feat: add Security room with Users and Groups sections
- Add Security room accessible from main navigation - Implement Users list page with DataGrid (fetches from /auth/users) - Implement Groups list page with DataGrid (fetches from /auth/groups) - Move user/group management from Control Room to dedicated Security room - Remove Authentik section from Control Room navigation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
2adb50b352
commit
a5a8e7ba88
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tatlock_ui/features/control_room/router.dart';
|
||||
import 'package:tatlock_ui/features/security/router.dart';
|
||||
import 'package:tatlock_ui/routing/app_router.dart';
|
||||
import 'package:tatlock_ui/shared/layouts/widgets/top_header_bar.dart';
|
||||
|
||||
@@ -54,7 +55,8 @@ class AppScaffold extends StatelessWidget {
|
||||
final location = GoRouterState.of(context).matchedLocation;
|
||||
|
||||
if (location.startsWith(ControlRoomRoutes.base)) return 1;
|
||||
if (location.startsWith(AppRoutes.parlor)) return 2;
|
||||
if (location.startsWith(SecurityRoutes.base)) return 2;
|
||||
if (location.startsWith(AppRoutes.parlor)) return 3;
|
||||
// Settings is no longer in main nav (accessed via Profile dropdown)
|
||||
return 0; // Front Hall
|
||||
}
|
||||
@@ -63,7 +65,8 @@ class AppScaffold extends StatelessWidget {
|
||||
final route = switch (index) {
|
||||
0 => AppRoutes.frontHall,
|
||||
1 => ControlRoomRoutes.containers,
|
||||
2 => AppRoutes.parlor,
|
||||
2 => SecurityRoutes.users,
|
||||
3 => AppRoutes.parlor,
|
||||
_ => AppRoutes.frontHall,
|
||||
};
|
||||
context.go(route);
|
||||
|
||||
@@ -34,6 +34,11 @@ class TopHeaderBar extends StatelessWidget {
|
||||
selectedIcon: Icons.dns,
|
||||
label: 'Control Room',
|
||||
),
|
||||
_RoomDestination(
|
||||
icon: Icons.security_outlined,
|
||||
selectedIcon: Icons.security,
|
||||
label: 'Security',
|
||||
),
|
||||
_RoomDestination(
|
||||
icon: Icons.lightbulb_outline,
|
||||
selectedIcon: Icons.lightbulb,
|
||||
|
||||
Reference in New Issue
Block a user