Files
noo/lib/models/app_tab.dart
T
ayushyaandClaude Opus 5.5 56784ef212 Rebuild UI on the Noo design system
Replaces the Material 3 screens with the Noo design system: warm
neutrals, one violet accent, pill controls, Schibsted Grotesk/
Instrument Sans, Lucide icons, no gradients/shadows.

- New lib/widgets/noo/ component kit (core, lists, files, media, nav,
  overlays) plus lib/theme/design_tokens.dart for the color/type/space/
  radius/motion tokens.
- Rebuilt the app shell (top/bottom bars, drawer, desktop sidebar and
  toolbar), every tab (Files/Offline, Photos, Favorites, Recent,
  Activity, Trash, Shares), Settings, the lock and login screens, the
  media viewer, search, the details/share sheets, and the share-upload
  and move/copy destination pickers.
- Added a design canvas (linked from DESIGN_SYSTEM.md) covering the
  screens the spec didn't already describe, with matching Android and
  iOS chrome; wrote up the approved recipes into DESIGN_SYSTEM.md §4.
- Removed now-dead legacy widgets (media_grid_tile, swipeable_item,
  sync_status_badge, selectable_thumbnail) and updated
  architecture.md/styling.md/standards.md to describe the new
  structure and component/testing conventions.
- Added widget tests for the noo/ component kit.

This is a UI-only rework: no provider/model/service behavior changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 01:51:58 -04:00

67 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
/// Every destination the bottom nav bar can show. Order here is only the
/// fallback default — actual order/visibility/default-tab are user
/// configurable and persisted in `SettingsController`.
enum AppTab {
files,
photos,
favorites,
activity,
trash,
shares,
recent,
offline,
}
/// At most this many tabs may be visible in the bottom nav bar at once —
/// the rest are reachable through the "more" dropdown instead.
const int maxVisibleTabs = 5;
extension AppTabInfo on AppTab {
String get label {
switch (this) {
case AppTab.files:
return 'Files';
case AppTab.photos:
return 'Photos';
case AppTab.favorites:
return 'Favorites';
case AppTab.activity:
return 'Activity';
case AppTab.trash:
return 'Trash';
case AppTab.shares:
return 'Shares';
case AppTab.recent:
return 'Recent';
case AppTab.offline:
return 'Offline';
}
}
// Lucide icon mapping per DESIGN_SYSTEM.md 1.5 - the Lucide icon slug is
// named in a comment where it doesn't match the Dart identifier.
IconData get icon {
switch (this) {
case AppTab.files:
return LucideIcons.folder;
case AppTab.photos:
return LucideIcons.images;
case AppTab.favorites:
return LucideIcons.star;
case AppTab.activity:
return LucideIcons.activity;
case AppTab.trash:
return LucideIcons.trash2; // trash-2
case AppTab.shares:
return LucideIcons.share2; // share-2
case AppTab.recent:
return LucideIcons.clock;
case AppTab.offline:
return LucideIcons.hardDriveDownload; // hard-drive-download
}
}
}