Tidy beta landing page and qBittorrent status
Magent CI/CD / verify (push) Successful in 11m0s
Magent CI/CD / deploy-prod (push) Has been skipped
Magent CI/CD / deploy-beta (push) Successful in 15s

This commit is contained in:
2026-06-21 12:06:38 +12:00
parent e6b4f99ea7
commit e163920e21
5 changed files with 217 additions and 82 deletions
+28 -17
View File
@@ -38,41 +38,52 @@ export default function HeaderActions() {
return null
}
const roleItems =
role === null
? []
: role === 'admin'
? [
{
href: '/admin',
label: 'Config',
match: (path: string) => path.startsWith('/admin'),
},
]
: [
{
href: '/profile',
label: 'Profile',
match: (path: string) => path.startsWith('/profile') && !path.startsWith('/profile/invites'),
},
{
href: '/profile/invites',
label: 'Invites',
match: (path: string) => path.startsWith('/profile/invites'),
},
]
const items = [
{ href: '/', label: 'Health', icon: '01', match: (path: string) => path === '/' },
{ href: '/', label: 'Health', match: (path: string) => path === '/' },
{
href: '/portal/requests',
label: 'Requests',
icon: '02',
match: (path: string) => path === '/portal/requests' || path.startsWith('/requests/'),
},
{
href: '/portal/issues',
label: 'Issues',
icon: '03',
match: (path: string) => path === '/portal/issues' || path === '/admin/issues',
},
{
href: role === 'admin' ? '/users' : '/profile',
label: role === 'admin' ? 'Users' : 'Profile',
icon: '04',
match: (path: string) => path.startsWith('/users') || path.startsWith('/profile'),
},
{
href: role === 'admin' ? '/admin' : '/profile/invites',
label: role === 'admin' ? 'Config' : 'Invites',
icon: '05',
match: (path: string) => path.startsWith('/admin') || path.startsWith('/profile/invites'),
},
...roleItems,
]
return (
<nav className="header-actions" aria-label="Primary">
{items.map((item) => {
{items.map((item, index) => {
const active = item.match(pathname)
return (
<a key={item.href} href={item.href} className={active ? 'is-active' : undefined}>
<span aria-hidden="true">{item.icon}</span>
<span aria-hidden="true">{String(index + 1).padStart(2, '0')}</span>
{item.label}
</a>
)