2023-03-22 11:38:18 +00:00
|
|
|
import 'package:auto_route/auto_route.dart';
|
2022-02-16 07:01:05 +00:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
2021-12-06 18:31:19 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2023-06-29 09:52:09 +00:00
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
2024-01-29 13:54:09 +00:00
|
|
|
import 'package:selfprivacy/logic/bloc/backups/backups_bloc.dart';
|
|
|
|
import 'package:selfprivacy/logic/bloc/server_jobs/server_jobs_bloc.dart';
|
2024-01-29 15:57:22 +00:00
|
|
|
import 'package:selfprivacy/logic/bloc/services/services_bloc.dart';
|
2024-01-31 10:57:12 +00:00
|
|
|
import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart';
|
2023-06-29 09:52:09 +00:00
|
|
|
import 'package:selfprivacy/logic/models/backup.dart';
|
|
|
|
import 'package:selfprivacy/logic/models/json/server_job.dart';
|
|
|
|
import 'package:selfprivacy/logic/models/service.dart';
|
2021-12-06 18:31:19 +00:00
|
|
|
import 'package:selfprivacy/logic/models/state_types.dart';
|
2024-01-31 10:57:12 +00:00
|
|
|
import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart';
|
2023-03-27 17:02:44 +00:00
|
|
|
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
|
2023-07-02 15:24:07 +00:00
|
|
|
import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart';
|
2022-11-09 15:49:37 +00:00
|
|
|
import 'package:selfprivacy/ui/helpers/modals.dart';
|
2024-01-31 10:57:12 +00:00
|
|
|
import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart';
|
2023-07-02 15:24:07 +00:00
|
|
|
import 'package:selfprivacy/ui/pages/backups/change_period_modal.dart';
|
2023-09-09 18:13:27 +00:00
|
|
|
import 'package:selfprivacy/ui/pages/backups/change_rotation_quotas_modal.dart';
|
2023-07-20 21:35:13 +00:00
|
|
|
import 'package:selfprivacy/ui/pages/backups/copy_encryption_key_modal.dart';
|
2023-07-02 15:24:07 +00:00
|
|
|
import 'package:selfprivacy/ui/pages/backups/create_backups_modal.dart';
|
2023-08-14 04:10:15 +00:00
|
|
|
import 'package:selfprivacy/ui/pages/backups/snapshot_modal.dart';
|
2023-07-02 15:24:07 +00:00
|
|
|
import 'package:selfprivacy/ui/router/router.dart';
|
|
|
|
import 'package:selfprivacy/utils/extensions/duration.dart';
|
2021-12-06 18:31:19 +00:00
|
|
|
|
2023-03-22 11:38:18 +00:00
|
|
|
@RoutePage()
|
2023-07-03 20:37:23 +00:00
|
|
|
class BackupDetailsPage extends StatelessWidget {
|
2023-02-24 16:45:32 +00:00
|
|
|
const BackupDetailsPage({super.key});
|
2021-12-06 18:31:19 +00:00
|
|
|
|
|
|
|
@override
|
2022-06-05 19:36:32 +00:00
|
|
|
Widget build(final BuildContext context) {
|
|
|
|
final bool isReady = context.watch<ServerInstallationCubit>().state
|
2022-05-17 13:31:34 +00:00
|
|
|
is ServerInstallationFinished;
|
2024-01-29 13:54:09 +00:00
|
|
|
final BackupsState backupsState = context.watch<BackupsBloc>().state;
|
2023-07-03 20:37:23 +00:00
|
|
|
final bool isBackupInitialized = backupsState.isInitialized;
|
2022-06-05 19:36:32 +00:00
|
|
|
final StateType providerState = isReady && isBackupInitialized
|
2023-06-29 09:52:09 +00:00
|
|
|
? StateType.stable
|
2021-12-06 18:31:19 +00:00
|
|
|
: StateType.uninitialized;
|
2023-07-03 20:37:23 +00:00
|
|
|
final bool preventActions = backupsState.preventActions;
|
|
|
|
final List<Backup> backups = backupsState.backups;
|
2023-06-29 09:52:09 +00:00
|
|
|
final List<Service> services =
|
2024-01-29 15:57:22 +00:00
|
|
|
context.watch<ServicesBloc>().state.servicesThatCanBeBackedUp;
|
2023-07-03 20:37:23 +00:00
|
|
|
final Duration? autobackupPeriod = backupsState.autobackupPeriod;
|
2023-07-02 15:24:07 +00:00
|
|
|
final List<ServerJob> backupJobs = context
|
2024-01-26 14:46:09 +00:00
|
|
|
.watch<ServerJobsBloc>()
|
2023-07-02 15:24:07 +00:00
|
|
|
.state
|
|
|
|
.backupJobList
|
|
|
|
.where((final job) => job.status != JobStatusEnum.finished)
|
|
|
|
.toList();
|
2021-12-06 18:31:19 +00:00
|
|
|
|
2023-07-02 15:24:07 +00:00
|
|
|
if (!isReady) {
|
|
|
|
return BrandHeroScreen(
|
|
|
|
heroIcon: BrandIcons.save,
|
|
|
|
heroTitle: 'backup.card_title'.tr(),
|
|
|
|
heroSubtitle: 'not_ready_card.in_menu'.tr(),
|
|
|
|
children: const [],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isBackupInitialized) {
|
|
|
|
return BrandHeroScreen(
|
|
|
|
heroIcon: BrandIcons.save,
|
|
|
|
heroTitle: 'backup.card_title'.tr(),
|
|
|
|
heroSubtitle: 'backup.description'.tr(),
|
|
|
|
children: [
|
2023-08-14 02:54:11 +00:00
|
|
|
if (preventActions)
|
|
|
|
const Center(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.all(16.0),
|
2024-03-13 15:20:50 +00:00
|
|
|
child: CircularProgressIndicator.adaptive(),
|
2023-08-14 02:54:11 +00:00
|
|
|
),
|
|
|
|
),
|
2023-08-14 04:10:15 +00:00
|
|
|
if (!preventActions)
|
|
|
|
BrandButton.rised(
|
|
|
|
onPressed: preventActions
|
|
|
|
? null
|
2024-01-29 13:54:09 +00:00
|
|
|
: () {
|
|
|
|
context
|
|
|
|
.read<BackupsBloc>()
|
|
|
|
.add(const InitializeBackupsRepository());
|
2023-08-14 04:10:15 +00:00
|
|
|
},
|
|
|
|
text: 'backup.initialize'.tr(),
|
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-09-07 21:04:26 +00:00
|
|
|
final Color? overrideColor =
|
2023-09-07 02:31:47 +00:00
|
|
|
preventActions ? Theme.of(context).colorScheme.secondary : null;
|
|
|
|
|
2023-07-02 15:24:07 +00:00
|
|
|
return BrandHeroScreen(
|
|
|
|
heroIcon: BrandIcons.save,
|
|
|
|
heroTitle: 'backup.card_title'.tr(),
|
|
|
|
heroSubtitle: 'backup.description'.tr(),
|
|
|
|
children: [
|
2023-06-29 09:52:09 +00:00
|
|
|
ListTile(
|
|
|
|
onTap: preventActions
|
|
|
|
? null
|
|
|
|
: () {
|
|
|
|
showModalBottomSheet(
|
|
|
|
useRootNavigator: true,
|
|
|
|
context: context,
|
|
|
|
isScrollControlled: true,
|
|
|
|
builder: (final BuildContext context) =>
|
|
|
|
DraggableScrollableSheet(
|
|
|
|
expand: false,
|
|
|
|
maxChildSize: 0.9,
|
|
|
|
minChildSize: 0.4,
|
|
|
|
initialChildSize: 0.6,
|
2023-06-29 10:51:38 +00:00
|
|
|
builder: (final context, final scrollController) =>
|
2023-06-29 09:52:09 +00:00
|
|
|
CreateBackupsModal(
|
|
|
|
services: services,
|
|
|
|
scrollController: scrollController,
|
2022-06-05 22:40:34 +00:00
|
|
|
),
|
2022-02-16 07:01:05 +00:00
|
|
|
),
|
2023-06-29 09:52:09 +00:00
|
|
|
);
|
|
|
|
},
|
2023-09-07 02:31:47 +00:00
|
|
|
leading: Icon(
|
2023-06-29 09:52:09 +00:00
|
|
|
Icons.add_circle_outline_rounded,
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2022-02-16 07:01:05 +00:00
|
|
|
),
|
2023-06-29 09:52:09 +00:00
|
|
|
title: Text(
|
|
|
|
'backup.create_new'.tr(),
|
2023-09-07 02:31:47 +00:00
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2023-06-29 09:52:09 +00:00
|
|
|
),
|
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
ListTile(
|
|
|
|
onTap: preventActions
|
|
|
|
? null
|
|
|
|
: () {
|
|
|
|
showModalBottomSheet(
|
|
|
|
useRootNavigator: true,
|
|
|
|
context: context,
|
|
|
|
isScrollControlled: true,
|
|
|
|
builder: (final BuildContext context) =>
|
|
|
|
DraggableScrollableSheet(
|
|
|
|
expand: false,
|
|
|
|
maxChildSize: 0.9,
|
|
|
|
minChildSize: 0.4,
|
|
|
|
initialChildSize: 0.6,
|
|
|
|
builder: (final context, final scrollController) =>
|
|
|
|
ChangeAutobackupsPeriodModal(
|
|
|
|
scrollController: scrollController,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
2023-09-07 02:31:47 +00:00
|
|
|
leading: Icon(
|
2023-07-02 15:24:07 +00:00
|
|
|
Icons.manage_history_outlined,
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-07-02 15:24:07 +00:00
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'backup.autobackup_period_title'.tr(),
|
2023-09-07 02:31:47 +00:00
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
),
|
|
|
|
subtitle: Text(
|
2023-09-07 02:31:47 +00:00
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
autobackupPeriod != null
|
|
|
|
? 'backup.autobackup_period_subtitle'.tr(
|
|
|
|
namedArgs: {
|
2023-11-06 13:15:38 +00:00
|
|
|
'period': autobackupPeriod.toPrettyString(context.locale),
|
2023-07-02 15:24:07 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
: 'backup.autobackup_period_never'.tr(),
|
|
|
|
),
|
|
|
|
),
|
2023-09-09 18:13:27 +00:00
|
|
|
ListTile(
|
|
|
|
onTap: preventActions
|
|
|
|
? null
|
|
|
|
: () {
|
|
|
|
showModalBottomSheet(
|
|
|
|
useRootNavigator: true,
|
|
|
|
context: context,
|
|
|
|
isScrollControlled: true,
|
|
|
|
builder: (final BuildContext context) =>
|
|
|
|
DraggableScrollableSheet(
|
|
|
|
expand: false,
|
|
|
|
maxChildSize: 0.9,
|
|
|
|
minChildSize: 0.4,
|
|
|
|
initialChildSize: 0.6,
|
|
|
|
builder: (final context, final scrollController) =>
|
|
|
|
ChangeRotationQuotasModal(
|
|
|
|
scrollController: scrollController,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
leading: Icon(
|
|
|
|
Icons.auto_delete_outlined,
|
|
|
|
color: overrideColor,
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'backup.rotation_quotas_title'.tr(),
|
|
|
|
style: TextStyle(
|
|
|
|
color: overrideColor,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2023-07-20 21:35:13 +00:00
|
|
|
ListTile(
|
|
|
|
onTap: preventActions
|
|
|
|
? null
|
|
|
|
: () {
|
|
|
|
showModalBottomSheet(
|
|
|
|
useRootNavigator: true,
|
|
|
|
context: context,
|
|
|
|
isScrollControlled: true,
|
|
|
|
builder: (final BuildContext context) =>
|
|
|
|
DraggableScrollableSheet(
|
|
|
|
expand: false,
|
2023-07-25 19:25:08 +00:00
|
|
|
maxChildSize: 0.9,
|
|
|
|
minChildSize: 0.5,
|
|
|
|
initialChildSize: 0.7,
|
2023-07-20 21:35:13 +00:00
|
|
|
builder: (final context, final scrollController) =>
|
|
|
|
CopyEncryptionKeyModal(
|
|
|
|
scrollController: scrollController,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
2023-09-07 02:31:47 +00:00
|
|
|
leading: Icon(
|
2023-07-20 21:35:13 +00:00
|
|
|
Icons.key_outlined,
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-07-20 21:35:13 +00:00
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'backup.backups_encryption_key'.tr(),
|
2023-09-07 02:31:47 +00:00
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2023-07-20 21:35:13 +00:00
|
|
|
),
|
2023-07-25 19:25:08 +00:00
|
|
|
subtitle: Text(
|
|
|
|
'backup.backups_encryption_key_subtitle'.tr(),
|
2023-09-07 02:31:47 +00:00
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2023-07-25 19:25:08 +00:00
|
|
|
),
|
2023-07-20 21:35:13 +00:00
|
|
|
),
|
2023-08-14 04:10:15 +00:00
|
|
|
const SizedBox(height: 8),
|
|
|
|
const Divider(),
|
|
|
|
const SizedBox(height: 8),
|
2023-07-02 15:24:07 +00:00
|
|
|
if (backupJobs.isNotEmpty)
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
ListTile(
|
|
|
|
title: Text(
|
|
|
|
'backup.pending_jobs'.tr(),
|
|
|
|
style: Theme.of(context).textTheme.headlineSmall!.copyWith(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
for (final job in backupJobs)
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
|
|
child: ServerJobCard(
|
|
|
|
serverJob: job,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2023-06-29 09:52:09 +00:00
|
|
|
if (isBackupInitialized)
|
2023-07-02 11:41:31 +00:00
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
ListTile(
|
|
|
|
title: Text(
|
2023-07-02 15:24:07 +00:00
|
|
|
'backup.latest_snapshots'.tr(),
|
2023-07-02 11:41:31 +00:00
|
|
|
style: Theme.of(context).textTheme.headlineSmall!.copyWith(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
subtitle: Text(
|
2023-07-02 15:24:07 +00:00
|
|
|
'backup.latest_snapshots_subtitle'.tr(),
|
2023-07-02 11:41:31 +00:00
|
|
|
style: Theme.of(context).textTheme.labelMedium,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (backups.isEmpty)
|
2022-02-16 07:01:05 +00:00
|
|
|
ListTile(
|
2023-09-07 02:31:47 +00:00
|
|
|
leading: Icon(
|
2023-07-02 11:41:31 +00:00
|
|
|
Icons.error_outline,
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'backup.no_backups'.tr(),
|
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2022-02-16 07:01:05 +00:00
|
|
|
),
|
|
|
|
),
|
2023-07-02 11:41:31 +00:00
|
|
|
if (backups.isNotEmpty)
|
|
|
|
Column(
|
2023-07-02 15:24:07 +00:00
|
|
|
children: backups.take(15).map(
|
2023-07-02 11:41:31 +00:00
|
|
|
(final Backup backup) {
|
|
|
|
final service = context
|
2024-01-29 15:57:22 +00:00
|
|
|
.read<ServicesBloc>()
|
2023-07-02 11:41:31 +00:00
|
|
|
.state
|
|
|
|
.getServiceById(backup.serviceId);
|
|
|
|
return ListTile(
|
|
|
|
onTap: preventActions
|
|
|
|
? null
|
|
|
|
: () {
|
2023-08-14 04:10:15 +00:00
|
|
|
showModalBottomSheet(
|
|
|
|
useRootNavigator: true,
|
|
|
|
context: context,
|
|
|
|
isScrollControlled: true,
|
|
|
|
builder: (final BuildContext context) =>
|
|
|
|
DraggableScrollableSheet(
|
|
|
|
expand: false,
|
|
|
|
maxChildSize: 0.9,
|
|
|
|
minChildSize: 0.5,
|
|
|
|
initialChildSize: 0.7,
|
|
|
|
builder: (
|
|
|
|
final context,
|
|
|
|
final scrollController,
|
|
|
|
) =>
|
|
|
|
SnapshotModal(
|
|
|
|
snapshot: backup,
|
|
|
|
scrollController: scrollController,
|
|
|
|
),
|
2023-07-02 11:41:31 +00:00
|
|
|
),
|
2023-08-14 04:10:15 +00:00
|
|
|
);
|
|
|
|
},
|
|
|
|
onLongPress: preventActions
|
|
|
|
? null
|
|
|
|
: () {
|
|
|
|
showPopUpAlert(
|
|
|
|
alertTitle: 'backup.forget_snapshot'.tr(),
|
|
|
|
description:
|
|
|
|
'backup.forget_snapshot_alert'.tr(),
|
|
|
|
actionButtonTitle:
|
|
|
|
'backup.forget_snapshot'.tr(),
|
2024-01-31 11:14:37 +00:00
|
|
|
actionButtonOnPressed: () =>
|
|
|
|
context.read<BackupsBloc>().add(
|
|
|
|
ForgetSnapshot(
|
|
|
|
backup.id,
|
|
|
|
),
|
2024-01-29 13:54:09 +00:00
|
|
|
),
|
2023-07-02 11:41:31 +00:00
|
|
|
);
|
|
|
|
},
|
|
|
|
title: Text(
|
2023-09-07 02:31:47 +00:00
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2023-07-02 11:41:31 +00:00
|
|
|
'${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}',
|
|
|
|
),
|
|
|
|
subtitle: Text(
|
2023-09-07 02:31:47 +00:00
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2023-07-02 11:41:31 +00:00
|
|
|
service?.displayName ?? backup.fallbackServiceName,
|
|
|
|
),
|
|
|
|
leading: service != null
|
|
|
|
? SvgPicture.string(
|
|
|
|
service.svgIcon,
|
|
|
|
height: 24,
|
|
|
|
width: 24,
|
|
|
|
colorFilter: ColorFilter.mode(
|
2023-09-07 21:04:26 +00:00
|
|
|
overrideColor ??
|
2023-09-07 02:31:47 +00:00
|
|
|
Theme.of(context)
|
|
|
|
.colorScheme
|
|
|
|
.onBackground,
|
2023-07-02 11:41:31 +00:00
|
|
|
BlendMode.srcIn,
|
|
|
|
),
|
|
|
|
)
|
2023-09-07 02:31:47 +00:00
|
|
|
: Icon(
|
2023-07-02 11:41:31 +00:00
|
|
|
Icons.question_mark_outlined,
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-07-02 11:41:31 +00:00
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
).toList(),
|
2022-02-16 07:01:05 +00:00
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
if (backups.isNotEmpty && backups.length > 15)
|
2023-07-02 11:41:31 +00:00
|
|
|
ListTile(
|
|
|
|
title: Text(
|
2023-07-02 15:24:07 +00:00
|
|
|
'backup.show_more'.tr(),
|
2023-07-02 11:41:31 +00:00
|
|
|
style: Theme.of(context).textTheme.labelMedium,
|
2022-02-16 07:01:05 +00:00
|
|
|
),
|
2023-07-02 11:41:31 +00:00
|
|
|
leading: const Icon(
|
|
|
|
Icons.arrow_drop_down,
|
2022-02-16 07:01:05 +00:00
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
onTap: () =>
|
|
|
|
context.pushRoute(BackupsListRoute(service: null)),
|
2023-11-06 13:15:38 +00:00
|
|
|
),
|
2023-07-02 11:41:31 +00:00
|
|
|
],
|
2022-02-16 07:01:05 +00:00
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
const SizedBox(height: 8),
|
|
|
|
const Divider(),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
if (providerState != StateType.uninitialized)
|
|
|
|
Column(
|
2022-02-16 07:01:05 +00:00
|
|
|
children: [
|
|
|
|
ListTile(
|
|
|
|
title: Text(
|
2023-07-02 15:24:07 +00:00
|
|
|
'backup.refetch_backups'.tr(),
|
2023-09-07 02:31:47 +00:00
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
),
|
|
|
|
subtitle: Text(
|
|
|
|
'backup.refetch_backups_subtitle'.tr(),
|
2023-09-07 02:31:47 +00:00
|
|
|
style: TextStyle(
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2023-09-07 02:31:47 +00:00
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
),
|
2023-09-07 02:31:47 +00:00
|
|
|
leading: Icon(
|
2023-07-02 15:24:07 +00:00
|
|
|
Icons.cached_outlined,
|
2023-09-07 21:04:26 +00:00
|
|
|
color: overrideColor,
|
2022-02-16 07:01:05 +00:00
|
|
|
),
|
2023-07-02 15:24:07 +00:00
|
|
|
onTap: preventActions
|
2022-02-16 07:01:05 +00:00
|
|
|
? null
|
2024-01-31 11:14:37 +00:00
|
|
|
: () => context
|
|
|
|
.read<BackupsBloc>()
|
|
|
|
.add(const ForceSnapshotListUpdate()),
|
2022-02-16 07:01:05 +00:00
|
|
|
),
|
2024-02-23 14:49:10 +00:00
|
|
|
// TODO: Return reupload key button in some form
|
2023-07-02 15:24:07 +00:00
|
|
|
],
|
2023-03-27 17:02:44 +00:00
|
|
|
),
|
2022-02-16 07:01:05 +00:00
|
|
|
],
|
2021-12-06 18:31:19 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|