Compare commits
4 Commits
c6f1daed44
...
6996421cde
Author | SHA1 | Date |
---|---|---|
tiny-craft | 6996421cde | |
tiny-craft | 5a29a34ea1 | |
tiny-craft | ca8403d784 | |
tiny-craft | 51ed14dcf8 |
|
@ -46,7 +46,9 @@ func (p *PreferencesStorage) GetPreferences() (ret types.Preferences) {
|
||||||
defer p.mutex.Unlock()
|
defer p.mutex.Unlock()
|
||||||
|
|
||||||
ret = p.getPreferences()
|
ret = p.getPreferences()
|
||||||
ret.General.ScanSize = max(ret.General.ScanSize, consts.DEFAULT_SCAN_SIZE)
|
if ret.General.ScanSize <= 0 {
|
||||||
|
ret.General.ScanSize = consts.DEFAULT_SCAN_SIZE
|
||||||
|
}
|
||||||
ret.Behavior.AsideWidth = max(ret.Behavior.AsideWidth, consts.DEFAULT_ASIDE_WIDTH)
|
ret.Behavior.AsideWidth = max(ret.Behavior.AsideWidth, consts.DEFAULT_ASIDE_WIDTH)
|
||||||
ret.Behavior.WindowWidth = max(ret.Behavior.WindowWidth, consts.MIN_WINDOW_WIDTH)
|
ret.Behavior.WindowWidth = max(ret.Behavior.WindowWidth, consts.MIN_WINDOW_WIDTH)
|
||||||
ret.Behavior.WindowHeight = max(ret.Behavior.WindowHeight, consts.MIN_WINDOW_HEIGHT)
|
ret.Behavior.WindowHeight = max(ret.Behavior.WindowHeight, consts.MIN_WINDOW_HEIGHT)
|
||||||
|
|
|
@ -8,13 +8,14 @@
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"bytes": "^3.1.2",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"highlight.js": "^11.9.0",
|
"highlight.js": "^11.9.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"sass": "^1.69.5",
|
"sass": "^1.69.5",
|
||||||
"vue": "^3.3.7",
|
"vue": "^3.3.7",
|
||||||
"vue-i18n": "^9.6.0",
|
"vue-i18n": "^9.6.2",
|
||||||
"xterm": "^5.3.0",
|
"xterm": "^5.3.0",
|
||||||
"xterm-addon-fit": "^0.8.0"
|
"xterm-addon-fit": "^0.8.0"
|
||||||
},
|
},
|
||||||
|
@ -464,23 +465,23 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@intlify/core-base": {
|
"node_modules/@intlify/core-base": {
|
||||||
"version": "9.6.0",
|
"version": "9.6.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.6.2.tgz",
|
||||||
"integrity": "sha512-9xWsUFrQq4iP1amH3cEIlUHsCXO541RGRDfrKqaDhlYvMbf2qTzpSjqeL3kWw1b+rC8XWHw+cgZXa4VPdOzqfg==",
|
"integrity": "sha512-ci0j2nbEL/pamvqgcCqyIVeQ3LS41F1IRqI5rCBNnpSp0FjNnH8bpha8R3OifkhqatzlP4wGOuN/UqfLYVDv7g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@intlify/message-compiler": "9.6.0",
|
"@intlify/message-compiler": "9.6.2",
|
||||||
"@intlify/shared": "9.6.0"
|
"@intlify/shared": "9.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 16"
|
"node": ">= 16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@intlify/message-compiler": {
|
"node_modules/@intlify/message-compiler": {
|
||||||
"version": "9.6.0",
|
"version": "9.6.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.6.2.tgz",
|
||||||
"integrity": "sha512-GucIIYA2H86gdf/lKHAahfLpyYm9Q1IUc/yUEMk8wwwfrzBwuYmTDg90ooed7eRVx2N/omyDyuhKV4cRp3b+DQ==",
|
"integrity": "sha512-kgZQL9zeJDeEB5vvD93Y++HvFUELnT48PjnpfCcF3EJaLLVs9he8IzODiNK42Z40lWbFyja0SXJZjsalybQygA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@intlify/shared": "9.6.0",
|
"@intlify/shared": "9.6.2",
|
||||||
"source-map-js": "^1.0.2"
|
"source-map-js": "^1.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -488,9 +489,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@intlify/shared": {
|
"node_modules/@intlify/shared": {
|
||||||
"version": "9.6.0",
|
"version": "9.6.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.6.2.tgz",
|
||||||
"integrity": "sha512-vZeID7kn10rhgRYZQvjULTOYXDGnC0j49HI0AD9CK08aj4nWmlPai/8awTsMg0qrfHVMTna8ZMNmBZNyFAUCfA==",
|
"integrity": "sha512-9KBcXmJNxElp7QMnU8V0/tScTOitDqyFi4HceEZqJyyDkMi8K5DBPMTIuXIAMmtMlXpe/nj5pke7tRw97VeQRA==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 16"
|
"node": ">= 16"
|
||||||
}
|
}
|
||||||
|
@ -779,6 +780,14 @@
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/bytes": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/chokidar": {
|
"node_modules/chokidar": {
|
||||||
"version": "3.5.3",
|
"version": "3.5.3",
|
||||||
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz",
|
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz",
|
||||||
|
@ -1917,12 +1926,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vue-i18n": {
|
"node_modules/vue-i18n": {
|
||||||
"version": "9.6.0",
|
"version": "9.6.2",
|
||||||
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.6.2.tgz",
|
||||||
"integrity": "sha512-DSUaHmc2qpXpB0oeHXrW4JtOXnzpmAeaPopDIlubRyXkxIdbzGTsQekZYrCoI3rCEouYKwD1tIw01/YYSYqWAw==",
|
"integrity": "sha512-J43grTQjPR8LCUxvx3mkoM+11xhTnej1Al4lvJCEeKmQqf8eqbuYPQb54HXnEg/UzZyaxLBAwPAUTbrZ8V7hcg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@intlify/core-base": "9.6.0",
|
"@intlify/core-base": "9.6.2",
|
||||||
"@intlify/shared": "9.6.0",
|
"@intlify/shared": "9.6.2",
|
||||||
"@vue/devtools-api": "^6.5.0"
|
"@vue/devtools-api": "^6.5.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -2229,27 +2238,27 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@intlify/core-base": {
|
"@intlify/core-base": {
|
||||||
"version": "9.6.0",
|
"version": "9.6.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.6.2.tgz",
|
||||||
"integrity": "sha512-9xWsUFrQq4iP1amH3cEIlUHsCXO541RGRDfrKqaDhlYvMbf2qTzpSjqeL3kWw1b+rC8XWHw+cgZXa4VPdOzqfg==",
|
"integrity": "sha512-ci0j2nbEL/pamvqgcCqyIVeQ3LS41F1IRqI5rCBNnpSp0FjNnH8bpha8R3OifkhqatzlP4wGOuN/UqfLYVDv7g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@intlify/message-compiler": "9.6.0",
|
"@intlify/message-compiler": "9.6.2",
|
||||||
"@intlify/shared": "9.6.0"
|
"@intlify/shared": "9.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@intlify/message-compiler": {
|
"@intlify/message-compiler": {
|
||||||
"version": "9.6.0",
|
"version": "9.6.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.6.2.tgz",
|
||||||
"integrity": "sha512-GucIIYA2H86gdf/lKHAahfLpyYm9Q1IUc/yUEMk8wwwfrzBwuYmTDg90ooed7eRVx2N/omyDyuhKV4cRp3b+DQ==",
|
"integrity": "sha512-kgZQL9zeJDeEB5vvD93Y++HvFUELnT48PjnpfCcF3EJaLLVs9he8IzODiNK42Z40lWbFyja0SXJZjsalybQygA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@intlify/shared": "9.6.0",
|
"@intlify/shared": "9.6.2",
|
||||||
"source-map-js": "^1.0.2"
|
"source-map-js": "^1.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@intlify/shared": {
|
"@intlify/shared": {
|
||||||
"version": "9.6.0",
|
"version": "9.6.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.6.2.tgz",
|
||||||
"integrity": "sha512-vZeID7kn10rhgRYZQvjULTOYXDGnC0j49HI0AD9CK08aj4nWmlPai/8awTsMg0qrfHVMTna8ZMNmBZNyFAUCfA=="
|
"integrity": "sha512-9KBcXmJNxElp7QMnU8V0/tScTOitDqyFi4HceEZqJyyDkMi8K5DBPMTIuXIAMmtMlXpe/nj5pke7tRw97VeQRA=="
|
||||||
},
|
},
|
||||||
"@jridgewell/sourcemap-codec": {
|
"@jridgewell/sourcemap-codec": {
|
||||||
"version": "1.4.15",
|
"version": "1.4.15",
|
||||||
|
@ -2493,6 +2502,11 @@
|
||||||
"fill-range": "^7.0.1"
|
"fill-range": "^7.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bytes": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
|
||||||
|
},
|
||||||
"chokidar": {
|
"chokidar": {
|
||||||
"version": "3.5.3",
|
"version": "3.5.3",
|
||||||
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz",
|
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz",
|
||||||
|
@ -3309,12 +3323,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vue-i18n": {
|
"vue-i18n": {
|
||||||
"version": "9.6.0",
|
"version": "9.6.2",
|
||||||
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.6.2.tgz",
|
||||||
"integrity": "sha512-DSUaHmc2qpXpB0oeHXrW4JtOXnzpmAeaPopDIlubRyXkxIdbzGTsQekZYrCoI3rCEouYKwD1tIw01/YYSYqWAw==",
|
"integrity": "sha512-J43grTQjPR8LCUxvx3mkoM+11xhTnej1Al4lvJCEeKmQqf8eqbuYPQb54HXnEg/UzZyaxLBAwPAUTbrZ8V7hcg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@intlify/core-base": "9.6.0",
|
"@intlify/core-base": "9.6.2",
|
||||||
"@intlify/shared": "9.6.0",
|
"@intlify/shared": "9.6.2",
|
||||||
"@vue/devtools-api": "^6.5.0"
|
"@vue/devtools-api": "^6.5.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,13 +9,14 @@
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"bytes": "^3.1.2",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"highlight.js": "^11.9.0",
|
"highlight.js": "^11.9.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"sass": "^1.69.5",
|
"sass": "^1.69.5",
|
||||||
"vue": "^3.3.7",
|
"vue": "^3.3.7",
|
||||||
"vue-i18n": "^9.6.0",
|
"vue-i18n": "^9.6.2",
|
||||||
"xterm": "^5.3.0",
|
"xterm": "^5.3.0",
|
||||||
"xterm-addon-fit": "^0.8.0"
|
"xterm-addon-fit": "^0.8.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
7c3f3d30a242641f2f308ca9c3a8e4f1
|
24a0be173ef3e3939a15eb9c7fff5e1a
|
|
@ -58,7 +58,7 @@ onMounted(() => {
|
||||||
const { term, fitAddon } = newTerm()
|
const { term, fitAddon } = newTerm()
|
||||||
termInst = term
|
termInst = term
|
||||||
fitAddonInst = fitAddon
|
fitAddonInst = fitAddon
|
||||||
// window.addEventListener('resize', resizeTerm)
|
window.addEventListener('resize', resizeTerm)
|
||||||
|
|
||||||
term.writeln('\r\n' + i18nGlobal.t('interface.cli_welcome'))
|
term.writeln('\r\n' + i18nGlobal.t('interface.cli_welcome'))
|
||||||
// term.write('\x1b[4h') // insert mode
|
// term.write('\x1b[4h') // insert mode
|
||||||
|
@ -71,7 +71,7 @@ onMounted(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
// window.removeEventListener('resize', resizeTerm)
|
window.removeEventListener('resize', resizeTerm)
|
||||||
EventsOff(`cmd:output:${props.name}`)
|
EventsOff(`cmd:output:${props.name}`)
|
||||||
termInst.dispose()
|
termInst.dispose()
|
||||||
termInst = null
|
termInst = null
|
||||||
|
|
|
@ -13,6 +13,7 @@ import Copy from '@/components/icons/Copy.vue'
|
||||||
import { ClipboardSetText } from 'wailsjs/runtime/runtime.js'
|
import { ClipboardSetText } from 'wailsjs/runtime/runtime.js'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { isEmpty, padStart } from 'lodash'
|
import { isEmpty, padStart } from 'lodash'
|
||||||
|
import { decodeTypes, formatTypes } from '@/consts/value_view_type.js'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
server: String,
|
server: String,
|
||||||
|
@ -33,6 +34,14 @@ const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
default: -1,
|
default: -1,
|
||||||
},
|
},
|
||||||
|
viewAs: {
|
||||||
|
type: String,
|
||||||
|
default: formatTypes.PLAIN_TEXT,
|
||||||
|
},
|
||||||
|
decode: {
|
||||||
|
type: String,
|
||||||
|
default: decodeTypes.NONE,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const dialogStore = useDialog()
|
const dialogStore = useDialog()
|
||||||
|
@ -69,7 +78,7 @@ const ttlString = computed(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const onReloadKey = () => {
|
const onReloadKey = () => {
|
||||||
connectionStore.loadKeyValue(props.server, props.db, keyName.value)
|
connectionStore.loadKeyValue(props.server, props.db, keyName.value, props.viewAs, props.decode)
|
||||||
}
|
}
|
||||||
|
|
||||||
const onCopyKey = () => {
|
const onCopyKey = () => {
|
||||||
|
|
|
@ -10,6 +10,7 @@ import useDialogStore from 'stores/dialog.js'
|
||||||
import useConnectionStore from 'stores/connections.js'
|
import useConnectionStore from 'stores/connections.js'
|
||||||
import { isEmpty } from 'lodash'
|
import { isEmpty } from 'lodash'
|
||||||
import bytes from 'bytes'
|
import bytes from 'bytes'
|
||||||
|
import { decodeTypes, formatTypes } from '@/consts/value_view_type.js'
|
||||||
|
|
||||||
const i18n = useI18n()
|
const i18n = useI18n()
|
||||||
const themeVars = useThemeVars()
|
const themeVars = useThemeVars()
|
||||||
|
@ -29,6 +30,14 @@ const props = defineProps({
|
||||||
value: Object,
|
value: Object,
|
||||||
size: Number,
|
size: Number,
|
||||||
length: Number,
|
length: Number,
|
||||||
|
viewAs: {
|
||||||
|
type: String,
|
||||||
|
default: formatTypes.PLAIN_TEXT,
|
||||||
|
},
|
||||||
|
decode: {
|
||||||
|
type: String,
|
||||||
|
default: decodeTypes.NONE,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -259,11 +268,13 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<div class="content-wrapper flex-box-v">
|
<div class="content-wrapper flex-box-v">
|
||||||
<content-toolbar
|
<content-toolbar
|
||||||
:db="props.db"
|
:db="props.db"
|
||||||
|
:decode="props.decode"
|
||||||
:key-code="props.keyCode"
|
:key-code="props.keyCode"
|
||||||
:key-path="props.keyPath"
|
:key-path="props.keyPath"
|
||||||
:key-type="keyType"
|
:key-type="keyType"
|
||||||
:server="props.name"
|
:server="props.name"
|
||||||
:ttl="ttl"
|
:ttl="ttl"
|
||||||
|
:view-as="props.viewAs"
|
||||||
class="value-item-part" />
|
class="value-item-part" />
|
||||||
<div class="tb2 value-item-part flex-box-h">
|
<div class="tb2 value-item-part flex-box-h">
|
||||||
<div class="flex-box-h">
|
<div class="flex-box-h">
|
||||||
|
|
|
@ -10,6 +10,7 @@ import EditableTableColumn from '@/components/common/EditableTableColumn.vue'
|
||||||
import useDialogStore from 'stores/dialog.js'
|
import useDialogStore from 'stores/dialog.js'
|
||||||
import useConnectionStore from 'stores/connections.js'
|
import useConnectionStore from 'stores/connections.js'
|
||||||
import bytes from 'bytes'
|
import bytes from 'bytes'
|
||||||
|
import { decodeTypes, formatTypes } from '@/consts/value_view_type.js'
|
||||||
|
|
||||||
const i18n = useI18n()
|
const i18n = useI18n()
|
||||||
const themeVars = useThemeVars()
|
const themeVars = useThemeVars()
|
||||||
|
@ -29,6 +30,14 @@ const props = defineProps({
|
||||||
value: Object,
|
value: Object,
|
||||||
size: Number,
|
size: Number,
|
||||||
length: Number,
|
length: Number,
|
||||||
|
viewAs: {
|
||||||
|
type: String,
|
||||||
|
default: formatTypes.PLAIN_TEXT,
|
||||||
|
},
|
||||||
|
decode: {
|
||||||
|
type: String,
|
||||||
|
default: decodeTypes.NONE,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -191,11 +200,13 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<div class="content-wrapper flex-box-v">
|
<div class="content-wrapper flex-box-v">
|
||||||
<content-toolbar
|
<content-toolbar
|
||||||
:db="props.db"
|
:db="props.db"
|
||||||
|
:decode="props.decode"
|
||||||
:key-code="props.keyCode"
|
:key-code="props.keyCode"
|
||||||
:key-path="props.keyPath"
|
:key-path="props.keyPath"
|
||||||
:key-type="keyType"
|
:key-type="keyType"
|
||||||
:server="props.name"
|
:server="props.name"
|
||||||
:ttl="ttl"
|
:ttl="ttl"
|
||||||
|
:view-as="props.viewAs"
|
||||||
class="value-item-part" />
|
class="value-item-part" />
|
||||||
<div class="tb2 value-item-part flex-box-h">
|
<div class="tb2 value-item-part flex-box-h">
|
||||||
<div class="flex-box-h">
|
<div class="flex-box-h">
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { types, types as redisTypes } from '@/consts/support_redis_type.js'
|
||||||
import EditableTableColumn from '@/components/common/EditableTableColumn.vue'
|
import EditableTableColumn from '@/components/common/EditableTableColumn.vue'
|
||||||
import useConnectionStore from 'stores/connections.js'
|
import useConnectionStore from 'stores/connections.js'
|
||||||
import bytes from 'bytes'
|
import bytes from 'bytes'
|
||||||
|
import { decodeTypes, formatTypes } from '@/consts/value_view_type.js'
|
||||||
|
|
||||||
const i18n = useI18n()
|
const i18n = useI18n()
|
||||||
const themeVars = useThemeVars()
|
const themeVars = useThemeVars()
|
||||||
|
@ -29,6 +30,14 @@ const props = defineProps({
|
||||||
value: Array,
|
value: Array,
|
||||||
size: Number,
|
size: Number,
|
||||||
length: Number,
|
length: Number,
|
||||||
|
viewAs: {
|
||||||
|
type: String,
|
||||||
|
default: formatTypes.PLAIN_TEXT,
|
||||||
|
},
|
||||||
|
decode: {
|
||||||
|
type: String,
|
||||||
|
default: decodeTypes.NONE,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -186,11 +195,13 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<div class="content-wrapper flex-box-v">
|
<div class="content-wrapper flex-box-v">
|
||||||
<content-toolbar
|
<content-toolbar
|
||||||
:db="props.db"
|
:db="props.db"
|
||||||
|
:decode="props.decode"
|
||||||
:key-code="props.keyCode"
|
:key-code="props.keyCode"
|
||||||
:key-path="props.keyPath"
|
:key-path="props.keyPath"
|
||||||
:key-type="keyType"
|
:key-type="keyType"
|
||||||
:server="props.name"
|
:server="props.name"
|
||||||
:ttl="ttl"
|
:ttl="ttl"
|
||||||
|
:view-as="props.viewAs"
|
||||||
class="value-item-part" />
|
class="value-item-part" />
|
||||||
<div class="tb2 value-item-part flex-box-h">
|
<div class="tb2 value-item-part flex-box-h">
|
||||||
<div class="flex-box-h">
|
<div class="flex-box-h">
|
||||||
|
|
|
@ -10,6 +10,7 @@ import useDialogStore from 'stores/dialog.js'
|
||||||
import useConnectionStore from 'stores/connections.js'
|
import useConnectionStore from 'stores/connections.js'
|
||||||
import { includes, isEmpty, keys, some, values } from 'lodash'
|
import { includes, isEmpty, keys, some, values } from 'lodash'
|
||||||
import bytes from 'bytes'
|
import bytes from 'bytes'
|
||||||
|
import { decodeTypes, formatTypes } from '@/consts/value_view_type.js'
|
||||||
|
|
||||||
const i18n = useI18n()
|
const i18n = useI18n()
|
||||||
const themeVars = useThemeVars()
|
const themeVars = useThemeVars()
|
||||||
|
@ -29,6 +30,14 @@ const props = defineProps({
|
||||||
value: Object,
|
value: Object,
|
||||||
size: Number,
|
size: Number,
|
||||||
length: Number,
|
length: Number,
|
||||||
|
viewAs: {
|
||||||
|
type: String,
|
||||||
|
default: formatTypes.PLAIN_TEXT,
|
||||||
|
},
|
||||||
|
decode: {
|
||||||
|
type: String,
|
||||||
|
default: decodeTypes.NONE,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -171,11 +180,13 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<div class="content-wrapper flex-box-v">
|
<div class="content-wrapper flex-box-v">
|
||||||
<content-toolbar
|
<content-toolbar
|
||||||
:db="props.db"
|
:db="props.db"
|
||||||
|
:decode="props.decode"
|
||||||
:key-code="props.keyCode"
|
:key-code="props.keyCode"
|
||||||
:key-path="props.keyPath"
|
:key-path="props.keyPath"
|
||||||
:key-type="keyType"
|
:key-type="keyType"
|
||||||
:server="props.name"
|
:server="props.name"
|
||||||
:ttl="ttl"
|
:ttl="ttl"
|
||||||
|
:view-as="props.viewAs"
|
||||||
class="value-item-part" />
|
class="value-item-part" />
|
||||||
<div class="tb2 value-item-part flex-box-h">
|
<div class="tb2 value-item-part flex-box-h">
|
||||||
<div class="flex-box-h">
|
<div class="flex-box-h">
|
||||||
|
|
|
@ -144,11 +144,13 @@ const onSaveValue = async () => {
|
||||||
<div class="content-wrapper flex-box-v">
|
<div class="content-wrapper flex-box-v">
|
||||||
<content-toolbar
|
<content-toolbar
|
||||||
:db="props.db"
|
:db="props.db"
|
||||||
|
:decode="props.decode"
|
||||||
:key-code="keyCode"
|
:key-code="keyCode"
|
||||||
:key-path="keyPath"
|
:key-path="keyPath"
|
||||||
:key-type="keyType"
|
:key-type="keyType"
|
||||||
:server="props.name"
|
:server="props.name"
|
||||||
:ttl="ttl"
|
:ttl="ttl"
|
||||||
|
:view-as="props.viewAs"
|
||||||
class="value-item-part" />
|
class="value-item-part" />
|
||||||
<div class="tb2 value-item-part flex-box-h">
|
<div class="tb2 value-item-part flex-box-h">
|
||||||
<div class="flex-item-expand"></div>
|
<div class="flex-item-expand"></div>
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { isEmpty } from 'lodash'
|
||||||
import useDialogStore from 'stores/dialog.js'
|
import useDialogStore from 'stores/dialog.js'
|
||||||
import useConnectionStore from 'stores/connections.js'
|
import useConnectionStore from 'stores/connections.js'
|
||||||
import bytes from 'bytes'
|
import bytes from 'bytes'
|
||||||
|
import { decodeTypes, formatTypes } from '@/consts/value_view_type.js'
|
||||||
|
|
||||||
const i18n = useI18n()
|
const i18n = useI18n()
|
||||||
const themeVars = useThemeVars()
|
const themeVars = useThemeVars()
|
||||||
|
@ -29,6 +30,14 @@ const props = defineProps({
|
||||||
value: Object,
|
value: Object,
|
||||||
size: Number,
|
size: Number,
|
||||||
length: Number,
|
length: Number,
|
||||||
|
viewAs: {
|
||||||
|
type: String,
|
||||||
|
default: formatTypes.PLAIN_TEXT,
|
||||||
|
},
|
||||||
|
decode: {
|
||||||
|
type: String,
|
||||||
|
default: decodeTypes.NONE,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -284,11 +293,13 @@ const onUpdateFilter = (filters, sourceColumn) => {
|
||||||
<div class="content-wrapper flex-box-v">
|
<div class="content-wrapper flex-box-v">
|
||||||
<content-toolbar
|
<content-toolbar
|
||||||
:db="props.db"
|
:db="props.db"
|
||||||
|
:decode="props.decode"
|
||||||
:key-code="props.keyCode"
|
:key-code="props.keyCode"
|
||||||
:key-path="props.keyPath"
|
:key-path="props.keyPath"
|
||||||
:key-type="keyType"
|
:key-type="keyType"
|
||||||
:server="props.name"
|
:server="props.name"
|
||||||
:ttl="ttl"
|
:ttl="ttl"
|
||||||
|
:view-as="props.viewAs"
|
||||||
class="value-item-part" />
|
class="value-item-part" />
|
||||||
<div class="tb2 value-item-part flex-box-h">
|
<div class="tb2 value-item-part flex-box-h">
|
||||||
<div class="flex-box-h">
|
<div class="flex-box-h">
|
||||||
|
|
|
@ -259,6 +259,9 @@ const handleSelectContextMenu = (key) => {
|
||||||
resetExpandKey(props.server, db, true)
|
resetExpandKey(props.server, db, true)
|
||||||
connectionStore.closeDatabase(props.server, db)
|
connectionStore.closeDatabase(props.server, db)
|
||||||
break
|
break
|
||||||
|
case 'db_flush':
|
||||||
|
dialogStore.openDeleteKeyDialog(props.server, db, '*')
|
||||||
|
break
|
||||||
case 'db_newkey':
|
case 'db_newkey':
|
||||||
case 'key_newkey':
|
case 'key_newkey':
|
||||||
dialogStore.openNewKeyDialog(redisKey, props.server, db)
|
dialogStore.openNewKeyDialog(redisKey, props.server, db)
|
||||||
|
@ -548,7 +551,7 @@ const getDatabaseMenu = (opened, loading, end) => {
|
||||||
tTooltip: 'interface.batch_delete',
|
tTooltip: 'interface.batch_delete',
|
||||||
icon: Delete,
|
icon: Delete,
|
||||||
disabled: loading === true,
|
disabled: loading === true,
|
||||||
onClick: () => handleSelectContextMenu('key_remove'),
|
onClick: () => handleSelectContextMenu('db_flush'),
|
||||||
}),
|
}),
|
||||||
// h(IconButton, {
|
// h(IconButton, {
|
||||||
// tTooltip: 'interface.more_action',
|
// tTooltip: 'interface.more_action',
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
"entries": "Entries",
|
"entries": "Entries",
|
||||||
"memory_usage": "Memory Usage",
|
"memory_usage": "Memory Usage",
|
||||||
"view_as": "View As",
|
"view_as": "View As",
|
||||||
"decode_with": "Decode/Decompress Type",
|
"decode_with": "Decode / Decompression",
|
||||||
"reload": "Reload",
|
"reload": "Reload",
|
||||||
"open_connection": "Open Connection",
|
"open_connection": "Open Connection",
|
||||||
"batch_delete": "Batch Delete",
|
"batch_delete": "Batch Delete",
|
||||||
|
|
|
@ -53,6 +53,9 @@ export const themeOverrides = {
|
||||||
buttonColorActive: '#D13B37',
|
buttonColorActive: '#D13B37',
|
||||||
buttonTextColorActive: '#FFF',
|
buttonTextColorActive: '#FFF',
|
||||||
},
|
},
|
||||||
|
Message: {
|
||||||
|
margin: '0 0 38px 0',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue