Files
noo/lib/models/app_tab.dart
T
ayushyaandClaude Sonnet 5 b1400e399f
Build APK / build (push) Successful in 5m18s
Add in-app copy/move, background downloads, and a Favorites tab
- WebDAV MOVE/COPY-backed copy/move for files and folders, with a
  destination picker (independent nav state so it doesn't disturb the
  Files tab's browsing position) and a conflict-resolution sheet
  (overwrite all / keep both / decide per item).
- Downloads now use the same foreground-service + notification approach
  as uploads, surviving app closure.
- Favorites is now its own tab (account-wide, via a WebDAV SEARCH query)
  instead of a Files-tab filter toggle, which couldn't represent
  favorited items outside the currently browsed folder correctly.
- Share sheet restyled to match the app's design language, plus a
  "share file directly" action via the OS share sheet; details sheet
  tab icons resized to match the bottom nav.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 16:20:56 -04:00

52 lines
1.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:material_symbols_icons/symbols.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 [ServerProvider].
enum AppTab { files, photos, favorites, activity, trash, shares, recent }
/// 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';
}
}
IconData get icon {
switch (this) {
case AppTab.files:
return Icons.folder_rounded;
case AppTab.photos:
return Icons.photo_library_rounded;
case AppTab.favorites:
return Icons.favorite_rounded;
case AppTab.activity:
return Icons.electric_bolt_rounded;
case AppTab.trash:
return Icons.delete_outline_rounded;
case AppTab.shares:
return Icons.groups_rounded;
case AppTab.recent:
return Symbols.search_activity_rounded;
}
}
}