Files
minstrel/flutter_client/lib/admin/admin_landing_screen.dart
T
bvandeusen 835592f073 refactor(ui): Lucide migration unit 2 — Icons.* -> LucideIcons.* sweep (#60)
Mechanical sweep across 30 files: every Material Icons.* replaced with
the signed-off Lucide equivalent + a flutter_lucide import per file.
Zero Material Icons.* remain in lib/; no unused imports.

Judgment-call mappings: album->disc_3, library_music->library_big,
playlist_play->list_video, graphic_eq->audio_lines,
system_update->download, restore->archive_restore,
download_done->circle_check_big.

track_actions_sheet like menu row: collapsed `liked ? favorite :
favorite_border` to a single LucideIcons.heart (the row's Like/Unlike
text label conveys state). Icon-only LikeButton + the notification keep
the filled-vs-outline shape per the design decision.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 20:43:05 -04:00

68 lines
2.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_lucide/flutter_lucide.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import '../shared/widgets/main_app_bar_actions.dart';
import '../theme/theme_extension.dart';
import 'admin_providers.dart';
import 'widgets/admin_section_card.dart';
class AdminLandingScreen extends ConsumerWidget {
const AdminLandingScreen({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final fs = Theme.of(context).extension<FabledSwordTheme>()!;
final counts = ref.watch(adminCountsProvider);
return Scaffold(
backgroundColor: fs.obsidian,
appBar: AppBar(
backgroundColor: fs.obsidian,
elevation: 0,
title: Text('Admin', style: TextStyle(color: fs.parchment)),
actions: const [MainAppBarActions(currentRoute: '/admin')],
),
body: SafeArea(
child: counts.when(
loading: () => const Center(child: CircularProgressIndicator()),
error: (e, _) => Center(
child: Text('$e', style: TextStyle(color: fs.error)),
),
data: (c) => RefreshIndicator(
onRefresh: () async => ref.refresh(adminCountsProvider.future),
child: ListView(
children: [
AdminSectionCard(
key: const Key('admin_card_requests'),
icon: LucideIcons.inbox,
title: 'Requests',
subtitle: 'Approve or reject Lidarr requests',
count: c.requests,
onTap: () => context.push('/admin/requests'),
),
AdminSectionCard(
key: const Key('admin_card_quarantine'),
icon: LucideIcons.triangle_alert,
title: 'Quarantine',
subtitle: 'Resolve scan failures',
count: c.quarantine,
onTap: () => context.push('/admin/quarantine'),
),
AdminSectionCard(
key: const Key('admin_card_users'),
icon: LucideIcons.users,
title: 'Users',
subtitle: 'Manage accounts and invites',
count: c.users,
onTap: () => context.push('/admin/users'),
),
],
),
),
),
),
);
}
}