mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-04 16:03:13 +00:00
Merge pull request 'feat: Implement visible accent when backup modal buttons are disabled' (#326) from gray-backups into master
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/326 Reviewed-by: Inex Code <inex.code@selfprivacy.org>
This commit is contained in:
commit
505444fb21
|
@ -83,6 +83,9 @@ class BackupDetailsPage extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
|
||||
final Color? overrideColor =
|
||||
preventActions ? Theme.of(context).colorScheme.secondary : null;
|
||||
|
||||
return BrandHeroScreen(
|
||||
heroIcon: BrandIcons.save,
|
||||
heroTitle: 'backup.card_title'.tr(),
|
||||
|
@ -110,11 +113,15 @@ class BackupDetailsPage extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
},
|
||||
leading: const Icon(
|
||||
leading: Icon(
|
||||
Icons.add_circle_outline_rounded,
|
||||
color: overrideColor,
|
||||
),
|
||||
title: Text(
|
||||
'backup.create_new'.tr(),
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
|
@ -138,13 +145,20 @@ class BackupDetailsPage extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
},
|
||||
leading: const Icon(
|
||||
leading: Icon(
|
||||
Icons.manage_history_outlined,
|
||||
color: overrideColor,
|
||||
),
|
||||
title: Text(
|
||||
'backup.autobackup_period_title'.tr(),
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
autobackupPeriod != null
|
||||
? 'backup.autobackup_period_subtitle'.tr(
|
||||
namedArgs: {
|
||||
|
@ -175,14 +189,21 @@ class BackupDetailsPage extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
},
|
||||
leading: const Icon(
|
||||
leading: Icon(
|
||||
Icons.key_outlined,
|
||||
color: overrideColor,
|
||||
),
|
||||
title: Text(
|
||||
'backup.backups_encryption_key'.tr(),
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'backup.backups_encryption_key_subtitle'.tr(),
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
@ -227,10 +248,16 @@ class BackupDetailsPage extends StatelessWidget {
|
|||
),
|
||||
if (backups.isEmpty)
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
leading: Icon(
|
||||
Icons.error_outline,
|
||||
color: overrideColor,
|
||||
),
|
||||
title: Text(
|
||||
'backup.no_backups'.tr(),
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
),
|
||||
title: Text('backup.no_backups'.tr()),
|
||||
),
|
||||
if (backups.isNotEmpty)
|
||||
Column(
|
||||
|
@ -282,9 +309,15 @@ class BackupDetailsPage extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
title: Text(
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
'${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}',
|
||||
),
|
||||
subtitle: Text(
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
service?.displayName ?? backup.fallbackServiceName,
|
||||
),
|
||||
leading: service != null
|
||||
|
@ -293,12 +326,16 @@ class BackupDetailsPage extends StatelessWidget {
|
|||
height: 24,
|
||||
width: 24,
|
||||
colorFilter: ColorFilter.mode(
|
||||
Theme.of(context).colorScheme.onBackground,
|
||||
overrideColor ??
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.onBackground,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
)
|
||||
: const Icon(
|
||||
: Icon(
|
||||
Icons.question_mark_outlined,
|
||||
color: overrideColor,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
@ -339,12 +376,19 @@ class BackupDetailsPage extends StatelessWidget {
|
|||
ListTile(
|
||||
title: Text(
|
||||
'backup.refetch_backups'.tr(),
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'backup.refetch_backups_subtitle'.tr(),
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
),
|
||||
leading: const Icon(
|
||||
leading: Icon(
|
||||
Icons.cached_outlined,
|
||||
color: overrideColor,
|
||||
),
|
||||
onTap: preventActions
|
||||
? null
|
||||
|
@ -356,12 +400,19 @@ class BackupDetailsPage extends StatelessWidget {
|
|||
ListTile(
|
||||
title: Text(
|
||||
'backup.reupload_key'.tr(),
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'backup.reupload_key_subtitle'.tr(),
|
||||
style: TextStyle(
|
||||
color: overrideColor,
|
||||
),
|
||||
),
|
||||
leading: const Icon(
|
||||
leading: Icon(
|
||||
Icons.warning_amber_outlined,
|
||||
color: overrideColor,
|
||||
),
|
||||
onTap: preventActions
|
||||
? null
|
||||
|
|
Loading…
Reference in a new issue