mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-16 13:43:17 +00:00
fix(backups): Remove '\n' and replace with a list of widgets
- Resolve: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/434
This commit is contained in:
parent
4ad43ff1fd
commit
8a757a70ea
|
@ -104,21 +104,29 @@ class _CreateBackupsModalState extends State<CreateBackupsModal> {
|
|||
...widget.services.map(
|
||||
(final Service service) {
|
||||
final bool busy = busyServices.contains(service.id);
|
||||
String description;
|
||||
final List<Widget> descriptionWidgets = [];
|
||||
if (busy) {
|
||||
description = 'backup.service_busy'.tr();
|
||||
descriptionWidgets.add(Text('backup.service_busy'.tr()));
|
||||
} else {
|
||||
description = service.backupDescription;
|
||||
description += '\n';
|
||||
description += 'service_page.uses'.tr(
|
||||
namedArgs: {
|
||||
'usage': service.storageUsage.used.toString(),
|
||||
'volume': context
|
||||
.read<VolumesBloc>()
|
||||
.state
|
||||
.getVolume(service.storageUsage.volume ?? '')
|
||||
.displayName,
|
||||
},
|
||||
descriptionWidgets.add(
|
||||
Text(
|
||||
'service_page.uses'.tr(
|
||||
namedArgs: {
|
||||
'usage': service.storageUsage.used.toString(),
|
||||
'volume': context
|
||||
.read<VolumesBloc>()
|
||||
.state
|
||||
.getVolume(service.storageUsage.volume ?? '')
|
||||
.displayName,
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
descriptionWidgets.add(
|
||||
const SizedBox(height: 4),
|
||||
);
|
||||
descriptionWidgets.add(
|
||||
Text(service.backupDescription),
|
||||
);
|
||||
}
|
||||
return CheckboxListTile.adaptive(
|
||||
|
@ -140,9 +148,7 @@ class _CreateBackupsModalState extends State<CreateBackupsModal> {
|
|||
title: Text(
|
||||
service.displayName,
|
||||
),
|
||||
subtitle: Text(
|
||||
description,
|
||||
),
|
||||
subtitle: Column(children: descriptionWidgets),
|
||||
secondary: SvgPicture.string(
|
||||
service.svgIcon,
|
||||
height: 24,
|
||||
|
|
Loading…
Reference in a new issue