feat: add route to services in storage page
parent
a4737e9f05
commit
456574002b
|
@ -95,6 +95,11 @@ class ServerStorageSection extends StatelessWidget {
|
|||
(final service) => ServerConsumptionListTile(
|
||||
service: service,
|
||||
volume: volume,
|
||||
onTap: () {
|
||||
context.pushRoute(
|
||||
ServiceRoute(serviceId: service.id),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
if (volume.isResizable) ...[
|
||||
|
@ -117,14 +122,18 @@ class ServerConsumptionListTile extends StatelessWidget {
|
|||
const ServerConsumptionListTile({
|
||||
required this.service,
|
||||
required this.volume,
|
||||
required this.onTap,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final Service service;
|
||||
final DiskVolume volume;
|
||||
final VoidCallback onTap;
|
||||
|
||||
@override
|
||||
Widget build(final BuildContext context) => Padding(
|
||||
Widget build(BuildContext context) => GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: ConsumptionListItem(
|
||||
title: service.displayName,
|
||||
|
@ -145,5 +154,6 @@ class ServerConsumptionListTile extends StatelessWidget {
|
|||
backgroundColor: Theme.of(context).colorScheme.surfaceVariant,
|
||||
dense: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue