Build APK / build (push) Successful in 7m40s
- Let Noo be picked as a source (Files + Photos) by other apps' native file/photo pickers via Android's GET_CONTENT intent, mirroring the existing "Share to Noo" plumbing: MainActivity.kt/PickIntentService/ PickRequest, ServerProvider.pickRequest/confirmPick/cancelPick, and pick-mode tap handling in FilesView/PhotosView. While picking, the bottom nav and MoreTabsButton are restricted to Files/Photos only. - Fix two account bugs: testConnection() failures no longer delete a still-valid stored app password (only an actual 401 does), and switchAccount() now retries a nominally-active-but-logged-out account instead of no-op'ing - both were silently locking users out of "Continue as" with no way back in except removing and re-adding the account (now exposed via login_view.dart's inline remove button). - Fix the login WebView: clear cookies before every load so "Add Account" can't silently reuse an existing session, and push it as a non-animated route to avoid a known WebView-as-PlatformView black-screen- on-pop issue under Impeller. - Redesign the Files/Photos selection toolbar to take over the top app bar entirely (SyncedHeaderScaffold.selectionBar) instead of sitting as a second bar under the controls row, with a horizontally-scrollable, uniformly-colored actions row and the same one-shot scroll-hint nudge the controls row uses. - Redesign ShareUploadView to share the same SyncedHeaderScaffold chrome as every tab, with the uploading-file summary (marqueed via the new shared MarqueeTitle widget) and upload button grouped into one rounded/elevated bottom sheet. - Restyle ShareSheet to open on the same DetailsHeader every other per-item sheet uses, and fix a couple of small design-language drifts (hardcoded text style, a non-rounded icon). - Settings' account card: icon buttons with tooltips instead of text buttons for refresh/logout/remove, divider removed.
58 lines
1.9 KiB
Dart
58 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import '../models/app_tab.dart';
|
|
import '../providers/server_provider.dart';
|
|
import 'app_tab_view_builder.dart';
|
|
|
|
/// Opens a tab that's currently hidden from the bottom nav bar as its own
|
|
/// standalone screen. Shown in every tab's toolbar (not just Files) so
|
|
/// hidden destinations stay reachable no matter which tab is active.
|
|
/// Always visible; dims/disables itself when nothing is hidden.
|
|
class MoreTabsButton extends StatelessWidget {
|
|
const MoreTabsButton({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final provider = context.watch<ServerProvider>();
|
|
|
|
// While picking (another app's GET_CONTENT request), MainShellView
|
|
// already restricts the bottom nav to Files/Photos - this button would
|
|
// otherwise be the one remaining way to reach a tab that isn't a valid
|
|
// pick source (Trash, Shares, ...), so it hides entirely rather than
|
|
// just disabling.
|
|
if (provider.isPicking) return const SizedBox.shrink();
|
|
|
|
return PopupMenuButton<AppTab>(
|
|
icon: const Icon(Icons.apps_rounded),
|
|
tooltip: 'More tabs',
|
|
enabled: provider.hiddenTabs.isNotEmpty,
|
|
onSelected: (tab) => _openHiddenTab(context, tab),
|
|
itemBuilder: (context) => [
|
|
for (final tab in provider.tabOrder.where(
|
|
(t) => provider.hiddenTabs.contains(t),
|
|
))
|
|
PopupMenuItem(
|
|
value: tab,
|
|
child: Row(
|
|
children: [
|
|
Icon(tab.icon, size: 20),
|
|
const SizedBox(width: 12),
|
|
Text(tab.label),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
void _openHiddenTab(BuildContext context, AppTab tab) {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (_) =>
|
|
Scaffold(body: buildAppTabView(tab, ScrollController())),
|
|
),
|
|
);
|
|
}
|
|
}
|