feat: 失败状态应用允许恢复 (#4732)

This commit is contained in:
ssongliu 2024-04-26 18:20:19 +08:00 committed by GitHub
parent 9851b31013
commit 29fd941d55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 12 deletions

View file

@ -31,7 +31,7 @@
:data="data"
>
<template #toolbar>
<el-button type="primary" @click="onBackup()">
<el-button type="primary" :disabled="status && status != 'Running'" @click="onBackup()">
{{ $t('commons.button.backup') }}
</el-button>
<el-button type="primary" plain :disabled="selects.length === 0" @click="onBatchDelete(null)">
@ -98,11 +98,13 @@ const type = ref();
const name = ref();
const detailName = ref();
const backupPath = ref();
const status = ref();
interface DialogProps {
type: string;
name: string;
detailName: string;
status: string;
}
const acceptParams = (params: DialogProps): void => {
type.value = params.type;
@ -112,6 +114,7 @@ const acceptParams = (params: DialogProps): void => {
name.value = params.name;
detailName.value = params.detailName;
backupVisible.value = true;
status.value = params.status;
search();
};
const handleClose = () => {

View file

@ -1195,8 +1195,8 @@ const message = {
noSpace: '輸入信息不能包括空格符號',
duplicatePassword: '新密碼不能與原始密碼一致請重新輸入',
diskClean: '缓存清理',
開發者模式: '預覽體驗計劃',
開發者模式幫助程序: '獲取 1Panel 的預覽版本以分享有關新功能和更新的反饋',
developerMode: '預覽體驗計劃',
developerModeHelper: '獲取 1Panel 的預覽版本以分享有關新功能和更新的反饋',
thirdParty: '第三方賬號',
createBackupAccount: '添加 {0}',

View file

@ -168,10 +168,6 @@
plain
round
size="small"
:disabled="
installed.status !== 'Running' ||
installed.app.status === 'TakeDown'
"
@click="openUploads(installed.app.key, installed.name)"
v-if="mode === 'installed'"
>
@ -182,11 +178,9 @@
plain
round
size="small"
:disabled="
installed.status !== 'Running' ||
installed.app.status === 'TakeDown'
@click="
openBackups(installed.app.key, installed.name, installed.status)
"
@click="openBackups(installed.app.key, installed.name)"
v-if="mode === 'installed'"
>
{{ $t('commons.button.backup') }}
@ -575,11 +569,12 @@ const buttons = [
},
];
const openBackups = (key: string, name: string) => {
const openBackups = (key: string, name: string, status: string) => {
let params = {
type: 'app',
name: key,
detailName: name,
status: status,
};
backupRef.value.acceptParams(params);
};