mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(mobile): quota (#6409)
* feat(mobile): quota * openapi * user entity update * Render quota * refresh usage upon opening the app bar * stop backup when quota exceed
This commit is contained in:
parent
abce82e235
commit
78de4f1312
18 changed files with 386 additions and 76 deletions
|
|
@ -363,6 +363,7 @@ class BackupService {
|
|||
} else {
|
||||
var data = await response.stream.bytesToString();
|
||||
var error = jsonDecode(data);
|
||||
var errorMessage = error['message'] ?? error['error'];
|
||||
|
||||
debugPrint(
|
||||
"Error(${error['statusCode']}) uploading ${entity.id} | $originalFileName | Created on ${entity.createDateTime} | ${error['error']}",
|
||||
|
|
@ -375,9 +376,14 @@ class BackupService {
|
|||
fileCreatedAt: entity.createDateTime,
|
||||
fileName: originalFileName,
|
||||
fileType: _getAssetType(entity.type),
|
||||
errorMessage: error['error'],
|
||||
errorMessage: errorMessage,
|
||||
),
|
||||
);
|
||||
|
||||
if (errorMessage == "Quota has been exceeded!") {
|
||||
anyErrors = true;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ class FailedBackupStatusPage extends HookConsumerWidget {
|
|||
ConstrainedBox(
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 100,
|
||||
minHeight: 150,
|
||||
minHeight: 100,
|
||||
maxWidth: 100,
|
||||
maxHeight: 200,
|
||||
maxHeight: 150,
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: const BorderRadius.only(
|
||||
|
|
@ -95,9 +95,10 @@ class FailedBackupStatusPage extends HookConsumerWidget {
|
|||
).toLocal(),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.grey[700],
|
||||
color: context.isDarkTheme
|
||||
? Colors.white70
|
||||
: Colors.grey[800],
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
|
|
@ -115,7 +116,6 @@ class FailedBackupStatusPage extends HookConsumerWidget {
|
|||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
color: context.primaryColor,
|
||||
),
|
||||
),
|
||||
|
|
@ -123,9 +123,10 @@ class FailedBackupStatusPage extends HookConsumerWidget {
|
|||
Text(
|
||||
errorAsset.errorMessage,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.grey[800],
|
||||
color: context.isDarkTheme
|
||||
? Colors.white70
|
||||
: Colors.grey[800],
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue