refactor: split large files into single-responsibility modules, add server-configuration section

Frontend:
- Extract Layout.tsx (801 lines) into navData.ts, Sidebar.tsx, and thin Layout.tsx
- Split Settings.tsx into settings/FormControls, ContactTab, BasicTab, NameserversSection
- Add server-configuration/ section with index card grid and one file per tool (13 tools)
- Add shared SectionCard and ComingSoon components
- Nav category headers with a section index link (optional `to` field on NavCategory)
- /settings redirects to /server-configuration/basic-setup

Backend:
- Split accounts.ts (671 lines) into accounts/list, create, modify, status sub-plugins
- Add GET /api/nixserver/system/network-interfaces for ETHDEV dropdown

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
NixReaper
2026-04-11 18:07:57 -05:00
co-authored by Claude Sonnet 4.6
parent da55367039
commit c5498994c3
33 changed files with 2299 additions and 1469 deletions
+14
View File
@@ -99,6 +99,20 @@ export default async function systemRoutes(fastify: FastifyInstance) {
})
})
// GET /api/nixserver/system/network-interfaces
fastify.get('/network-interfaces', { preHandler: [requireAdmin] }, async (_request, reply) => {
try {
const result = await exec('ls', ['/sys/class/net'])
const ifaces = result.stdout
.split('\n')
.map(s => s.trim())
.filter(s => s && s !== 'lo') // exclude loopback
return reply.send({ success: true, data: ifaces })
} catch {
return reply.send({ success: true, data: [] })
}
})
// GET /api/nixserver/system/settings
fastify.get('/settings', { preHandler: [requireAdmin] }, async (request, reply) => {
const settings = await prisma.setting.findMany({ orderBy: { key: 'asc' } })