mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 19:49:25 +01:00
Add a "Debug Info" link to the footer and settings sidebar that opens a modal with non-sensitive system information (version, OS, hardware, GPU, installed services, internet status, update availability). Users can copy the formatted text and paste it into GitHub issues. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import { useState } from 'react'
|
|
import { usePage } from '@inertiajs/react'
|
|
import { UsePageProps } from '../../types/system'
|
|
import ThemeToggle from '~/components/ThemeToggle'
|
|
import { IconBug } from '@tabler/icons-react'
|
|
import DebugInfoModal from './DebugInfoModal'
|
|
|
|
export default function Footer() {
|
|
const { appVersion } = usePage().props as unknown as UsePageProps
|
|
const [debugModalOpen, setDebugModalOpen] = useState(false)
|
|
|
|
return (
|
|
<footer>
|
|
<div className="flex items-center justify-center gap-3 border-t border-border-subtle py-4">
|
|
<p className="text-sm/6 text-text-secondary">
|
|
Project N.O.M.A.D. Command Center v{appVersion}
|
|
</p>
|
|
<span className="text-gray-300">|</span>
|
|
<button
|
|
onClick={() => setDebugModalOpen(true)}
|
|
className="text-sm/6 text-gray-500 hover:text-desert-green flex items-center gap-1 cursor-pointer"
|
|
>
|
|
<IconBug className="size-3.5" />
|
|
Debug Info
|
|
</button>
|
|
<ThemeToggle />
|
|
</div>
|
|
<DebugInfoModal open={debugModalOpen} onClose={() => setDebugModalOpen(false)} />
|
|
</footer>
|
|
)
|
|
}
|