feat: 下载时若存在数据丢失风险则弹窗提示;服务端增加占用信息查看功能

This commit is contained in:
2026-07-19 00:21:57 +08:00
parent 0aacef79e5
commit d53d6deb2e
5 changed files with 123 additions and 14 deletions
+10 -2
View File
@@ -105,6 +105,7 @@ class _MyHomePageState extends State<MyHomePage> {
IconButton(
onPressed: () {
loadCloudArchives();
loadLocalStatus();
},
icon: Icon(Icons.refresh_outlined),
),
@@ -210,9 +211,16 @@ class _MyHomePageState extends State<MyHomePage> {
return InkWell(
onTap: cloudModifiedTimeTs == null
? null
: () {
: () async {
if (syncItemConfig != null) {
download(context, syncItemConfig, cloudArchives.sorted.first);
if (cloudModifiedTimeTs != null &&
localModifiedTime != null &&
localModifiedTime.millisecondsSinceEpoch > cloudModifiedTimeTs) {
if (await UploadConfirmDialog.show(context) != true) return;
}
if (context.mounted) {
download(context, syncItemConfig, cloudArchives.sorted.first);
}
}
},
onLongPress: cloudModifiedTimeTs == null