From 8b67faf96d89de745b22840a217ed6d81ef668e6 Mon Sep 17 00:00:00 2001 From: Jamie Pine Date: Mon, 26 Jan 2026 19:22:43 -0800 Subject: [PATCH] Enhance update status display and audio sample components - Improved the UpdateStatus component to show download progress and total bytes downloaded during updates. - Refactored AudioSampleRecording and AudioSampleSystem components for cleaner button rendering and consistent layout. - Updated import order in SampleUpload component for better organization. --- .../ServerSettings/UpdateStatus.tsx | 20 +++++++-- .../VoiceProfiles/AudioSampleRecording.tsx | 20 ++------- .../VoiceProfiles/AudioSampleSystem.tsx | 20 ++------- .../components/VoiceProfiles/SampleUpload.tsx | 4 +- app/src/hooks/useAutoUpdater.ts | 41 +++++++++++++++---- 5 files changed, 60 insertions(+), 45 deletions(-) diff --git a/app/src/components/ServerSettings/UpdateStatus.tsx b/app/src/components/ServerSettings/UpdateStatus.tsx index 7e1e160d..31e4640b 100644 --- a/app/src/components/ServerSettings/UpdateStatus.tsx +++ b/app/src/components/ServerSettings/UpdateStatus.tsx @@ -71,11 +71,23 @@ export function UpdateStatus() { {status.downloading && (
-
- - Downloading update... +
+
+ + Downloading update... +
+ {status.downloadProgress !== undefined && ( + + {status.downloadProgress}% + + )}
- + + {status.downloadedBytes !== undefined && status.totalBytes !== undefined && status.totalBytes > 0 && ( +
+ {(status.downloadedBytes / 1024 / 1024).toFixed(1)} MB / {(status.totalBytes / 1024 / 1024).toFixed(1)} MB +
+ )}
)} diff --git a/app/src/components/VoiceProfiles/AudioSampleRecording.tsx b/app/src/components/VoiceProfiles/AudioSampleRecording.tsx index 34c3c372..9c7c9b62 100644 --- a/app/src/components/VoiceProfiles/AudioSampleRecording.tsx +++ b/app/src/components/VoiceProfiles/AudioSampleRecording.tsx @@ -1,4 +1,4 @@ -import { Mic, Square, Play, Pause } from 'lucide-react'; +import { Mic, Pause, Play, Square } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { FormControl, FormItem, FormLabel, FormMessage } from '@/components/ui/form'; import { formatAudioDuration } from '@/lib/utils/audio'; @@ -35,12 +35,7 @@ export function AudioSampleRecording({
{!isRecording && !file && (
- @@ -81,16 +76,9 @@ export function AudioSampleRecording({ Recording complete
-

- File: {file.name} -

+

File: {file.name}

- @@ -81,16 +76,9 @@ export function AudioSampleSystem({ Capture complete
-

- File: {file.name} -

+

File: {file.name}

-