The open-source AI voice studio. Clone, dictate, create.
Remove CheckCircle2 icon from various components for a cleaner UI
Jamie Pinecb44377b096d
diff --git a/app/src/components/ServerSettings/ConnectionForm.tsx b/app/src/components/ServerSettings/ConnectionForm.tsxindex fe1d7137..cc1e2d1d 100644--- a/app/src/components/ServerSettings/ConnectionForm.tsx+++ b/app/src/components/ServerSettings/ConnectionForm.tsx@@ -14,10 +14,11 @@ import {FormMessage,} from '@/components/ui/form';import { Input } from '@/components/ui/input';-import { Checkbox } from '@/components/ui/checkbox';import { useToast } from '@/components/ui/use-toast';import { useServerStore } from '@/stores/serverStore';import { setKeepServerRunning } from '@/lib/tauri';+import { Check } from 'lucide-react';+import { cn } from '@/lib/utils/cn';const connectionSchema = z.object({serverUrl: z.string().url('Please enter a valid URL'),@@ -83,36 +84,41 @@ export function ConnectionForm() {</Form><div className="mt-6 pt-6 border-t">- <div className="flex items-start space-x-3">- <Checkbox- id="keepServerRunning"- checked={keepServerRunningOnClose}- onCheckedChange={(checked: boolean) => {- setKeepServerRunningOnClose(checked);- setKeepServerRunning(checked).catch((error) => {- console.error('Failed to sync setting to Rust:', error);- });- toast({- title: 'Setting updated',- description: checked- ? 'Server will continue running when app closes'- : 'Server will stop when app closes',- });- }}- />+ <button+ type="button"+ onClick={() => {+ const newValue = !keepServerRunningOnClose;+ setKeepServerRunningOnClose(newValue);+ setKeepServerRunning(newValue).catch((error) => {+ console.error('Failed to sync setting to Rust:', error);+ });+ toast({+ title: 'Setting updated',+ description: newValue+ ? 'Server will continue running when app closes'+ : 'Server will stop when app closes',+ });+ }}+ className="flex items-start gap-3 text-left w-full"+ >+ <div+ className={cn(+ 'h-4 w-4 rounded border-2 flex items-center justify-center shrink-0 mt-0.5',+ keepServerRunningOnClose ? 'bg-accent border-accent' : 'border-muted-foreground/30',+ )}+ >+ {keepServerRunningOnClose && <Check className="h-3 w-3 text-accent-foreground" />}+ </div><div className="space-y-1">- <label- htmlFor="keepServerRunning"- className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer"- >+ <div className="text-sm font-medium leading-none">Keep server running when app closes- </label>+ </div><p className="text-sm text-muted-foreground">When enabled, the server will continue running in the background after closing theapp. Disabled by default.</p></div>- </div>+ </button></div></CardContent></Card>diff --git a/app/src/components/ServerSettings/ModelManagement.tsx b/app/src/components/ServerSettings/ModelManagement.tsxindex 2b6f4e67..776d5077 100644--- a/app/src/components/ServerSettings/ModelManagement.tsx+++ b/app/src/components/ServerSettings/ModelManagement.tsx@@ -1,5 +1,5 @@import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';-import { CheckCircle2, Download, Loader2, Trash2 } from 'lucide-react';+import { Download, Loader2, Trash2 } from 'lucide-react';import { useState } from 'react';import {AlertDialog,@@ -271,7 +271,6 @@ function ModelItem({ model, onDownload, onDelete, isDownloading, formatSize }: M{model.downloaded ? (<div className="flex items-center gap-2"><div className="flex items-center gap-1 text-sm text-muted-foreground">- <CheckCircle2 className="h-4 w-4 text-accent" /><span>Ready</span></div><Buttondiff --git a/app/src/components/ServerSettings/ModelProgress.tsx b/app/src/components/ServerSettings/ModelProgress.tsxindex 9bcabb60..4f651a7f 100644--- a/app/src/components/ServerSettings/ModelProgress.tsx+++ b/app/src/components/ServerSettings/ModelProgress.tsx@@ -3,7 +3,7 @@ import { Progress } from '@/components/ui/progress';import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';import { useServerStore } from '@/stores/serverStore';import type { ModelProgress as ModelProgressType } from '@/lib/api/types';-import { Loader2, CheckCircle2, XCircle } from 'lucide-react';+import { Loader2, XCircle } from 'lucide-react';interface ModelProgressProps {modelName: string;@@ -68,8 +68,6 @@ export function ModelProgress({ modelName, displayName }: ModelProgressProps) {const getStatusIcon = () => {switch (progress.status) {- case 'complete':- return <CheckCircle2 className="h-4 w-4 text-green-500" />;case 'error':return <XCircle className="h-4 w-4 text-destructive" />;case 'downloading':diff --git a/app/src/components/ServerSettings/ServerStatus.tsx b/app/src/components/ServerSettings/ServerStatus.tsxindex ef965f82..02a94ec2 100644--- a/app/src/components/ServerSettings/ServerStatus.tsx+++ b/app/src/components/ServerSettings/ServerStatus.tsx@@ -1,4 +1,4 @@-import { CheckCircle2, Loader2, XCircle } from 'lucide-react';+import { Loader2, XCircle } from 'lucide-react';import { Badge } from '@/components/ui/badge';import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';import { useServerHealth } from '@/lib/hooks/useServer';@@ -43,7 +43,6 @@ export function ServerStatus() {) : health ? (<div className="space-y-2"><div className="flex items-center gap-2">- <CheckCircle2 className="h-4 w-4 text-green-500" /><span className="text-sm">Connected</span></div><div className="flex flex-wrap gap-2">diff --git a/app/src/components/ServerSettings/UpdateStatus.tsx b/app/src/components/ServerSettings/UpdateStatus.tsxindex 475aabc6..d0d122e4 100644--- a/app/src/components/ServerSettings/UpdateStatus.tsx+++ b/app/src/components/ServerSettings/UpdateStatus.tsx@@ -1,5 +1,5 @@import { useState, useEffect } from 'react';-import { RefreshCw, Download, CheckCircle2, AlertCircle } from 'lucide-react';+import { RefreshCw, Download, AlertCircle } from 'lucide-react';import { Button } from '@/components/ui/button';import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';import { Badge } from '@/components/ui/badge';@@ -94,7 +94,6 @@ export function UpdateStatus() {{status.readyToInstall && (<div className="space-y-3 p-4 border rounded-lg bg-green-500/10 border-green-500/20"><div className="flex items-center gap-2">- <CheckCircle2 className="h-5 w-5 text-green-500" /><div><div className="font-semibold">Update Ready to Install</div><div className="text-sm text-muted-foreground">Version {status.version} has been downloaded</div>@@ -112,7 +111,6 @@ export function UpdateStatus() {{!status.available && !status.checking && !status.error && status.checking === false && (<div className="flex items-center gap-2 text-sm text-muted-foreground">- <CheckCircle2 className="h-4 w-4 text-green-500" />You're up to date</div>)}