mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 03:29:25 +01:00
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>
54 lines
2.0 KiB
TypeScript
54 lines
2.0 KiB
TypeScript
import {
|
|
IconArrowBigUpLines,
|
|
IconChartBar,
|
|
IconDashboard,
|
|
IconFolder,
|
|
IconGavel,
|
|
IconMapRoute,
|
|
IconSettings,
|
|
IconTerminal2,
|
|
IconWand,
|
|
IconZoom
|
|
} from '@tabler/icons-react'
|
|
import { usePage } from '@inertiajs/react'
|
|
import StyledSidebar from '~/components/StyledSidebar'
|
|
import { getServiceLink } from '~/lib/navigation'
|
|
import useServiceInstalledStatus from '~/hooks/useServiceInstalledStatus'
|
|
import { SERVICE_NAMES } from '../../constants/service_names'
|
|
|
|
export default function SettingsLayout({ children }: { children: React.ReactNode }) {
|
|
const { aiAssistantName } = usePage<{ aiAssistantName: string }>().props
|
|
const aiAssistantInstallStatus = useServiceInstalledStatus(SERVICE_NAMES.OLLAMA)
|
|
|
|
const navigation = [
|
|
...(aiAssistantInstallStatus.isInstalled ? [{ name: aiAssistantName, href: '/settings/models', icon: IconWand, current: false }] : []),
|
|
{ name: 'Apps', href: '/settings/apps', icon: IconTerminal2, current: false },
|
|
{ name: 'Benchmark', href: '/settings/benchmark', icon: IconChartBar, current: false },
|
|
{ name: 'Content Explorer', href: '/settings/zim/remote-explorer', icon: IconZoom, current: false },
|
|
{ name: 'Content Manager', href: '/settings/zim', icon: IconFolder, current: false },
|
|
{ name: 'Maps Manager', href: '/settings/maps', icon: IconMapRoute, current: false },
|
|
{
|
|
name: 'Service Logs & Metrics',
|
|
href: getServiceLink('9999'),
|
|
icon: IconDashboard,
|
|
current: false,
|
|
target: '_blank',
|
|
},
|
|
{
|
|
name: 'Check for Updates',
|
|
href: '/settings/update',
|
|
icon: IconArrowBigUpLines,
|
|
current: false,
|
|
},
|
|
{ name: 'System', href: '/settings/system', icon: IconSettings, current: false },
|
|
{ name: 'Legal Notices', href: '/settings/legal', icon: IconGavel, current: false },
|
|
]
|
|
|
|
return (
|
|
<div className="min-h-screen flex flex-row bg-surface-secondary/90">
|
|
<StyledSidebar title="Settings" items={navigation} />
|
|
{children}
|
|
</div>
|
|
)
|
|
}
|