Skip to content

Commit 55fb0b7

Browse files
author
fuyoo
committed
add key not found page
1 parent e9e69f7 commit 55fb0b7

File tree

6 files changed

+24
-4
lines changed

6 files changed

+24
-4
lines changed

src/i18n/en-US/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default {
3939
tips: [
4040
'Current data type unsupported yet.',
4141
'Due to the data being larger than {size}, the displayed data is truncated. You can click the button next to it to download the original data',
42+
'Currently Key {key} not found.'
4243
],
4344
title: ['New {type} Type Key'],
4445
}

src/i18n/zh-CN/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ export default {
3333
normal: ['数据库', '请选择一个键'],
3434
timeFormat: ['天', '时', '分', '秒', '毫秒', '永不过期'],
3535
table: ['数据', '操作'],
36-
tips: ['该数据类型尚不支持','由于数据大于{size},当前显示的是被截断的数据。你可以点击旁边的按钮下载原始数据'],
36+
tips: ['该数据类型尚不支持','由于数据大于{size},当前显示的是被截断的数据。你可以点击旁边的按钮下载原始数据','当前键{key}未查询到'],
3737
title: ['添加{type}类型键']
3838
}

src/pages/host/components/CoKeys/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ const menuOptions = ref<DropdownOption[]>([
177177
])
178178
const x = ref(0)
179179
const y = ref(0)
180-
const supportDataType = ['string', 'list', 'set', 'zset', 'hash']
180+
const supportDataType = ['string', 'list', 'set', 'zset', 'hash','none']
181181
const nodeProps = ({ option }: { option: Tree }) => {
182182
return {
183183
async onClick() {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script setup lang="ts">
2+
import { Key } from '@/tools/keys.ts'
3+
4+
const key = Key()
5+
</script>
6+
7+
<template>
8+
<div class="h-full w-full flex justify-center items-center">
9+
<n-empty size="huge" :description="$t('tips.2',{key:key})"></n-empty>
10+
</div>
11+
</template>
12+
13+
<style scoped lang="scss">
14+
15+
</style>

src/pages/host/key-types/co-string/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ const changeValue = () => {
9898
</n-space>
9999
</co-info-header>
100100
<div class="p-4">
101-
<n-alert v-if="largerThan" type="info" :bordered="false">
101+
<n-alert v-if="largerThan" type="info" class="mb-4" :bordered="false">
102102
{{$t('tips[1]',{size: '1Mb'})}} <n-button size="tiny" type="primary" quaternary>{{$t("actions.6")}}</n-button>
103103
</n-alert>
104-
<textarea readonly class="mt-4 w-full h-full resize-none b-none outline-none" v-model="content" />
104+
<textarea readonly class=" w-full h-full resize-none b-none outline-none" v-model="content" />
105105
</div>
106106
</div>
107107
</template>

src/router/routes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ const routes: RouteRecordRaw[] = [
4444
path: 'set/:key',
4545
component: () => import('@/pages/host/key-types/co-set/index.vue'),
4646
},
47+
{
48+
path: 'none/:key',
49+
component: () => import('@/pages/host/key-types/co-none/index.vue'),
50+
},
4751
{
4852
path: 'list/:key',
4953
component: () => import('@/pages/host/key-types/co-list/index.vue'),

0 commit comments

Comments
 (0)