style: redis 按钮位置调整

pull/65/head
ssongliu 2022-12-05 15:44:13 +08:00
parent c89de70d87
commit a0f8a7b968
4 changed files with 11 additions and 35 deletions

View File

@ -22,7 +22,7 @@
</el-tag>
</div>
</el-col>
<el-col :lg="5" :xl="4">
<el-col :lg="6" :xl="4">
<div>
{{ $t('website.lastBackupAt') }}:
<el-tag v-if="data.lastBackupAt != ''" type="info">{{ data.lastBackupAt }}</el-tag>
@ -30,8 +30,6 @@
</div>
</el-col>
<el-col :lg="4" :xl="6">
<el-button type="primary" link @click="onOperate('restart')">{{ $t('app.restart') }}</el-button>
<el-divider direction="vertical" />
<el-button type="primary" link @click="setting">{{ $t('commons.button.set') }}</el-button>
</el-col>
</el-row>
@ -47,10 +45,8 @@
</div>
</template>
<script lang="ts" setup>
import { CheckAppInstalled, InstalledOp } from '@/api/modules/app';
import i18n from '@/lang';
import { CheckAppInstalled } from '@/api/modules/app';
import router from '@/routers';
import { ElMessage, ElMessageBox } from 'element-plus';
import { onMounted, reactive, ref } from 'vue';
import Status from '@/components/status/index.vue';
@ -95,29 +91,6 @@ const onCheck = async () => {
loading.value = false;
};
const onOperate = async (operation: string) => {
operateReq.operate = operation;
ElMessageBox.confirm(
i18n.global.t('app.operatorHelper', [i18n.global.t('app.' + operation)]),
i18n.global.t('app.' + operation),
{
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),
type: 'info',
},
).then(() => {
loading.value = true;
InstalledOp(operateReq)
.then(() => {
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
onCheck();
})
.finally(() => {
loading.value = false;
});
});
};
onMounted(() => {
key.value = props.appKey;
onCheck();

View File

@ -82,7 +82,7 @@ export default {
welcome: 'Welcome back, please enter your username and password to log in!',
errorAuthInfo: 'The user name or password you entered is incorrect, please re-enter!',
captchaHelper: 'Please enter the verification code',
errorCaptcha: 'Incorrect verification code information!',
errorCaptcha: 'Verification code error!',
safeEntrance: 'Please use the correct entry to log in to the panel',
reason: 'Cause of error:',
reasonHelper:

View File

@ -84,7 +84,7 @@ export default {
welcome: '',
errorAuthInfo: '',
captchaHelper: '',
errorCaptcha: '',
errorCaptcha: '',
safeEntrance: '使',
reason: '',
reasonHelper:

View File

@ -4,10 +4,13 @@
<AppStatus :app-key="'redis'" style="margin-top: 20px" @setting="onSetting" @is-exist="checkExist"></AppStatus>
<div v-show="redisIsExist">
<Setting ref="settingRef" style="margin-top: 20px" />
<el-button style="margin-top: 20px" type="p" @click="goDashboard" icon="Position">
Redis-Commander
</el-button>
<el-button style="margin-top: 20px" type="p" @click="goDashboard" icon="Position">Redis-Command</el-button>
<Terminal v-show="!isOnSetting" ref="terminalRef" />
<Setting ref="settingRef" style="margin-top: 10px" />
<Terminal style="margin-top: 10px" v-show="!isOnSetting" ref="terminalRef" />
</div>
<el-dialog
@ -17,7 +20,7 @@
:close-on-click-modal="false"
:destroy-on-close="true"
>
<el-alert :closable="false" :title="$t('app.checkInstalledWarn', ['Redis-Command'])" type="info">
<el-alert :closable="false" :title="$t('app.checkInstalledWarn', ['Redis-Commander'])" type="info">
<el-link icon="Position" @click="goRouter('/apps')" type="primary">
{{ $t('database.goInstall') }}
</el-link>