mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
chore(mobile): cleanup server storage info (#26038)
The server storage info has a lot of whitespace due to the ListTile. Converting it to be inline makes the styling appear more intentional. There are also a few semantically relevant list items in the app bar dialog which have been grouped together.
This commit is contained in:
parent
675bbf3ac3
commit
0d35231dfd
3 changed files with 229 additions and 251 deletions
|
|
@ -153,43 +153,27 @@ class ImmichAppBarDialog extends HookConsumerWidget {
|
|||
percentage = user.quotaUsageInBytes / user.quotaSizeInBytes;
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 3),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
decoration: BoxDecoration(color: context.colorScheme.surface),
|
||||
child: ListTile(
|
||||
minLeadingWidth: 50,
|
||||
leading: Icon(Icons.storage_rounded, color: theme.primaryColor),
|
||||
title: Text(
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 12,
|
||||
children: [
|
||||
Text(
|
||||
"backup_controller_page_server_storage",
|
||||
style: context.textTheme.labelLarge?.copyWith(fontWeight: FontWeight.w500),
|
||||
).tr(),
|
||||
isThreeLine: true,
|
||||
subtitle: Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: LinearProgressIndicator(
|
||||
LinearProgressIndicator(
|
||||
minHeight: 10.0,
|
||||
value: percentage,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 12.0),
|
||||
child: const Text(
|
||||
Text(
|
||||
'backup_controller_page_storage_format',
|
||||
style: context.textTheme.bodySmall,
|
||||
).tr(namedArgs: {'used': usedDiskSpace, 'total': totalDiskSpace}),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -275,9 +259,22 @@ class ImmichAppBarDialog extends HookConsumerWidget {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(padding: const EdgeInsets.symmetric(horizontal: 8), child: buildTopRow()),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: context.colorScheme.surface,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
||||
),
|
||||
margin: const EdgeInsets.only(left: 8, right: 8, bottom: 8),
|
||||
child: Column(
|
||||
children: [
|
||||
const AppBarProfileInfoBox(),
|
||||
const Divider(height: 3),
|
||||
buildStorageInformation(),
|
||||
const Divider(height: 3),
|
||||
const AppBarServerInfo(),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (Store.isBetaTimelineEnabled && isReadonlyModeEnabled) buildReadonlyMessage(),
|
||||
buildAppLogButton(),
|
||||
buildFreeUpSpaceButton(),
|
||||
|
|
|
|||
|
|
@ -80,15 +80,7 @@ class AppBarProfileInfoBox extends HookConsumerWidget {
|
|||
);
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: context.colorScheme.surface,
|
||||
borderRadius: const BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10)),
|
||||
),
|
||||
child: ListTile(
|
||||
return ListTile(
|
||||
minLeadingWidth: 50,
|
||||
leading: GestureDetector(
|
||||
onTap: pickUserProfileImage,
|
||||
|
|
@ -122,8 +114,6 @@ class AppBarProfileInfoBox extends HookConsumerWidget {
|
|||
authState.userEmail,
|
||||
style: context.textTheme.bodySmall?.copyWith(color: context.colorScheme.onSurfaceSecondary),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,13 +38,6 @@ class AppBarServerInfo extends HookConsumerWidget {
|
|||
}, []);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0, right: 10.0, bottom: 10.0),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: context.colorScheme.surface,
|
||||
borderRadius: const BorderRadius.only(bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
|
@ -218,8 +211,6 @@ class AppBarServerInfo extends HookConsumerWidget {
|
|||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue