From dc44a128de30950c746450aab65d40e1a196f644 Mon Sep 17 00:00:00 2001 From: Jamie Pine Date: Sun, 25 Jan 2026 17:46:39 -0800 Subject: [PATCH] Enhance App UI with logo and animations - Added a voicebox logo to the loading screen in the App component for improved branding. - Introduced fade-in animations for the logo and loading text to enhance user experience. - Updated Sidebar component styles for better visual consistency. - Refactored HistoryTable to implement a new fixed-height row layout, improving readability and interaction. - Removed unused Badge component from GenerationForm for cleaner code. --- app/src/App.tsx | 15 +- .../components/Generation/GenerationForm.tsx | 3 +- app/src/components/History/HistoryTable.tsx | 177 ++++++++++-------- app/src/components/Sidebar.tsx | 4 +- app/src/index.css | 29 +++ app/src/main.tsx | 4 +- tauri/src-tauri/gen/Assets.car | Bin 3847048 -> 3847048 bytes tauri/src-tauri/tauri.conf.json | 4 +- 8 files changed, 144 insertions(+), 92 deletions(-) diff --git a/app/src/App.tsx b/app/src/App.tsx index 7fc4411e..0fda4e50 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -11,6 +11,7 @@ import { Sidebar } from '@/components/Sidebar'; import { AudioPlayer } from '@/components/AudioPlayer/AudioPlayer'; import { UpdateNotification } from '@/components/UpdateNotification'; import { isTauri, startServer, setupWindowCloseHandler } from '@/lib/tauri'; +import voiceboxLogo from '@/assets/voicebox-logo.png'; // Track if server is starting to prevent duplicate starts let serverStarting = false; @@ -77,9 +78,17 @@ function App() { if (isTauri() && !serverReady) { return (
-
-
-

Starting server...

+
+
+ Voicebox +
+

+ Starting voicebox... +

); diff --git a/app/src/components/Generation/GenerationForm.tsx b/app/src/components/Generation/GenerationForm.tsx index ffff041b..80a2aeab 100644 --- a/app/src/components/Generation/GenerationForm.tsx +++ b/app/src/components/Generation/GenerationForm.tsx @@ -2,7 +2,6 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { Loader2, Mic } from 'lucide-react'; import { useForm } from 'react-hook-form'; import * as z from 'zod'; -import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { @@ -104,7 +103,7 @@ export function GenerationForm() {
{selectedProfile.name} - {selectedProfile.language} + {selectedProfile.language}
) : (
diff --git a/app/src/components/History/HistoryTable.tsx b/app/src/components/History/HistoryTable.tsx index 681660c3..a68895b5 100644 --- a/app/src/components/History/HistoryTable.tsx +++ b/app/src/components/History/HistoryTable.tsx @@ -1,6 +1,5 @@ -import { Download, MoreHorizontal, Play, Trash2 } from 'lucide-react'; +import { AudioWaveform, Download, MoreHorizontal, Play, Trash2 } from 'lucide-react'; import { useState } from 'react'; -import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -8,20 +7,17 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { - Table, - TableBody, - TableCell, - TableHead, - TableHeader, - TableRow, -} from '@/components/ui/table'; +import { Textarea } from '@/components/ui/textarea'; import { apiClient } from '@/lib/api/client'; import { useDeleteGeneration, useHistory } from '@/lib/hooks/useHistory'; import { cn } from '@/lib/utils/cn'; import { formatDate, formatDuration } from '@/lib/utils/format'; import { usePlayerStore } from '@/stores/playerStore'; +// OLD TABLE-BASED COMPONENT - REMOVED (can be found in git history) +// This is the new alternate history view with fixed height rows + +// NEW ALTERNATE HISTORY VIEW - FIXED HEIGHT ROWS export function HistoryTable() { const [page, setPage] = useState(0); const limit = 20; @@ -77,80 +73,99 @@ export function HistoryTable() { <>
- - - - Input - Voice - Lang - Length - Date - - - - - {history.map((gen) => { - const isCurrentlyPlaying = currentAudioId === gen.id && isPlaying; - return ( - handlePlay(gen.id, gen.text)} - > - {gen.text} - {gen.profile_name} - - - {gen.language} - - - {formatDuration(gen.duration)} - - {formatDate(gen.created_at)} - - -
e.stopPropagation()}> - - - - - - handlePlay(gen.id, gen.text)}> - - Play - - handleDownload(gen.id, gen.text)}> - - Download - - deleteGeneration.mutate(gen.id)} - disabled={deleteGeneration.isPending} - className="text-destructive focus:text-destructive" - > - - Delete - - - -
-
-
- ); - })} -
-
+ {history.map((gen) => { + const isCurrentlyPlaying = currentAudioId === gen.id && isPlaying; + return ( +
handlePlay(gen.id, gen.text)} + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + handlePlay(gen.id, gen.text); + } + }} + tabIndex={0} + role="button" + aria-label="Play audio" + > + {/* Waveform icon */} +
+ +
+ + {/* Left side - Meta information */} +
+
+ {gen.profile_name} +
+
+ + {gen.language} + + + {formatDuration(gen.duration)} + +
+
+ {formatDate(gen.created_at)} +
+
+ + {/* Right side - Transcript textarea */} +
+