mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: delete actions (#20034)
* chore: show delete local * pr feedback * restore and perm delete action
This commit is contained in:
parent
2efca67217
commit
aa344a3989
18 changed files with 285 additions and 18 deletions
|
|
@ -2,8 +2,10 @@ import 'package:auto_route/auto_route.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/extensions/translate_extensions.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart';
|
||||
import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart';
|
||||
import 'package:immich_mobile/providers/server_info.provider.dart';
|
||||
import 'package:immich_mobile/providers/user.provider.dart';
|
||||
|
||||
@RoutePage()
|
||||
|
|
@ -29,6 +31,7 @@ class DriftTrashPage extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
child: Timeline(
|
||||
showStorageIndicator: true,
|
||||
appBar: SliverAppBar(
|
||||
title: Text('trash'.t(context: context)),
|
||||
floating: true,
|
||||
|
|
@ -37,6 +40,27 @@ class DriftTrashPage extends StatelessWidget {
|
|||
centerTitle: true,
|
||||
elevation: 0,
|
||||
),
|
||||
topSliverWidgetHeight: 24,
|
||||
topSliverWidget: Consumer(
|
||||
builder: (context, ref, child) {
|
||||
final trashDays = ref.watch(
|
||||
serverInfoProvider.select((v) => v.serverConfig.trashDays),
|
||||
);
|
||||
|
||||
return SliverPadding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
sliver: SliverToBoxAdapter(
|
||||
child: SizedBox(
|
||||
height: 24.0,
|
||||
child: const Text(
|
||||
"trash_page_info",
|
||||
).t(context: context, args: {"days": "$trashDays"}),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
bottomSheet: const TrashBottomBar(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue