1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

feat: 同步所有应用增加提示信息 (#2501)

This commit is contained in:
zhengkunwang 2023-10-11 01:16:29 -05:00 committed by GitHub
parent 9130d5d2c8
commit 23ed80298e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 8 deletions

View File

@ -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',

View File

@ -1294,6 +1294,7 @@ const message = {
openrestyDeleteHelper: '強制刪除 OpenResty 會刪除所有的網站請確認風險後操作',
downloadLogHelper1: '即將下載 {0} 套用所有日誌是否繼續 ',
downloadLogHelper2: '即將下載 {0} 應用最近 {1} 條日誌是否繼續 ',
syncAllAppHelper: '即將同步所有應用是否繼續 ',
},
website: {
website: '網站',

View File

@ -1293,6 +1293,7 @@ const message = {
openrestyDeleteHelper: '强制删除 OpenResty 会删除所有的网站请确认风险之后操作',
downloadLogHelper1: '即将下载 {0} 应用所有日志是否继续',
downloadLogHelper2: '即将下载 {0} 应用最近 {1} 条日志是否继续',
syncAllAppHelper: '即将同步所有应用是否继续',
},
website: {
website: '网站',

View File

@ -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) => {