Major additions since the initial rebuild: - New tabs: Trash, Shares, Recent, configurable tab visibility/order/default - Nextcloud sharing: search users/teams, internal link, email shares, public links, "others with access" - in its own Share bottom sheet - Details bottom sheet (Info/Versions/Activity) with a persistent peek panel in the media viewer, reachable from selection, swipe, and the media viewer - Files/Photos: tap-and-hold multi-select with a sticky selection toolbar, swipe actions (favorite/delete/share), sticky sort/filter controls, list/grid views, breadcrumb chips, whole-account Photos view - Media viewer: pinch/double-tap zoom on images, predictive-back support, fixed PDF zoom-out floor - Settings: Material You theming incl. AMOLED black, configurable bottom bar tabs, swipe actions, media seek bar style, and folder-listing cache policy (never/periodic/manual) to cut down on refetching - Login flow moved to an in-app Chrome Custom Tab with retry-tolerant polling - Replaced ad hoc widgets with native Material 3 equivalents (toggle IconButtons, SliverAppBar selection toolbar, SearchBar, drag handles) - Rebrand: app renamed to Noo throughout, package id -> dev.ayushya.noo, new adaptive launcher icon Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
46 lines
1.3 KiB
Dart
46 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import '../providers/server_provider.dart';
|
|
import '../views/account_view.dart';
|
|
|
|
/// Top-bar avatar button that opens the account screen. Replaces the old
|
|
/// "Account" bottom-nav destination, matching how Google Drive surfaces
|
|
/// account access from a profile picture in the app bar.
|
|
class ProfileAvatarButton extends StatelessWidget {
|
|
const ProfileAvatarButton({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final provider = context.watch<ServerProvider>();
|
|
final colorScheme = Theme.of(context).colorScheme;
|
|
final initial = provider.username.isNotEmpty
|
|
? provider.username[0].toUpperCase()
|
|
: '?';
|
|
|
|
return Padding(
|
|
padding: const EdgeInsets.only(right: 8),
|
|
child: IconButton(
|
|
tooltip: 'Settings',
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(builder: (_) => const AccountView()),
|
|
);
|
|
},
|
|
icon: CircleAvatar(
|
|
radius: 17,
|
|
backgroundColor: colorScheme.primary,
|
|
child: Text(
|
|
initial,
|
|
style: TextStyle(
|
|
color: colorScheme.onPrimary,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 14,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|