style: fix formatting with Prettier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
SuperComboGamer
2025-12-21 20:31:57 -05:00
parent 584f5a3426
commit 8d578558ff
295 changed files with 9088 additions and 10546 deletions

View File

@@ -1,15 +1,8 @@
import { useState, useEffect, useCallback } from "react";
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { useSetupStore } from "@/store/setup-store";
import { getElectronAPI } from "@/lib/electron";
import { useState, useEffect, useCallback } from 'react';
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { useSetupStore } from '@/store/setup-store';
import { getElectronAPI } from '@/lib/electron';
import {
CheckCircle2,
Loader2,
@@ -21,9 +14,9 @@ import {
AlertTriangle,
Github,
XCircle,
} from "lucide-react";
import { toast } from "sonner";
import { StatusBadge } from "../components";
} from 'lucide-react';
import { toast } from 'sonner';
import { StatusBadge } from '../components';
interface GitHubSetupStepProps {
onNext: () => void;
@@ -31,11 +24,7 @@ interface GitHubSetupStepProps {
onSkip: () => void;
}
export function GitHubSetupStep({
onNext,
onBack,
onSkip,
}: GitHubSetupStepProps) {
export function GitHubSetupStep({ onNext, onBack, onSkip }: GitHubSetupStepProps) {
const { ghCliStatus, setGhCliStatus } = useSetupStore();
const [isChecking, setIsChecking] = useState(false);
@@ -57,7 +46,7 @@ export function GitHubSetupStep({
});
}
} catch (error) {
console.error("Failed to check gh status:", error);
console.error('Failed to check gh status:', error);
} finally {
setIsChecking(false);
}
@@ -69,7 +58,7 @@ export function GitHubSetupStep({
const copyCommand = (command: string) => {
navigator.clipboard.writeText(command);
toast.success("Command copied to clipboard");
toast.success('Command copied to clipboard');
};
const isReady = ghCliStatus?.installed && ghCliStatus?.authenticated;
@@ -93,12 +82,8 @@ export function GitHubSetupStep({
<div className="w-16 h-16 rounded-xl bg-zinc-800 flex items-center justify-center mx-auto mb-4">
<Github className="w-8 h-8 text-white" />
</div>
<h2 className="text-2xl font-bold text-foreground mb-2">
GitHub CLI Setup
</h2>
<p className="text-muted-foreground">
Optional - Used for creating pull requests
</p>
<h2 className="text-2xl font-bold text-foreground mb-2">GitHub CLI Setup</h2>
<p className="text-muted-foreground">Optional - Used for creating pull requests</p>
</div>
{/* Info Banner */}
@@ -107,13 +92,10 @@ export function GitHubSetupStep({
<div className="flex items-start gap-3">
<AlertTriangle className="w-5 h-5 text-amber-500 shrink-0 mt-0.5" />
<div>
<p className="font-medium text-foreground">
This step is optional
</p>
<p className="font-medium text-foreground">This step is optional</p>
<p className="text-sm text-muted-foreground mt-1">
The GitHub CLI allows you to create pull requests directly from
the app. Without it, you can still create PRs manually in your
browser.
The GitHub CLI allows you to create pull requests directly from the app. Without it,
you can still create PRs manually in your browser.
</p>
</div>
</div>
@@ -130,24 +112,17 @@ export function GitHubSetupStep({
</CardTitle>
<div className="flex items-center gap-2">
{getStatusBadge()}
<Button
variant="ghost"
size="sm"
onClick={checkStatus}
disabled={isChecking}
>
<RefreshCw
className={`w-4 h-4 ${isChecking ? "animate-spin" : ""}`}
/>
<Button variant="ghost" size="sm" onClick={checkStatus} disabled={isChecking}>
<RefreshCw className={`w-4 h-4 ${isChecking ? 'animate-spin' : ''}`} />
</Button>
</div>
</div>
<CardDescription>
{ghCliStatus?.installed
? ghCliStatus.authenticated
? `Logged in${ghCliStatus.user ? ` as ${ghCliStatus.user}` : ""}`
: "Installed but not logged in"
: "Not installed on your system"}
? `Logged in${ghCliStatus.user ? ` as ${ghCliStatus.user}` : ''}`
: 'Installed but not logged in'
: 'Not installed on your system'}
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
@@ -156,9 +131,7 @@ export function GitHubSetupStep({
<div className="flex items-center gap-3 p-4 rounded-lg bg-green-500/10 border border-green-500/20">
<CheckCircle2 className="w-5 h-5 text-green-500" />
<div>
<p className="font-medium text-foreground">
GitHub CLI is ready!
</p>
<p className="font-medium text-foreground">GitHub CLI is ready!</p>
<p className="text-sm text-muted-foreground">
You can create pull requests directly from the app.
{ghCliStatus?.version && (
@@ -175,9 +148,7 @@ export function GitHubSetupStep({
<div className="flex items-start gap-3 p-4 rounded-lg bg-muted/30 border border-border">
<XCircle className="w-5 h-5 text-muted-foreground shrink-0 mt-0.5" />
<div className="flex-1">
<p className="font-medium text-foreground">
GitHub CLI not found
</p>
<p className="font-medium text-foreground">GitHub CLI not found</p>
<p className="text-sm text-muted-foreground mt-1">
Install the GitHub CLI to enable PR creation from the app.
</p>
@@ -185,9 +156,7 @@ export function GitHubSetupStep({
</div>
<div className="space-y-3 p-4 rounded-lg bg-muted/30 border border-border">
<p className="font-medium text-foreground text-sm">
Installation Commands:
</p>
<p className="font-medium text-foreground text-sm">Installation Commands:</p>
<div className="space-y-2">
<p className="text-xs text-muted-foreground">macOS (Homebrew)</p>
@@ -198,7 +167,7 @@ export function GitHubSetupStep({
<Button
variant="ghost"
size="icon"
onClick={() => copyCommand("brew install gh")}
onClick={() => copyCommand('brew install gh')}
>
<Copy className="w-4 h-4" />
</Button>
@@ -214,7 +183,7 @@ export function GitHubSetupStep({
<Button
variant="ghost"
size="icon"
onClick={() => copyCommand("winget install GitHub.cli")}
onClick={() => copyCommand('winget install GitHub.cli')}
>
<Copy className="w-4 h-4" />
</Button>
@@ -230,7 +199,7 @@ export function GitHubSetupStep({
<Button
variant="ghost"
size="icon"
onClick={() => copyCommand("sudo apt install gh")}
onClick={() => copyCommand('sudo apt install gh')}
>
<Copy className="w-4 h-4" />
</Button>
@@ -256,9 +225,7 @@ export function GitHubSetupStep({
<div className="flex items-start gap-3 p-4 rounded-lg bg-amber-500/10 border border-amber-500/20">
<AlertTriangle className="w-5 h-5 text-amber-500 shrink-0 mt-0.5" />
<div className="flex-1">
<p className="font-medium text-foreground">
GitHub CLI not logged in
</p>
<p className="font-medium text-foreground">GitHub CLI not logged in</p>
<p className="text-sm text-muted-foreground mt-1">
Run the login command to authenticate with GitHub.
</p>
@@ -266,18 +233,12 @@ export function GitHubSetupStep({
</div>
<div className="space-y-2 p-4 rounded-lg bg-muted/30 border border-border">
<p className="text-sm text-muted-foreground">
Run this command in your terminal:
</p>
<p className="text-sm text-muted-foreground">Run this command in your terminal:</p>
<div className="flex items-center gap-2">
<code className="flex-1 bg-muted px-3 py-2 rounded text-sm font-mono text-foreground">
gh auth login
</code>
<Button
variant="ghost"
size="icon"
onClick={() => copyCommand("gh auth login")}
>
<Button variant="ghost" size="icon" onClick={() => copyCommand('gh auth login')}>
<Copy className="w-4 h-4" />
</Button>
</div>
@@ -290,9 +251,7 @@ export function GitHubSetupStep({
<div className="flex items-center gap-3 p-4 rounded-lg bg-blue-500/10 border border-blue-500/20">
<Loader2 className="w-5 h-5 text-blue-500 animate-spin" />
<div>
<p className="font-medium text-foreground">
Checking GitHub CLI status...
</p>
<p className="font-medium text-foreground">Checking GitHub CLI status...</p>
</div>
</div>
)}
@@ -301,28 +260,20 @@ export function GitHubSetupStep({
{/* Navigation */}
<div className="flex justify-between pt-4">
<Button
variant="ghost"
onClick={onBack}
className="text-muted-foreground"
>
<Button variant="ghost" onClick={onBack} className="text-muted-foreground">
<ArrowLeft className="w-4 h-4 mr-2" />
Back
</Button>
<div className="flex gap-2">
<Button
variant="ghost"
onClick={onSkip}
className="text-muted-foreground"
>
{isReady ? "Skip" : "Skip for now"}
<Button variant="ghost" onClick={onSkip} className="text-muted-foreground">
{isReady ? 'Skip' : 'Skip for now'}
</Button>
<Button
onClick={onNext}
className="bg-brand-500 hover:bg-brand-600 text-white"
data-testid="github-next-button"
>
{isReady ? "Continue" : "Continue without GitHub CLI"}
{isReady ? 'Continue' : 'Continue without GitHub CLI'}
<ArrowRight className="w-4 h-4 ml-2" />
</Button>
</div>