mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(mobile): unify asset grid multiselect actions (#5407)
* feat(mobile): unify asset grid multiselect actions * add favorite & archive page * show edit date&place on main photos screen * Reposition exit button * Sort favorite with the same order as other view --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
b9a9a3956c
commit
c25556bb08
26 changed files with 768 additions and 968 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
|
||||
class DisableMultiSelectButton extends ConsumerWidget {
|
||||
const DisableMultiSelectButton({
|
||||
|
|
@ -13,24 +14,25 @@ class DisableMultiSelectButton extends ConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Padding(
|
||||
return Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 16.0, top: 16.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: () {
|
||||
onPressed();
|
||||
},
|
||||
onPressed: () => onPressed(),
|
||||
icon: const Icon(Icons.close_rounded),
|
||||
label: Text(
|
||||
'$selectedItemCount',
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 18,
|
||||
style: context.textTheme.titleMedium?.copyWith(
|
||||
height: 2.5,
|
||||
color: context.isDarkTheme ? Colors.black : Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
|||
final bool shrinkWrap;
|
||||
final bool showDragScroll;
|
||||
final bool showStack;
|
||||
final bool isOwner;
|
||||
final String? sharedAlbumId;
|
||||
|
||||
const ImmichAssetGrid({
|
||||
super.key,
|
||||
|
|
@ -55,8 +53,6 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
|||
this.shrinkWrap = false,
|
||||
this.showDragScroll = true,
|
||||
this.showStack = false,
|
||||
this.isOwner = true,
|
||||
this.sharedAlbumId,
|
||||
});
|
||||
|
||||
@override
|
||||
|
|
@ -121,8 +117,6 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
|||
shrinkWrap: shrinkWrap,
|
||||
showDragScroll: showDragScroll,
|
||||
showStack: showStack,
|
||||
isOwner: isOwner,
|
||||
sharedAlbumId: sharedAlbumId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ class ImmichAssetGridView extends StatefulWidget {
|
|||
final bool shrinkWrap;
|
||||
final bool showDragScroll;
|
||||
final bool showStack;
|
||||
final bool isOwner;
|
||||
final String? sharedAlbumId;
|
||||
|
||||
const ImmichAssetGridView({
|
||||
super.key,
|
||||
|
|
@ -61,8 +59,6 @@ class ImmichAssetGridView extends StatefulWidget {
|
|||
this.shrinkWrap = false,
|
||||
this.showDragScroll = true,
|
||||
this.showStack = false,
|
||||
this.isOwner = true,
|
||||
this.sharedAlbumId,
|
||||
});
|
||||
|
||||
@override
|
||||
|
|
@ -143,8 +139,6 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
|
|||
showStorageIndicator: widget.showStorageIndicator,
|
||||
heroOffset: widget.heroOffset,
|
||||
showStack: widget.showStack,
|
||||
isOwner: widget.isOwner,
|
||||
sharedAlbumId: widget.sharedAlbumId,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,14 +14,12 @@ class ThumbnailImage extends StatelessWidget {
|
|||
final int totalAssets;
|
||||
final bool showStorageIndicator;
|
||||
final bool showStack;
|
||||
final bool isOwner;
|
||||
final bool useGrayBoxPlaceholder;
|
||||
final bool isSelected;
|
||||
final bool multiselectEnabled;
|
||||
final Function? onSelect;
|
||||
final Function? onDeselect;
|
||||
final int heroOffset;
|
||||
final String? sharedAlbumId;
|
||||
|
||||
const ThumbnailImage({
|
||||
Key? key,
|
||||
|
|
@ -31,8 +29,6 @@ class ThumbnailImage extends StatelessWidget {
|
|||
required this.totalAssets,
|
||||
this.showStorageIndicator = true,
|
||||
this.showStack = false,
|
||||
this.isOwner = true,
|
||||
this.sharedAlbumId,
|
||||
this.useGrayBoxPlaceholder = false,
|
||||
this.isSelected = false,
|
||||
this.multiselectEnabled = false,
|
||||
|
|
@ -185,8 +181,6 @@ class ThumbnailImage extends StatelessWidget {
|
|||
totalAssets: totalAssets,
|
||||
heroOffset: heroOffset,
|
||||
showStack: showStack,
|
||||
isOwner: isOwner,
|
||||
sharedAlbumId: sharedAlbumId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue