feat: add system pages for information, notifications, and settings with corresponding navigation and i18n support
This commit is contained in:
@@ -3,12 +3,18 @@ import { Navigate, Route, Routes } from 'react-router-dom';
|
|||||||
import ModuleLayout from './layouts/module.layout';
|
import ModuleLayout from './layouts/module.layout';
|
||||||
|
|
||||||
const ExampleModule = lazy(() => import('./example'));
|
const ExampleModule = lazy(() => import('./example'));
|
||||||
|
const SystemSetting = lazy(() => import('./system/setting'));
|
||||||
|
const SystemInformation = lazy(() => import('./system/information'));
|
||||||
|
const SystemNotification = lazy(() => import('./system/notification'));
|
||||||
|
|
||||||
export default function AppModule() {
|
export default function AppModule() {
|
||||||
return (
|
return (
|
||||||
<ModuleLayout>
|
<ModuleLayout>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/example/*" element={<ExampleModule />} />
|
<Route path="/example/*" element={<ExampleModule />} />
|
||||||
|
<Route path="/system/setting" element={<SystemSetting />} />
|
||||||
|
<Route path="/system/information" element={<SystemInformation />} />
|
||||||
|
<Route path="/system/notifications" element={<SystemNotification />} />
|
||||||
<Route path="/" element={<Navigate to="/app/example/full-page" replace={true} />} />
|
<Route path="/" element={<Navigate to="/app/example/full-page" replace={true} />} />
|
||||||
<Route path="*" element={<Navigate to={'/404'} replace={true} />} />
|
<Route path="*" element={<Navigate to={'/404'} replace={true} />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
import { Globe, Bell, HelpCircle, Settings, User, Briefcase, LogOut, ChevronDown } from 'lucide-react';
|
import { Globe, Bell, HelpCircle, Settings, User, Briefcase, LogOut, ChevronDown } from 'lucide-react';
|
||||||
import { AppStorageKey, secureStorage } from '../../../../core/storage/local';
|
import { AppStorageKey, secureStorage } from '../../../../core/storage/local';
|
||||||
import { NotificationDropdown } from './notifications/notification-dropdown';
|
import { NotificationDropdown } from './notifications/notification-dropdown';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
// Dummy user data for preview
|
// Dummy user data for preview
|
||||||
const USER = {
|
const USER = {
|
||||||
@@ -56,7 +57,7 @@ export default function HeaderLayout() {
|
|||||||
|
|
||||||
{/* 3. RIGHT SECTION (Actions & Profile) */}
|
{/* 3. RIGHT SECTION (Actions & Profile) */}
|
||||||
<Group wrap="nowrap" gap="sm">
|
<Group wrap="nowrap" gap="sm">
|
||||||
<ActionIcon variant="subtle" color="gray" size="lg" aria-label="Help">
|
<ActionIcon component={Link} to="/app/system/information" variant="subtle" color="gray" size="lg" aria-label="Help">
|
||||||
<HelpCircle size={18} />
|
<HelpCircle size={18} />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
|
|
||||||
@@ -148,7 +149,7 @@ export default function HeaderLayout() {
|
|||||||
|
|
||||||
{/* Application Section */}
|
{/* Application Section */}
|
||||||
<Menu.Label>{t('common:application')}</Menu.Label>
|
<Menu.Label>{t('common:application')}</Menu.Label>
|
||||||
<Menu.Item leftSection={<Settings size={14} />}>{t('common:settings')}</Menu.Item>
|
<Menu.Item component={Link} to="/app/system/setting" leftSection={<Settings size={14} />}>{t('common:settings')}</Menu.Item>
|
||||||
<Menu.Item leftSection={<User size={14} />}>{t('common:myProfile')}</Menu.Item>
|
<Menu.Item leftSection={<User size={14} />}>{t('common:myProfile')}</Menu.Item>
|
||||||
|
|
||||||
<Menu.Divider />
|
<Menu.Divider />
|
||||||
|
|||||||
+2
-1
@@ -14,6 +14,7 @@ import {
|
|||||||
NavLink,
|
NavLink,
|
||||||
} from '@repo/ui/components';
|
} from '@repo/ui/components';
|
||||||
import { BellOff } from 'lucide-react';
|
import { BellOff } from 'lucide-react';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
interface NotificationItem {
|
interface NotificationItem {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -137,7 +138,7 @@ export function NotificationDropdown({ children }: NotificationDropdownProps) {
|
|||||||
|
|
||||||
{notifications.length > 0 && (
|
{notifications.length > 0 && (
|
||||||
<Box p="xs">
|
<Box p="xs">
|
||||||
<Button variant="light" color="gray" fullWidth size="xs" radius="md">
|
<Button component={Link} to="/app/system/notifications" variant="light" color="gray" fullWidth size="xs" radius="md">
|
||||||
{t('common:viewAll')}
|
{t('common:viewAll')}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { Container, Paper, Title, Text } from '@repo/ui/components';
|
||||||
|
import { useTranslation } from '@repo/core-i18n';
|
||||||
|
|
||||||
|
export default function InformationPage() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Container fluid p="md">
|
||||||
|
<Paper shadow="sm" p="md" radius="md">
|
||||||
|
<Title order={2} mb="xs">
|
||||||
|
{t('common:systemInformation')}
|
||||||
|
</Title>
|
||||||
|
<Text c="dimmed">{t('common:systemInformationDesc')}</Text>
|
||||||
|
</Paper>
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { Container, Paper, Title, Text } from '@repo/ui/components';
|
||||||
|
import { useTranslation } from '@repo/core-i18n';
|
||||||
|
|
||||||
|
export default function NotificationPage() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Container fluid p="md">
|
||||||
|
<Paper shadow="sm" p="md" radius="md">
|
||||||
|
<Title order={2} mb="xs">
|
||||||
|
{t('common:systemNotifications')}
|
||||||
|
</Title>
|
||||||
|
<Text c="dimmed">{t('common:systemNotificationsDesc')}</Text>
|
||||||
|
</Paper>
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { Container, Paper, Title, Text } from '@repo/ui/components';
|
||||||
|
import { useTranslation } from '@repo/core-i18n';
|
||||||
|
|
||||||
|
export default function ConfigurationPage() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Container fluid p="md">
|
||||||
|
<Paper shadow="sm" p="md" radius="md">
|
||||||
|
<Title order={2} mb="xs">
|
||||||
|
{t('common:configuration')}
|
||||||
|
</Title>
|
||||||
|
<Text c="dimmed">{t('common:configurationDesc')}</Text>
|
||||||
|
</Paper>
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -26,6 +26,12 @@
|
|||||||
"viewAll": "View all notifications",
|
"viewAll": "View all notifications",
|
||||||
"emptyState": "No new notifications",
|
"emptyState": "No new notifications",
|
||||||
"justNow": "Just now",
|
"justNow": "Just now",
|
||||||
"hoursAgo": "hours ago"
|
"hoursAgo": "hours ago",
|
||||||
|
"configuration": "System Configuration",
|
||||||
|
"configurationDesc": "Manage your system settings and preferences here.",
|
||||||
|
"systemInformation": "System Information",
|
||||||
|
"systemInformationDesc": "View details about the system version and status.",
|
||||||
|
"systemNotifications": "All Notifications",
|
||||||
|
"systemNotificationsDesc": "View and manage all system notifications."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,6 +26,12 @@
|
|||||||
"viewAll": "Lihat semua notifikasi",
|
"viewAll": "Lihat semua notifikasi",
|
||||||
"emptyState": "Tidak ada notifikasi baru",
|
"emptyState": "Tidak ada notifikasi baru",
|
||||||
"justNow": "Baru saja",
|
"justNow": "Baru saja",
|
||||||
"hoursAgo": "jam lalu"
|
"hoursAgo": "jam lalu",
|
||||||
|
"configuration": "Konfigurasi Sistem",
|
||||||
|
"configurationDesc": "Kelola pengaturan dan preferensi sistem Anda di sini.",
|
||||||
|
"systemInformation": "Informasi Sistem",
|
||||||
|
"systemInformationDesc": "Lihat detail tentang versi dan status sistem.",
|
||||||
|
"systemNotifications": "Semua Notifikasi",
|
||||||
|
"systemNotificationsDesc": "Lihat dan kelola semua notifikasi sistem."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user