headplane/app/routes.ts

38 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-12-31 10:30:14 +05:30
import { index, layout, prefix, route } from '@react-router/dev/routes';
2024-12-08 13:27:51 -05:00
export default [
// Utility Routes
2024-12-08 13:52:02 -05:00
index('routes/util/redirect.ts'),
route('/healthz', 'routes/util/healthz.ts'),
2024-12-08 13:27:51 -05:00
// Authentication Routes
route('/login', 'routes/auth/login.tsx'),
route('/logout', 'routes/auth/logout.ts'),
route('/oidc/callback', 'routes/auth/oidc-callback.ts'),
route('/oidc/start', 'routes/auth/oidc-start.ts'),
2024-12-08 13:27:51 -05:00
// API
route('/api/agent', 'routes/api/agent.ts'),
2024-12-08 13:27:51 -05:00
// All the main logged-in dashboard routes
// Double nested to separate error propagations
layout('layouts/shell.tsx', [
layout('layouts/dashboard.tsx', [
...prefix('/machines', [
index('routes/machines/overview.tsx'),
route('/:id', 'routes/machines/machine.tsx'),
]),
2024-12-08 13:52:02 -05:00
route('/users', 'routes/users/overview.tsx'),
route('/acls', 'routes/acls/editor.tsx'),
route('/dns', 'routes/dns/overview.tsx'),
2024-12-08 13:52:02 -05:00
...prefix('/settings', [
index('routes/settings/overview.tsx'),
route('/auth-keys', 'routes/settings/auth-keys.tsx'),
2025-01-18 07:37:03 +00:00
// route('/local-agent', 'routes/settings/local-agent.tsx'),
]),
2024-12-08 13:27:51 -05:00
]),
2024-12-31 10:30:14 +05:30
]),
];