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;
|
percentage = user.quotaUsageInBytes / user.quotaSizeInBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Padding(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 3),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Container(
|
child: Column(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
decoration: BoxDecoration(color: context.colorScheme.surface),
|
spacing: 12,
|
||||||
child: ListTile(
|
children: [
|
||||||
minLeadingWidth: 50,
|
Text(
|
||||||
leading: Icon(Icons.storage_rounded, color: theme.primaryColor),
|
|
||||||
title: Text(
|
|
||||||
"backup_controller_page_server_storage",
|
"backup_controller_page_server_storage",
|
||||||
style: context.textTheme.labelLarge?.copyWith(fontWeight: FontWeight.w500),
|
style: context.textTheme.labelLarge?.copyWith(fontWeight: FontWeight.w500),
|
||||||
).tr(),
|
).tr(),
|
||||||
isThreeLine: true,
|
LinearProgressIndicator(
|
||||||
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(
|
|
||||||
minHeight: 10.0,
|
minHeight: 10.0,
|
||||||
value: percentage,
|
value: percentage,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
|
||||||
),
|
),
|
||||||
),
|
Text(
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 12.0),
|
|
||||||
child: const Text(
|
|
||||||
'backup_controller_page_storage_format',
|
'backup_controller_page_storage_format',
|
||||||
|
style: context.textTheme.bodySmall,
|
||||||
).tr(namedArgs: {'used': usedDiskSpace, 'total': totalDiskSpace}),
|
).tr(namedArgs: {'used': usedDiskSpace, 'total': totalDiskSpace}),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -275,9 +259,22 @@ class ImmichAppBarDialog extends HookConsumerWidget {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Container(padding: const EdgeInsets.symmetric(horizontal: 8), child: buildTopRow()),
|
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 AppBarProfileInfoBox(),
|
||||||
|
const Divider(height: 3),
|
||||||
buildStorageInformation(),
|
buildStorageInformation(),
|
||||||
|
const Divider(height: 3),
|
||||||
const AppBarServerInfo(),
|
const AppBarServerInfo(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
if (Store.isBetaTimelineEnabled && isReadonlyModeEnabled) buildReadonlyMessage(),
|
if (Store.isBetaTimelineEnabled && isReadonlyModeEnabled) buildReadonlyMessage(),
|
||||||
buildAppLogButton(),
|
buildAppLogButton(),
|
||||||
buildFreeUpSpaceButton(),
|
buildFreeUpSpaceButton(),
|
||||||
|
|
|
||||||
|
|
@ -80,15 +80,7 @@ class AppBarProfileInfoBox extends HookConsumerWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Padding(
|
return ListTile(
|
||||||
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(
|
|
||||||
minLeadingWidth: 50,
|
minLeadingWidth: 50,
|
||||||
leading: GestureDetector(
|
leading: GestureDetector(
|
||||||
onTap: pickUserProfileImage,
|
onTap: pickUserProfileImage,
|
||||||
|
|
@ -122,8 +114,6 @@ class AppBarProfileInfoBox extends HookConsumerWidget {
|
||||||
authState.userEmail,
|
authState.userEmail,
|
||||||
style: context.textTheme.bodySmall?.copyWith(color: context.colorScheme.onSurfaceSecondary),
|
style: context.textTheme.bodySmall?.copyWith(color: context.colorScheme.onSurfaceSecondary),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,6 @@ class AppBarServerInfo extends HookConsumerWidget {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return Padding(
|
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),
|
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|
@ -218,8 +211,6 @@ class AppBarServerInfo extends HookConsumerWidget {
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue