project-nomad/admin/inertia/pages/easy-setup/complete.tsx
Chris Sherwood e8d775dfe4 feat(UI): add Night Ops dark mode with theme toggle
Add a warm charcoal dark mode ("Night Ops") using CSS variable swapping
under [data-theme="dark"]. All 23 desert palette variables are overridden
with dark-mode counterparts, and ~313 generic Tailwind classes (bg-white,
text-gray-*, border-gray-*) are replaced with semantic tokens.

Infrastructure:
- CSS variable overrides in app.css for both themes
- ThemeProvider + useTheme hook (localStorage + KV store sync)
- ThemeToggle component (moon/sun icons, "Night Ops"/"Day Ops" labels)
- FOUC prevention script in inertia_layout.edge
- Toggle placed in StyledSidebar and Footer for access on every page

Color replacements across 50 files:
- bg-white → bg-surface-primary
- bg-gray-50/100 → bg-surface-secondary
- text-gray-900/800 → text-text-primary
- text-gray-600/500 → text-text-secondary/text-text-muted
- border-gray-200/300 → border-border-subtle/border-border-default
- text-desert-white → text-white (fixes invisible text on colored bg)
- Button hover/active states use dedicated btn-green-hover/active vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 09:17:05 -07:00

54 lines
2.2 KiB
TypeScript

import { Head, router } from '@inertiajs/react'
import AppLayout from '~/layouts/AppLayout'
import StyledButton from '~/components/StyledButton'
import Alert from '~/components/Alert'
import useInternetStatus from '~/hooks/useInternetStatus'
import useServiceInstallationActivity from '~/hooks/useServiceInstallationActivity'
import InstallActivityFeed from '~/components/InstallActivityFeed'
import ActiveDownloads from '~/components/ActiveDownloads'
import StyledSectionHeader from '~/components/StyledSectionHeader'
export default function EasySetupWizardComplete() {
const { isOnline } = useInternetStatus()
const installActivity = useServiceInstallationActivity()
return (
<AppLayout>
<Head title="Easy Setup Wizard Complete" />
{!isOnline && (
<Alert
title="No Internet Connection"
message="It looks like you're not connected to the internet. Installing apps and downloading content will require an internet connection."
type="warning"
variant="solid"
className="mb-8"
/>
)}
<div className="max-w-7xl mx-auto px-4 py-8">
<div className="bg-surface-primary rounded-md shadow-md p-6">
<StyledSectionHeader title="App Installation Activity" className=" mb-4" />
<InstallActivityFeed
activity={installActivity}
className="!shadow-none border-desert-stone-light border"
/>
<ActiveDownloads withHeader />
<Alert
title="Running in the Background"
message='Feel free to leave this page at any time - your app installs and downloads will continue in the background! Please note, the Information Library (if installed) may be unavailable until all initial downloads complete.'
type="info"
variant="solid"
className='mt-12'
/>
<div className="flex justify-center mt-8 pt-4 border-t border-desert-stone-light">
<div className="flex space-x-4">
<StyledButton onClick={() => router.visit('/home')} icon="IconHome">
Go to Home
</StyledButton>
</div>
</div>
</div>
</div>
</AppLayout>
)
}