diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 7fd662b..efe4692 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -88,25 +88,23 @@ const theme = computed(() => {
class="fill-height"
>
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/components/content_value/ContentToolbar.vue b/frontend/src/components/content_value/ContentToolbar.vue
index 6127431..2766588 100644
--- a/frontend/src/components/content_value/ContentToolbar.vue
+++ b/frontend/src/components/content_value/ContentToolbar.vue
@@ -7,12 +7,12 @@ import Refresh from '@/components/icons/Refresh.vue'
import Timer from '@/components/icons/Timer.vue'
import RedisTypeTag from '@/components/common/RedisTypeTag.vue'
import { useI18n } from 'vue-i18n'
-import { useMessage } from 'naive-ui'
import IconButton from '@/components/common/IconButton.vue'
import useConnectionStore from 'stores/connections.js'
import { useConfirmDialog } from '@/utils/confirm_dialog.js'
import Copy from '@/components/icons/Copy.vue'
import { ClipboardSetText } from 'wailsjs/runtime/runtime.js'
+import { useMessage } from '@/utils/message.js'
const props = defineProps({
server: String,
diff --git a/frontend/src/components/content_value/ContentValueHash.vue b/frontend/src/components/content_value/ContentValueHash.vue
index edb577d..71e1868 100644
--- a/frontend/src/components/content_value/ContentValueHash.vue
+++ b/frontend/src/components/content_value/ContentValueHash.vue
@@ -3,14 +3,15 @@ import { computed, h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import ContentToolbar from './ContentToolbar.vue'
import AddLink from '@/components/icons/AddLink.vue'
-import { NButton, NCode, NIcon, NInput, useMessage } from 'naive-ui'
+import { NButton, NCode, NIcon, NInput } from 'naive-ui'
import { types, types as redisTypes } from '@/consts/support_redis_type.js'
import EditableTableColumn from '@/components/common/EditableTableColumn.vue'
import useDialogStore from 'stores/dialog.js'
import useConnectionStore from 'stores/connections.js'
+import { useMessage } from '@/utils/message.js'
const i18n = useI18n()
-
+const message = useMessage()
const props = defineProps({
name: String,
db: Number,
@@ -197,7 +198,6 @@ const tableData = computed(() => {
}
return data
})
-const message = useMessage()
const onAddRow = () => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, types.HASH)
}
diff --git a/frontend/src/components/content_value/ContentValueList.vue b/frontend/src/components/content_value/ContentValueList.vue
index c05ec68..5793991 100644
--- a/frontend/src/components/content_value/ContentValueList.vue
+++ b/frontend/src/components/content_value/ContentValueList.vue
@@ -3,15 +3,16 @@ import { computed, h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import ContentToolbar from './ContentToolbar.vue'
import AddLink from '@/components/icons/AddLink.vue'
-import { NButton, NCode, NIcon, NInput, useMessage } from 'naive-ui'
+import { NButton, NCode, NIcon, NInput } from 'naive-ui'
import { size } from 'lodash'
import { types, types as redisTypes } from '@/consts/support_redis_type.js'
import EditableTableColumn from '@/components/common/EditableTableColumn.vue'
import useDialogStore from 'stores/dialog.js'
import useConnectionStore from 'stores/connections.js'
+import { useMessage } from '@/utils/message.js'
const i18n = useI18n()
-
+const message = useMessage()
const props = defineProps({
name: String,
db: Number,
@@ -151,7 +152,7 @@ const tableData = computed(() => {
}
return data
})
-const message = useMessage()
+
const onAddValue = (value) => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, types.LIST)
}
diff --git a/frontend/src/components/content_value/ContentValueSet.vue b/frontend/src/components/content_value/ContentValueSet.vue
index b93f5cd..9d04d10 100644
--- a/frontend/src/components/content_value/ContentValueSet.vue
+++ b/frontend/src/components/content_value/ContentValueSet.vue
@@ -3,14 +3,16 @@ import { computed, h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import ContentToolbar from './ContentToolbar.vue'
import AddLink from '@/components/icons/AddLink.vue'
-import { NButton, NCode, NIcon, NInput, useMessage } from 'naive-ui'
+import { NButton, NCode, NIcon, NInput } from 'naive-ui'
import { size } from 'lodash'
import useDialogStore from 'stores/dialog.js'
import { types, types as redisTypes } from '@/consts/support_redis_type.js'
import EditableTableColumn from '@/components/common/EditableTableColumn.vue'
import useConnectionStore from 'stores/connections.js'
+import { useMessage } from '@/utils/message.js'
const i18n = useI18n()
+const message = useMessage()
const props = defineProps({
name: String,
db: Number,
@@ -147,7 +149,6 @@ const tableData = computed(() => {
return data
})
-const message = useMessage()
const onAddValue = (value) => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, types.SET)
}
diff --git a/frontend/src/components/content_value/ContentValueStream.vue b/frontend/src/components/content_value/ContentValueStream.vue
index 7cabc9b..6f793ee 100644
--- a/frontend/src/components/content_value/ContentValueStream.vue
+++ b/frontend/src/components/content_value/ContentValueStream.vue
@@ -3,15 +3,16 @@ import { computed, h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import ContentToolbar from './ContentToolbar.vue'
import AddLink from '@/components/icons/AddLink.vue'
-import { NButton, NCode, NIcon, NInput, useMessage } from 'naive-ui'
+import { NButton, NCode, NIcon, NInput } from 'naive-ui'
import { types, types as redisTypes } from '@/consts/support_redis_type.js'
import EditableTableColumn from '@/components/common/EditableTableColumn.vue'
import useDialogStore from 'stores/dialog.js'
import useConnectionStore from 'stores/connections.js'
import { includes, keys, some, values } from 'lodash'
+import { useMessage } from '@/utils/message.js'
const i18n = useI18n()
-
+const message = useMessage()
const props = defineProps({
name: String,
db: Number,
@@ -120,7 +121,7 @@ const tableData = computed(() => {
}
return data
})
-const message = useMessage()
+
const onAddRow = () => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, types.STREAM)
}
diff --git a/frontend/src/components/content_value/ContentValueString.vue b/frontend/src/components/content_value/ContentValueString.vue
index bccc4e5..312ca4f 100644
--- a/frontend/src/components/content_value/ContentValueString.vue
+++ b/frontend/src/components/content_value/ContentValueString.vue
@@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'
import ContentToolbar from './ContentToolbar.vue'
import Copy from '@/components/icons/Copy.vue'
import Save from '@/components/icons/Save.vue'
-import { useMessage, useThemeVars } from 'naive-ui'
+import { useThemeVars } from 'naive-ui'
import { types } from '@/consts/value_view_type.js'
import Close from '@/components/icons/Close.vue'
import Edit from '@/components/icons/Edit.vue'
@@ -13,7 +13,10 @@ import { types as redisTypes } from '@/consts/support_redis_type.js'
import { ClipboardSetText } from 'wailsjs/runtime/runtime.js'
import { toLower } from 'lodash'
import useConnectionStore from 'stores/connections.js'
+import { useMessage } from '@/utils/message.js'
+const i18n = useI18n()
+const message = useMessage()
const themeVars = useThemeVars()
const props = defineProps({
@@ -106,8 +109,6 @@ const viewLanguage = computed(() => {
return 'plaintext'
}
})
-const i18n = useI18n()
-const message = useMessage()
/**
* Copy value
diff --git a/frontend/src/components/content_value/ContentValueZSet.vue b/frontend/src/components/content_value/ContentValueZSet.vue
index 02e25fe..c64ed71 100644
--- a/frontend/src/components/content_value/ContentValueZSet.vue
+++ b/frontend/src/components/content_value/ContentValueZSet.vue
@@ -3,15 +3,16 @@ import { computed, h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import ContentToolbar from './ContentToolbar.vue'
import AddLink from '@/components/icons/AddLink.vue'
-import { NButton, NCode, NIcon, NInput, NInputNumber, useMessage } from 'naive-ui'
+import { NButton, NCode, NIcon, NInput, NInputNumber } from 'naive-ui'
import { types, types as redisTypes } from '@/consts/support_redis_type.js'
import EditableTableColumn from '@/components/common/EditableTableColumn.vue'
import { isEmpty } from 'lodash'
import useDialogStore from 'stores/dialog.js'
import useConnectionStore from 'stores/connections.js'
+import { useMessage } from '@/utils/message.js'
const i18n = useI18n()
-
+const message = useMessage()
const props = defineProps({
name: String,
db: Number,
@@ -220,7 +221,7 @@ const tableData = computed(() => {
}
return data
})
-const message = useMessage()
+
const onAddRow = () => {
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, types.ZSET)
}
diff --git a/frontend/src/components/dialogs/AddFieldsDialog.vue b/frontend/src/components/dialogs/AddFieldsDialog.vue
index c6b793c..3234ba2 100644
--- a/frontend/src/components/dialogs/AddFieldsDialog.vue
+++ b/frontend/src/components/dialogs/AddFieldsDialog.vue
@@ -5,7 +5,7 @@ import useDialog from 'stores/dialog'
import NewStringValue from '@/components/new_value/NewStringValue.vue'
import NewSetValue from '@/components/new_value/NewSetValue.vue'
import { useI18n } from 'vue-i18n'
-import { useMessage } from 'naive-ui'
+import { useMessage } from '@/utils/message.js'
import AddListValue from '@/components/new_value/AddListValue.vue'
import AddHashValue from '@/components/new_value/AddHashValue.vue'
import AddZSetValue from '@/components/new_value/AddZSetValue.vue'
diff --git a/frontend/src/components/dialogs/ConnectionDialog.vue b/frontend/src/components/dialogs/ConnectionDialog.vue
index 5add45e..cc8c33c 100644
--- a/frontend/src/components/dialogs/ConnectionDialog.vue
+++ b/frontend/src/components/dialogs/ConnectionDialog.vue
@@ -4,7 +4,7 @@ import { computed, nextTick, ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { TestConnection } from 'wailsjs/go/services/connectionService.js'
import useDialog from 'stores/dialog'
-import { useMessage } from 'naive-ui'
+import { useMessage } from '@/utils/message.js'
import Close from '@/components/icons/Close.vue'
import useConnectionStore from 'stores/connections.js'
diff --git a/frontend/src/components/dialogs/DeleteKeyDialog.vue b/frontend/src/components/dialogs/DeleteKeyDialog.vue
index 26fa8f4..ee98767 100644
--- a/frontend/src/components/dialogs/DeleteKeyDialog.vue
+++ b/frontend/src/components/dialogs/DeleteKeyDialog.vue
@@ -1,7 +1,7 @@