feat(mobile): new mobile UI ()

This commit is contained in:
Alex 2024-10-10 15:44:14 +07:00 committed by GitHub
parent b59abdff3d
commit e9813315e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 1960 additions and 1274 deletions
mobile/lib/widgets/common

View file

@ -18,9 +18,10 @@ import 'package:immich_mobile/providers/server_info.provider.dart';
class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget {
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
final Widget? action;
final List<Widget>? actions;
final bool showUploadButton;
const ImmichAppBar({super.key, this.action});
const ImmichAppBar({super.key, this.actions, this.showUploadButton = true});
@override
Widget build(BuildContext context, WidgetRef ref) {
@ -184,12 +185,18 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget {
},
),
actions: [
if (action != null)
Padding(padding: const EdgeInsets.only(right: 20), child: action!),
Padding(
padding: const EdgeInsets.only(right: 20),
child: buildBackupIndicator(),
),
if (actions != null)
...actions!.map(
(action) => Padding(
padding: const EdgeInsets.only(right: 16),
child: action,
),
),
if (showUploadButton)
Padding(
padding: const EdgeInsets.only(right: 20),
child: buildBackupIndicator(),
),
Padding(
padding: const EdgeInsets.only(right: 20),
child: buildProfileIndicator(),