feat: rebranded from vpn-router to linux-manager.

This commit is contained in:
slawek committed 2026-11-22 09:51:07 +01:00
1 parent 8efe21bfa6
commit 85a1ffa21f
238 files changed
+5010 -3761

No files matched your search

+8 -5
View File
@@ -31,12 +31,12 @@ export const DOCKER_PATH = '/docker-manager'
/** The path of the Web Sites page: the sites Caddy serves, their files and the name server. */
export const SITES_PATH = '/sites-manager'
/** The path of the shell page: a login shell on the router, opened with the shell button of the header, not the menu. */
/** The path of the shell page: a login shell on the server, opened with the shell button of the header, not the menu. */
export const SHELL_PATH = '/shell'
/** The pages of an administrator in the menu: path, label and icon. */
const PAGES: { path: string; label: string; icon: ReactNode }[] = [
{ path: '/', label: 'Router', icon: <Router fontSize="small" /> },
{ path: '/', label: 'Server', icon: <Router fontSize="small" /> },
{ path: USERS_PATH, label: 'Identities', icon: <People fontSize="small" /> },
{ path: SITE_TO_SITE_PATH, label: 'Connectivity', icon: <Hub fontSize="small" /> },
{ path: REMOTE_ACCESS_PATH, label: 'Remote Access', icon: <VpnKey fontSize="small" /> },
@@ -45,8 +45,11 @@ const PAGES: { path: string; label: string; icon: ReactNode }[] = [
{ path: DOCKER_PATH, label: 'Docker', icon: <ViewInAr fontSize="small" /> },
]
/** A button naming the page shown, or Pages on the account and the shell page, whose menu opens the pages of an administrator. */
export default function PageMenu(props: { path: string }) {
/**
* A button naming the page shown, or Pages on the account and the shell page, whose menu opens the pages of an
* administrator but those of hidden, the pages of a component switched off.
*/
export default function PageMenu(props: { path: string; hidden: string[] }) {
const [anchor, setAnchor] = useState<HTMLElement | null>(null)
const current = PAGES.find((page) => page.path === props.path) ?? { path: props.path, label: 'Pages', icon: <MenuIcon fontSize="small" /> }
return (
@@ -63,7 +66,7 @@ export default function PageMenu(props: { path: string }) {
{current.label}
</Button>
<Menu anchorEl={anchor} open={anchor !== null} onClose={() => setAnchor(null)}>
{PAGES.map((page) => (
{PAGES.filter((page) => !props.hidden.includes(page.path)).map((page) => (
<MenuItem key={page.path} component="a" href={page.path} selected={page.path === current.path}>
<ListItemIcon>{page.icon}</ListItemIcon>
<ListItemText>{page.label}</ListItemText>