chore: standardize security and quality foundations
Magent CI/CD / verify (push) Failing after 9m34s
Magent CI/CD / deploy-beta (push) Skipped

This commit is contained in:
2026-09-17 20:03:47 +12:00
parent 5639dbcb83
commit f852e7c941
127 changed files with 17928 additions and 10741 deletions
+31 -14
View File
@@ -1,18 +1,35 @@
'use client'
"use client";
import { usePathname, useRouter } from 'next/navigation'
import { CONFIG_GROUPS } from '../admin/configNavigation'
import { usePathname, useRouter } from "next/navigation";
import { CONFIG_GROUPS } from "../admin/configNavigation";
export default function SettingsNavigation() {
const pathname = usePathname()
const router = useRouter()
const current = CONFIG_GROUPS.flatMap((group) => group.items).find((item) => item.href === pathname)
if (pathname === '/admin') return null
return <nav className="settings-top-navigation" aria-label="Settings navigation">
<a href="/admin"> All settings</a>
<label><span>Jump to</span><select aria-label="Settings section" value={current?.href ?? '/admin'} onChange={(event) => router.push(event.target.value)}>
<option value="/admin">Settings overview</option>
{CONFIG_GROUPS.map((group) => <optgroup label={group.title} key={group.title}>{group.items.map((item) => <option key={item.href} value={item.href}>{item.label}</option>)}</optgroup>)}
</select></label>
</nav>
const pathname = usePathname();
const router = useRouter();
const current = CONFIG_GROUPS.flatMap((group) => group.items).find((item) => item.href === pathname);
if (pathname === "/admin") return null;
return (
<nav className="settings-top-navigation" aria-label="Settings navigation">
<a href="/admin"> All settings</a>
<label>
<span>Jump to</span>
<select
aria-label="Settings section"
value={current?.href ?? "/admin"}
onChange={(event) => router.push(event.target.value)}
>
<option value="/admin">Settings overview</option>
{CONFIG_GROUPS.map((group) => (
<optgroup label={group.title} key={group.title}>
{group.items.map((item) => (
<option key={item.href} value={item.href}>
{item.label}
</option>
))}
</optgroup>
))}
</select>
</label>
</nav>
);
}