feat(users): add admin user management page

This commit is contained in:
zhi
2026-03-20 10:56:00 +00:00
parent caad6be048
commit 50563f2b3d
3 changed files with 313 additions and 2 deletions

View File

@@ -35,7 +35,10 @@ export default function Sidebar({ user, onLogout }: Props) {
{ to: '/proposes', icon: '💡', label: 'Proposes' },
{ to: '/notifications', icon: '🔔', label: 'Notifications' + (unreadCount > 0 ? ' (' + unreadCount + ')' : '') },
{ to: '/monitor', icon: '📡', label: 'Monitor' },
...(user.is_admin ? [{ to: '/roles', icon: '🔐', label: 'Roles' }] : []),
...(user.is_admin ? [
{ to: '/users', icon: '👥', label: 'Users' },
{ to: '/roles', icon: '🔐', label: 'Roles' },
] : []),
] : [
{ to: '/monitor', icon: '📡', label: 'Monitor' },
]