refactor: reorganized the structure of the multi-language content.
This commit is contained in:
parent
e15bf3ab2f
commit
9152a32fd3
|
@ -22,11 +22,14 @@ const emit = defineEmits(['edit', 'delete', 'save', 'cancel'])
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex-box-h edit-column-func">
|
<div v-else class="flex-box-h edit-column-func">
|
||||||
<icon-button v-if="!props.readonly" :icon="Edit" @click="emit('edit')" />
|
<icon-button v-if="!props.readonly" :icon="Edit" @click="emit('edit')" />
|
||||||
<n-popconfirm :negative-text="$t('cancel')" :positive-text="$t('confirm')" @positive-click="emit('delete')">
|
<n-popconfirm
|
||||||
|
:negative-text="$t('common.cancel')"
|
||||||
|
:positive-text="$t('common.confirm')"
|
||||||
|
@positive-click="emit('delete')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<icon-button :icon="Delete" />
|
<icon-button :icon="Delete" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('remove_tip', { name: props.bindKey }) }}
|
{{ $t('dialogue.remove_tip', { name: props.bindKey }) }}
|
||||||
</n-popconfirm>
|
</n-popconfirm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -23,7 +23,7 @@ const filterServerOption = computed(() => {
|
||||||
value: server,
|
value: server,
|
||||||
}))
|
}))
|
||||||
options.splice(0, 0, {
|
options.splice(0, 0, {
|
||||||
label: i18n.t('all'),
|
label: i18n.t('common.all'),
|
||||||
value: '',
|
value: '',
|
||||||
})
|
})
|
||||||
return options
|
return options
|
||||||
|
@ -45,7 +45,7 @@ const loadHistory = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const cleanHistory = async () => {
|
const cleanHistory = async () => {
|
||||||
$dialog.warning(i18n.t('confirm_clean_log'), () => {
|
$dialog.warning(i18n.t('log.confirm_clean_log'), () => {
|
||||||
data.loading = true
|
data.loading = true
|
||||||
connectionStore
|
connectionStore
|
||||||
.cleanCmdHistory()
|
.cleanCmdHistory()
|
||||||
|
@ -53,7 +53,7 @@ const cleanHistory = async () => {
|
||||||
if (success) {
|
if (success) {
|
||||||
data.history = []
|
data.history = []
|
||||||
tableRef.value?.scrollTo({ top: 0 })
|
tableRef.value?.scrollTo({ top: 0 })
|
||||||
$message.success(i18n.t('success'))
|
$message.success(i18n.t('common.success'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
@ -69,26 +69,26 @@ defineExpose({
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-card
|
<n-card
|
||||||
:title="$t('launch_log')"
|
:title="$t('log.launch_log')"
|
||||||
:bordered="false"
|
:bordered="false"
|
||||||
class="content-container flex-box-v"
|
class="content-container flex-box-v"
|
||||||
content-style="display: flex;flex-direction: column; overflow: hidden;">
|
content-style="display: flex;flex-direction: column; overflow: hidden;">
|
||||||
<n-form :disabled="data.loading" class="flex-item" inline>
|
<n-form :disabled="data.loading" class="flex-item" inline>
|
||||||
<n-form-item :label="$t('filter_server')">
|
<n-form-item :label="$t('log.filter_server')">
|
||||||
<n-select
|
<n-select
|
||||||
v-model:value="data.server"
|
v-model:value="data.server"
|
||||||
:consistent-menu-width="false"
|
:consistent-menu-width="false"
|
||||||
:options="filterServerOption"
|
:options="filterServerOption"
|
||||||
style="min-width: 100px" />
|
style="min-width: 100px" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('filter_keyword')">
|
<n-form-item :label="$t('log.filter_keyword')">
|
||||||
<n-input v-model:value="data.keyword" clearable placeholder="" />
|
<n-input v-model:value="data.keyword" clearable placeholder="" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item label=" ">
|
<n-form-item label=" ">
|
||||||
<icon-button :icon="Refresh" border t-tooltip="refresh" @click="loadHistory" />
|
<icon-button :icon="Refresh" border t-tooltip="log.refresh" @click="loadHistory" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item label=" ">
|
<n-form-item label=" ">
|
||||||
<icon-button :icon="Delete" border t-tooltip="clean_log" @click="cleanHistory" />
|
<icon-button :icon="Delete" border t-tooltip="log.clean_log" @click="cleanHistory" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
<div class="content-value fill-height flex-box-h">
|
<div class="content-value fill-height flex-box-h">
|
||||||
|
@ -96,7 +96,7 @@ defineExpose({
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:columns="[
|
:columns="[
|
||||||
{
|
{
|
||||||
title: $t('exec_time'),
|
title: $t('log.exec_time'),
|
||||||
key: 'timestamp',
|
key: 'timestamp',
|
||||||
defaultSortOrder: 'ascend',
|
defaultSortOrder: 'ascend',
|
||||||
sorter: 'default',
|
sorter: 'default',
|
||||||
|
@ -108,7 +108,7 @@ defineExpose({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: $t('server'),
|
title: $t('log.server'),
|
||||||
key: 'server',
|
key: 'server',
|
||||||
filterOptionValue: data.server,
|
filterOptionValue: data.server,
|
||||||
filter(value, row) {
|
filter(value, row) {
|
||||||
|
@ -120,7 +120,7 @@ defineExpose({
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: $t('cmd'),
|
title: $t('log.cmd'),
|
||||||
key: 'cmd',
|
key: 'cmd',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
filterOptionValue: data.keyword,
|
filterOptionValue: data.keyword,
|
||||||
|
@ -130,7 +130,7 @@ defineExpose({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: $t('cost_time'),
|
title: $t('log.cost_time'),
|
||||||
key: 'cost',
|
key: 'cost',
|
||||||
width: 100,
|
width: 100,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|
|
@ -138,9 +138,9 @@ const onReloadKey = async () => {
|
||||||
@refresh="refreshInfo(true)" />
|
@refresh="refreshInfo(true)" />
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="showNonexists" class="content-container flex-item-expand flex-box-v">
|
<div v-else-if="showNonexists" class="content-container flex-item-expand flex-box-v">
|
||||||
<n-empty :description="$t('nonexist_tab_content')" class="empty-content">
|
<n-empty :description="$t('interface.nonexist_tab_content')" class="empty-content">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<n-button :focusable="false" @click="onReloadKey">{{ $t('reload') }}</n-button>
|
<n-button :focusable="false" @click="onReloadKey">{{ $t('interface.reload') }}</n-button>
|
||||||
</template>
|
</template>
|
||||||
</n-empty>
|
</n-empty>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,13 +8,13 @@ const dialogStore = useDialogStore()
|
||||||
<template>
|
<template>
|
||||||
<div class="content-container flex-box-v">
|
<div class="content-container flex-box-v">
|
||||||
<!-- TODO: replace icon to app icon -->
|
<!-- TODO: replace icon to app icon -->
|
||||||
<n-empty :description="$t('empty_server_content')">
|
<n-empty :description="$t('interface.empty_server_content')">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<n-button :focusable="false" @click="dialogStore.openNewDialog()">
|
<n-button :focusable="false" @click="dialogStore.openNewDialog()">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="AddLink" size="18" />
|
<n-icon :component="AddLink" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('new_conn') }}
|
{{ $t('interface.new_conn') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</template>
|
</template>
|
||||||
</n-empty>
|
</n-empty>
|
||||||
|
|
|
@ -13,7 +13,7 @@ const tabStore = useTabStore()
|
||||||
const connectionStore = useConnectionStore()
|
const connectionStore = useConnectionStore()
|
||||||
|
|
||||||
const onCloseTab = (tabIndex) => {
|
const onCloseTab = (tabIndex) => {
|
||||||
$dialog.warning(i18n.t('close_confirm'), () => {
|
$dialog.warning(i18n.t('dialogue.close_confirm'), () => {
|
||||||
const tab = get(tabStore.tabs, tabIndex)
|
const tab = get(tabStore.tabs, tabIndex)
|
||||||
if (tab != null) {
|
if (tab != null) {
|
||||||
connectionStore.closeConnection(tab.name)
|
connectionStore.closeConnection(tab.name)
|
||||||
|
|
|
@ -28,7 +28,7 @@ const role = computed(() => {
|
||||||
return get(props.info, 'Replication.role', '')
|
return get(props.info, 'Replication.role', '')
|
||||||
})
|
})
|
||||||
|
|
||||||
const timeUnit = ['unit_minute', 'unit_hour', 'unit_day']
|
const timeUnit = ['common.unit_minute', 'common.unit_hour', 'common.unit_day']
|
||||||
const uptime = computed(() => {
|
const uptime = computed(() => {
|
||||||
let seconds = get(props.info, 'Server.uptime_in_seconds', 0)
|
let seconds = get(props.info, 'Server.uptime_in_seconds', 0)
|
||||||
seconds /= 60
|
seconds /= 60
|
||||||
|
@ -102,13 +102,13 @@ const infoFilter = ref('')
|
||||||
</template>
|
</template>
|
||||||
<template #header-extra>
|
<template #header-extra>
|
||||||
<n-space align="center" inline>
|
<n-space align="center" inline>
|
||||||
{{ $t('auto_refresh') }}
|
{{ $t('status.auto_refresh') }}
|
||||||
<n-switch
|
<n-switch
|
||||||
:value="props.autoRefresh"
|
:value="props.autoRefresh"
|
||||||
:loading="props.autoLoading"
|
:loading="props.autoLoading"
|
||||||
@update:value="(v) => emit('update:autoRefresh', v)" />
|
@update:value="(v) => emit('update:autoRefresh', v)" />
|
||||||
<n-tooltip>
|
<n-tooltip>
|
||||||
{{ $t('refresh') }}
|
{{ $t('status.refresh') }}
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<n-button
|
<n-button
|
||||||
circle
|
circle
|
||||||
|
@ -127,31 +127,31 @@ const infoFilter = ref('')
|
||||||
<n-spin :show="props.loading">
|
<n-spin :show="props.loading">
|
||||||
<n-grid style="min-width: 500px" x-gap="5">
|
<n-grid style="min-width: 500px" x-gap="5">
|
||||||
<n-gi :span="6">
|
<n-gi :span="6">
|
||||||
<n-statistic :label="$t('uptime')" :value="uptime[0]">
|
<n-statistic :label="$t('status.uptime')" :value="uptime[0]">
|
||||||
<template #suffix>{{ $t(uptime[1]) }}</template>
|
<template #suffix>{{ $t(uptime[1]) }}</template>
|
||||||
</n-statistic>
|
</n-statistic>
|
||||||
</n-gi>
|
</n-gi>
|
||||||
<n-gi :span="6">
|
<n-gi :span="6">
|
||||||
<n-statistic
|
<n-statistic
|
||||||
:label="$t('connected_clients')"
|
:label="$t('status.connected_clients')"
|
||||||
:value="get(props.info, 'Clients.connected_clients', 0)" />
|
:value="get(props.info, 'Clients.connected_clients', 0)" />
|
||||||
</n-gi>
|
</n-gi>
|
||||||
<n-gi :span="6">
|
<n-gi :span="6">
|
||||||
<n-statistic :value="totalKeys">
|
<n-statistic :value="totalKeys">
|
||||||
<template #label>
|
<template #label>
|
||||||
{{ $t('total_keys') }}
|
{{ $t('status.total_keys') }}
|
||||||
</template>
|
</template>
|
||||||
</n-statistic>
|
</n-statistic>
|
||||||
</n-gi>
|
</n-gi>
|
||||||
<n-gi :span="6">
|
<n-gi :span="6">
|
||||||
<n-statistic :label="$t('memory_used')" :value="usedMemory[0]">
|
<n-statistic :label="$t('status.memory_used')" :value="usedMemory[0]">
|
||||||
<template #suffix>{{ usedMemory[1] }}</template>
|
<template #suffix>{{ usedMemory[1] }}</template>
|
||||||
</n-statistic>
|
</n-statistic>
|
||||||
</n-gi>
|
</n-gi>
|
||||||
</n-grid>
|
</n-grid>
|
||||||
</n-spin>
|
</n-spin>
|
||||||
</n-card>
|
</n-card>
|
||||||
<n-card :title="$t('all_info')">
|
<n-card :title="$t('status.all_info')">
|
||||||
<template #header-extra>
|
<template #header-extra>
|
||||||
<n-input v-model:value="infoFilter" clearable placeholder="">
|
<n-input v-model:value="infoFilter" clearable placeholder="">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
|
@ -165,7 +165,7 @@ const infoFilter = ref('')
|
||||||
<n-data-table
|
<n-data-table
|
||||||
:columns="[
|
:columns="[
|
||||||
{
|
{
|
||||||
title: $t('key'),
|
title: $t('common.key'),
|
||||||
key: 'key',
|
key: 'key',
|
||||||
defaultSortOrder: 'ascend',
|
defaultSortOrder: 'ascend',
|
||||||
sorter: 'default',
|
sorter: 'default',
|
||||||
|
@ -175,7 +175,7 @@ const infoFilter = ref('')
|
||||||
return !!~row.key.indexOf(value.toString())
|
return !!~row.key.indexOf(value.toString())
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ title: $t('value'), key: 'value' },
|
{ title: $t('common.value'), key: 'value' },
|
||||||
]"
|
]"
|
||||||
:data="map(v, (value, key) => ({ value, key }))" />
|
:data="map(v, (value, key) => ({ value, key }))" />
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
|
|
|
@ -41,7 +41,7 @@ const onCopyKey = () => {
|
||||||
ClipboardSetText(props.keyPath)
|
ClipboardSetText(props.keyPath)
|
||||||
.then((succ) => {
|
.then((succ) => {
|
||||||
if (succ) {
|
if (succ) {
|
||||||
$message.success(i18n.t('copy_succ'))
|
$message.success(i18n.t('dialogue.copy_succ'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
@ -50,10 +50,10 @@ const onCopyKey = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const onDeleteKey = () => {
|
const onDeleteKey = () => {
|
||||||
$dialog.warning(i18n.t('remove_tip', { name: props.keyPath }), () => {
|
$dialog.warning(i18n.t('dialogue.remove_tip', { name: props.keyPath }), () => {
|
||||||
connectionStore.deleteKey(props.server, props.db, props.keyPath).then((success) => {
|
connectionStore.deleteKey(props.server, props.db, props.keyPath).then((success) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
$message.success(i18n.t('delete_key_succ', { key: props.keyPath }))
|
$message.success(i18n.t('dialogue.delete_key_succ', { key: props.keyPath }))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -66,10 +66,10 @@ const onDeleteKey = () => {
|
||||||
<redis-type-tag :type="props.keyType" size="large" />
|
<redis-type-tag :type="props.keyType" size="large" />
|
||||||
<n-input v-model:value="props.keyPath">
|
<n-input v-model:value="props.keyPath">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<icon-button :icon="Refresh" size="18" t-tooltip="reload" @click="onReloadKey" />
|
<icon-button :icon="Refresh" size="18" t-tooltip="interface.reload" @click="onReloadKey" />
|
||||||
</template>
|
</template>
|
||||||
</n-input>
|
</n-input>
|
||||||
<icon-button :icon="Copy" border size="18" t-tooltip="copy_key" @click="onCopyKey" />
|
<icon-button :icon="Copy" border size="18" t-tooltip="interface.copy_key" @click="onCopyKey" />
|
||||||
</n-input-group>
|
</n-input-group>
|
||||||
<n-button-group>
|
<n-button-group>
|
||||||
<n-tooltip>
|
<n-tooltip>
|
||||||
|
@ -79,9 +79,9 @@ const onDeleteKey = () => {
|
||||||
<n-icon :component="Timer" size="18" />
|
<n-icon :component="Timer" size="18" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="ttl < 0">
|
<template v-if="ttl < 0">
|
||||||
{{ $t('forever') }}
|
{{ $t('interface.forever') }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>{{ ttl }} {{ $t('second') }}</template>
|
<template v-else>{{ ttl }} {{ $t('common.second') }}</template>
|
||||||
</n-button>
|
</n-button>
|
||||||
</template>
|
</template>
|
||||||
TTL
|
TTL
|
||||||
|
@ -90,7 +90,7 @@ const onDeleteKey = () => {
|
||||||
:icon="Edit"
|
:icon="Edit"
|
||||||
border
|
border
|
||||||
size="18"
|
size="18"
|
||||||
t-tooltip="rename_key"
|
t-tooltip="interface.rename_key"
|
||||||
@click="dialogStore.openRenameKeyDialog(props.server, props.db, props.keyPath)" />
|
@click="dialogStore.openRenameKeyDialog(props.server, props.db, props.keyPath)" />
|
||||||
</n-button-group>
|
</n-button-group>
|
||||||
<n-tooltip>
|
<n-tooltip>
|
||||||
|
@ -101,7 +101,7 @@ const onDeleteKey = () => {
|
||||||
</template>
|
</template>
|
||||||
</n-button>
|
</n-button>
|
||||||
</template>
|
</template>
|
||||||
{{ $t('delete_key') }}
|
{{ $t('interface.delete_key') }}
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -24,11 +24,11 @@ const props = defineProps({
|
||||||
const filterOption = [
|
const filterOption = [
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: i18n.t('field'),
|
label: i18n.t('common.field'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 2,
|
value: 2,
|
||||||
label: i18n.t('value'),
|
label: i18n.t('common.value'),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
const filterType = ref(1)
|
const filterType = ref(1)
|
||||||
|
@ -43,7 +43,7 @@ const currentEditRow = ref({
|
||||||
})
|
})
|
||||||
const fieldColumn = reactive({
|
const fieldColumn = reactive({
|
||||||
key: 'key',
|
key: 'key',
|
||||||
title: i18n.t('field'),
|
title: i18n.t('common.field'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
resizable: true,
|
resizable: true,
|
||||||
|
@ -68,7 +68,7 @@ const fieldColumn = reactive({
|
||||||
})
|
})
|
||||||
const valueColumn = reactive({
|
const valueColumn = reactive({
|
||||||
key: 'value',
|
key: 'value',
|
||||||
title: i18n.t('value'),
|
title: i18n.t('common.value'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
resizable: true,
|
resizable: true,
|
||||||
|
@ -99,7 +99,7 @@ const valueColumn = reactive({
|
||||||
})
|
})
|
||||||
const actionColumn = {
|
const actionColumn = {
|
||||||
key: 'action',
|
key: 'action',
|
||||||
title: i18n.t('action'),
|
title: i18n.t('interface.action'),
|
||||||
width: 100,
|
width: 100,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
|
@ -123,7 +123,7 @@ const actionColumn = {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
||||||
$message.success(i18n.t('delete_key_succ', { key: row.key }))
|
$message.success(i18n.t('dialogue.delete_key_succ', { key: row.key }))
|
||||||
// update display value
|
// update display value
|
||||||
// if (!isEmpty(removed)) {
|
// if (!isEmpty(removed)) {
|
||||||
// for (const elem of removed) {
|
// for (const elem of removed) {
|
||||||
|
@ -149,7 +149,7 @@ const actionColumn = {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
||||||
$message.success(i18n.t('save_value_succ'))
|
$message.success(i18n.t('dialogue.save_value_succ'))
|
||||||
// update display value
|
// update display value
|
||||||
// if (!isEmpty(updated)) {
|
// if (!isEmpty(updated)) {
|
||||||
// for (const key in updated) {
|
// for (const key in updated) {
|
||||||
|
@ -251,7 +251,7 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
@update:value="onChangeFilterType" />
|
@update:value="onChangeFilterType" />
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="filterValue"
|
v-model:value="filterValue"
|
||||||
:placeholder="$t('search')"
|
:placeholder="$t('interface.search')"
|
||||||
clearable
|
clearable
|
||||||
@clear="clearFilter"
|
@clear="clearFilter"
|
||||||
@update:value="onFilterInput" />
|
@update:value="onFilterInput" />
|
||||||
|
@ -262,7 +262,7 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="AddLink" size="18" />
|
<n-icon :component="AddLink" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('add_row') }}
|
{{ $t('interface.add_row') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="value-wrapper fill-height flex-box-h">
|
<div class="value-wrapper fill-height flex-box-h">
|
||||||
|
|
|
@ -31,7 +31,7 @@ const currentEditRow = ref({
|
||||||
})
|
})
|
||||||
const valueColumn = reactive({
|
const valueColumn = reactive({
|
||||||
key: 'value',
|
key: 'value',
|
||||||
title: i18n.t('value'),
|
title: i18n.t('common.value'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
filterOptionValue: null,
|
filterOptionValue: null,
|
||||||
|
@ -57,7 +57,7 @@ const valueColumn = reactive({
|
||||||
})
|
})
|
||||||
const actionColumn = {
|
const actionColumn = {
|
||||||
key: 'action',
|
key: 'action',
|
||||||
title: i18n.t('action'),
|
title: i18n.t('interface.action'),
|
||||||
width: 100,
|
width: 100,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
|
@ -80,7 +80,7 @@ const actionColumn = {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
||||||
$message.success(i18n.t('delete_key_succ', { key: '#' + row.no }))
|
$message.success(i18n.t('dialogue.delete_key_succ', { key: '#' + row.no }))
|
||||||
// update display value
|
// update display value
|
||||||
// if (!isEmpty(removed)) {
|
// if (!isEmpty(removed)) {
|
||||||
// props.value.splice(removed[0], 1)
|
// props.value.splice(removed[0], 1)
|
||||||
|
@ -103,7 +103,7 @@ const actionColumn = {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
||||||
$message.success(i18n.t('save_value_succ'))
|
$message.success(i18n.t('dialogue.save_value_succ'))
|
||||||
// update display value
|
// update display value
|
||||||
// if (!isEmpty(updated)) {
|
// if (!isEmpty(updated)) {
|
||||||
// for (const key in updated) {
|
// for (const key in updated) {
|
||||||
|
@ -176,7 +176,7 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<div class="flex-box-h">
|
<div class="flex-box-h">
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="filterValue"
|
v-model:value="filterValue"
|
||||||
:placeholder="$t('search')"
|
:placeholder="$t('interface.search')"
|
||||||
clearable
|
clearable
|
||||||
@clear="clearFilter"
|
@clear="clearFilter"
|
||||||
@update:value="onFilterInput" />
|
@update:value="onFilterInput" />
|
||||||
|
@ -186,7 +186,7 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="AddLink" size="18" />
|
<n-icon :component="AddLink" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('add_row') }}
|
{{ $t('interface.add_row') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="value-wrapper fill-height flex-box-h">
|
<div class="value-wrapper fill-height flex-box-h">
|
||||||
|
|
|
@ -32,7 +32,7 @@ const currentEditRow = ref({
|
||||||
|
|
||||||
const valueColumn = reactive({
|
const valueColumn = reactive({
|
||||||
key: 'value',
|
key: 'value',
|
||||||
title: i18n.t('value'),
|
title: i18n.t('common.value'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
filterOptionValue: null,
|
filterOptionValue: null,
|
||||||
|
@ -58,7 +58,7 @@ const valueColumn = reactive({
|
||||||
})
|
})
|
||||||
const actionColumn = {
|
const actionColumn = {
|
||||||
key: 'action',
|
key: 'action',
|
||||||
title: i18n.t('action'),
|
title: i18n.t('interface.action'),
|
||||||
width: 100,
|
width: 100,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
|
@ -82,7 +82,7 @@ const actionColumn = {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
||||||
$message.success(i18n.t('delete_key_succ', { key: row.value }))
|
$message.success(i18n.t('dialogue.delete_key_succ', { key: row.value }))
|
||||||
// update display value
|
// update display value
|
||||||
// props.value.splice(row.no - 1, 1)
|
// props.value.splice(row.no - 1, 1)
|
||||||
} else {
|
} else {
|
||||||
|
@ -103,7 +103,7 @@ const actionColumn = {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
||||||
$message.success(i18n.t('save_value_succ'))
|
$message.success(i18n.t('dialogue.save_value_succ'))
|
||||||
// update display value
|
// update display value
|
||||||
// props.value[row.no - 1] = currentEditRow.value.value
|
// props.value[row.no - 1] = currentEditRow.value.value
|
||||||
} else {
|
} else {
|
||||||
|
@ -172,7 +172,7 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<div class="flex-box-h">
|
<div class="flex-box-h">
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="filterValue"
|
v-model:value="filterValue"
|
||||||
:placeholder="$t('search')"
|
:placeholder="$t('interface.search')"
|
||||||
clearable
|
clearable
|
||||||
@clear="clearFilter"
|
@clear="clearFilter"
|
||||||
@update:value="onFilterInput" />
|
@update:value="onFilterInput" />
|
||||||
|
@ -182,7 +182,7 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="AddLink" size="18" />
|
<n-icon :component="AddLink" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('add_row') }}
|
{{ $t('interface.add_row') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="value-wrapper fill-height flex-box-h">
|
<div class="value-wrapper fill-height flex-box-h">
|
||||||
|
|
|
@ -25,11 +25,11 @@ const props = defineProps({
|
||||||
const filterOption = [
|
const filterOption = [
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: i18n.t('field'),
|
label: i18n.t('common.field'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 2,
|
value: 2,
|
||||||
label: i18n.t('value'),
|
label: i18n.t('common.value'),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
const filterType = ref(1)
|
const filterType = ref(1)
|
||||||
|
@ -46,7 +46,7 @@ const idColumn = reactive({
|
||||||
})
|
})
|
||||||
const valueColumn = reactive({
|
const valueColumn = reactive({
|
||||||
key: 'value',
|
key: 'value',
|
||||||
title: i18n.t('value'),
|
title: i18n.t('common.value'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
resizable: true,
|
resizable: true,
|
||||||
|
@ -71,7 +71,7 @@ const valueColumn = reactive({
|
||||||
})
|
})
|
||||||
const actionColumn = {
|
const actionColumn = {
|
||||||
key: 'action',
|
key: 'action',
|
||||||
title: i18n.t('action'),
|
title: i18n.t('interface.action'),
|
||||||
width: 60,
|
width: 60,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
|
@ -90,7 +90,7 @@ const actionColumn = {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
||||||
$message.success(i18n.t('delete_key_succ', { key: row.id }))
|
$message.success(i18n.t('dialogue.delete_key_succ', { key: row.id }))
|
||||||
// update display value
|
// update display value
|
||||||
// if (!isEmpty(removed)) {
|
// if (!isEmpty(removed)) {
|
||||||
// for (const elem of removed) {
|
// for (const elem of removed) {
|
||||||
|
@ -164,7 +164,7 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
@update:value="onChangeFilterType" />
|
@update:value="onChangeFilterType" />
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="filterValue"
|
v-model:value="filterValue"
|
||||||
:placeholder="$t('search')"
|
:placeholder="$t('interface.search')"
|
||||||
clearable
|
clearable
|
||||||
@clear="clearFilter"
|
@clear="clearFilter"
|
||||||
@update:value="onFilterInput" />
|
@update:value="onFilterInput" />
|
||||||
|
@ -175,7 +175,7 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="AddLink" size="18" />
|
<n-icon :component="AddLink" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('add_row') }}
|
{{ $t('interface.add_row') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="value-wrapper fill-height flex-box-h">
|
<div class="value-wrapper fill-height flex-box-h">
|
||||||
|
|
|
@ -115,7 +115,7 @@ const onCopyValue = () => {
|
||||||
ClipboardSetText(viewValue.value)
|
ClipboardSetText(viewValue.value)
|
||||||
.then((succ) => {
|
.then((succ) => {
|
||||||
if (succ) {
|
if (succ) {
|
||||||
$message.success(i18n.t('copy_succ'))
|
$message.success(i18n.t('dialogue.copy_succ'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
@ -152,7 +152,7 @@ const onSaveValue = async () => {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
await connectionStore.loadKeyValue(props.name, props.db, props.keyPath)
|
await connectionStore.loadKeyValue(props.name, props.db, props.keyPath)
|
||||||
$message.success(i18n.t('save_value_succ'))
|
$message.success(i18n.t('dialogue.save_value_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ const onSaveValue = async () => {
|
||||||
<div class="content-wrapper flex-box-v">
|
<div class="content-wrapper flex-box-v">
|
||||||
<content-toolbar :db="props.db" :key-path="keyPath" :key-type="keyType" :server="props.name" :ttl="ttl" />
|
<content-toolbar :db="props.db" :key-path="keyPath" :key-type="keyType" :server="props.name" :ttl="ttl" />
|
||||||
<div class="tb2 flex-box-h">
|
<div class="tb2 flex-box-h">
|
||||||
<n-text>{{ $t('view_as') }}</n-text>
|
<n-text>{{ $t('interface.view_as') }}</n-text>
|
||||||
<n-select v-model:value="viewAs" :options="viewOption" style="width: 200px" />
|
<n-select v-model:value="viewAs" :options="viewOption" style="width: 200px" />
|
||||||
<div class="flex-item-expand"></div>
|
<div class="flex-item-expand"></div>
|
||||||
<n-button-group v-if="!inEdit">
|
<n-button-group v-if="!inEdit">
|
||||||
|
@ -177,13 +177,13 @@ const onSaveValue = async () => {
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="Copy" size="18" />
|
<n-icon :component="Copy" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('copy_value') }}
|
{{ $t('interface.copy_value') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button plain :focusable="false" @click="onEditValue">
|
<n-button plain :focusable="false" @click="onEditValue">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="Edit" size="18" />
|
<n-icon :component="Edit" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('edit_value') }}
|
{{ $t('interface.edit_value') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</n-button-group>
|
</n-button-group>
|
||||||
<n-button-group v-else>
|
<n-button-group v-else>
|
||||||
|
@ -191,13 +191,13 @@ const onSaveValue = async () => {
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="Save" size="18" />
|
<n-icon :component="Save" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('save_update') }}
|
{{ $t('interface.save_update') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button :loading="saving" :focusable="false" plain @click="onCancelEdit">
|
<n-button :loading="saving" :focusable="false" plain @click="onCancelEdit">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="Close" size="18" />
|
<n-icon :component="Close" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('cancel') }}
|
{{ $t('common.cancel') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</n-button-group>
|
</n-button-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,11 +25,11 @@ const props = defineProps({
|
||||||
const filterOption = [
|
const filterOption = [
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: i18n.t('value'),
|
label: i18n.t('common.value'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 2,
|
value: 2,
|
||||||
label: i18n.t('score'),
|
label: i18n.t('interface.score'),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
const filterType = ref(1)
|
const filterType = ref(1)
|
||||||
|
@ -44,7 +44,7 @@ const currentEditRow = ref({
|
||||||
})
|
})
|
||||||
const scoreColumn = reactive({
|
const scoreColumn = reactive({
|
||||||
key: 'score',
|
key: 'score',
|
||||||
title: i18n.t('score'),
|
title: i18n.t('interface.score'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
resizable: true,
|
resizable: true,
|
||||||
|
@ -98,7 +98,7 @@ const scoreColumn = reactive({
|
||||||
})
|
})
|
||||||
const valueColumn = reactive({
|
const valueColumn = reactive({
|
||||||
key: 'value',
|
key: 'value',
|
||||||
title: i18n.t('value'),
|
title: i18n.t('common.value'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
resizable: true,
|
resizable: true,
|
||||||
|
@ -129,7 +129,7 @@ const valueColumn = reactive({
|
||||||
})
|
})
|
||||||
const actionColumn = {
|
const actionColumn = {
|
||||||
key: 'action',
|
key: 'action',
|
||||||
title: i18n.t('action'),
|
title: i18n.t('interface.action'),
|
||||||
width: 100,
|
width: 100,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
titleAlign: 'center',
|
titleAlign: 'center',
|
||||||
|
@ -153,7 +153,7 @@ const actionColumn = {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
||||||
$message.success(i18n.t('delete_key_succ', { key: row.value }))
|
$message.success(i18n.t('dialogue.delete_key_succ', { key: row.value }))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ const actionColumn = {
|
||||||
try {
|
try {
|
||||||
const newValue = currentEditRow.value.value
|
const newValue = currentEditRow.value.value
|
||||||
if (isEmpty(newValue)) {
|
if (isEmpty(newValue)) {
|
||||||
$message.error(i18n.t('spec_field_required', { key: i18n.t('value') }))
|
$message.error(i18n.t('dialogue.spec_field_required', { key: i18n.t('common.value') }))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const { success, msg } = await connectionStore.updateZSetItem(
|
const { success, msg } = await connectionStore.updateZSetItem(
|
||||||
|
@ -178,7 +178,7 @@ const actionColumn = {
|
||||||
)
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
connectionStore.loadKeyValue(props.name, props.db, props.keyPath).then((r) => {})
|
||||||
$message.success(i18n.t('save_value_succ'))
|
$message.success(i18n.t('dialogue.save_value_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -279,12 +279,12 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="filterValue"
|
v-model:value="filterValue"
|
||||||
:placeholder="$t('search')"
|
:placeholder="$t('interface.search')"
|
||||||
clearable
|
clearable
|
||||||
@clear="clearFilter"
|
@clear="clearFilter"
|
||||||
@update:value="onFilterInput" />
|
@update:value="onFilterInput" />
|
||||||
</template>
|
</template>
|
||||||
<div class="text-block">{{ $t('score_filter_tip') }}</div>
|
<div class="text-block">{{ $t('interface.score_filter_tip') }}</div>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
</n-input-group>
|
</n-input-group>
|
||||||
</div>
|
</div>
|
||||||
|
@ -293,7 +293,7 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="AddLink" size="18" />
|
<n-icon :component="AddLink" size="18" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('add_row') }}
|
{{ $t('interface.add_row') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="value-wrapper fill-height flex-box-h">
|
<div class="value-wrapper fill-height flex-box-h">
|
||||||
|
|
|
@ -47,15 +47,15 @@ const defaultValue = {
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
switch (newForm.type) {
|
switch (newForm.type) {
|
||||||
case types.LIST:
|
case types.LIST:
|
||||||
return i18n.t('new_item')
|
return i18n.t('dialogue.field.new_item')
|
||||||
case types.HASH:
|
case types.HASH:
|
||||||
return i18n.t('new_field')
|
return i18n.t('dialogue.field.new')
|
||||||
case types.SET:
|
case types.SET:
|
||||||
return i18n.t('new_field')
|
return i18n.t('dialogue.field.new')
|
||||||
case types.ZSET:
|
case types.ZSET:
|
||||||
return i18n.t('new_field')
|
return i18n.t('dialogue.field.new')
|
||||||
case types.STREAM:
|
case types.STREAM:
|
||||||
return i18n.t('new_field')
|
return i18n.t('dialogue.field.new')
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
})
|
})
|
||||||
|
@ -98,7 +98,7 @@ const onAdd = async () => {
|
||||||
if (newForm.reload) {
|
if (newForm.reload) {
|
||||||
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
||||||
}
|
}
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ const onAdd = async () => {
|
||||||
if (newForm.reload) {
|
if (newForm.reload) {
|
||||||
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
||||||
}
|
}
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ const onAdd = async () => {
|
||||||
if (newForm.reload) {
|
if (newForm.reload) {
|
||||||
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
||||||
}
|
}
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ const onAdd = async () => {
|
||||||
if (newForm.reload) {
|
if (newForm.reload) {
|
||||||
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
||||||
}
|
}
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ const onAdd = async () => {
|
||||||
if (newForm.reload) {
|
if (newForm.reload) {
|
||||||
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
connectionStore.loadKeyValue(server, db, key).then(() => {})
|
||||||
}
|
}
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -187,9 +187,9 @@ const onClose = () => {
|
||||||
:close-on-esc="false"
|
:close-on-esc="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:negative-button-props="{ size: 'medium' }"
|
:negative-button-props="{ size: 'medium' }"
|
||||||
:negative-text="$t('cancel')"
|
:negative-text="$t('common.cancel')"
|
||||||
:positive-button-props="{ size: 'medium' }"
|
:positive-button-props="{ size: 'medium' }"
|
||||||
:positive-text="$t('confirm')"
|
:positive-text="$t('common.confirm')"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
:title="title"
|
:title="title"
|
||||||
preset="dialog"
|
preset="dialog"
|
||||||
|
@ -199,7 +199,7 @@ const onClose = () => {
|
||||||
@negative-click="onClose">
|
@negative-click="onClose">
|
||||||
<n-scrollbar style="max-height: 500px">
|
<n-scrollbar style="max-height: 500px">
|
||||||
<n-form :model="newForm" :show-require-mark="false" label-placement="top" style="padding-right: 15px">
|
<n-form :model="newForm" :show-require-mark="false" label-placement="top" style="padding-right: 15px">
|
||||||
<n-form-item :label="$t('key')" path="key" required>
|
<n-form-item :label="$t('common.key')" path="key" required>
|
||||||
<n-input v-model:value="newForm.key" placeholder="" readonly />
|
<n-input v-model:value="newForm.key" placeholder="" readonly />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<component
|
<component
|
||||||
|
@ -208,7 +208,7 @@ const onClose = () => {
|
||||||
v-model:value="newForm.value" />
|
v-model:value="newForm.value" />
|
||||||
<n-form-item label=" " path="key" required>
|
<n-form-item label=" " path="key" required>
|
||||||
<n-checkbox v-model:checked="newForm.reload">
|
<n-checkbox v-model:checked="newForm.reload">
|
||||||
{{ $t('reload_when_succ') }}
|
{{ $t('dialogue.field.reload_when_succ') }}
|
||||||
</n-checkbox>
|
</n-checkbox>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
|
|
|
@ -18,7 +18,7 @@ const i18n = useI18n()
|
||||||
const editName = ref('')
|
const editName = ref('')
|
||||||
const generalForm = ref(null)
|
const generalForm = ref(null)
|
||||||
const generalFormRules = () => {
|
const generalFormRules = () => {
|
||||||
const requiredMsg = i18n.t('field_required')
|
const requiredMsg = i18n.t('dialogue.field_required')
|
||||||
const illegalChars = ['/', '\\']
|
const illegalChars = ['/', '\\']
|
||||||
return {
|
return {
|
||||||
name: [
|
name: [
|
||||||
|
@ -27,7 +27,7 @@ const generalFormRules = () => {
|
||||||
validator: (rule, value) => {
|
validator: (rule, value) => {
|
||||||
return every(illegalChars, (c) => !includes(value, c))
|
return every(illegalChars, (c) => !includes(value, c))
|
||||||
},
|
},
|
||||||
message: i18n.t('illegal_characters'),
|
message: i18n.t('dialogue.illegal_characters'),
|
||||||
trigger: 'input',
|
trigger: 'input',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -50,7 +50,7 @@ const groupOptions = computed(() => {
|
||||||
value: group,
|
value: group,
|
||||||
}))
|
}))
|
||||||
options.splice(0, 0, {
|
options.splice(0, 0, {
|
||||||
label: i18n.t('no_group'),
|
label: i18n.t('dialogue.connection.no_group'),
|
||||||
value: '',
|
value: '',
|
||||||
})
|
})
|
||||||
return options
|
return options
|
||||||
|
@ -86,7 +86,7 @@ const onSaveConnection = async () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
onClose()
|
onClose()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,26 +149,30 @@ const onClose = () => {
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:on-after-leave="resetForm"
|
:on-after-leave="resetForm"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
:title="isEditMode ? $t('edit_conn_title') : $t('new_conn_title')"
|
:title="isEditMode ? $t('dialogue.connection.edit_title') : $t('dialogue.connection.new_title')"
|
||||||
preset="dialog"
|
preset="dialog"
|
||||||
transform-origin="center">
|
transform-origin="center">
|
||||||
<n-spin :show="closingConnection">
|
<n-spin :show="closingConnection">
|
||||||
<n-tabs v-model:value="tab" animated type="line">
|
<n-tabs v-model:value="tab" animated type="line">
|
||||||
<n-tab-pane :tab="$t('general')" display-directive="show" name="general">
|
<n-tab-pane :tab="$t('dialogue.connection.general')" display-directive="show" name="general">
|
||||||
<n-form
|
<n-form
|
||||||
ref="generalFormRef"
|
ref="generalFormRef"
|
||||||
:model="generalForm"
|
:model="generalForm"
|
||||||
:rules="generalFormRules()"
|
:rules="generalFormRules()"
|
||||||
:show-require-mark="false"
|
:show-require-mark="false"
|
||||||
label-placement="top">
|
label-placement="top">
|
||||||
<n-form-item :label="$t('conn_name')" path="name" required>
|
<n-form-item :label="$t('dialogue.connection.conn_name')" path="name" required>
|
||||||
<n-input v-model:value="generalForm.name" :placeholder="$t('conn_name_tip')" />
|
<n-input
|
||||||
|
v-model:value="generalForm.name"
|
||||||
|
:placeholder="$t('dialogue.connection.name_tip')" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item v-if="!isEditMode" :label="$t('conn_group')" required>
|
<n-form-item v-if="!isEditMode" :label="$t('dialogue.connection.group')" required>
|
||||||
<n-select v-model:value="generalForm.group" :options="groupOptions" />
|
<n-select v-model:value="generalForm.group" :options="groupOptions" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('conn_addr')" path="addr" required>
|
<n-form-item :label="$t('dialogue.connection.addr')" path="addr" required>
|
||||||
<n-input v-model:value="generalForm.addr" :placeholder="$t('conn_addr_tip')" />
|
<n-input
|
||||||
|
v-model:value="generalForm.addr"
|
||||||
|
:placeholder="$t('dialogue.connection.addr_tip')" />
|
||||||
<n-text style="width: 40px; text-align: center">:</n-text>
|
<n-text style="width: 40px; text-align: center">:</n-text>
|
||||||
<n-input-number
|
<n-input-number
|
||||||
v-model:value="generalForm.port"
|
v-model:value="generalForm.port"
|
||||||
|
@ -176,51 +180,51 @@ const onClose = () => {
|
||||||
:min="1"
|
:min="1"
|
||||||
style="width: 200px" />
|
style="width: 200px" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('conn_pwd')" path="password">
|
<n-form-item :label="$t('dialogue.connection.pwd')" path="password">
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="generalForm.password"
|
v-model:value="generalForm.password"
|
||||||
:placeholder="$t('conn_pwd_tip')"
|
:placeholder="$t('dialogue.connection.pwd_tip')"
|
||||||
show-password-on="click"
|
show-password-on="click"
|
||||||
type="password" />
|
type="password" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('conn_usr')" path="username">
|
<n-form-item :label="$t('dialogue.connection.usr')" path="username">
|
||||||
<n-input v-model="generalForm.username" :placeholder="$t('conn_usr_tip')" />
|
<n-input v-model="generalForm.username" :placeholder="$t('dialogue.connection.usr_tip')" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
|
|
||||||
<n-tab-pane :tab="$t('advanced')" display-directive="show" name="advanced">
|
<n-tab-pane :tab="$t('dialogue.connection.advanced')" display-directive="show" name="advanced">
|
||||||
<n-form
|
<n-form
|
||||||
ref="advanceFormRef"
|
ref="advanceFormRef"
|
||||||
:model="generalForm"
|
:model="generalForm"
|
||||||
:rules="generalFormRules()"
|
:rules="generalFormRules()"
|
||||||
:show-require-mark="false"
|
:show-require-mark="false"
|
||||||
label-placement="top">
|
label-placement="top">
|
||||||
<n-form-item :label="$t('conn_advn_filter')" path="defaultFilter">
|
<n-form-item :label="$t('dialogue.connection.advn_filter')" path="defaultFilter">
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="generalForm.defaultFilter"
|
v-model:value="generalForm.defaultFilter"
|
||||||
:placeholder="$t('conn_advn_filter_tip')" />
|
:placeholder="$t('dialogue.connection.advn_filter_tip')" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('conn_advn_separator')" path="keySeparator">
|
<n-form-item :label="$t('dialogue.connection.advn_separator')" path="keySeparator">
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="generalForm.keySeparator"
|
v-model:value="generalForm.keySeparator"
|
||||||
:placeholder="$t('conn_advn_separator_tip')" />
|
:placeholder="$t('dialogue.connection.advn_separator_tip')" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('conn_advn_conn_timeout')" path="connTimeout">
|
<n-form-item :label="$t('dialogue.connection.advn_conn_timeout')" path="connTimeout">
|
||||||
<n-input-number v-model:value="generalForm.connTimeout" :max="999999" :min="1">
|
<n-input-number v-model:value="generalForm.connTimeout" :max="999999" :min="1">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
{{ $t('second') }}
|
{{ $t('common.second') }}
|
||||||
</template>
|
</template>
|
||||||
</n-input-number>
|
</n-input-number>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('conn_advn_exec_timeout')" path="execTimeout">
|
<n-form-item :label="$t('dialogue.connection.advn_exec_timeout')" path="execTimeout">
|
||||||
<n-input-number v-model:value="generalForm.execTimeout" :max="999999" :min="1">
|
<n-input-number v-model:value="generalForm.execTimeout" :max="999999" :min="1">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
{{ $t('second') }}
|
{{ $t('common.second') }}
|
||||||
</template>
|
</template>
|
||||||
</n-input-number>
|
</n-input-number>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('conn_advn_mark_color')" path="markColor">
|
<n-form-item :label="$t('dialogue.connection.advn_mark_color')" path="markColor">
|
||||||
<div
|
<div
|
||||||
v-for="color in predefineColors"
|
v-for="color in predefineColors"
|
||||||
:key="color"
|
:key="color"
|
||||||
|
@ -240,9 +244,9 @@ const onClose = () => {
|
||||||
<!-- test result alert-->
|
<!-- test result alert-->
|
||||||
<n-alert
|
<n-alert
|
||||||
v-if="showTestResult"
|
v-if="showTestResult"
|
||||||
:title="isEmpty(testResult) ? '' : $t('conn_test_fail')"
|
:title="isEmpty(testResult) ? '' : $t('dialogue.connection.test_fail')"
|
||||||
:type="isEmpty(testResult) ? 'success' : 'error'">
|
:type="isEmpty(testResult) ? 'success' : 'error'">
|
||||||
<template v-if="isEmpty(testResult)">{{ $t('conn_test_succ') }}</template>
|
<template v-if="isEmpty(testResult)">{{ $t('dialogue.connection.test_succ') }}</template>
|
||||||
<template v-else>{{ testResult }}</template>
|
<template v-else>{{ testResult }}</template>
|
||||||
</n-alert>
|
</n-alert>
|
||||||
</n-spin>
|
</n-spin>
|
||||||
|
@ -250,15 +254,15 @@ const onClose = () => {
|
||||||
<template #action>
|
<template #action>
|
||||||
<div class="flex-item-expand">
|
<div class="flex-item-expand">
|
||||||
<n-button :focusable="false" :disabled="closingConnection" :loading="testing" @click="onTestConnection">
|
<n-button :focusable="false" :disabled="closingConnection" :loading="testing" @click="onTestConnection">
|
||||||
{{ $t('conn_test') }}
|
{{ $t('dialogue.connection.test') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-item n-dialog__action">
|
<div class="flex-item n-dialog__action">
|
||||||
<n-button :focusable="false" :disabled="closingConnection" @click="onClose">
|
<n-button :focusable="false" :disabled="closingConnection" @click="onClose">
|
||||||
{{ $t('cancel') }}
|
{{ $t('common.cancel') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button :focusable="false" :disabled="closingConnection" type="primary" @click="onSaveConnection">
|
<n-button :focusable="false" :disabled="closingConnection" type="primary" @click="onSaveConnection">
|
||||||
{{ isEditMode ? $t('update') : $t('confirm') }}
|
{{ isEditMode ? $t('preferences.general.update') : $t('common.confirm') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -53,7 +53,7 @@ const onConfirmDelete = async () => {
|
||||||
const { server, db, key } = deleteForm
|
const { server, db, key } = deleteForm
|
||||||
const success = await connectionStore.deleteKeyPrefix(server, db, key)
|
const success = await connectionStore.deleteKeyPrefix(server, db, key)
|
||||||
if (success) {
|
if (success) {
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$message.error(e.message)
|
$message.error(e.message)
|
||||||
|
@ -73,20 +73,20 @@ const onClose = () => {
|
||||||
:close-on-esc="false"
|
:close-on-esc="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
:title="$t('batch_delete_key')"
|
:title="$t('interface.batch_delete_key')"
|
||||||
preset="dialog"
|
preset="dialog"
|
||||||
transform-origin="center">
|
transform-origin="center">
|
||||||
<n-form :model="deleteForm" :show-require-mark="false" label-placement="top">
|
<n-form :model="deleteForm" :show-require-mark="false" label-placement="top">
|
||||||
<n-form-item :label="$t('server')">
|
<n-form-item :label="$t('dialogue.key.server')">
|
||||||
<n-input :value="deleteForm.server" readonly />
|
<n-input :value="deleteForm.server" readonly />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('db_index')">
|
<n-form-item :label="$t('dialogue.key.db_index')">
|
||||||
<n-input :value="deleteForm.db.toString()" readonly />
|
<n-input :value="deleteForm.db.toString()" readonly />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('key_expression')" required>
|
<n-form-item :label="$t('dialogue.key.key_expression')" required>
|
||||||
<n-input v-model:value="deleteForm.key" placeholder="" @input="resetAffected" />
|
<n-input v-model:value="deleteForm.key" placeholder="" @input="resetAffected" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-card v-if="deleteForm.showAffected" :title="$t('affected_key')" size="small">
|
<n-card v-if="deleteForm.showAffected" :title="$t('dialogue.key.affected_key')" size="small">
|
||||||
<n-skeleton v-if="deleteForm.loadingAffected" :repeat="10" text />
|
<n-skeleton v-if="deleteForm.loadingAffected" :repeat="10" text />
|
||||||
<n-log
|
<n-log
|
||||||
v-else
|
v-else
|
||||||
|
@ -99,9 +99,9 @@ const onClose = () => {
|
||||||
|
|
||||||
<template #action>
|
<template #action>
|
||||||
<div class="flex-item n-dialog__action">
|
<div class="flex-item n-dialog__action">
|
||||||
<n-button :focusable="false" @click="onClose">{{ $t('cancel') }}</n-button>
|
<n-button :focusable="false" @click="onClose">{{ $t('common.cancel') }}</n-button>
|
||||||
<n-button v-if="!deleteForm.showAffected" type="primary" :focusable="false" @click="scanAffectedKey">
|
<n-button v-if="!deleteForm.showAffected" type="primary" :focusable="false" @click="scanAffectedKey">
|
||||||
{{ $t('show_affected_key') }}
|
{{ $t('dialogue.key.show_affected_key') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button
|
<n-button
|
||||||
v-else
|
v-else
|
||||||
|
@ -109,7 +109,7 @@ const onClose = () => {
|
||||||
:disabled="isEmpty(deleteForm.affectedKeys)"
|
:disabled="isEmpty(deleteForm.affectedKeys)"
|
||||||
type="error"
|
type="error"
|
||||||
@click="onConfirmDelete">
|
@click="onConfirmDelete">
|
||||||
{{ $t('confirm_delete_key', { num: size(deleteForm.affectedKeys) }) }}
|
{{ $t('dialogue.key.confirm_delete_key', { num: size(deleteForm.affectedKeys) }) }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -34,14 +34,14 @@ const onConfirm = async () => {
|
||||||
if (isRenameMode.value) {
|
if (isRenameMode.value) {
|
||||||
const { success, msg } = await connectionStore.renameGroup(editGroup.value, name)
|
const { success, msg } = await connectionStore.renameGroup(editGroup.value, name)
|
||||||
if (success) {
|
if (success) {
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const { success, msg } = await connectionStore.createGroup(name)
|
const { success, msg } = await connectionStore.createGroup(name)
|
||||||
if (success) {
|
if (success) {
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -68,17 +68,17 @@ const onClose = () => {
|
||||||
:close-on-esc="false"
|
:close-on-esc="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:negative-button-props="{ size: 'medium' }"
|
:negative-button-props="{ size: 'medium' }"
|
||||||
:negative-text="$t('cancel')"
|
:negative-text="$t('common.cancel')"
|
||||||
:positive-button-props="{ size: 'medium' }"
|
:positive-button-props="{ size: 'medium' }"
|
||||||
:positive-text="$t('confirm')"
|
:positive-text="$t('common.confirm')"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
:title="isRenameMode ? $t('rename_group') : $t('new_group')"
|
:title="isRenameMode ? $t('dialogue.group.rename') : $t('dialogue.group.new')"
|
||||||
preset="dialog"
|
preset="dialog"
|
||||||
transform-origin="center"
|
transform-origin="center"
|
||||||
@positive-click="onConfirm"
|
@positive-click="onConfirm"
|
||||||
@negative-click="onClose">
|
@negative-click="onClose">
|
||||||
<n-form :model="groupForm" :show-label="false" :show-require-mark="false" label-placement="top">
|
<n-form :model="groupForm" :show-label="false" :show-require-mark="false" label-placement="top">
|
||||||
<n-form-item :label="$t('group_name')" required>
|
<n-form-item :label="$t('dialogue.group.name')" required>
|
||||||
<n-input v-model:value="groupForm.name" placeholder="" />
|
<n-input v-model:value="groupForm.name" placeholder="" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
|
|
|
@ -20,7 +20,7 @@ const typeOptions = computed(() => {
|
||||||
}))
|
}))
|
||||||
options.splice(0, 0, {
|
options.splice(0, 0, {
|
||||||
value: '',
|
value: '',
|
||||||
label: i18n.t('all'),
|
label: i18n.t('common.all'),
|
||||||
})
|
})
|
||||||
return options
|
return options
|
||||||
})
|
})
|
||||||
|
@ -58,11 +58,11 @@ const onClose = () => {
|
||||||
:close-on-esc="false"
|
:close-on-esc="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:negative-button-props="{ size: 'medium' }"
|
:negative-button-props="{ size: 'medium' }"
|
||||||
:negative-text="$t('cancel')"
|
:negative-text="$t('common.cancel')"
|
||||||
:positive-button-props="{ size: 'medium' }"
|
:positive-button-props="{ size: 'medium' }"
|
||||||
:positive-text="$t('confirm')"
|
:positive-text="$t('common.confirm')"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
:title="$t('set_key_filter')"
|
:title="$t('dialogue.filter.set_key_filter')"
|
||||||
preset="dialog"
|
preset="dialog"
|
||||||
style="width: 450px"
|
style="width: 450px"
|
||||||
transform-origin="center"
|
transform-origin="center"
|
||||||
|
@ -77,22 +77,22 @@ const onClose = () => {
|
||||||
<n-form-item :label="$t('server')" path="key">
|
<n-form-item :label="$t('server')" path="key">
|
||||||
<n-text>{{ filterForm.server }}</n-text>
|
<n-text>{{ filterForm.server }}</n-text>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('db_index')" path="db">
|
<n-form-item :label="$t('dialogue.key.db_index')" path="db">
|
||||||
<n-text>{{ filterForm.db }}</n-text>
|
<n-text>{{ filterForm.db }}</n-text>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('type')" path="type" required>
|
<n-form-item :label="$t('interface.type')" path="type" required>
|
||||||
<n-select v-model:value="filterForm.type" :options="typeOptions" />
|
<n-select v-model:value="filterForm.type" :options="typeOptions" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('filter_pattern')" required>
|
<n-form-item :label="$t('dialogue.filter.filter_pattern')" required>
|
||||||
<n-input-group>
|
<n-input-group>
|
||||||
<n-tooltip trigger="focus">
|
<n-tooltip trigger="focus">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<n-input v-model:value="filterForm.pattern" clearable placeholder="Filter Pattern" />
|
<n-input v-model:value="filterForm.pattern" clearable placeholder="Filter Pattern" />
|
||||||
</template>
|
</template>
|
||||||
<div class="text-block">{{ $t('filter_pattern_tip') }}</div>
|
<div class="text-block">{{ $t('dialogue.filter.filter_pattern_tip') }}</div>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
<n-button secondary type="primary" :focusable="false" @click="filterForm.pattern = '*'">
|
<n-button secondary type="primary" :focusable="false" @click="filterForm.pattern = '*'">
|
||||||
{{ $t('restore_defaults') }}
|
{{ $t('preferences.restore_defaults') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</n-input-group>
|
</n-input-group>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
|
|
|
@ -24,7 +24,7 @@ const newForm = reactive({
|
||||||
value: null,
|
value: null,
|
||||||
})
|
})
|
||||||
const formRules = computed(() => {
|
const formRules = computed(() => {
|
||||||
const requiredMsg = i18n.t('field_required')
|
const requiredMsg = i18n.t('dialogue.field_required')
|
||||||
return {
|
return {
|
||||||
key: { required: true, message: requiredMsg, trigger: 'input' },
|
key: { required: true, message: requiredMsg, trigger: 'input' },
|
||||||
type: { required: true, message: requiredMsg, trigger: 'input' },
|
type: { required: true, message: requiredMsg, trigger: 'input' },
|
||||||
|
@ -107,7 +107,7 @@ const onAdd = async () => {
|
||||||
$message.error(err.message)
|
$message.error(err.message)
|
||||||
})
|
})
|
||||||
if (subFormRef.value?.validate && !subFormRef.value?.validate()) {
|
if (subFormRef.value?.validate && !subFormRef.value?.validate()) {
|
||||||
$message.error(i18n.t('spec_field_required', { key: i18n.t('element') }))
|
$message.error(i18n.t('dialogue.spec_field_required', { key: i18n.t('dialogue.field.element') }))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -140,11 +140,11 @@ const onClose = () => {
|
||||||
:close-on-esc="false"
|
:close-on-esc="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:negative-button-props="{ size: 'medium' }"
|
:negative-button-props="{ size: 'medium' }"
|
||||||
:negative-text="$t('cancel')"
|
:negative-text="$t('common.cancel')"
|
||||||
:positive-button-props="{ size: 'medium' }"
|
:positive-button-props="{ size: 'medium' }"
|
||||||
:positive-text="$t('confirm')"
|
:positive-text="$t('common.confirm')"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
:title="$t('new_key')"
|
:title="$t('dialogue.key.new')"
|
||||||
preset="dialog"
|
preset="dialog"
|
||||||
style="width: 600px"
|
style="width: 600px"
|
||||||
transform-origin="center"
|
transform-origin="center"
|
||||||
|
@ -158,16 +158,16 @@ const onClose = () => {
|
||||||
:show-require-mark="false"
|
:show-require-mark="false"
|
||||||
label-placement="top"
|
label-placement="top"
|
||||||
style="padding-right: 15px">
|
style="padding-right: 15px">
|
||||||
<n-form-item :label="$t('key')" path="key" required>
|
<n-form-item :label="$t('common.key')" path="key" required>
|
||||||
<n-input v-model:value="newForm.key" placeholder="" />
|
<n-input v-model:value="newForm.key" placeholder="" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('db_index')" path="db" required>
|
<n-form-item :label="$t('dialogue.key.db_index')" path="db" required>
|
||||||
<n-select v-model:value="newForm.db" :options="dbOptions" filterable />
|
<n-select v-model:value="newForm.db" :options="dbOptions" filterable />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('type')" path="type" required>
|
<n-form-item :label="$t('interface.type')" path="type" required>
|
||||||
<n-select v-model:value="newForm.type" :options="options" :render-label="renderTypeLabel" />
|
<n-select v-model:value="newForm.type" :options="options" :render-label="renderTypeLabel" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('ttl')" required>
|
<n-form-item :label="$t('interface.ttl')" required>
|
||||||
<n-input-group>
|
<n-input-group>
|
||||||
<n-input-number
|
<n-input-number
|
||||||
v-model:value="newForm.ttl"
|
v-model:value="newForm.ttl"
|
||||||
|
@ -175,11 +175,11 @@ const onClose = () => {
|
||||||
:min="-1"
|
:min="-1"
|
||||||
placeholder="TTL">
|
placeholder="TTL">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
{{ $t('second') }}
|
{{ $t('common.second') }}
|
||||||
</template>
|
</template>
|
||||||
</n-input-number>
|
</n-input-number>
|
||||||
<n-button secondary type="primary" :focusable="false" @click="newForm.ttl = -1">
|
<n-button secondary type="primary" :focusable="false" @click="newForm.ttl = -1">
|
||||||
{{ $t('persist_key') }}
|
{{ $t('dialogue.key.persist_key') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</n-input-group>
|
</n-input-group>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
|
|
|
@ -38,7 +38,7 @@ watch(
|
||||||
const onSavePreferences = async () => {
|
const onSavePreferences = async () => {
|
||||||
const success = await prefStore.savePreferences()
|
const success = await prefStore.savePreferences()
|
||||||
if (success) {
|
if (success) {
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
dialogStore.closePreferencesDialog()
|
dialogStore.closePreferencesDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,57 +58,57 @@ const onClose = () => {
|
||||||
:close-on-esc="false"
|
:close-on-esc="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
:title="$t('preferences')"
|
:title="$t('preferences.name')"
|
||||||
preset="dialog"
|
preset="dialog"
|
||||||
transform-origin="center">
|
transform-origin="center">
|
||||||
<!-- FIXME: set loading will slow down appear animation of dialog in linux -->
|
<!-- FIXME: set loading will slow down appear animation of dialog in linux -->
|
||||||
<!-- <n-spin :show="loading"> -->
|
<!-- <n-spin :show="loading"> -->
|
||||||
<n-tabs v-model:value="tab" animated type="line">
|
<n-tabs v-model:value="tab" animated type="line">
|
||||||
<n-tab-pane :tab="$t('general')" display-directive="show" name="general">
|
<n-tab-pane :tab="$t('preferences.general.name')" display-directive="show" name="general">
|
||||||
<n-form :disabled="loading" :model="prefStore.general" :show-require-mark="false" label-placement="top">
|
<n-form :disabled="loading" :model="prefStore.general" :show-require-mark="false" label-placement="top">
|
||||||
<n-form-item :label="$t('theme')" required>
|
<n-form-item :label="$t('preferences.general.theme')" required>
|
||||||
<n-radio-group v-model:value="prefStore.general.theme" name="theme" size="medium">
|
<n-radio-group v-model:value="prefStore.general.theme" name="theme" size="medium">
|
||||||
<n-radio-button v-for="opt in prefStore.themeOption" :key="opt.value" :value="opt.value">
|
<n-radio-button v-for="opt in prefStore.themeOption" :key="opt.value" :value="opt.value">
|
||||||
{{ opt.label }}
|
{{ opt.label }}
|
||||||
</n-radio-button>
|
</n-radio-button>
|
||||||
</n-radio-group>
|
</n-radio-group>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('language')" required>
|
<n-form-item :label="$t('preferences.general.language')" required>
|
||||||
<n-select
|
<n-select
|
||||||
v-model:value="prefStore.general.language"
|
v-model:value="prefStore.general.language"
|
||||||
:options="prefStore.langOption"
|
:options="prefStore.langOption"
|
||||||
filterable />
|
filterable />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('font')" required>
|
<n-form-item :label="$t('preferences.general.font')" required>
|
||||||
<n-select v-model:value="prefStore.general.font" :options="prefStore.fontOption" filterable />
|
<n-select v-model:value="prefStore.general.font" :options="prefStore.fontOption" filterable />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('font_size')">
|
<n-form-item :label="$t('preferences.general.font_size')">
|
||||||
<n-input-number v-model:value="prefStore.general.fontSize" :max="65535" :min="1" />
|
<n-input-number v-model:value="prefStore.general.fontSize" :max="65535" :min="1" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('proxy')">
|
<n-form-item :label="$t('preferences.general.proxy')">
|
||||||
<n-space>
|
<n-space>
|
||||||
<n-checkbox v-model:checked="prefStore.general.useSysProxy">
|
<n-checkbox v-model:checked="prefStore.general.useSysProxy">
|
||||||
{{ $t('use_system_proxy') }}
|
{{ $t('preferences.general.use_system_proxy') }}
|
||||||
</n-checkbox>
|
</n-checkbox>
|
||||||
<n-checkbox v-model:checked="prefStore.general.useSysProxyHttp">
|
<n-checkbox v-model:checked="prefStore.general.useSysProxyHttp">
|
||||||
{{ $t('use_system_proxy_http') }}
|
{{ $t('preferences.general.use_system_proxy_http') }}
|
||||||
</n-checkbox>
|
</n-checkbox>
|
||||||
</n-space>
|
</n-space>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('update')">
|
<n-form-item :label="$t('preferences.general.update')">
|
||||||
<n-checkbox v-model:checked="prefStore.general.checkUpdate">
|
<n-checkbox v-model:checked="prefStore.general.checkUpdate">
|
||||||
{{ $t('auto_check_update') }}
|
{{ $t('preferences.general.auto_check_update') }}
|
||||||
</n-checkbox>
|
</n-checkbox>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
|
|
||||||
<n-tab-pane :tab="$t('editor')" display-directive="show" name="editor">
|
<n-tab-pane :tab="$t('preferences.editor.name')" display-directive="show" name="editor">
|
||||||
<n-form :disabled="loading" :model="prefStore.editor" :show-require-mark="false" label-placement="top">
|
<n-form :disabled="loading" :model="prefStore.editor" :show-require-mark="false" label-placement="top">
|
||||||
<n-form-item :label="$t('font')" required>
|
<n-form-item :label="$t('preferences.general.font')" required>
|
||||||
<n-select v-model:value="prefStore.editor.font" :options="prefStore.fontOption" filterable />
|
<n-select v-model:value="prefStore.editor.font" :options="prefStore.fontOption" filterable />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('font_size')">
|
<n-form-item :label="$t('preferences.general.font_size')">
|
||||||
<n-input-number v-model:value="prefStore.editor.fontSize" :max="65535" :min="1" />
|
<n-input-number v-model:value="prefStore.editor.fontSize" :max="65535" :min="1" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
|
@ -119,12 +119,14 @@ const onClose = () => {
|
||||||
<template #action>
|
<template #action>
|
||||||
<div class="flex-item-expand">
|
<div class="flex-item-expand">
|
||||||
<n-button :disabled="loading" @click="prefStore.restorePreferences">
|
<n-button :disabled="loading" @click="prefStore.restorePreferences">
|
||||||
{{ $t('restore_defaults') }}
|
{{ $t('preferences.restore_defaults') }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-item n-dialog__action">
|
<div class="flex-item n-dialog__action">
|
||||||
<n-button :disabled="loading" @click="onClose">{{ $t('cancel') }}</n-button>
|
<n-button :disabled="loading" @click="onClose">{{ $t('common.cancel') }}</n-button>
|
||||||
<n-button :disabled="loading" type="primary" @click="onSavePreferences">{{ $t('save') }}</n-button>
|
<n-button :disabled="loading" type="primary" @click="onSavePreferences">
|
||||||
|
{{ $t('common.save') }}
|
||||||
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
|
|
|
@ -33,7 +33,7 @@ const onRename = async () => {
|
||||||
const { success, msg } = await connectionStore.renameKey(server, db, key, newKey)
|
const { success, msg } = await connectionStore.renameKey(server, db, key, newKey)
|
||||||
if (success) {
|
if (success) {
|
||||||
await connectionStore.loadKeyValue(server, db, newKey)
|
await connectionStore.loadKeyValue(server, db, newKey)
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
} else {
|
} else {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
}
|
}
|
||||||
|
@ -55,11 +55,11 @@ const onClose = () => {
|
||||||
:close-on-esc="false"
|
:close-on-esc="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:negative-button-props="{ size: 'medium' }"
|
:negative-button-props="{ size: 'medium' }"
|
||||||
:negative-text="$t('cancel')"
|
:negative-text="$t('common.cancel')"
|
||||||
:positive-button-props="{ size: 'medium' }"
|
:positive-button-props="{ size: 'medium' }"
|
||||||
:positive-text="$t('confirm')"
|
:positive-text="$t('common.confirm')"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
:title="$t('rename_key')"
|
:title="$t('interface.rename_key')"
|
||||||
preset="dialog"
|
preset="dialog"
|
||||||
transform-origin="center"
|
transform-origin="center"
|
||||||
@positive-click="onRename"
|
@positive-click="onRename"
|
||||||
|
@ -70,7 +70,7 @@ const onClose = () => {
|
||||||
:show-label="false"
|
:show-label="false"
|
||||||
label-align="left"
|
label-align="left"
|
||||||
label-placement="top">
|
label-placement="top">
|
||||||
<n-form-item :label="$t('new_key_name')" required>
|
<n-form-item :label="$t('dialogue.key.new_name')" required>
|
||||||
<n-input v-model:value="renameForm.newKey" />
|
<n-input v-model:value="renameForm.newKey" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
|
|
|
@ -69,21 +69,21 @@ const onConfirm = async () => {
|
||||||
:close-on-esc="false"
|
:close-on-esc="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:show-icon="false"
|
:show-icon="false"
|
||||||
:title="$t('set_ttl')"
|
:title="$t('dialogue.ttl.title')"
|
||||||
preset="dialog"
|
preset="dialog"
|
||||||
transform-origin="center">
|
transform-origin="center">
|
||||||
<n-form :model="ttlForm" :show-require-mark="false" label-placement="top">
|
<n-form :model="ttlForm" :show-require-mark="false" label-placement="top">
|
||||||
<n-form-item :label="$t('key')">
|
<n-form-item :label="$t('common.key')">
|
||||||
<n-input :value="currentKey" readonly />
|
<n-input :value="currentKey" readonly />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('ttl')" required>
|
<n-form-item :label="$t('interface.ttl')" required>
|
||||||
<n-input-number
|
<n-input-number
|
||||||
v-model:value="ttlForm.ttl"
|
v-model:value="ttlForm.ttl"
|
||||||
:max="Number.MAX_SAFE_INTEGER"
|
:max="Number.MAX_SAFE_INTEGER"
|
||||||
:min="-1"
|
:min="-1"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
{{ $t('second') }}
|
{{ $t('common.second') }}
|
||||||
</template>
|
</template>
|
||||||
</n-input-number>
|
</n-input-number>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
|
@ -91,11 +91,11 @@ const onConfirm = async () => {
|
||||||
|
|
||||||
<template #action>
|
<template #action>
|
||||||
<div class="flex-item-expand">
|
<div class="flex-item-expand">
|
||||||
<n-button :focusable="false" @click="ttlForm.ttl = -1">{{ $t('persist_key') }}</n-button>
|
<n-button :focusable="false" @click="ttlForm.ttl = -1">{{ $t('dialogue.key.persist_key') }}</n-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-item n-dialog__action">
|
<div class="flex-item n-dialog__action">
|
||||||
<n-button :focusable="false" @click="onClose">{{ $t('cancel') }}</n-button>
|
<n-button :focusable="false" @click="onClose">{{ $t('common.cancel') }}</n-button>
|
||||||
<n-button type="primary" :focusable="false" @click="onConfirm">{{ $t('save') }}</n-button>
|
<n-button type="primary" :focusable="false" @click="onConfirm">{{ $t('common.save') }}</n-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
|
|
|
@ -16,11 +16,11 @@ const i18n = useI18n()
|
||||||
const updateOption = [
|
const updateOption = [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
label: i18n.t('overwrite_field'),
|
label: i18n.t('dialogue.field.overwrite_field'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: i18n.t('ignore_field'),
|
label: i18n.t('dialogue.field.ignore_field'),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -45,16 +45,16 @@ const onUpdate = (val) => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-form-item :label="$t('type')">
|
<n-form-item :label="$t('interface.type')">
|
||||||
<n-radio-group :value="props.type" @update:value="(val) => emit('update:type', val)">
|
<n-radio-group :value="props.type" @update:value="(val) => emit('update:type', val)">
|
||||||
<n-radio-button v-for="(op, i) in updateOption" :key="i" :label="op.label" :value="op.value" />
|
<n-radio-button v-for="(op, i) in updateOption" :key="i" :label="op.label" :value="op.value" />
|
||||||
</n-radio-group>
|
</n-radio-group>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('element')" required>
|
<n-form-item :label="$t('dialogue.field.element')" required>
|
||||||
<n-dynamic-input
|
<n-dynamic-input
|
||||||
v-model:value="kvList"
|
v-model:value="kvList"
|
||||||
:key-placeholder="$t('enter_field')"
|
:key-placeholder="$t('dialogue.field.enter_field')"
|
||||||
:value-placeholder="$t('enter_value')"
|
:value-placeholder="$t('dialogue.field.enter_value')"
|
||||||
preset="pair"
|
preset="pair"
|
||||||
@update:value="onUpdate">
|
@update:value="onUpdate">
|
||||||
<template #action="{ index, create, remove, move }">
|
<template #action="{ index, create, remove, move }">
|
||||||
|
|
|
@ -16,11 +16,11 @@ const i18n = useI18n()
|
||||||
const insertOption = [
|
const insertOption = [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
label: i18n.t('append_item'),
|
label: i18n.t('dialogue.field.append_item'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: i18n.t('prepend_item'),
|
label: i18n.t('dialogue.field.prepend_item'),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -32,13 +32,13 @@ const onUpdate = (val) => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-form-item :label="$t('type')">
|
<n-form-item :label="$t('interface.type')">
|
||||||
<n-radio-group :value="props.type" @update:value="(val) => emit('update:type', val)">
|
<n-radio-group :value="props.type" @update:value="(val) => emit('update:type', val)">
|
||||||
<n-radio-button v-for="(op, i) in insertOption" :key="i" :label="op.label" :value="op.value" />
|
<n-radio-button v-for="(op, i) in insertOption" :key="i" :label="op.label" :value="op.value" />
|
||||||
</n-radio-group>
|
</n-radio-group>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('element')" required>
|
<n-form-item :label="$t('dialogue.field.element')" required>
|
||||||
<n-dynamic-input v-model:value="list" :placeholder="$t('enter_elem')" @update:value="onUpdate">
|
<n-dynamic-input v-model:value="list" :placeholder="$t('dialogue.field.enter_elem')" @update:value="onUpdate">
|
||||||
<template #action="{ index, create, remove, move }">
|
<template #action="{ index, create, remove, move }">
|
||||||
<icon-button v-if="list.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
<icon-button v-if="list.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
||||||
<icon-button :icon="Add" size="18" @click="() => create(index)" />
|
<icon-button :icon="Add" size="18" @click="() => create(index)" />
|
||||||
|
|
|
@ -19,11 +19,11 @@ const i18n = useI18n()
|
||||||
const updateOption = [
|
const updateOption = [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
label: i18n.t('overwrite_field'),
|
label: i18n.t('dialogue.field.overwrite_field'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: i18n.t('ignore_field'),
|
label: i18n.t('dialogue.field.ignore_field'),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -53,20 +53,23 @@ const onUpdate = () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-form-item :label="$t('type')">
|
<n-form-item :label="$t('interface.type')">
|
||||||
<n-radio-group :value="props.type" @update:value="(val) => emit('update:type', val)">
|
<n-radio-group :value="props.type" @update:value="(val) => emit('update:type', val)">
|
||||||
<n-radio-button v-for="(op, i) in updateOption" :key="i" :label="op.label" :value="op.value" />
|
<n-radio-button v-for="(op, i) in updateOption" :key="i" :label="op.label" :value="op.value" />
|
||||||
</n-radio-group>
|
</n-radio-group>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('element')" required>
|
<n-form-item :label="$t('dialogue.field.element')" required>
|
||||||
<n-dynamic-input v-model:value="zset" @create="onCreate" @update:value="onUpdate">
|
<n-dynamic-input v-model:value="zset" @create="onCreate" @update:value="onUpdate">
|
||||||
<template #default="{ value }">
|
<template #default="{ value }">
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="value.value"
|
v-model:value="value.value"
|
||||||
:placeholder="$t('enter_elem')"
|
:placeholder="$t('dialogue.field.enter_elem')"
|
||||||
type="text"
|
type="text"
|
||||||
@update:value="onUpdate" />
|
@update:value="onUpdate" />
|
||||||
<n-input-number v-model:value="value.score" :placeholder="$t('enter_score')" @update:value="onUpdate" />
|
<n-input-number
|
||||||
|
v-model:value="value.score"
|
||||||
|
:placeholder="$t('dialogue.field.enter_score')"
|
||||||
|
@update:value="onUpdate" />
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ index, create, remove, move }">
|
<template #action="{ index, create, remove, move }">
|
||||||
<icon-button v-if="zset.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
<icon-button v-if="zset.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
||||||
|
|
|
@ -37,11 +37,11 @@ defineExpose({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-form-item :label="$t('element')" required>
|
<n-form-item :label="$t('dialogue.field.element')" required>
|
||||||
<n-dynamic-input
|
<n-dynamic-input
|
||||||
v-model:value="kvList"
|
v-model:value="kvList"
|
||||||
:key-placeholder="$t('enter_field')"
|
:key-placeholder="$t('dialogue.field.enter_field')"
|
||||||
:value-placeholder="$t('enter_value')"
|
:value-placeholder="$t('dialogue.field.enter_value')"
|
||||||
preset="pair"
|
preset="pair"
|
||||||
@update:value="onUpdate">
|
@update:value="onUpdate">
|
||||||
<template #action="{ index, create, remove, move }">
|
<template #action="{ index, create, remove, move }">
|
||||||
|
|
|
@ -24,8 +24,8 @@ defineExpose({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-form-item :label="$t('element')" required>
|
<n-form-item :label="$t('dialogue.field.element')" required>
|
||||||
<n-dynamic-input v-model:value="list" :placeholder="$t('enter_elem')" @update:value="onUpdate">
|
<n-dynamic-input v-model:value="list" :placeholder="$t('dialogue.field.enter_elem')" @update:value="onUpdate">
|
||||||
<template #action="{ index, create, remove, move }">
|
<template #action="{ index, create, remove, move }">
|
||||||
<icon-button v-if="list.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
<icon-button v-if="list.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
||||||
<icon-button :icon="Add" size="18" @click="() => create(index)" />
|
<icon-button :icon="Add" size="18" @click="() => create(index)" />
|
||||||
|
|
|
@ -24,8 +24,8 @@ defineExpose({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-form-item :label="$t('element')" required>
|
<n-form-item :label="$t('dialogue.field.element')" required>
|
||||||
<n-dynamic-input v-model:value="set" :placeholder="$t('enter_elem')" @update:value="onUpdate">
|
<n-dynamic-input v-model:value="set" :placeholder="$t('dialogue.field.enter_elem')" @update:value="onUpdate">
|
||||||
<template #action="{ index, create, remove, move }">
|
<template #action="{ index, create, remove, move }">
|
||||||
<icon-button v-if="set.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
<icon-button v-if="set.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
||||||
<icon-button :icon="Add" size="18" @click="() => create(index)" />
|
<icon-button :icon="Add" size="18" @click="() => create(index)" />
|
||||||
|
|
|
@ -43,11 +43,11 @@ defineExpose({
|
||||||
<n-form-item label="ID">
|
<n-form-item label="ID">
|
||||||
<n-input v-model:value="id" />
|
<n-input v-model:value="id" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item :label="$t('element')" required>
|
<n-form-item :label="$t('dialogue.field.element')" required>
|
||||||
<n-dynamic-input
|
<n-dynamic-input
|
||||||
v-model:value="kvList"
|
v-model:value="kvList"
|
||||||
:key-placeholder="$t('enter_field')"
|
:key-placeholder="$t('dialogue.field.enter_field')"
|
||||||
:value-placeholder="$t('enter_value')"
|
:value-placeholder="$t('dialogue.field.enter_value')"
|
||||||
preset="pair"
|
preset="pair"
|
||||||
@update:value="onUpdate">
|
@update:value="onUpdate">
|
||||||
<template #action="{ index, create, remove, move }">
|
<template #action="{ index, create, remove, move }">
|
||||||
|
|
|
@ -7,7 +7,7 @@ const emit = defineEmits(['update:value'])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-form-item :label="$t('value')">
|
<n-form-item :label="$t('common.value')">
|
||||||
<n-input
|
<n-input
|
||||||
:rows="6"
|
:rows="6"
|
||||||
:value="props.value"
|
:value="props.value"
|
||||||
|
|
|
@ -41,15 +41,18 @@ defineExpose({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-form-item :label="$t('element')" required>
|
<n-form-item :label="$t('dialogue.field.element')" required>
|
||||||
<n-dynamic-input v-model:value="zset" @create="onCreate" @update:value="onUpdate">
|
<n-dynamic-input v-model:value="zset" @create="onCreate" @update:value="onUpdate">
|
||||||
<template #default="{ value }">
|
<template #default="{ value }">
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="value.value"
|
v-model:value="value.value"
|
||||||
:placeholder="$t('enter_member')"
|
:placeholder="$t('dialogue.field.enter_member')"
|
||||||
type="text"
|
type="text"
|
||||||
@update:value="onUpdate" />
|
@update:value="onUpdate" />
|
||||||
<n-input-number v-model:value="value.score" :placeholder="$t('enter_score')" @update:value="onUpdate" />
|
<n-input-number
|
||||||
|
v-model:value="value.score"
|
||||||
|
:placeholder="$t('dialogue.field.enter_score')"
|
||||||
|
@update:value="onUpdate" />
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ index, create, remove, move }">
|
<template #action="{ index, create, remove, move }">
|
||||||
<icon-button v-if="zset.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
<icon-button v-if="zset.length > 1" :icon="Delete" size="18" @click="() => remove(index)" />
|
||||||
|
|
|
@ -56,7 +56,7 @@ const filterTypeOptions = computed(() => {
|
||||||
}))
|
}))
|
||||||
options.splice(0, 0, {
|
options.splice(0, 0, {
|
||||||
value: '',
|
value: '',
|
||||||
label: i18n.t('all'),
|
label: i18n.t('common.all'),
|
||||||
})
|
})
|
||||||
return options
|
return options
|
||||||
})
|
})
|
||||||
|
@ -83,10 +83,15 @@ const filterTypeOptions = computed(() => {
|
||||||
</div>
|
</div>
|
||||||
<!-- bottom function bar -->
|
<!-- bottom function bar -->
|
||||||
<div class="nav-pane-bottom flex-box-h">
|
<div class="nav-pane-bottom flex-box-h">
|
||||||
<icon-button :icon="Status" size="20" stroke-width="4" t-tooltip="status" @click="onInfo" />
|
<icon-button :icon="Status" size="20" stroke-width="4" t-tooltip="interface.status" @click="onInfo" />
|
||||||
<icon-button :icon="Refresh" size="20" stroke-width="4" t-tooltip="reload" @click="onRefresh" />
|
<icon-button :icon="Refresh" size="20" stroke-width="4" t-tooltip="interface.reload" @click="onRefresh" />
|
||||||
<div class="flex-item-expand"></div>
|
<div class="flex-item-expand"></div>
|
||||||
<icon-button :icon="Unlink" size="20" stroke-width="4" t-tooltip="disconnect" @click="onDisconnect" />
|
<icon-button
|
||||||
|
:icon="Unlink"
|
||||||
|
size="20"
|
||||||
|
stroke-width="4"
|
||||||
|
t-tooltip="interface.disconnect"
|
||||||
|
@click="onDisconnect" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -88,12 +88,12 @@ const menuOptions = {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
key: 'server_reload',
|
key: 'server_reload',
|
||||||
label: i18n.t('reload'),
|
label: i18n.t('interface.reload'),
|
||||||
icon: renderIcon(Refresh),
|
icon: renderIcon(Refresh),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'server_close',
|
key: 'server_close',
|
||||||
label: i18n.t('disconnect'),
|
label: i18n.t('interface.disconnect'),
|
||||||
icon: renderIcon(Unlink),
|
icon: renderIcon(Unlink),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -103,17 +103,17 @@ const menuOptions = {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
key: 'db_reload',
|
key: 'db_reload',
|
||||||
label: i18n.t('reload'),
|
label: i18n.t('interface.reload'),
|
||||||
icon: renderIcon(Refresh),
|
icon: renderIcon(Refresh),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'db_newkey',
|
key: 'db_newkey',
|
||||||
label: i18n.t('new_key'),
|
label: i18n.t('interface.new_key'),
|
||||||
icon: renderIcon(Add),
|
icon: renderIcon(Add),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'db_filter',
|
key: 'db_filter',
|
||||||
label: i18n.t('filter_key'),
|
label: i18n.t('interface.filter_key'),
|
||||||
icon: renderIcon(Filter),
|
icon: renderIcon(Filter),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ const menuOptions = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'key_remove',
|
key: 'key_remove',
|
||||||
label: i18n.t('batch_delete'),
|
label: i18n.t('interface.batch_delete'),
|
||||||
icon: renderIcon(Delete),
|
icon: renderIcon(Delete),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -131,7 +131,7 @@ const menuOptions = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'db_close',
|
key: 'db_close',
|
||||||
label: i18n.t('close_db'),
|
label: i18n.t('interface.close_db'),
|
||||||
icon: renderIcon(Close),
|
icon: renderIcon(Close),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -139,7 +139,7 @@ const menuOptions = {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
key: 'db_open',
|
key: 'db_open',
|
||||||
label: i18n.t('open_db'),
|
label: i18n.t('interface.open_db'),
|
||||||
icon: renderIcon(Connect),
|
icon: renderIcon(Connect),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -148,17 +148,17 @@ const menuOptions = {
|
||||||
[ConnectionType.RedisKey]: () => [
|
[ConnectionType.RedisKey]: () => [
|
||||||
{
|
{
|
||||||
key: 'key_reload',
|
key: 'key_reload',
|
||||||
label: i18n.t('reload'),
|
label: i18n.t('interface.reload'),
|
||||||
icon: renderIcon(Refresh),
|
icon: renderIcon(Refresh),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'key_newkey',
|
key: 'key_newkey',
|
||||||
label: i18n.t('new_key'),
|
label: i18n.t('interface.new_key'),
|
||||||
icon: renderIcon(Add),
|
icon: renderIcon(Add),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'key_copy',
|
key: 'key_copy',
|
||||||
label: i18n.t('copy_path'),
|
label: i18n.t('interface.copy_path'),
|
||||||
icon: renderIcon(CopyLink),
|
icon: renderIcon(CopyLink),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -167,19 +167,19 @@ const menuOptions = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'key_remove',
|
key: 'key_remove',
|
||||||
label: i18n.t('batch_delete'),
|
label: i18n.t('interface.batch_delete'),
|
||||||
icon: renderIcon(Delete),
|
icon: renderIcon(Delete),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[ConnectionType.RedisValue]: () => [
|
[ConnectionType.RedisValue]: () => [
|
||||||
{
|
{
|
||||||
key: 'value_reload',
|
key: 'value_reload',
|
||||||
label: i18n.t('reload'),
|
label: i18n.t('interface.reload'),
|
||||||
icon: renderIcon(Refresh),
|
icon: renderIcon(Refresh),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'value_copy',
|
key: 'value_copy',
|
||||||
label: i18n.t('copy_key'),
|
label: i18n.t('interface.copy_key'),
|
||||||
icon: renderIcon(CopyLink),
|
icon: renderIcon(CopyLink),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ const menuOptions = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'value_remove',
|
key: 'value_remove',
|
||||||
label: i18n.t('remove_key'),
|
label: i18n.t('interface.remove_key'),
|
||||||
icon: renderIcon(Delete),
|
icon: renderIcon(Delete),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -233,7 +233,7 @@ const handleSelectContextMenu = (key) => {
|
||||||
expandedKeys.value = [props.server]
|
expandedKeys.value = [props.server]
|
||||||
tabStore.setSelectedKeys(props.server)
|
tabStore.setSelectedKeys(props.server)
|
||||||
connectionStore.openConnection(props.server, true).then(() => {
|
connectionStore.openConnection(props.server, true).then(() => {
|
||||||
$message.success(i18n.t('reload_succ'))
|
$message.success(i18n.t('dialogue.reload_succ'))
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'server_close':
|
case 'server_close':
|
||||||
|
@ -267,10 +267,10 @@ const handleSelectContextMenu = (key) => {
|
||||||
dialogStore.openDeleteKeyDialog(props.server, db, isEmpty(redisKey) ? '*' : redisKey + ':*')
|
dialogStore.openDeleteKeyDialog(props.server, db, isEmpty(redisKey) ? '*' : redisKey + ':*')
|
||||||
break
|
break
|
||||||
case 'value_remove':
|
case 'value_remove':
|
||||||
$dialog.warning(i18n.t('remove_tip', { name: redisKey }), () => {
|
$dialog.warning(i18n.t('dialogue.remove_tip', { name: redisKey }), () => {
|
||||||
connectionStore.deleteKey(props.server, db, redisKey).then((success) => {
|
connectionStore.deleteKey(props.server, db, redisKey).then((success) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
$message.success(i18n.t('delete_key_succ', { key: redisKey }))
|
$message.success(i18n.t('dialogue.delete_key_succ', { key: redisKey }))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -280,7 +280,7 @@ const handleSelectContextMenu = (key) => {
|
||||||
ClipboardSetText(redisKey)
|
ClipboardSetText(redisKey)
|
||||||
.then((succ) => {
|
.then((succ) => {
|
||||||
if (succ) {
|
if (succ) {
|
||||||
$message.success(i18n.t('copy_succ'))
|
$message.success(i18n.t('dialogue.copy_succ'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
@ -451,22 +451,22 @@ const getDatabaseMenu = (opened) => {
|
||||||
if (opened) {
|
if (opened) {
|
||||||
btns.push(
|
btns.push(
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'filter_key',
|
tTooltip: 'interface.filter_key',
|
||||||
icon: Filter,
|
icon: Filter,
|
||||||
onClick: () => handleSelectContextMenu('db_filter'),
|
onClick: () => handleSelectContextMenu('db_filter'),
|
||||||
}),
|
}),
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'reload',
|
tTooltip: 'interface.reload',
|
||||||
icon: Refresh,
|
icon: Refresh,
|
||||||
onClick: () => handleSelectContextMenu('db_reload'),
|
onClick: () => handleSelectContextMenu('db_reload'),
|
||||||
}),
|
}),
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'new_key',
|
tTooltip: 'interface.new_key',
|
||||||
icon: Add,
|
icon: Add,
|
||||||
onClick: () => handleSelectContextMenu('db_newkey'),
|
onClick: () => handleSelectContextMenu('db_newkey'),
|
||||||
}),
|
}),
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'batch_delete',
|
tTooltip: 'interface.batch_delete',
|
||||||
icon: Delete,
|
icon: Delete,
|
||||||
onClick: () => handleSelectContextMenu('key_remove'),
|
onClick: () => handleSelectContextMenu('key_remove'),
|
||||||
}),
|
}),
|
||||||
|
@ -474,7 +474,7 @@ const getDatabaseMenu = (opened) => {
|
||||||
} else {
|
} else {
|
||||||
btns.push(
|
btns.push(
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'open_db',
|
tTooltip: 'interface.open_db',
|
||||||
icon: Connect,
|
icon: Connect,
|
||||||
onClick: () => handleSelectContextMenu('db_open'),
|
onClick: () => handleSelectContextMenu('db_open'),
|
||||||
}),
|
}),
|
||||||
|
@ -486,17 +486,17 @@ const getDatabaseMenu = (opened) => {
|
||||||
const getLayerMenu = () => {
|
const getLayerMenu = () => {
|
||||||
return [
|
return [
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'reload',
|
tTooltip: 'interface.reload',
|
||||||
icon: Refresh,
|
icon: Refresh,
|
||||||
onClick: () => handleSelectContextMenu('key_reload'),
|
onClick: () => handleSelectContextMenu('key_reload'),
|
||||||
}),
|
}),
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'new_key',
|
tTooltip: 'interface.new_key',
|
||||||
icon: Add,
|
icon: Add,
|
||||||
onClick: () => handleSelectContextMenu('key_newkey'),
|
onClick: () => handleSelectContextMenu('key_newkey'),
|
||||||
}),
|
}),
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'batch_delete',
|
tTooltip: 'interface.batch_delete',
|
||||||
icon: Delete,
|
icon: Delete,
|
||||||
onClick: () => handleSelectContextMenu('key_remove'),
|
onClick: () => handleSelectContextMenu('key_remove'),
|
||||||
}),
|
}),
|
||||||
|
@ -506,7 +506,7 @@ const getLayerMenu = () => {
|
||||||
const getValueMenu = () => {
|
const getValueMenu = () => {
|
||||||
return [
|
return [
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'remove_key',
|
tTooltip: 'interface.remove_key',
|
||||||
icon: Delete,
|
icon: Delete,
|
||||||
onClick: () => handleSelectContextMenu('value_remove'),
|
onClick: () => handleSelectContextMenu('value_remove'),
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -25,15 +25,15 @@ const filterPattern = ref('')
|
||||||
:icon="AddLink"
|
:icon="AddLink"
|
||||||
size="20"
|
size="20"
|
||||||
stroke-width="4"
|
stroke-width="4"
|
||||||
t-tooltip="new_conn"
|
t-tooltip="interface.new_conn"
|
||||||
@click="dialogStore.openNewDialog()" />
|
@click="dialogStore.openNewDialog()" />
|
||||||
<icon-button
|
<icon-button
|
||||||
:icon="AddGroup"
|
:icon="AddGroup"
|
||||||
size="20"
|
size="20"
|
||||||
stroke-width="4"
|
stroke-width="4"
|
||||||
t-tooltip="new_group"
|
t-tooltip="interface.new_group"
|
||||||
@click="dialogStore.openNewGroupDialog()" />
|
@click="dialogStore.openNewGroupDialog()" />
|
||||||
<n-input v-model:value="filterPattern" :placeholder="$t('filter')" clearable>
|
<n-input v-model:value="filterPattern" :placeholder="$t('interface.filter')" clearable>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<n-icon :component="Filter" size="20" />
|
<n-icon :component="Filter" size="20" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -55,12 +55,12 @@ const menuOptions = {
|
||||||
[ConnectionType.Group]: ({ opened }) => [
|
[ConnectionType.Group]: ({ opened }) => [
|
||||||
{
|
{
|
||||||
key: 'group_rename',
|
key: 'group_rename',
|
||||||
label: i18n.t('rename_conn_group'),
|
label: i18n.t('interface.rename_conn_group'),
|
||||||
icon: renderIcon(Edit),
|
icon: renderIcon(Edit),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'group_delete',
|
key: 'group_delete',
|
||||||
label: i18n.t('remove_conn_group'),
|
label: i18n.t('interface.remove_conn_group'),
|
||||||
icon: renderIcon(Delete),
|
icon: renderIcon(Delete),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -70,17 +70,17 @@ const menuOptions = {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
key: 'server_close',
|
key: 'server_close',
|
||||||
label: i18n.t('disconnect'),
|
label: i18n.t('interface.disconnect'),
|
||||||
icon: renderIcon(Unlink),
|
icon: renderIcon(Unlink),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'server_dup',
|
key: 'server_dup',
|
||||||
label: i18n.t('dup_conn'),
|
label: i18n.t('interface.dup_conn'),
|
||||||
icon: renderIcon(CopyLink),
|
icon: renderIcon(CopyLink),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'server_edit',
|
key: 'server_edit',
|
||||||
label: i18n.t('edit_conn'),
|
label: i18n.t('interface.edit_conn'),
|
||||||
icon: renderIcon(Config),
|
icon: renderIcon(Config),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,7 @@ const menuOptions = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'server_remove',
|
key: 'server_remove',
|
||||||
label: i18n.t('remove_conn'),
|
label: i18n.t('interface.remove_conn'),
|
||||||
icon: renderIcon(Delete),
|
icon: renderIcon(Delete),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -97,12 +97,12 @@ const menuOptions = {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
key: 'server_open',
|
key: 'server_open',
|
||||||
label: i18n.t('open_connection'),
|
label: i18n.t('interface.open_connection'),
|
||||||
icon: renderIcon(Connect),
|
icon: renderIcon(Connect),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'server_edit',
|
key: 'server_edit',
|
||||||
label: i18n.t('edit_conn'),
|
label: i18n.t('interface.edit_conn'),
|
||||||
icon: renderIcon(Config),
|
icon: renderIcon(Config),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -111,7 +111,7 @@ const menuOptions = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'server_remove',
|
key: 'server_remove',
|
||||||
label: i18n.t('remove_conn'),
|
label: i18n.t('interface.remove_conn'),
|
||||||
icon: renderIcon(Delete),
|
icon: renderIcon(Delete),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -207,12 +207,12 @@ const getServerMenu = (connected) => {
|
||||||
if (connected) {
|
if (connected) {
|
||||||
btns.push(
|
btns.push(
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'disconnect',
|
tTooltip: 'interface.disconnect',
|
||||||
icon: Unlink,
|
icon: Unlink,
|
||||||
onClick: () => handleSelectContextMenu('server_close'),
|
onClick: () => handleSelectContextMenu('server_close'),
|
||||||
}),
|
}),
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'edit_conn',
|
tTooltip: 'interface.edit_conn',
|
||||||
icon: Config,
|
icon: Config,
|
||||||
onClick: () => handleSelectContextMenu('server_edit'),
|
onClick: () => handleSelectContextMenu('server_edit'),
|
||||||
}),
|
}),
|
||||||
|
@ -220,17 +220,17 @@ const getServerMenu = (connected) => {
|
||||||
} else {
|
} else {
|
||||||
btns.push(
|
btns.push(
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'open_connection',
|
tTooltip: 'interface.open_connection',
|
||||||
icon: Connect,
|
icon: Connect,
|
||||||
onClick: () => handleSelectContextMenu('server_open'),
|
onClick: () => handleSelectContextMenu('server_open'),
|
||||||
}),
|
}),
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'edit_conn',
|
tTooltip: 'interface.edit_conn',
|
||||||
icon: Config,
|
icon: Config,
|
||||||
onClick: () => handleSelectContextMenu('server_edit'),
|
onClick: () => handleSelectContextMenu('server_edit'),
|
||||||
}),
|
}),
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'remove_conn',
|
tTooltip: 'interface.remove_conn',
|
||||||
icon: Delete,
|
icon: Delete,
|
||||||
onClick: () => handleSelectContextMenu('server_remove'),
|
onClick: () => handleSelectContextMenu('server_remove'),
|
||||||
}),
|
}),
|
||||||
|
@ -242,12 +242,12 @@ const getServerMenu = (connected) => {
|
||||||
const getGroupMenu = () => {
|
const getGroupMenu = () => {
|
||||||
return [
|
return [
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'edit_conn',
|
tTooltip: 'interface.edit_conn',
|
||||||
icon: Config,
|
icon: Config,
|
||||||
onClick: () => handleSelectContextMenu('group_rename'),
|
onClick: () => handleSelectContextMenu('group_rename'),
|
||||||
}),
|
}),
|
||||||
h(IconButton, {
|
h(IconButton, {
|
||||||
tTooltip: 'remove_conn',
|
tTooltip: 'interface.remove_conn',
|
||||||
icon: Delete,
|
icon: Delete,
|
||||||
onClick: () => handleSelectContextMenu('group_delete'),
|
onClick: () => handleSelectContextMenu('group_delete'),
|
||||||
}),
|
}),
|
||||||
|
@ -298,17 +298,20 @@ const openConnection = async (name) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const removeConnection = (name) => {
|
const removeConnection = (name) => {
|
||||||
$dialog.warning(i18n.t('remove_tip', { type: i18n.t('conn_name'), name }), async () => {
|
$dialog.warning(
|
||||||
connectionStore.deleteConnection(name).then(({ success, msg }) => {
|
i18n.t('dialogue.remove_tip', { type: i18n.t('dialogue.connection.conn_name'), name }),
|
||||||
if (!success) {
|
async () => {
|
||||||
$message.error(msg)
|
connectionStore.deleteConnection(name).then(({ success, msg }) => {
|
||||||
}
|
if (!success) {
|
||||||
})
|
$message.error(msg)
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const removeGroup = async (name) => {
|
const removeGroup = async (name) => {
|
||||||
$dialog.warning(i18n.t('remove_group_tip', { name }), async () => {
|
$dialog.warning(i18n.t('dialogue.remove_group_tip', { name }), async () => {
|
||||||
connectionStore.deleteGroup(name).then(({ success, msg }) => {
|
connectionStore.deleteGroup(name).then(({ success, msg }) => {
|
||||||
if (!success) {
|
if (!success) {
|
||||||
$message.error(msg)
|
$message.error(msg)
|
||||||
|
@ -376,7 +379,7 @@ const handleSelectContextMenu = (key) => {
|
||||||
case 'server_edit':
|
case 'server_edit':
|
||||||
// ask for close relevant connections before edit
|
// ask for close relevant connections before edit
|
||||||
if (connectionStore.isConnected(name)) {
|
if (connectionStore.isConnected(name)) {
|
||||||
$dialog.warning(i18n.t('edit_close_confirm'), () => {
|
$dialog.warning(i18n.t('dialogue.edit_close_confirm'), () => {
|
||||||
connectionStore.closeConnection(name)
|
connectionStore.closeConnection(name)
|
||||||
dialogStore.openEditDialog(name)
|
dialogStore.openEditDialog(name)
|
||||||
})
|
})
|
||||||
|
@ -390,7 +393,7 @@ const handleSelectContextMenu = (key) => {
|
||||||
case 'server_close':
|
case 'server_close':
|
||||||
connectionStore.closeConnection(name).then((closed) => {
|
connectionStore.closeConnection(name).then((closed) => {
|
||||||
if (closed) {
|
if (closed) {
|
||||||
$message.success(i18n.t('handle_succ'))
|
$message.success(i18n.t('dialogue.handle_succ'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
|
@ -459,7 +462,10 @@ const handleDrop = ({ node, dragNode, dropPosition }) => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-empty v-if="isEmpty(connectionStore.connections)" :description="$t('empty_server_list')" class="empty-content" />
|
<n-empty
|
||||||
|
v-if="isEmpty(connectionStore.connections)"
|
||||||
|
:description="$t('interface.empty_server_list')"
|
||||||
|
class="empty-content" />
|
||||||
<n-tree
|
<n-tree
|
||||||
v-else
|
v-else
|
||||||
:animated="false"
|
:animated="false"
|
||||||
|
@ -491,7 +497,7 @@ const handleDrop = ({ node, dragNode, dropPosition }) => {
|
||||||
style="width: 400px">
|
style="width: 400px">
|
||||||
<n-spin>
|
<n-spin>
|
||||||
<template #description>
|
<template #description>
|
||||||
{{ $t('opening_connection') }}
|
{{ $t('dialogue.opening_connection') }}
|
||||||
</template>
|
</template>
|
||||||
</n-spin>
|
</n-spin>
|
||||||
</n-card>
|
</n-card>
|
||||||
|
|
|
@ -39,18 +39,18 @@ const i18n = useI18n()
|
||||||
const menuOptions = computed(() => {
|
const menuOptions = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: i18n.t('browser'),
|
label: i18n.t('ribbon.browser'),
|
||||||
key: 'browser',
|
key: 'browser',
|
||||||
icon: renderIcon(ToggleDb),
|
icon: renderIcon(ToggleDb),
|
||||||
show: connectionStore.anyConnectionOpened,
|
show: connectionStore.anyConnectionOpened,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: i18n.t('server'),
|
label: i18n.t('ribbon.server'),
|
||||||
key: 'server',
|
key: 'server',
|
||||||
icon: renderIcon(ToggleServer),
|
icon: renderIcon(ToggleServer),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: i18n.t('log'),
|
label: i18n.t('ribbon.log'),
|
||||||
key: 'log',
|
key: 'log',
|
||||||
icon: renderIcon(Record),
|
icon: renderIcon(Record),
|
||||||
},
|
},
|
||||||
|
@ -60,17 +60,17 @@ const menuOptions = computed(() => {
|
||||||
const preferencesOptions = computed(() => {
|
const preferencesOptions = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: i18n.t('preferences'),
|
label: i18n.t('menu.preferences'),
|
||||||
key: 'preferences',
|
key: 'preferences',
|
||||||
icon: renderIcon(Config),
|
icon: renderIcon(Config),
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// label: i18n.t('menu.help'),
|
||||||
|
// key: 'help',
|
||||||
|
// icon: renderIcon(Help),
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
label: i18n.t('help'),
|
label: i18n.t('menu.check_update'),
|
||||||
key: 'help',
|
|
||||||
icon: renderIcon(Help),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: i18n.t('check_update'),
|
|
||||||
key: 'update',
|
key: 'update',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,168 +1,208 @@
|
||||||
{
|
{
|
||||||
"name": "English",
|
"name": "English",
|
||||||
"system_lang": "Use System Language",
|
"common": {
|
||||||
"confirm": "Confirm",
|
"confirm": "Confirm",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"success": "Success",
|
"success": "Success",
|
||||||
"warning": "Warning",
|
"warning": "Warning",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"none": "None",
|
"none": "None",
|
||||||
"default": "Default",
|
"second": "Second(s)",
|
||||||
"new_conn": "Add New Connection",
|
"unit_day": "D",
|
||||||
"new_group": "Add New Group",
|
"unit_hour": "H",
|
||||||
"rename_group": "Rename Group",
|
"unit_minute": "M",
|
||||||
"disconnect_all": "Disconnect all",
|
"all": "All",
|
||||||
"status": "Status",
|
"key": "Key",
|
||||||
"filter": "Filter",
|
"value": "Value",
|
||||||
"sort_conn": "Sort Connections",
|
"field": "Field"
|
||||||
"close_confirm": "Confirm close this tab and connection",
|
},
|
||||||
"edit_close_confirm": "Please close the relevant connections before editing. Do you want to continue?",
|
"preferences": {
|
||||||
"opening_connection": "Opening Connection...",
|
"name": "Preferences",
|
||||||
"remove_tip": "{type} \"{name}\" will be deleted",
|
"restore_defaults": "Restore Defaults",
|
||||||
"remove_group_tip": "Group \"{name}\" and all connections in it will be deleted",
|
"general": {
|
||||||
"ttl": "TTL",
|
"name": "General",
|
||||||
"forever": "Forever",
|
"theme": "Theme",
|
||||||
"rename_key": "Rename Key",
|
"theme_light": "Light",
|
||||||
"delete_key": "Delete Key",
|
"theme_dark": "Dark",
|
||||||
"batch_delete_key": "Batch Delete Keys",
|
"theme_auto": "Auto",
|
||||||
"db_index": "Database Index",
|
"language": "Language",
|
||||||
"key_expression": "Key Expression",
|
"system_lang": "Use System Language",
|
||||||
"affected_key": "Affected Keys",
|
"default": "Default",
|
||||||
"show_affected_key": "Show Affected Keys",
|
"font": "Font",
|
||||||
"confirm_delete_key": "Confirm Delete {num} Keys",
|
"font_size": "Font Size",
|
||||||
"delete_key_succ": "\"{key}\" has been deleted",
|
"proxy": "Proxy",
|
||||||
"copy_value": "Copy Value",
|
"use_system_proxy": "Use system proxy",
|
||||||
"edit_value": "Edit Value",
|
"use_system_proxy_http": "Use system proxy only for HTTP(S) request",
|
||||||
"save_update": "Save Update",
|
"update": "Update",
|
||||||
"score_filter_tip": "Support operator list below:\n= equal\n!= not equal\n> greater than\n>= greater than or equal to\n< less than\n<= less than or equal to\nfor example you want to filter results which greater than 3, input: >3",
|
"auto_check_update": "Automatically check for updates"
|
||||||
"add_row": "Add Row",
|
},
|
||||||
"edit_row": "Edit Row",
|
"editor": {
|
||||||
"delete_row": "Delete Row",
|
"name": "Editor"
|
||||||
"search": "Search",
|
}
|
||||||
"filter_field": "Filter Field",
|
},
|
||||||
"filter_value": "Filter Value",
|
"interface": {
|
||||||
"view_as": "View As",
|
"new_conn": "Add New Connection",
|
||||||
"reload": "Reload",
|
"new_group": "Add New Group",
|
||||||
"open_connection": "Open Connection",
|
"disconnect_all": "Disconnect all",
|
||||||
"open_db": "Open Database",
|
"status": "Status",
|
||||||
"close_db": "Close Database",
|
"filter": "Filter",
|
||||||
"filter_key": "Filter Key",
|
"sort_conn": "Sort Connections",
|
||||||
"disconnect": "Disconnect",
|
"open_db": "Open Database",
|
||||||
"dup_conn": "Duplicate Connection",
|
"close_db": "Close Database",
|
||||||
"remove_conn": "Delete Connection",
|
"filter_key": "Filter Key",
|
||||||
"edit_conn": "Edit Connection Config",
|
"disconnect": "Disconnect",
|
||||||
"edit_conn_group": "Edit Connection Group",
|
"dup_conn": "Duplicate Connection",
|
||||||
"rename_conn_group": "Rename Connection Group",
|
"remove_conn": "Delete Connection",
|
||||||
"remove_conn_group": "Delete Connection Group",
|
"edit_conn": "Edit Connection Config",
|
||||||
"no_group": "No Group",
|
"edit_conn_group": "Edit Connection Group",
|
||||||
"copy_path": "Copy Path",
|
"rename_conn_group": "Rename Connection Group",
|
||||||
"batch_delete": "Batch Delete",
|
"remove_conn_group": "Delete Connection Group",
|
||||||
"copy_key": "Copy Key",
|
"ttl": "TTL",
|
||||||
"remove_key": "Remove Key",
|
"forever": "Forever",
|
||||||
"new_conn_title": "New Connection",
|
"rename_key": "Rename Key",
|
||||||
"edit_conn_title": "Edit Connection",
|
"delete_key": "Delete Key",
|
||||||
"general": "General",
|
"batch_delete_key": "Batch Delete Keys",
|
||||||
"advanced": "Advanced",
|
"copy_value": "Copy Value",
|
||||||
"editor": "Editor",
|
"edit_value": "Edit Value",
|
||||||
"conn_group": "Group",
|
"save_update": "Save Update",
|
||||||
"group_name": "Group Name",
|
"score_filter_tip": "Support operator list below:\n= equal\n!= not equal\n> greater than\n>= greater than or equal to\n< less than\n<= less than or equal to\nfor example you want to filter results which greater than 3, input: >3",
|
||||||
"conn_name": "Name",
|
"add_row": "Add Row",
|
||||||
"conn_addr": "Address",
|
"edit_row": "Edit Row",
|
||||||
"conn_usr": "Username",
|
"delete_row": "Delete Row",
|
||||||
"conn_pwd": "Password",
|
"search": "Search",
|
||||||
"conn_name_tip": "Connection name",
|
"filter_field": "Filter Field",
|
||||||
"conn_addr_tip": "Redis server host",
|
"filter_value": "Filter Value",
|
||||||
"conn_usr_tip": "(Optional) Redis server username",
|
"view_as": "View As",
|
||||||
"conn_pwd_tip": "(Optional) Redis server authentication password (Redis > 6.0)",
|
"reload": "Reload",
|
||||||
"conn_test": "Test Connection",
|
"open_connection": "Open Connection",
|
||||||
"conn_test_succ": "Successful connection to redis-server",
|
"batch_delete": "Batch Delete",
|
||||||
"conn_test_fail": "Fail Connection",
|
"copy_path": "Copy Path",
|
||||||
"conn_advn_filter": "Default Filter",
|
"copy_key": "Copy Key",
|
||||||
"conn_advn_filter_tip": "Pattern which defines loaded keys from redis server",
|
"remove_key": "Remove Key",
|
||||||
"conn_advn_separator": "Key Separator",
|
"new_key": "Add New Key",
|
||||||
"conn_advn_separator_tip": "Separator used for key path item",
|
"nonexist_tab_content": "Selected key does not exist. Please retry",
|
||||||
"conn_advn_conn_timeout": "Connection Timeout",
|
"empty_server_content": "Select and open a connection from the left",
|
||||||
"conn_advn_exec_timeout": "Execution Timeout",
|
"empty_server_list": "No redis server",
|
||||||
"conn_advn_mark_color": "Mark Color",
|
"action": "Action",
|
||||||
"second": "Second(s)",
|
"type": "Type",
|
||||||
"new_key_name": "New Key Name",
|
"score": "Score"
|
||||||
"new_key": "Add New Key",
|
},
|
||||||
"new_field": "Add New Field",
|
"ribbon": {
|
||||||
"overwrite_field": "Overwrite Existing Field",
|
"server": "Server",
|
||||||
"ignore_field": "Ignore Existing Field",
|
"browser": "Browser",
|
||||||
"new_item": "Add New Item",
|
"log": "Log"
|
||||||
"insert_type": "Insert",
|
},
|
||||||
"append_item": "Append",
|
"dialogue": {
|
||||||
"prepend_item": "Prepend",
|
"close_confirm": "Confirm close this tab and connection",
|
||||||
"enter_key": "Enter Key",
|
"edit_close_confirm": "Please close the relevant connections before editing. Do you want to continue?",
|
||||||
"enter_value": "Enter Value",
|
"opening_connection": "Opening Connection...",
|
||||||
"enter_field": "Enter Field Name",
|
"remove_tip": "{type} \"{name}\" will be deleted",
|
||||||
"enter_elem": "Enter Element",
|
"remove_group_tip": "Group \"{name}\" and all connections in it will be deleted",
|
||||||
"enter_member": "Enter Member",
|
"delete_key_succ": "\"{key}\" has been deleted",
|
||||||
"enter_score": "Enter Score",
|
"save_value_succ": "Value Saved !",
|
||||||
"element": "Element",
|
"copy_succ": "Value Copied !",
|
||||||
"set_key_filter": "Set Key Filter",
|
"handle_succ": "Success!",
|
||||||
"filter_pattern": "Pattern",
|
"reload_succ": "Reloaded!",
|
||||||
"filter_pattern_tip": "prefix_*: Matches key names starting with \"prefix_\".\n*_suffix: Matches key names ending with \"_suffix\".\n*pattern*: Matches key names containing \"pattern\".\nprefix_??: Matches key names starting with \"prefix_\" followed by any two characters.\n*abc*: Matches key names containing \"abc\" at any position.",
|
"field_required": "This item should not be blank",
|
||||||
"key": "Key",
|
"spec_field_required": "\"{key}\" should not be blank",
|
||||||
"value": "Value",
|
"illegal_characters": "Include illegal characters",
|
||||||
"field": "Field",
|
"connection": {
|
||||||
"action": "Action",
|
"new_title": "New Connection",
|
||||||
"type": "Type",
|
"edit_title": "Edit Connection",
|
||||||
"score": "Score",
|
"general": "General",
|
||||||
"order_no": "Order",
|
"advanced": "Advanced",
|
||||||
"preferences": "Preferences",
|
"no_group": "No Group",
|
||||||
"theme": "Theme",
|
"group": "Group",
|
||||||
"theme_light": "Light",
|
"conn_name": "Name",
|
||||||
"theme_dark": "Dark",
|
"addr": "Address",
|
||||||
"theme_auto": "Auto",
|
"usr": "Username",
|
||||||
"language": "Language",
|
"pwd": "Password",
|
||||||
"font": "Font",
|
"name_tip": "Connection name",
|
||||||
"font_size": "Font Size",
|
"addr_tip": "Redis server host",
|
||||||
"restore_defaults": "Restore Defaults",
|
"usr_tip": "(Optional) Redis server username",
|
||||||
"proxy": "Proxy",
|
"pwd_tip": "(Optional) Redis server authentication password (Redis > 6.0)",
|
||||||
"use_system_proxy": "Use system proxy",
|
"test": "Test Connection",
|
||||||
"use_system_proxy_http": "Use system proxy only for HTTP(S) request",
|
"test_succ": "Successful connection to redis-server",
|
||||||
"update": "Update",
|
"test_fail": "Fail Connection",
|
||||||
"auto_check_update": "Automatically check for updates",
|
"advn_filter": "Default Filter",
|
||||||
"set_ttl": "Set Key TTL",
|
"advn_filter_tip": "Pattern which defines loaded keys from redis server",
|
||||||
"persist_key": "Persist Key",
|
"advn_separator": "Key Separator",
|
||||||
"copy_succ": "Value Copied !",
|
"advn_separator_tip": "Separator used for key path item",
|
||||||
"save_value_succ": "Value Saved !",
|
"advn_conn_timeout": "Connection Timeout",
|
||||||
"handle_succ": "Success!",
|
"advn_exec_timeout": "Execution Timeout",
|
||||||
"reload_succ": "Reloaded!",
|
"advn_mark_color": "Mark Color"
|
||||||
"field_required": "This item should not be blank",
|
},
|
||||||
"spec_field_required": "\"{key}\" should not be blank",
|
"group": {
|
||||||
"illegal_characters": "Include illegal characters",
|
"name": "Group Name",
|
||||||
"nonexist_tab_content": "Selected key does not exist. Please retry",
|
"rename": "Rename Group",
|
||||||
"empty_server_content": "Select and open a connection from the left",
|
"new": "New Group"
|
||||||
"empty_server_list": "No redis server",
|
},
|
||||||
"reload_when_succ": "Reload immediately after success",
|
"key": {
|
||||||
"server": "Server",
|
"new": "New Key",
|
||||||
"browser": "Browser",
|
"new_name": "New Key Name",
|
||||||
"log": "Log",
|
"persist_key": "Persist Key",
|
||||||
"help": "Help",
|
"server": "Belong",
|
||||||
"check_update": "Check for Updates...",
|
"db_index": "Database Index",
|
||||||
"auto_refresh": "Auto Refresh",
|
"key_expression": "Key Expression",
|
||||||
"new_version_tip": "A new version is available. Download now?",
|
"affected_key": "Affected Keys",
|
||||||
"no_update": "You're update to date",
|
"show_affected_key": "Show Affected Keys",
|
||||||
"refresh": "Refresh",
|
"confirm_delete_key": "Confirm Delete {num} Keys"
|
||||||
"uptime": "Uptime",
|
},
|
||||||
"connected_clients": "Clients",
|
"field": {
|
||||||
"total_keys": "Keys",
|
"new": "Add New Field",
|
||||||
"memory_used": "Memory",
|
"new_item": "Add New Item",
|
||||||
"unit_day": "D",
|
"overwrite_field": "Overwrite Existing Field",
|
||||||
"unit_hour": "H",
|
"ignore_field": "Ignore Existing Field",
|
||||||
"unit_minute": "M",
|
"insert_type": "Insert",
|
||||||
"all_info": "All Info",
|
"append_item": "Append",
|
||||||
"all": "All",
|
"prepend_item": "Prepend",
|
||||||
"launch_log": "Launch Log",
|
"enter_key": "Enter Key",
|
||||||
"filter_server": "Filter Server",
|
"enter_value": "Enter Value",
|
||||||
"filter_keyword": "Filter Keyword",
|
"enter_field": "Enter Field Name",
|
||||||
"clean_log": "Clean Launch Log",
|
"enter_elem": "Enter Element",
|
||||||
"confirm_clean_log": "Confirm clean launch log",
|
"enter_member": "Enter Member",
|
||||||
"exec_time": "Exec Time",
|
"enter_score": "Enter Score",
|
||||||
"cmd": "Command",
|
"element": "Element",
|
||||||
"cost_time": "Cost"
|
"reload_when_succ": "Reload immediately after success"
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"set_key_filter": "Set Key Filter",
|
||||||
|
"filter_pattern": "Pattern",
|
||||||
|
"filter_pattern_tip": "prefix_*: Matches key names starting with \"prefix_\".\n*_suffix: Matches key names ending with \"_suffix\".\n*pattern*: Matches key names containing \"pattern\".\nprefix_??: Matches key names starting with \"prefix_\" followed by any two characters.\n*abc*: Matches key names containing \"abc\" at any position."
|
||||||
|
},
|
||||||
|
"ttl": {
|
||||||
|
"title": "Set Key TTL"
|
||||||
|
},
|
||||||
|
"upgrade": {
|
||||||
|
"new_version_tip": "A new version is available. Download now?",
|
||||||
|
"no_update": "You're update to date"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"menu": {
|
||||||
|
"preferences": "Preferences",
|
||||||
|
"help": "Help",
|
||||||
|
"check_update": "Check for Updates..."
|
||||||
|
},
|
||||||
|
"log": {
|
||||||
|
"launch_log": "Launch Log",
|
||||||
|
"filter_server": "Filter Server",
|
||||||
|
"filter_keyword": "Filter Keyword",
|
||||||
|
"clean_log": "Clean Launch Log",
|
||||||
|
"confirm_clean_log": "Confirm clean launch log",
|
||||||
|
"exec_time": "Exec Time",
|
||||||
|
"server": "Server",
|
||||||
|
"cmd": "Command",
|
||||||
|
"cost_time": "Cost",
|
||||||
|
"refresh": "Refresh"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"uptime": "Uptime",
|
||||||
|
"connected_clients": "Clients",
|
||||||
|
"total_keys": "Keys",
|
||||||
|
"memory_used": "Memory",
|
||||||
|
"all_info": "All Info",
|
||||||
|
"refresh": "Refresh",
|
||||||
|
"auto_refresh": "Auto Refresh"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,168 +1,209 @@
|
||||||
{
|
{
|
||||||
"name": "简体中文",
|
"name": "简体中文",
|
||||||
"system_lang": "使用系统语言",
|
"common": {
|
||||||
"confirm": "确认",
|
"confirm": "确认",
|
||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
"success": "成功",
|
"success": "成功",
|
||||||
"warning": "警告",
|
"warning": "警告",
|
||||||
"error": "错误",
|
"error": "错误",
|
||||||
"save": "保存",
|
"save": "保存",
|
||||||
"none": "无",
|
"none": "无",
|
||||||
"default": "默认",
|
"second": "秒",
|
||||||
"new_conn": "添加新连接",
|
"unit_day": "天",
|
||||||
"new_group": "添加新分组",
|
"unit_hour": "小时",
|
||||||
"rename_group": "重命名分组",
|
"unit_minute": "分钟",
|
||||||
"disconnect_all": "断开所有连接",
|
"all": "全部",
|
||||||
"status": "状态",
|
"key": "键",
|
||||||
"filter": "筛选",
|
"value": "值",
|
||||||
"sort_conn": "调整连接顺序",
|
"field": "字段"
|
||||||
"close_confirm": "是否关闭当前连接",
|
},
|
||||||
"edit_close_confirm": "编辑前需要关闭相关连接,是否继续",
|
"preferences": {
|
||||||
"opening_connection": "正在打开连接...",
|
"name": "偏好设置",
|
||||||
"remove_tip": "{type} \"{name}\" 将会被删除",
|
"restore_defaults": "重置为默认",
|
||||||
"remove_group_tip": "分组 \"{name}\"及其所有连接将会被删除",
|
"general": {
|
||||||
"ttl": "TTL",
|
"name": "常规配置",
|
||||||
"forever": "永久",
|
"theme": "主题",
|
||||||
"rename_key": "重命名键",
|
"theme_light": "浅色",
|
||||||
"delete_key": "删除键",
|
"theme_dark": "深色",
|
||||||
"batch_delete_key": "批量删除键",
|
"theme_auto": "自动",
|
||||||
"db_index": "数据库编号",
|
"language": "语言",
|
||||||
"key_expression": "键名表达式",
|
"system_lang": "使用系统语言",
|
||||||
"affected_key": "受影响的键名",
|
"default": "默认",
|
||||||
"show_affected_key": "查看受影响的键名",
|
"font": "字体",
|
||||||
"confirm_delete_key": "确认删除{num}个键",
|
"font_size": "字体尺寸",
|
||||||
"delete_key_succ": "{key} 已被删除",
|
"proxy": "代理",
|
||||||
"copy_value": "复制值",
|
"use_system_proxy": "使用系统代理",
|
||||||
"edit_value": "修改值",
|
"use_system_proxy_http": "仅在HTTP请求时使用系统代理",
|
||||||
"save_update": "保存修改",
|
"update": "更新",
|
||||||
"score_filter_tip": "支持如下运算符比较匹配范围\n=:等于\n!=:不等于\n>:大于\n<:小于\n>=:大于等于\n<=:小于等于\n如查询分值大于3的结果,则输入:>3",
|
"auto_check_update": "自动检查更新"
|
||||||
"add_row": "插入行",
|
},
|
||||||
"edit_row": "编辑行",
|
"editor": {
|
||||||
"delete_row": "删除行",
|
"name": "编辑器"
|
||||||
"search": "搜索",
|
}
|
||||||
"filter_field": "筛选字段",
|
},
|
||||||
"filter_value": "筛选值",
|
"interface": {
|
||||||
"view_as": "查看方式",
|
"new_conn": "添加新连接",
|
||||||
"reload": "重新载入",
|
"new_group": "添加新分组",
|
||||||
"open_connection": "打开连接",
|
"disconnect_all": "断开所有连接",
|
||||||
"open_db": "打开数据库",
|
"status": "状态",
|
||||||
"close_db": "关闭数据库",
|
"filter": "筛选",
|
||||||
"filter_key": "过滤键",
|
"sort_conn": "调整连接顺序",
|
||||||
"disconnect": "断开连接",
|
"new_conn_title": "新建连接",
|
||||||
"dup_conn": "复制连接",
|
"open_db": "打开数据库",
|
||||||
"remove_conn": "删除连接",
|
"close_db": "关闭数据库",
|
||||||
"edit_conn": "编辑连接配置",
|
"filter_key": "过滤键",
|
||||||
"edit_conn_group": "编辑连接分组",
|
"disconnect": "断开连接",
|
||||||
"rename_conn_group": "重命名连接分组",
|
"dup_conn": "复制连接",
|
||||||
"remove_conn_group": "删除连接分组",
|
"remove_conn": "删除连接",
|
||||||
"no_group": "无分组",
|
"edit_conn": "编辑连接配置",
|
||||||
"copy_path": "复制路径",
|
"edit_conn_group": "编辑连接分组",
|
||||||
"batch_delete": "批量删除键",
|
"rename_conn_group": "重命名连接分组",
|
||||||
"copy_key": "复制键名",
|
"remove_conn_group": "删除连接分组",
|
||||||
"remove_key": "删除键",
|
"ttl": "TTL",
|
||||||
"new_conn_title": "新建连接",
|
"forever": "永久",
|
||||||
"edit_conn_title": "编辑连接",
|
"rename_key": "重命名键",
|
||||||
"general": "常规配置",
|
"delete_key": "删除键",
|
||||||
"advanced": "高级配置",
|
"batch_delete_key": "批量删除键",
|
||||||
"editor": "编辑器",
|
"copy_value": "复制值",
|
||||||
"conn_group": "分组",
|
"edit_value": "修改值",
|
||||||
"group_name": "分组名",
|
"save_update": "保存修改",
|
||||||
"conn_name": "连接名",
|
"score_filter_tip": "支持如下运算符比较匹配范围\n=:等于\n!=:不等于\n>:大于\n<:小于\n>=:大于等于\n<=:小于等于\n如查询分值大于3的结果,则输入:>3",
|
||||||
"conn_addr": "连接地址",
|
"add_row": "插入行",
|
||||||
"conn_usr": "用户名",
|
"edit_row": "编辑行",
|
||||||
"conn_pwd": "密码",
|
"delete_row": "删除行",
|
||||||
"conn_name_tip": "连接名",
|
"search": "搜索",
|
||||||
"conn_addr_tip": "Redis服务地址",
|
"filter_field": "筛选字段",
|
||||||
"conn_usr_tip": "(可选)Redis服务授权用户名",
|
"filter_value": "筛选值",
|
||||||
"conn_pwd_tip": "(可选)Redis服务授权密码 (Redis > 6.0)",
|
"view_as": "查看方式",
|
||||||
"conn_test": "测试连接",
|
"reload": "重新载入",
|
||||||
"conn_test_succ": "成功连接到Redis服务器",
|
"open_connection": "打开连接",
|
||||||
"conn_test_fail": "连接失败",
|
"batch_delete": "批量删除键",
|
||||||
"conn_advn_filter": "默认过滤",
|
"copy_path": "复制路径",
|
||||||
"conn_advn_filter_tip": "需要加载的键名表达式",
|
"copy_key": "复制键名",
|
||||||
"conn_advn_separator": "键分隔符",
|
"remove_key": "删除键",
|
||||||
"conn_advn_separator_tip": "键名路径分隔符",
|
"new_key": "添加新键",
|
||||||
"conn_advn_conn_timeout": "连接超时",
|
"nonexist_tab_content": "所选键不存在,请尝试刷新重试",
|
||||||
"conn_advn_exec_timeout": "执行超时",
|
"empty_server_content": "可以从左边选择并打开连接",
|
||||||
"conn_advn_mark_color": "标记颜色",
|
"empty_server_list": "还没添加Redis服务器",
|
||||||
"second": "秒",
|
"action": "操作",
|
||||||
"new_key_name": "新键名",
|
"type": "类型",
|
||||||
"new_key": "添加新键",
|
"score": "分值"
|
||||||
"new_field": "添加新字段",
|
},
|
||||||
"overwrite_field": "覆盖同名字段",
|
"ribbon": {
|
||||||
"ignore_field": "忽略同名字段",
|
"server": "服务器",
|
||||||
"new_item": "添加新元素",
|
"browser": "浏览器",
|
||||||
"insert_type": "插入类型",
|
"log": "日志"
|
||||||
"append_item": "尾部追加",
|
},
|
||||||
"prepend_item": "插入头部",
|
"dialogue": {
|
||||||
"enter_key": "输入键名",
|
"close_confirm": "是否关闭当前连接",
|
||||||
"enter_value": "输入值",
|
"edit_close_confirm": "编辑前需要关闭相关连接,是否继续",
|
||||||
"enter_field": "输入字段名",
|
"opening_connection": "正在打开连接...",
|
||||||
"enter_elem": "输入新元素",
|
"remove_tip": "{type} \"{name}\" 将会被删除",
|
||||||
"enter_member": "输入成员",
|
"remove_group_tip": "分组 \"{name}\"及其所有连接将会被删除",
|
||||||
"enter_score": "输入分值",
|
"delete_key_succ": "{key} 已被删除",
|
||||||
"element": "元素",
|
"save_value_succ": "已保存值",
|
||||||
"set_key_filter": "设置键过滤器",
|
"copy_succ": "已复制到剪切板",
|
||||||
"filter_pattern": "过滤表达式",
|
"handle_succ": "操作成功",
|
||||||
"filter_pattern_tip": "prefix_*:匹配以\"prefix_\"开头的键名\n*_suffix:匹配以\"_suffix\"结尾的键名\n*pattern*:匹配包含\"pattern\"的键名\nprefix_??:匹配以\"prefix_\"开头后跟两个任意字符的键名\n*abc*:匹配包含\"abc\"的任意位置的键名",
|
"reload_succ": "已重新载入",
|
||||||
"key": "键",
|
"field_required": "此项不能为空",
|
||||||
"value": "值",
|
"spec_field_required": "{key} 不能为空",
|
||||||
"field": "字段",
|
"illegal_characters": "包含非法字符",
|
||||||
"action": "操作",
|
"connection": {
|
||||||
"type": "类型",
|
"new_title": "新建连接",
|
||||||
"score": "分值",
|
"edit_title": "编辑连接",
|
||||||
"order_no": "序号",
|
"general": "常规配置",
|
||||||
"preferences": "偏好设置",
|
"advanced": "高级配置",
|
||||||
"theme": "主题",
|
"no_group": "无分组",
|
||||||
"theme_light": "浅色",
|
"group": "分组",
|
||||||
"theme_dark": "深色",
|
"conn_name": "连接名",
|
||||||
"theme_auto": "自动",
|
"addr": "连接地址",
|
||||||
"language": "语言",
|
"usr": "用户名",
|
||||||
"font": "字体",
|
"pwd": "密码",
|
||||||
"font_size": "字体尺寸",
|
"name_tip": "连接名",
|
||||||
"restore_defaults": "重置为默认",
|
"addr_tip": "Redis服务地址",
|
||||||
"proxy": "代理",
|
"usr_tip": "(可选)Redis服务授权用户名",
|
||||||
"use_system_proxy": "使用系统代理",
|
"pwd_tip": "(可选)Redis服务授权密码 (Redis > 6.0)",
|
||||||
"use_system_proxy_http": "仅在HTTP请求时使用系统代理",
|
"test": "测试连接",
|
||||||
"update": "更新",
|
"test_succ": "成功连接到Redis服务器",
|
||||||
"auto_check_update": "自动检查更新",
|
"test_fail": "连接失败",
|
||||||
"set_ttl": "设置键存活时间",
|
"advn_filter": "默认过滤",
|
||||||
"persist_key": "持久化键",
|
"advn_filter_tip": "需要加载的键名表达式",
|
||||||
"copy_succ": "已复制到剪切板",
|
"advn_separator": "键分隔符",
|
||||||
"save_value_succ": "已保存值",
|
"advn_separator_tip": "键名路径分隔符",
|
||||||
"handle_succ": "操作成功",
|
"advn_conn_timeout": "连接超时",
|
||||||
"reload_succ": "已重新载入",
|
"advn_exec_timeout": "执行超时",
|
||||||
"field_required": "此项不能为空",
|
"advn_mark_color": "标记颜色"
|
||||||
"spec_field_required": "{key} 不能为空",
|
},
|
||||||
"illegal_characters": "包含非法字符",
|
"group": {
|
||||||
"nonexist_tab_content": "所选键不存在,请尝试刷新重试",
|
"name": "分组名",
|
||||||
"empty_server_content": "可以从左边选择并打开连接",
|
"rename": "重命名分组",
|
||||||
"empty_server_list": "还没添加Redis服务器",
|
"new": "添加新分组"
|
||||||
"reload_when_succ": "操作成功后立即重新加载",
|
},
|
||||||
"server": "服务器",
|
"key": {
|
||||||
"browser": "浏览器",
|
"new": "添加新键",
|
||||||
"log": "日志",
|
"new_name": "新键名",
|
||||||
"help": "帮助",
|
"persist_key": "持久化键",
|
||||||
"check_update": "检查更新...",
|
"server": "所属连接",
|
||||||
"auto_refresh": "自动刷新",
|
"db_index": "数据库编号",
|
||||||
"new_version_tip": "有可用的新版本,是否立即下载",
|
"key_expression": "键名表达式",
|
||||||
"no_update": "当前已是最新版",
|
"affected_key": "受影响的键名",
|
||||||
"refresh": "立即刷新",
|
"show_affected_key": "查看受影响的键名",
|
||||||
"uptime": "运行时间",
|
"confirm_delete_key": "确认删除{num}个键"
|
||||||
"connected_clients": "已连客户端",
|
},
|
||||||
"total_keys": "键总数",
|
"field": {
|
||||||
"memory_used": "内存使用",
|
"new": "添加新字段",
|
||||||
"unit_day": "天",
|
"new_item": "添加新元素",
|
||||||
"unit_hour": "小时",
|
"overwrite_field": "覆盖同名字段",
|
||||||
"unit_minute": "分钟",
|
"ignore_field": "忽略同名字段",
|
||||||
"all_info": "全部信息",
|
"insert_type": "插入类型",
|
||||||
"all": "全部",
|
"append_item": "尾部追加",
|
||||||
"launch_log": "运行日志",
|
"prepend_item": "插入头部",
|
||||||
"filter_server": "筛选服务器",
|
"enter_key": "输入键名",
|
||||||
"filter_keyword": "筛选关键字",
|
"enter_value": "输入值",
|
||||||
"clean_log": "清空运行日志",
|
"enter_field": "输入字段名",
|
||||||
"confirm_clean_log": "确定清空运行日志",
|
"enter_elem": "输入新元素",
|
||||||
"exec_time": "执行时间",
|
"enter_member": "输入成员",
|
||||||
"cmd": "命令",
|
"enter_score": "输入分值",
|
||||||
"cost_time": "耗时"
|
"element": "元素",
|
||||||
|
"reload_when_succ": "操作成功后立即重新加载"
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"set_key_filter": "设置键过滤器",
|
||||||
|
"filter_pattern": "过滤表达式",
|
||||||
|
"filter_pattern_tip": "prefix_*:匹配以\"prefix_\"开头的键名\n*_suffix:匹配以\"_suffix\"结尾的键名\n*pattern*:匹配包含\"pattern\"的键名\nprefix_??:匹配以\"prefix_\"开头后跟两个任意字符的键名\n*abc*:匹配包含\"abc\"的任意位置的键名"
|
||||||
|
},
|
||||||
|
"ttl": {
|
||||||
|
"title": "设置键存活时间"
|
||||||
|
},
|
||||||
|
"upgrade":{
|
||||||
|
"new_version_tip": "有可用的新版本,是否立即下载",
|
||||||
|
"no_update": "当前已是最新版"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"menu": {
|
||||||
|
"preferences": "偏好设置",
|
||||||
|
"help": "帮助",
|
||||||
|
"check_update": "检查更新..."
|
||||||
|
},
|
||||||
|
"log": {
|
||||||
|
"launch_log": "运行日志",
|
||||||
|
"filter_server": "筛选服务器",
|
||||||
|
"filter_keyword": "筛选关键字",
|
||||||
|
"clean_log": "清空运行日志",
|
||||||
|
"confirm_clean_log": "确定清空运行日志",
|
||||||
|
"exec_time": "执行时间",
|
||||||
|
"server": "服务器",
|
||||||
|
"cmd": "命令",
|
||||||
|
"cost_time": "耗时",
|
||||||
|
"refresh": "立即刷新"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"uptime": "运行时间",
|
||||||
|
"connected_clients": "已连客户端",
|
||||||
|
"total_keys": "键总数",
|
||||||
|
"memory_used": "内存使用",
|
||||||
|
"all_info": "全部信息",
|
||||||
|
"refresh": "立即刷新",
|
||||||
|
"auto_refresh": "自动刷新"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ async function setupApp() {
|
||||||
try {
|
try {
|
||||||
const content = err.toString()
|
const content = err.toString()
|
||||||
$notification.error({
|
$notification.error({
|
||||||
title: i18n.global.t('error'),
|
title: i18n.global.t('common.error'),
|
||||||
content,
|
content,
|
||||||
// meta: err.stack,
|
// meta: err.stack,
|
||||||
})
|
})
|
||||||
|
|
|
@ -56,15 +56,15 @@ const usePreferencesStore = defineStore('preferences', {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
value: 'light',
|
value: 'light',
|
||||||
label: i18nGlobal.t('theme_light'),
|
label: i18nGlobal.t('preferences.general.theme_light'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'dark',
|
value: 'dark',
|
||||||
label: i18nGlobal.t('theme_dark'),
|
label: i18nGlobal.t('preferences.general.theme_dark'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'auto',
|
value: 'auto',
|
||||||
label: i18nGlobal.t('theme_auto'),
|
label: i18nGlobal.t('preferences.general.theme_auto'),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -80,7 +80,7 @@ const usePreferencesStore = defineStore('preferences', {
|
||||||
}))
|
}))
|
||||||
options.splice(0, 0, {
|
options.splice(0, 0, {
|
||||||
value: 'auto',
|
value: 'auto',
|
||||||
label: i18nGlobal.t('system_lang'),
|
label: i18nGlobal.t('preferences.general.system_lang'),
|
||||||
})
|
})
|
||||||
return options
|
return options
|
||||||
},
|
},
|
||||||
|
@ -97,7 +97,7 @@ const usePreferencesStore = defineStore('preferences', {
|
||||||
}))
|
}))
|
||||||
option.splice(0, 0, {
|
option.splice(0, 0, {
|
||||||
value: '',
|
value: '',
|
||||||
label: i18nGlobal.t('default'),
|
label: i18nGlobal.t('preferences.general.default'),
|
||||||
path: '',
|
path: '',
|
||||||
})
|
})
|
||||||
return option
|
return option
|
||||||
|
@ -252,7 +252,7 @@ const usePreferencesStore = defineStore('preferences', {
|
||||||
if (success) {
|
if (success) {
|
||||||
const { version, latest, pageUrl } = data
|
const { version, latest, pageUrl } = data
|
||||||
if (latest > version) {
|
if (latest > version) {
|
||||||
$dialog.warning(i18nGlobal.t('new_version_tip'), () => {
|
$dialog.warning(i18nGlobal.t('dialogue.upgrade.new_version_tip'), () => {
|
||||||
BrowserOpenURL(pageUrl)
|
BrowserOpenURL(pageUrl)
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
@ -260,7 +260,7 @@ const usePreferencesStore = defineStore('preferences', {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (manual) {
|
if (manual) {
|
||||||
$message.info(i18nGlobal.t('no_update'))
|
$message.info(i18nGlobal.t('dialogue.upgrade.no_update'))
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (msgRef != null) {
|
if (msgRef != null) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ function setupNotification(notification) {
|
||||||
return {
|
return {
|
||||||
error: (content, option = {}) => {
|
error: (content, option = {}) => {
|
||||||
option.content = content
|
option.content = content
|
||||||
option.title = option.title || i18nGlobal.t('error')
|
option.title = option.title || i18nGlobal.t('common.error')
|
||||||
return notification.error(option)
|
return notification.error(option)
|
||||||
},
|
},
|
||||||
info: (content, option = {}) => {
|
info: (content, option = {}) => {
|
||||||
|
@ -39,12 +39,12 @@ function setupNotification(notification) {
|
||||||
},
|
},
|
||||||
success: (content, option = {}) => {
|
success: (content, option = {}) => {
|
||||||
option.content = content
|
option.content = content
|
||||||
option.title = option.title || i18nGlobal.t('success')
|
option.title = option.title || i18nGlobal.t('common.success')
|
||||||
return notification.success(option)
|
return notification.success(option)
|
||||||
},
|
},
|
||||||
warning: (content, option = {}) => {
|
warning: (content, option = {}) => {
|
||||||
option.content = content
|
option.content = content
|
||||||
option.title = option.title || i18nGlobal.t('warning')
|
option.title = option.title || i18nGlobal.t('common.warning')
|
||||||
return notification.warning(option)
|
return notification.warning(option)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -54,13 +54,13 @@ function setupDialog(dialog) {
|
||||||
return {
|
return {
|
||||||
warning: (content, onConfirm) => {
|
warning: (content, onConfirm) => {
|
||||||
return dialog.warning({
|
return dialog.warning({
|
||||||
title: i18nGlobal.t('warning'),
|
title: i18nGlobal.t('common.warning'),
|
||||||
content: content,
|
content: content,
|
||||||
closable: false,
|
closable: false,
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
transformOrigin: 'center',
|
transformOrigin: 'center',
|
||||||
positiveText: i18nGlobal.t('confirm'),
|
positiveText: i18nGlobal.t('common.confirm'),
|
||||||
negativeText: i18nGlobal.t('cancel'),
|
negativeText: i18nGlobal.t('common.cancel'),
|
||||||
onPositiveClick: () => {
|
onPositiveClick: () => {
|
||||||
onConfirm && onConfirm()
|
onConfirm && onConfirm()
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue