diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-22 16:43:08 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-22 16:43:08 +0300 |
| commit | d15b31ec2248846af2adede429e7278e374cb4c3 (patch) | |
| tree | e694aa7248b5d274caedd6837bbf823b0b83147c /player-android/lib/app_routes.dart | |
| parent | 874a305bbc23e9a1e6428b4e87071c3567317545 (diff) | |
Implement AdminPermissionsScreen, RescanScreen, and TrashScreen (eb)
Add three admin-only screens with routes and navigation tiles:
- AdminPermissionsScreen: permission matrix (users × sets) with optimistic
grant/revoke checkboxes; admin rows shown as disabled (implicit access).
- AdminRescanScreen: trigger library rescan, poll getScanProgress every 2s
while running, cancel timer in dispose, show live file/set counters.
- AdminTrashScreen: list soft-deleted media with restore + hard-delete
(confirmation dialog); optimistic UI with revert-on-error for both actions.
All three use generation counters for stale-async cancellation and guard
async continuations on mounted. Added error mappers and route constants.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'player-android/lib/app_routes.dart')
| -rw-r--r-- | player-android/lib/app_routes.dart | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/player-android/lib/app_routes.dart b/player-android/lib/app_routes.dart index 4d31fbd..c07559a 100644 --- a/player-android/lib/app_routes.dart +++ b/player-android/lib/app_routes.dart @@ -121,4 +121,20 @@ abstract final class AppRoutes { /// Only accessible when the authenticated user has admin privileges. /// Shows a list of all registered users and allows creating/deleting accounts. static const adminUsers = '/admin/users'; + + /// Route for the admin permission matrix screen. + /// + /// Displays a cross-table of users vs. sets with checkboxes for granting or + /// revoking per-user access to each set. Admin-only. + static const adminPermissions = '/admin/permissions'; + + /// Route for the admin rescan screen. + /// + /// Allows an admin to trigger a library rescan and monitor live progress. + static const adminRescan = '/admin/rescan'; + + /// Route for the admin trash screen. + /// + /// Lists soft-deleted media items and allows restore or hard-delete. + static const adminTrash = '/admin/trash'; } |
