parent
4ad43ff1fd
commit
8a757a70ea
|
@ -104,21 +104,29 @@ class _CreateBackupsModalState extends State<CreateBackupsModal> {
|
||||||
...widget.services.map(
|
...widget.services.map(
|
||||||
(final Service service) {
|
(final Service service) {
|
||||||
final bool busy = busyServices.contains(service.id);
|
final bool busy = busyServices.contains(service.id);
|
||||||
String description;
|
final List<Widget> descriptionWidgets = [];
|
||||||
if (busy) {
|
if (busy) {
|
||||||
description = 'backup.service_busy'.tr();
|
descriptionWidgets.add(Text('backup.service_busy'.tr()));
|
||||||
} else {
|
} else {
|
||||||
description = service.backupDescription;
|
descriptionWidgets.add(
|
||||||
description += '\n';
|
Text(
|
||||||
description += 'service_page.uses'.tr(
|
'service_page.uses'.tr(
|
||||||
namedArgs: {
|
namedArgs: {
|
||||||
'usage': service.storageUsage.used.toString(),
|
'usage': service.storageUsage.used.toString(),
|
||||||
'volume': context
|
'volume': context
|
||||||
.read<VolumesBloc>()
|
.read<VolumesBloc>()
|
||||||
.state
|
.state
|
||||||
.getVolume(service.storageUsage.volume ?? '')
|
.getVolume(service.storageUsage.volume ?? '')
|
||||||
.displayName,
|
.displayName,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
descriptionWidgets.add(
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
);
|
||||||
|
descriptionWidgets.add(
|
||||||
|
Text(service.backupDescription),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return CheckboxListTile.adaptive(
|
return CheckboxListTile.adaptive(
|
||||||
|
@ -140,9 +148,7 @@ class _CreateBackupsModalState extends State<CreateBackupsModal> {
|
||||||
title: Text(
|
title: Text(
|
||||||
service.displayName,
|
service.displayName,
|
||||||
),
|
),
|
||||||
subtitle: Text(
|
subtitle: Column(children: descriptionWidgets),
|
||||||
description,
|
|
||||||
),
|
|
||||||
secondary: SvgPicture.string(
|
secondary: SvgPicture.string(
|
||||||
service.svgIcon,
|
service.svgIcon,
|
||||||
height: 24,
|
height: 24,
|
||||||
|
|
Loading…
Reference in New Issue