mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-13 17:05:47 +01:00
✨ Add correct page routing
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
Alert,
|
|
||||||
AppShell,
|
AppShell,
|
||||||
Avatar,
|
Avatar,
|
||||||
Box,
|
|
||||||
Flex,
|
Flex,
|
||||||
Footer,
|
Footer,
|
||||||
Group,
|
Group,
|
||||||
@@ -17,8 +15,6 @@ import {
|
|||||||
UnstyledButton,
|
UnstyledButton,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import {
|
import {
|
||||||
IconAdjustmentsAlt,
|
|
||||||
IconAlertTriangle,
|
|
||||||
IconBook2,
|
IconBook2,
|
||||||
IconBrandDiscord,
|
IconBrandDiscord,
|
||||||
IconBrandGithub,
|
IconBrandGithub,
|
||||||
@@ -31,6 +27,7 @@ import {
|
|||||||
IconSun,
|
IconSun,
|
||||||
IconUser,
|
IconUser,
|
||||||
IconUserSearch,
|
IconUserSearch,
|
||||||
|
IconUsers,
|
||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import { signOut } from 'next-auth/react';
|
import { signOut } from 'next-auth/react';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
@@ -66,7 +63,7 @@ export const MainLayout = ({ children }: MainLayoutProps) => {
|
|||||||
}
|
}
|
||||||
label="Home"
|
label="Home"
|
||||||
component={Link}
|
component={Link}
|
||||||
href="/admin/users"
|
href="/manage/"
|
||||||
/>
|
/>
|
||||||
<NavLink
|
<NavLink
|
||||||
label="Users"
|
label="Users"
|
||||||
@@ -77,16 +74,16 @@ export const MainLayout = ({ children }: MainLayoutProps) => {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<NavLink
|
<NavLink
|
||||||
icon={<IconAdjustmentsAlt size="1rem" />}
|
icon={<IconUsers size="1rem" />}
|
||||||
label="Manage"
|
label="Manage"
|
||||||
component={Link}
|
component={Link}
|
||||||
href="/admin/users"
|
href="/manage/users"
|
||||||
/>
|
/>
|
||||||
<NavLink
|
<NavLink
|
||||||
icon={<IconMailForward size="1rem" />}
|
icon={<IconMailForward size="1rem" />}
|
||||||
label="Invites"
|
label="Invites"
|
||||||
component={Link}
|
component={Link}
|
||||||
href="/admin/users/invites"
|
href="/manage/users/invites"
|
||||||
/>
|
/>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
<NavLink
|
<NavLink
|
||||||
@@ -108,7 +105,7 @@ export const MainLayout = ({ children }: MainLayoutProps) => {
|
|||||||
header={
|
header={
|
||||||
<Header height={60} p="sm" pt="xs">
|
<Header height={60} p="sm" pt="xs">
|
||||||
<Group spacing="xl" position="apart" noWrap>
|
<Group spacing="xl" position="apart" noWrap>
|
||||||
<UnstyledButton component={Link} href="/admin">
|
<UnstyledButton component={Link} href="/manage">
|
||||||
<Logo />
|
<Logo />
|
||||||
</UnstyledButton>
|
</UnstyledButton>
|
||||||
<TextInput radius="xl" w={400} placeholder="Search..." variant="filled" />
|
<TextInput radius="xl" w={400} placeholder="Search..." variant="filled" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Title } from "@mantine/core";
|
import { Title } from "@mantine/core";
|
||||||
import { MainLayout } from "~/components/layout/admin/main-admin.layout";
|
import { MainLayout } from "~/components/layout/admin/main-admin.layout";
|
||||||
|
|
||||||
const SettingsPage = () => {
|
const ManagementPage = () => {
|
||||||
return (
|
return (
|
||||||
<MainLayout>
|
<MainLayout>
|
||||||
<Title>Good morning, Manicraft1001</Title>
|
<Title>Good morning, Manicraft1001</Title>
|
||||||
@@ -9,4 +9,4 @@ const SettingsPage = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SettingsPage;
|
export default ManagementPage;
|
||||||
12
src/pages/manage/preferences.tsx
Normal file
12
src/pages/manage/preferences.tsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { Title } from "@mantine/core";
|
||||||
|
import { MainLayout } from "~/components/layout/admin/main-admin.layout";
|
||||||
|
|
||||||
|
const PreferencesPage = () => {
|
||||||
|
return (
|
||||||
|
<MainLayout>
|
||||||
|
<Title>Preferences</Title>
|
||||||
|
</MainLayout>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PreferencesPage
|
||||||
12
src/pages/manage/users/index.tsx
Normal file
12
src/pages/manage/users/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { Title } from "@mantine/core";
|
||||||
|
import { MainLayout } from "~/components/layout/admin/main-admin.layout";
|
||||||
|
|
||||||
|
const ManageUsersPage = () => {
|
||||||
|
return (
|
||||||
|
<MainLayout>
|
||||||
|
<Title>Manage users</Title>
|
||||||
|
</MainLayout>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ManageUsersPage;
|
||||||
12
src/pages/manage/users/invites.tsx
Normal file
12
src/pages/manage/users/invites.tsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { Title } from "@mantine/core";
|
||||||
|
import { MainLayout } from "~/components/layout/admin/main-admin.layout";
|
||||||
|
|
||||||
|
const ManageUserInvitesPage = () => {
|
||||||
|
return (
|
||||||
|
<MainLayout>
|
||||||
|
<Title>Manage user invites</Title>
|
||||||
|
</MainLayout>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ManageUserInvitesPage;
|
||||||
Reference in New Issue
Block a user