|
@@ -23,6 +23,8 @@ class CurrentUploadingAssetInfoBox extends HookConsumerWidget {
|
|
var uploadProgress = !isManualUpload
|
|
var uploadProgress = !isManualUpload
|
|
? ref.watch(backupProvider).progressInPercentage
|
|
? ref.watch(backupProvider).progressInPercentage
|
|
: ref.watch(manualUploadProvider).progressInPercentage;
|
|
: ref.watch(manualUploadProvider).progressInPercentage;
|
|
|
|
+ var iCloudDownloadProgress =
|
|
|
|
+ ref.watch(backupProvider).iCloudDownloadProgress;
|
|
final isShowThumbnail = useState(false);
|
|
final isShowThumbnail = useState(false);
|
|
|
|
|
|
String getAssetCreationDate() {
|
|
String getAssetCreationDate() {
|
|
@@ -143,6 +145,69 @@ class CurrentUploadingAssetInfoBox extends HookConsumerWidget {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ buildiCloudDownloadProgerssBar() {
|
|
|
|
+ if (asset.iCloudAsset != null && asset.iCloudAsset!) {
|
|
|
|
+ return Padding(
|
|
|
|
+ padding: const EdgeInsets.only(top: 8.0),
|
|
|
|
+ child: Row(
|
|
|
|
+ children: [
|
|
|
|
+ SizedBox(
|
|
|
|
+ width: 110,
|
|
|
|
+ child: Text(
|
|
|
|
+ "iCloud Download",
|
|
|
|
+ style: context.textTheme.labelSmall,
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ Expanded(
|
|
|
|
+ child: LinearProgressIndicator(
|
|
|
|
+ minHeight: 10.0,
|
|
|
|
+ value: uploadProgress / 100.0,
|
|
|
|
+ backgroundColor: Colors.grey,
|
|
|
|
+ color: context.primaryColor,
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ Text(
|
|
|
|
+ " ${iCloudDownloadProgress.toStringAsFixed(0)}%",
|
|
|
|
+ style: const TextStyle(fontSize: 12),
|
|
|
|
+ ),
|
|
|
|
+ ],
|
|
|
|
+ ),
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return const SizedBox();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ buildUploadProgressBar() {
|
|
|
|
+ return Padding(
|
|
|
|
+ padding: const EdgeInsets.only(top: 8.0),
|
|
|
|
+ child: Row(
|
|
|
|
+ children: [
|
|
|
|
+ if (asset.iCloudAsset != null && asset.iCloudAsset!)
|
|
|
|
+ SizedBox(
|
|
|
|
+ width: 110,
|
|
|
|
+ child: Text(
|
|
|
|
+ "Immich Upload",
|
|
|
|
+ style: context.textTheme.labelSmall,
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ Expanded(
|
|
|
|
+ child: LinearProgressIndicator(
|
|
|
|
+ minHeight: 10.0,
|
|
|
|
+ value: uploadProgress / 100.0,
|
|
|
|
+ backgroundColor: Colors.grey,
|
|
|
|
+ color: context.primaryColor,
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ Text(
|
|
|
|
+ " ${uploadProgress.toStringAsFixed(0)}%",
|
|
|
|
+ style: const TextStyle(fontSize: 12),
|
|
|
|
+ ),
|
|
|
|
+ ],
|
|
|
|
+ ),
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
return FutureBuilder<Uint8List?>(
|
|
return FutureBuilder<Uint8List?>(
|
|
future: buildAssetThumbnail(),
|
|
future: buildAssetThumbnail(),
|
|
builder: (context, thumbnail) => ListTile(
|
|
builder: (context, thumbnail) => ListTile(
|
|
@@ -197,25 +262,8 @@ class CurrentUploadingAssetInfoBox extends HookConsumerWidget {
|
|
),
|
|
),
|
|
subtitle: Column(
|
|
subtitle: Column(
|
|
children: [
|
|
children: [
|
|
- Padding(
|
|
|
|
- padding: const EdgeInsets.only(top: 8.0),
|
|
|
|
- child: Row(
|
|
|
|
- children: [
|
|
|
|
- Expanded(
|
|
|
|
- child: LinearProgressIndicator(
|
|
|
|
- minHeight: 10.0,
|
|
|
|
- value: uploadProgress / 100.0,
|
|
|
|
- backgroundColor: Colors.grey,
|
|
|
|
- color: context.primaryColor,
|
|
|
|
- ),
|
|
|
|
- ),
|
|
|
|
- Text(
|
|
|
|
- " ${uploadProgress.toStringAsFixed(0)}%",
|
|
|
|
- style: const TextStyle(fontSize: 12),
|
|
|
|
- ),
|
|
|
|
- ],
|
|
|
|
- ),
|
|
|
|
- ),
|
|
|
|
|
|
+ buildiCloudDownloadProgerssBar(),
|
|
|
|
+ buildUploadProgressBar(),
|
|
Padding(
|
|
Padding(
|
|
padding: const EdgeInsets.only(top: 8.0),
|
|
padding: const EdgeInsets.only(top: 8.0),
|
|
child: buildAssetInfoTable(),
|
|
child: buildAssetInfoTable(),
|