diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 551d58956..6b404bb19 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1364,6 +1364,7 @@ const message = { downloadLogHelper1: 'All logs of {0} application are about to be downloaded. Do you want to continue? ', downloadLogHelper2: 'The latest {1} logs of {0} application are about to be downloaded. Do you want to continue? ', + syncAllAppHelper: 'All applications are about to be synchronized. Do you want to continue? ', }, website: { website: 'Website', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 8f8e34043..74e305529 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1294,6 +1294,7 @@ const message = { openrestyDeleteHelper: '強制刪除 OpenResty 會刪除所有的網站,請確認風險後操作', downloadLogHelper1: '即將下載 {0} 套用所有日誌,是否繼續? ', downloadLogHelper2: '即將下載 {0} 應用最近 {1} 條日誌,是否繼續? ', + syncAllAppHelper: '即將同步所有應用,是否繼續? ', }, website: { website: '網站', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index eed479a34..22d8eaf16 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1293,6 +1293,7 @@ const message = { openrestyDeleteHelper: '强制删除 OpenResty 会删除所有的网站,请确认风险之后操作', downloadLogHelper1: '即将下载 {0} 应用所有日志,是否继续?', downloadLogHelper2: '即将下载 {0} 应用最近 {1} 条日志,是否继续?', + syncAllAppHelper: '即将同步所有应用,是否继续?', }, website: { website: '网站', diff --git a/frontend/src/views/app-store/installed/index.vue b/frontend/src/views/app-store/installed/index.vue index dcc21eeee..587767215 100644 --- a/frontend/src/views/app-store/installed/index.vue +++ b/frontend/src/views/app-store/installed/index.vue @@ -371,15 +371,22 @@ const moreTag = ref(''); const language = useI18n().locale.value; const sync = () => { - syncLoading.value = true; - SyncInstalledApp() - .then(() => { - MsgSuccess(i18n.global.t('app.syncSuccess')); - search(); + ElMessageBox.confirm(i18n.global.t('app.syncAllAppHelper'), i18n.global.t('app.sync'), { + confirmButtonText: i18n.global.t('commons.button.confirm'), + cancelButtonText: i18n.global.t('commons.button.cancel'), + type: 'info', + }) + .then(async () => { + syncLoading.value = true; + try { + await SyncInstalledApp(); + MsgSuccess(i18n.global.t('app.syncSuccess')); + search(); + } finally { + syncLoading.value = false; + } }) - .finally(() => { - syncLoading.value = false; - }); + .catch(() => {}); }; const changeTag = (key: string) => {