diff --git a/frontend/src/components/dialogs/DeleteKeyDialog.vue b/frontend/src/components/dialogs/DeleteKeyDialog.vue index dec4978..40d5755 100644 --- a/frontend/src/components/dialogs/DeleteKeyDialog.vue +++ b/frontend/src/components/dialogs/DeleteKeyDialog.vue @@ -64,7 +64,7 @@ const resetAffected = () => { deleteForm.affectedKeys = [] } -const logLines = computed(() => { +const keyLines = computed(() => { return map(deleteForm.affectedKeys, (k) => decodeRedisKey(k)) }) @@ -126,12 +126,13 @@ const onClose = () => { embedded size="small"> - + + + @@ -152,7 +153,7 @@ const onClose = () => { :disabled="isEmpty(deleteForm.affectedKeys)" :focusable="false" :loading="loading" - type="error" + type="primary" @click="onConfirmDelete"> {{ $t('dialogue.key.confirm_delete_key', { num: size(deleteForm.affectedKeys) }) }} @@ -161,4 +162,15 @@ const onClose = () => { - + diff --git a/frontend/src/components/dialogs/ExportKeyDialog.vue b/frontend/src/components/dialogs/ExportKeyDialog.vue index 8587d02..e653ffa 100644 --- a/frontend/src/components/dialogs/ExportKeyDialog.vue +++ b/frontend/src/components/dialogs/ExportKeyDialog.vue @@ -95,7 +95,13 @@ const onClose = () => { :title="$t('dialogue.key.affected_key') + `(${size(exportKeyForm.keys)})`" embedded size="small"> - + + + @@ -118,4 +124,15 @@ const onClose = () => { - + diff --git a/frontend/src/components/dialogs/SetTtlDialog.vue b/frontend/src/components/dialogs/SetTtlDialog.vue index 10a71aa..331e57f 100644 --- a/frontend/src/components/dialogs/SetTtlDialog.vue +++ b/frontend/src/components/dialogs/SetTtlDialog.vue @@ -3,7 +3,7 @@ import { computed, reactive, ref, watchEffect } from 'vue' import useDialog from 'stores/dialog' import useBrowserStore from 'stores/browser.js' import { useI18n } from 'vue-i18n' -import { isEmpty } from 'lodash' +import { isEmpty, size } from 'lodash' import TtlInput from '@/components/common/TtlInput.vue' const ttlForm = reactive({ @@ -42,6 +42,14 @@ const isBatchAction = computed(() => { return !isEmpty(ttlForm.keys) }) +const title = computed(() => { + if (isBatchAction.value) { + return i18n.t('dialogue.ttl.title_batch', { count: size(ttlForm.keys) }) + } else { + return i18n.t('dialogue.ttl.title') + } +}) + const i18n = useI18n() const quickOption = computed(() => [ { value: -1, unit: 1, label: i18n.t('interface.forever') }, @@ -94,9 +102,7 @@ const onConfirm = async () => { :positive-button-props="{ focusable: false, size: 'medium', loading: procssing }" :positive-text="$t('common.save')" :show-icon="false" - :title=" - isBatchAction ? $t('dialogue.ttl.title_batch', { count: size(ttlForm.keys) }) : $t('dialogue.ttl.title') - " + :title="title" preset="dialog" transform-origin="center">