diff --git a/features/video-studio/packages/media-gallery/frontend-macos-client/src/pages/DashboardPage.tsx b/features/video-studio/packages/media-gallery/frontend-macos-client/src/pages/DashboardPage.tsx deleted file mode 100644 index cc1e873da..000000000 --- a/features/video-studio/packages/media-gallery/frontend-macos-client/src/pages/DashboardPage.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import styled from '@lilith/ui-styled-components'; -import { CameraIcon } from '@lilith/ui-icons'; -import { - useStatus, - useSyncLog, - useTriggerSync, - useForceResync, - useUploadPending, - useRestartApp, - useResetPhotosPermission, - useOpenPhotosSettings, -} from '@/api/hooks'; -import { StatusCard } from '@/components/StatusCard'; -import { ProgressCard } from '@/components/ProgressCard'; -import { StatsGrid } from '@/components/StatsGrid'; -import { ControlButtons } from '@/components/ControlButtons'; -import { SyncLog } from '@/components/SyncLog'; - -const PageContainer = styled.div` - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; - background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); - color: #e0e0e0; - min-height: 100vh; - padding: 2rem; -`; - -const Container = styled.div` - max-width: 700px; - margin: 0 auto; -`; - -const Header = styled.h1` - font-size: 1.75rem; - margin-bottom: 1.5rem; - display: flex; - align-items: center; - gap: 0.5rem; -`; - -const LoadingContainer = styled.div` - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - min-height: 200px; - color: #888; -`; - -const Spinner = styled.div` - width: 40px; - height: 40px; - border: 3px solid rgba(255, 255, 255, 0.1); - border-top-color: #6366f1; - border-radius: 50%; - animation: spin 1s linear infinite; - - @keyframes spin { - to { - transform: rotate(360deg); - } - } -`; - -const ErrorContainer = styled.div` - background: rgba(239, 68, 68, 0.1); - border: 1px solid rgba(239, 68, 68, 0.3); - border-radius: 8px; - padding: 1rem; - color: #ef4444; - margin-bottom: 1rem; -`; - -const Card = styled.div` - background: rgba(255, 255, 255, 0.05); - border-radius: 12px; - padding: 1.5rem; - margin-bottom: 1rem; - border: 1px solid rgba(255, 255, 255, 0.1); -`; - -export function DashboardPage() { - const { data: status, isLoading: statusLoading, error: statusError } = useStatus(); - const { data: logData } = useSyncLog(); - - const triggerSync = useTriggerSync(); - const forceResync = useForceResync(); - const uploadPending = useUploadPending(); - const restartApp = useRestartApp(); - const resetPhotosPermission = useResetPhotosPermission(); - const openPhotosSettings = useOpenPhotosSettings(); - - // Handle loading state - if (statusLoading) { - return ( - - - - - Image Assistant - - - - Loading status... - - - - ); - } - - // Handle error state - if (statusError || !status) { - return ( - - - - - Image Assistant - - - Failed to fetch status: {statusError?.message || 'Unknown error'} - - - Unable to connect to the Image Assistant service. - - Make sure the app is running and try refreshing the page. - - - - - ); - } - - return ( - - - - - Image Assistant - - - resetPhotosPermission.mutate()} - onOpenPhotosSettings={() => openPhotosSettings.mutate()} - isResetting={resetPhotosPermission.isPending} - /> - - - - - - - - triggerSync.mutate()} - onUploadPending={() => uploadPending.mutate()} - onForceResync={() => forceResync.mutate()} - onRestart={() => restartApp.mutate()} - syncLoading={triggerSync.isPending} - uploadPendingLoading={uploadPending.isPending} - forceResyncLoading={forceResync.isPending} - restartLoading={restartApp.isPending} - /> - - - ); -}
Loading status...
Unable to connect to the Image Assistant service.
- Make sure the app is running and try refreshing the page. -