Compare commits
7 Commits
5d2080aafb
...
aab2531d40
Author | SHA1 | Date |
---|---|---|
Lykin | aab2531d40 | |
Lykin | 2e7f832754 | |
Lykin | f3f12479fd | |
Lykin | e1362fce45 | |
Lykin | f1cfa1778f | |
Lykin | b7ba179e62 | |
Lykin | bc53c405a5 |
|
@ -600,7 +600,6 @@ func (b *browserService) GetKeySummary(param types.KeySummaryParam) (resp types.
|
|||
pipe := client.Pipeline()
|
||||
typeVal := pipe.Type(ctx, key)
|
||||
ttlVal := pipe.TTL(ctx, key)
|
||||
sizeVal := pipe.MemoryUsage(ctx, key, 0)
|
||||
_, err = pipe.Exec(ctx)
|
||||
if err != nil {
|
||||
resp.Msg = err.Error()
|
||||
|
@ -611,9 +610,10 @@ func (b *browserService) GetKeySummary(param types.KeySummaryParam) (resp types.
|
|||
resp.Msg = typeVal.Err().Error()
|
||||
return
|
||||
}
|
||||
size, _ := client.MemoryUsage(ctx, key, 0).Result()
|
||||
data := types.KeySummary{
|
||||
Type: strings.ToLower(typeVal.Val()),
|
||||
Size: sizeVal.Val(),
|
||||
Size: size,
|
||||
}
|
||||
if data.Type == "none" {
|
||||
resp.Msg = "key not exists"
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
"monaco-editor": "^0.45.0",
|
||||
"pinia": "^2.1.7",
|
||||
"sass": "^1.69.7",
|
||||
"vue": "^3.4.7",
|
||||
"vue": "^3.4.8",
|
||||
"vue-i18n": "^9.9.0",
|
||||
"xterm": "^5.3.0",
|
||||
"xterm-addon-fit": "^0.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.0.2",
|
||||
"@vitejs/plugin-vue": "^5.0.3",
|
||||
"naive-ui": "^2.37.3",
|
||||
"prettier": "^3.1.1",
|
||||
"unplugin-auto-import": "^0.17.3",
|
||||
|
@ -864,9 +864,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-vue": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.2.tgz",
|
||||
"integrity": "sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==",
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.3.tgz",
|
||||
"integrity": "sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^18.0.0 || >=20.0.0"
|
||||
|
@ -877,36 +877,36 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-core": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.7.tgz",
|
||||
"integrity": "sha512-hhCaE3pTMrlIJK7M/o3Xf7HV8+JoNTGOQ/coWS+V+pH6QFFyqtoXqQzpqsNp7UK17xYKua/MBiKj4e1vgZOBYw==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.8.tgz",
|
||||
"integrity": "sha512-GjAwOydZV6UyVBi1lYW5v4jjfU6wOeyi3vBATKJOwV7muYF0/nZi4kfdJc0pwdT5lXwbbx57lyA2Y356rFpw1A==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.23.6",
|
||||
"@vue/shared": "3.4.7",
|
||||
"@vue/shared": "3.4.8",
|
||||
"entities": "^4.5.0",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map-js": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-dom": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.7.tgz",
|
||||
"integrity": "sha512-qDKBAIurCTub4n/6jDYkXwgsFuriqqmmLrIq1N2QDfYJA/mwiwvxi09OGn28g+uDdERX9NaKDLji0oTjE3sScg==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.8.tgz",
|
||||
"integrity": "sha512-GsPyji42zmkSJlaDFKXvwB97ukTlHzlFH/iVzPFYz/APnSzuhu/CMFQbsYmrtsnc2yscF39eC4rKzvKR27aBug==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-core": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/compiler-core": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-sfc": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.7.tgz",
|
||||
"integrity": "sha512-Gec6CLkReVswDYjQFq79O5rktri4R7TsD/VPCiUoJw40JhNNxaNJJa8mrQrWoJluW4ETy6QN0NUyC/JO77OCOw==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.8.tgz",
|
||||
"integrity": "sha512-3ZcurOa6bQdZ6VZLtMqYSUZqpsMqfX0MC3oCxQG0VIJFCqouZAgRYJN1c8QvGs7HW5wW8aXVvUOQU0ILVlYHKA==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.23.6",
|
||||
"@vue/compiler-core": "3.4.7",
|
||||
"@vue/compiler-dom": "3.4.7",
|
||||
"@vue/compiler-ssr": "3.4.7",
|
||||
"@vue/shared": "3.4.7",
|
||||
"@vue/compiler-core": "3.4.8",
|
||||
"@vue/compiler-dom": "3.4.8",
|
||||
"@vue/compiler-ssr": "3.4.8",
|
||||
"@vue/shared": "3.4.8",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.30.5",
|
||||
"postcss": "^8.4.32",
|
||||
|
@ -914,12 +914,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-ssr": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.7.tgz",
|
||||
"integrity": "sha512-PvYeSOvnCkST5mGS0TLwEn5w+4GavtEn6adcq8AspbHaIr+mId5hp7cG3ASy3iy8b+LuXEG2/QaV/nj5BQ/Aww==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.8.tgz",
|
||||
"integrity": "sha512-nxN79LHeAemhBpIa2PQ6rz57cW7W4C/XIJCOMSn2g49u6q2ekirmJI0osAOTErQPApOR0KwP2QyeTexX4zQCrw==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/compiler-dom": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/devtools-api": {
|
||||
|
@ -928,29 +928,29 @@
|
|||
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
|
||||
},
|
||||
"node_modules/@vue/reactivity": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.7.tgz",
|
||||
"integrity": "sha512-F539DO0ogH0+L8F9Pnw7cjqibcmSOh5UTk16u5f4MKQ8fraqepI9zdh+sozPX6VmEHOcjo8qw3Or9ZcFFw4SZA==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.8.tgz",
|
||||
"integrity": "sha512-UJYMQ3S2rqIGw9IvKomD4Xw2uS5VlcKEEmwcfboGOdrI79oqebxnCgTvXWLMClvg3M5SF0Cyn+9eDQoyGMLu9Q==",
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-core": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.7.tgz",
|
||||
"integrity": "sha512-QMMsWRQaD3BpGyjjChthpl4Mji4Fjx1qfdufsXlDkKU3HV+hWNor2z+29F+E1MmVcP0ZfRZUfqYgtsQoL7IGwQ==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.8.tgz",
|
||||
"integrity": "sha512-sMRXOy89KnwY6fWG5epgPOsCWzpo/64FrA0QkjIeNeGnoA2YyZ6bBUxpFUyqhJ8VbrDhXEFH+6LHMOYrpzX/ZQ==",
|
||||
"dependencies": {
|
||||
"@vue/reactivity": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/reactivity": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-dom": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.7.tgz",
|
||||
"integrity": "sha512-XwegyUY1rw8zxsX1Z36vwYcqo+uOgih5ti7y9vx+pPFhNdSQmN4LqK2RmSeAJG1oKV8NqSUmjpv92f/x6h0SeQ==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.8.tgz",
|
||||
"integrity": "sha512-L4gZcYo8f3d7rQqQIHkPvyczkjjQ55cJqz2G0v6Ptmqa1mO2zkqN9F8lBT6aGPYy3hd0RDiINbs4jxhSvvy10Q==",
|
||||
"dependencies": {
|
||||
"@vue/runtime-core": "3.4.7",
|
||||
"@vue/shared": "3.4.7",
|
||||
"@vue/runtime-core": "3.4.8",
|
||||
"@vue/shared": "3.4.8",
|
||||
"csstype": "^3.1.3"
|
||||
}
|
||||
},
|
||||
|
@ -960,21 +960,21 @@
|
|||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
|
||||
},
|
||||
"node_modules/@vue/server-renderer": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.7.tgz",
|
||||
"integrity": "sha512-3bWnYLEkLLhkDWqvNk7IvbQD4UcxvFKxELBiOO2iG3m6AniFIsBWfHOO5tLVQnjdWkODu4rq0GipmfEenVAK5Q==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.8.tgz",
|
||||
"integrity": "sha512-pBeHM59Owevr3P0Fl1XOjBmq4DTy5JDcjMG4NuzJEVDlZYzY8fHybx0wdjkY5lK5mCtUyBtw6Mz4d87aosc1Sw==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-ssr": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/compiler-ssr": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "3.4.7"
|
||||
"vue": "3.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/shared": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.7.tgz",
|
||||
"integrity": "sha512-G+i4glX1dMJk88sbJEcQEGWRQnVm9eIY7CcQbO5dpdsD9SF8jka3Mr5OqZYGjczGN1+D6EUwdu6phcmcx9iuPA=="
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.8.tgz",
|
||||
"integrity": "sha512-ChLCWzXiJboQ009oVkemhEoUdrxHme7v3ip+Kh+/kDDeF1WtHWGt0knRLGm1Y4YqCRTSs9QxsZIY8paJj5Szrw=="
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.11.2",
|
||||
|
@ -2259,15 +2259,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vue": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.7.tgz",
|
||||
"integrity": "sha512-4urmkWpudekq0CPNMO7p6mBGa9qmTXwJMO2r6CT4EzIJVG7WoSReiysiNb7OSi/WI113oX0Srn9Rz1k/DCXKFQ==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.8.tgz",
|
||||
"integrity": "sha512-vJffFOe6DqWsAI10v3tDhb1nJrj7CF3CbdQwOznywAsFNoyvrQ1AWQdcIWJpmRpRnw7NFzstzh6fh4w7n1PNdg==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.4.7",
|
||||
"@vue/compiler-sfc": "3.4.7",
|
||||
"@vue/runtime-dom": "3.4.7",
|
||||
"@vue/server-renderer": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/compiler-dom": "3.4.8",
|
||||
"@vue/compiler-sfc": "3.4.8",
|
||||
"@vue/runtime-dom": "3.4.8",
|
||||
"@vue/server-renderer": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "*"
|
||||
|
@ -2858,43 +2858,43 @@
|
|||
}
|
||||
},
|
||||
"@vitejs/plugin-vue": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.2.tgz",
|
||||
"integrity": "sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==",
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.3.tgz",
|
||||
"integrity": "sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"@vue/compiler-core": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.7.tgz",
|
||||
"integrity": "sha512-hhCaE3pTMrlIJK7M/o3Xf7HV8+JoNTGOQ/coWS+V+pH6QFFyqtoXqQzpqsNp7UK17xYKua/MBiKj4e1vgZOBYw==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.8.tgz",
|
||||
"integrity": "sha512-GjAwOydZV6UyVBi1lYW5v4jjfU6wOeyi3vBATKJOwV7muYF0/nZi4kfdJc0pwdT5lXwbbx57lyA2Y356rFpw1A==",
|
||||
"requires": {
|
||||
"@babel/parser": "^7.23.6",
|
||||
"@vue/shared": "3.4.7",
|
||||
"@vue/shared": "3.4.8",
|
||||
"entities": "^4.5.0",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map-js": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"@vue/compiler-dom": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.7.tgz",
|
||||
"integrity": "sha512-qDKBAIurCTub4n/6jDYkXwgsFuriqqmmLrIq1N2QDfYJA/mwiwvxi09OGn28g+uDdERX9NaKDLji0oTjE3sScg==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.8.tgz",
|
||||
"integrity": "sha512-GsPyji42zmkSJlaDFKXvwB97ukTlHzlFH/iVzPFYz/APnSzuhu/CMFQbsYmrtsnc2yscF39eC4rKzvKR27aBug==",
|
||||
"requires": {
|
||||
"@vue/compiler-core": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/compiler-core": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"@vue/compiler-sfc": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.7.tgz",
|
||||
"integrity": "sha512-Gec6CLkReVswDYjQFq79O5rktri4R7TsD/VPCiUoJw40JhNNxaNJJa8mrQrWoJluW4ETy6QN0NUyC/JO77OCOw==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.8.tgz",
|
||||
"integrity": "sha512-3ZcurOa6bQdZ6VZLtMqYSUZqpsMqfX0MC3oCxQG0VIJFCqouZAgRYJN1c8QvGs7HW5wW8aXVvUOQU0ILVlYHKA==",
|
||||
"requires": {
|
||||
"@babel/parser": "^7.23.6",
|
||||
"@vue/compiler-core": "3.4.7",
|
||||
"@vue/compiler-dom": "3.4.7",
|
||||
"@vue/compiler-ssr": "3.4.7",
|
||||
"@vue/shared": "3.4.7",
|
||||
"@vue/compiler-core": "3.4.8",
|
||||
"@vue/compiler-dom": "3.4.8",
|
||||
"@vue/compiler-ssr": "3.4.8",
|
||||
"@vue/shared": "3.4.8",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.30.5",
|
||||
"postcss": "^8.4.32",
|
||||
|
@ -2902,12 +2902,12 @@
|
|||
}
|
||||
},
|
||||
"@vue/compiler-ssr": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.7.tgz",
|
||||
"integrity": "sha512-PvYeSOvnCkST5mGS0TLwEn5w+4GavtEn6adcq8AspbHaIr+mId5hp7cG3ASy3iy8b+LuXEG2/QaV/nj5BQ/Aww==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.8.tgz",
|
||||
"integrity": "sha512-nxN79LHeAemhBpIa2PQ6rz57cW7W4C/XIJCOMSn2g49u6q2ekirmJI0osAOTErQPApOR0KwP2QyeTexX4zQCrw==",
|
||||
"requires": {
|
||||
"@vue/compiler-dom": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/compiler-dom": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"@vue/devtools-api": {
|
||||
|
@ -2916,29 +2916,29 @@
|
|||
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
|
||||
},
|
||||
"@vue/reactivity": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.7.tgz",
|
||||
"integrity": "sha512-F539DO0ogH0+L8F9Pnw7cjqibcmSOh5UTk16u5f4MKQ8fraqepI9zdh+sozPX6VmEHOcjo8qw3Or9ZcFFw4SZA==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.8.tgz",
|
||||
"integrity": "sha512-UJYMQ3S2rqIGw9IvKomD4Xw2uS5VlcKEEmwcfboGOdrI79oqebxnCgTvXWLMClvg3M5SF0Cyn+9eDQoyGMLu9Q==",
|
||||
"requires": {
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"@vue/runtime-core": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.7.tgz",
|
||||
"integrity": "sha512-QMMsWRQaD3BpGyjjChthpl4Mji4Fjx1qfdufsXlDkKU3HV+hWNor2z+29F+E1MmVcP0ZfRZUfqYgtsQoL7IGwQ==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.8.tgz",
|
||||
"integrity": "sha512-sMRXOy89KnwY6fWG5epgPOsCWzpo/64FrA0QkjIeNeGnoA2YyZ6bBUxpFUyqhJ8VbrDhXEFH+6LHMOYrpzX/ZQ==",
|
||||
"requires": {
|
||||
"@vue/reactivity": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/reactivity": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"@vue/runtime-dom": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.7.tgz",
|
||||
"integrity": "sha512-XwegyUY1rw8zxsX1Z36vwYcqo+uOgih5ti7y9vx+pPFhNdSQmN4LqK2RmSeAJG1oKV8NqSUmjpv92f/x6h0SeQ==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.8.tgz",
|
||||
"integrity": "sha512-L4gZcYo8f3d7rQqQIHkPvyczkjjQ55cJqz2G0v6Ptmqa1mO2zkqN9F8lBT6aGPYy3hd0RDiINbs4jxhSvvy10Q==",
|
||||
"requires": {
|
||||
"@vue/runtime-core": "3.4.7",
|
||||
"@vue/shared": "3.4.7",
|
||||
"@vue/runtime-core": "3.4.8",
|
||||
"@vue/shared": "3.4.8",
|
||||
"csstype": "^3.1.3"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -2950,18 +2950,18 @@
|
|||
}
|
||||
},
|
||||
"@vue/server-renderer": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.7.tgz",
|
||||
"integrity": "sha512-3bWnYLEkLLhkDWqvNk7IvbQD4UcxvFKxELBiOO2iG3m6AniFIsBWfHOO5tLVQnjdWkODu4rq0GipmfEenVAK5Q==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.8.tgz",
|
||||
"integrity": "sha512-pBeHM59Owevr3P0Fl1XOjBmq4DTy5JDcjMG4NuzJEVDlZYzY8fHybx0wdjkY5lK5mCtUyBtw6Mz4d87aosc1Sw==",
|
||||
"requires": {
|
||||
"@vue/compiler-ssr": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/compiler-ssr": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"@vue/shared": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.7.tgz",
|
||||
"integrity": "sha512-G+i4glX1dMJk88sbJEcQEGWRQnVm9eIY7CcQbO5dpdsD9SF8jka3Mr5OqZYGjczGN1+D6EUwdu6phcmcx9iuPA=="
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.8.tgz",
|
||||
"integrity": "sha512-ChLCWzXiJboQ009oVkemhEoUdrxHme7v3ip+Kh+/kDDeF1WtHWGt0knRLGm1Y4YqCRTSs9QxsZIY8paJj5Szrw=="
|
||||
},
|
||||
"acorn": {
|
||||
"version": "8.11.2",
|
||||
|
@ -3884,15 +3884,15 @@
|
|||
}
|
||||
},
|
||||
"vue": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.7.tgz",
|
||||
"integrity": "sha512-4urmkWpudekq0CPNMO7p6mBGa9qmTXwJMO2r6CT4EzIJVG7WoSReiysiNb7OSi/WI113oX0Srn9Rz1k/DCXKFQ==",
|
||||
"version": "3.4.8",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.8.tgz",
|
||||
"integrity": "sha512-vJffFOe6DqWsAI10v3tDhb1nJrj7CF3CbdQwOznywAsFNoyvrQ1AWQdcIWJpmRpRnw7NFzstzh6fh4w7n1PNdg==",
|
||||
"requires": {
|
||||
"@vue/compiler-dom": "3.4.7",
|
||||
"@vue/compiler-sfc": "3.4.7",
|
||||
"@vue/runtime-dom": "3.4.7",
|
||||
"@vue/server-renderer": "3.4.7",
|
||||
"@vue/shared": "3.4.7"
|
||||
"@vue/compiler-dom": "3.4.8",
|
||||
"@vue/compiler-sfc": "3.4.8",
|
||||
"@vue/runtime-dom": "3.4.8",
|
||||
"@vue/server-renderer": "3.4.8",
|
||||
"@vue/shared": "3.4.8"
|
||||
}
|
||||
},
|
||||
"vue-i18n": {
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
"monaco-editor": "^0.45.0",
|
||||
"pinia": "^2.1.7",
|
||||
"sass": "^1.69.7",
|
||||
"vue": "^3.4.7",
|
||||
"vue": "^3.4.8",
|
||||
"vue-i18n": "^9.9.0",
|
||||
"xterm": "^5.3.0",
|
||||
"xterm-addon-fit": "^0.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.0.2",
|
||||
"@vitejs/plugin-vue": "^5.0.3",
|
||||
"naive-ui": "^2.37.3",
|
||||
"prettier": "^3.1.1",
|
||||
"unplugin-auto-import": "^0.17.3",
|
||||
|
|
|
@ -1 +1 @@
|
|||
af8db32947008da00ca6dfaef778b59f
|
||||
b7b4dcba7bae9a407221c4105139adcb
|
||||
|
|
|
@ -298,6 +298,10 @@ const loadProgress = computed(() => {
|
|||
return (len * 100) / Math.max(len, props.length)
|
||||
})
|
||||
|
||||
const showMemoryUsage = computed(() => {
|
||||
return !isNaN(props.size) && props.size > 0
|
||||
})
|
||||
|
||||
const onAddRow = () => {
|
||||
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.HASH)
|
||||
}
|
||||
|
@ -415,8 +419,8 @@ defineExpose({
|
|||
</div>
|
||||
<div class="value-footer flex-box-h">
|
||||
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
|
||||
<n-divider v-if="!isNaN(props.length)" vertical />
|
||||
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<n-divider v-if="showMemoryUsage" vertical />
|
||||
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<div class="flex-item-expand"></div>
|
||||
<format-selector
|
||||
v-show="!inEdit"
|
||||
|
|
|
@ -266,6 +266,10 @@ const loadProgress = computed(() => {
|
|||
return (len * 100) / Math.max(len, props.length)
|
||||
})
|
||||
|
||||
const showMemoryUsage = computed(() => {
|
||||
return !isNaN(props.size) && props.size > 0
|
||||
})
|
||||
|
||||
const onAddValue = (value) => {
|
||||
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.LIST)
|
||||
}
|
||||
|
@ -383,8 +387,8 @@ defineExpose({
|
|||
</div>
|
||||
<div class="value-footer flex-box-h">
|
||||
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
|
||||
<n-divider v-if="!isNaN(props.length)" vertical />
|
||||
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<n-divider v-if="showMemoryUsage" vertical />
|
||||
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<div class="flex-item-expand"></div>
|
||||
<format-selector
|
||||
v-show="!inEdit"
|
||||
|
|
|
@ -263,6 +263,10 @@ const loadProgress = computed(() => {
|
|||
return (len * 100) / Math.max(len, props.length)
|
||||
})
|
||||
|
||||
const showMemoryUsage = computed(() => {
|
||||
return !isNaN(props.size) && props.size > 0
|
||||
})
|
||||
|
||||
const onAddValue = (value) => {
|
||||
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.SET)
|
||||
}
|
||||
|
@ -380,8 +384,8 @@ defineExpose({
|
|||
</div>
|
||||
<div class="value-footer flex-box-h">
|
||||
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
|
||||
<n-divider v-if="!isNaN(props.length)" vertical />
|
||||
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<n-divider v-if="showMemoryUsage" vertical />
|
||||
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<div class="flex-item-expand"></div>
|
||||
<format-selector
|
||||
v-show="!inEdit"
|
||||
|
|
|
@ -149,6 +149,10 @@ const loadProgress = computed(() => {
|
|||
return (len * 100) / Math.max(len, props.length)
|
||||
})
|
||||
|
||||
const showMemoryUsage = computed(() => {
|
||||
return !isNaN(props.size) && props.size > 0
|
||||
})
|
||||
|
||||
const onAddRow = () => {
|
||||
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.STREAM)
|
||||
}
|
||||
|
@ -238,8 +242,8 @@ defineExpose({
|
|||
|
||||
<div class="value-footer flex-box-h">
|
||||
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
|
||||
<n-divider v-if="!isNaN(props.length)" vertical />
|
||||
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<n-divider v-if="showMemoryUsage" vertical />
|
||||
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<div class="flex-item-expand"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -70,6 +70,7 @@ const editingContent = ref('')
|
|||
const enableSave = computed(() => {
|
||||
return editingContent.value !== viewAs.value && !props.loading
|
||||
})
|
||||
|
||||
const displayValue = computed(() => {
|
||||
if (props.loading) {
|
||||
return ''
|
||||
|
@ -77,6 +78,10 @@ const displayValue = computed(() => {
|
|||
return viewAs.value || decodeRedisKey(props.value)
|
||||
})
|
||||
|
||||
const showMemoryUsage = computed(() => {
|
||||
return !isNaN(props.size) && props.size > 0
|
||||
})
|
||||
|
||||
watchEffect(
|
||||
() => {
|
||||
if (props.value !== undefined) {
|
||||
|
@ -209,8 +214,8 @@ defineExpose({
|
|||
</div>
|
||||
<div class="value-footer flex-box-h">
|
||||
<n-text v-if="!isNaN(props.length)">{{ $t('interface.length') }}: {{ props.length }}</n-text>
|
||||
<n-divider v-if="!isNaN(props.length)" vertical />
|
||||
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<n-divider v-if="showMemoryUsage" vertical />
|
||||
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<div class="flex-item-expand" />
|
||||
<format-selector
|
||||
:decode="viewAs.decode"
|
||||
|
|
|
@ -300,6 +300,10 @@ const loadProgress = computed(() => {
|
|||
return (len * 100) / Math.max(len, props.length)
|
||||
})
|
||||
|
||||
const showMemoryUsage = computed(() => {
|
||||
return !isNaN(props.size) && props.size > 0
|
||||
})
|
||||
|
||||
const onAddRow = () => {
|
||||
dialogStore.openAddFieldsDialog(props.name, props.db, props.keyPath, props.keyCode, types.ZSET)
|
||||
}
|
||||
|
@ -415,8 +419,8 @@ defineExpose({
|
|||
</div>
|
||||
<div class="value-footer flex-box-h">
|
||||
<n-text v-if="!isNaN(props.length)">{{ $t('interface.entries') }}: {{ entries }}</n-text>
|
||||
<n-divider v-if="!isNaN(props.length)" vertical />
|
||||
<n-text v-if="!isNaN(props.size)">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<n-divider v-if="showMemoryUsage" vertical />
|
||||
<n-text v-if="showMemoryUsage">{{ $t('interface.memory_usage') }}: {{ bytes(props.size) }}</n-text>
|
||||
<div class="flex-item-expand"></div>
|
||||
<format-selector
|
||||
v-show="!inEdit"
|
||||
|
|
|
@ -166,7 +166,7 @@ const onClose = () => {
|
|||
:loading="loading"
|
||||
type="primary"
|
||||
@click="onConfirmImport">
|
||||
{{ $t('dialogue.export.export') }}
|
||||
{{ $t('dialogue.import.import') }}
|
||||
</n-button>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<script setup>
|
||||
const props = defineProps({
|
||||
strokeWidth: {
|
||||
type: [Number, String],
|
||||
default: 3,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<svg fill="none" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
:stroke-width="props.strokeWidth"
|
||||
d="M20 6H6V20H20V6Z"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-linejoin="round" />
|
||||
<path
|
||||
:stroke-width="props.strokeWidth"
|
||||
d="M20 28H6V42H20V28Z"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-linejoin="round" />
|
||||
<path
|
||||
:stroke-width="props.strokeWidth"
|
||||
d="M42 6H28V20H42V6Z"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-linejoin="round" />
|
||||
<path :stroke-width="props.strokeWidth" d="M29 28V42" stroke="currentColor" stroke-linecap="round" />
|
||||
<path :stroke-width="props.strokeWidth" d="M41 28V42" stroke="currentColor" stroke-linecap="round" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
|
@ -25,6 +25,7 @@ import { useRender } from '@/utils/render.js'
|
|||
import RedisTypeTag from '@/components/common/RedisTypeTag.vue'
|
||||
import usePreferencesStore from 'stores/preferences.js'
|
||||
import { typesIconStyle } from '@/consts/support_redis_type.js'
|
||||
import { nativeRedisKey } from '@/utils/key_convert.js'
|
||||
|
||||
const props = defineProps({
|
||||
server: String,
|
||||
|
@ -199,7 +200,7 @@ const handleSelectContextMenu = (key) => {
|
|||
break
|
||||
case 'key_copy':
|
||||
case 'value_copy':
|
||||
ClipboardSetText(redisKey)
|
||||
ClipboardSetText(nativeRedisKey(redisKey))
|
||||
.then((succ) => {
|
||||
if (succ) {
|
||||
$message.success(i18n.t('interface.copy_succ'))
|
||||
|
@ -230,29 +231,11 @@ const handleSelectContextMenu = (key) => {
|
|||
}
|
||||
|
||||
const onUpdateSelectedKeys = (keys, options) => {
|
||||
try {
|
||||
if (!isEmpty(options)) {
|
||||
// prevent load duplicate key
|
||||
for (const node of options) {
|
||||
if (node.type === ConnectionType.RedisValue) {
|
||||
const { key, db } = node
|
||||
const redisKey = node.redisKeyCode || node.redisKey
|
||||
if (!includes(selectedKeys.value, key)) {
|
||||
browserStore.loadKeySummary({
|
||||
server: props.server,
|
||||
db,
|
||||
key: redisKey,
|
||||
clearValue: true,
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isEmpty(keys)) {
|
||||
tabStore.setSelectedKeys(props.server, keys)
|
||||
} else {
|
||||
// default is load blank key to display server status
|
||||
// tabStore.openBlank(props.server)
|
||||
} finally {
|
||||
tabStore.setSelectedKeys(props.server, keys)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -484,6 +467,19 @@ const renderSuffix = ({ option }) => {
|
|||
|
||||
const nodeProps = ({ option }) => {
|
||||
return {
|
||||
onClick: () => {
|
||||
if (option.type === ConnectionType.RedisValue) {
|
||||
if (tabStore.setActivatedKey(props.server, option.key)) {
|
||||
const { db, redisKey, redisKeyCode } = option
|
||||
browserStore.loadKeySummary({
|
||||
server: props.server,
|
||||
db,
|
||||
key: redisKeyCode || redisKey,
|
||||
clearValue: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onDblclick: () => {
|
||||
if (props.loading) {
|
||||
console.warn('TODO: alert to ignore double click when loading')
|
||||
|
@ -505,7 +501,7 @@ const nodeProps = ({ option }) => {
|
|||
contextMenuParam.x = e.clientX
|
||||
contextMenuParam.y = e.clientY
|
||||
contextMenuParam.show = true
|
||||
onUpdateSelectedKeys([option.key], [option])
|
||||
// onUpdateSelectedKeys([option.key], [option])
|
||||
})
|
||||
},
|
||||
// onMouseover() {
|
||||
|
@ -571,7 +567,7 @@ defineExpose({
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div :style="{ backgroundColor }" class="flex-box-v browser-tree-wrapper">
|
||||
<div :style="{ backgroundColor }" class="flex-box-v browser-tree-wrapper" @contextmenu="(e) => e.preventDefault()">
|
||||
<n-spin v-if="props.loading" class="fill-height" />
|
||||
<n-empty v-else-if="!props.loading && isEmpty(data)" class="empty-content" />
|
||||
<n-tree
|
||||
|
|
|
@ -15,6 +15,7 @@ import { extraTheme } from '@/utils/extra_theme.js'
|
|||
import useBrowserStore from 'stores/browser.js'
|
||||
import { useRender } from '@/utils/render.js'
|
||||
import wechatUrl from '@/assets/images/wechat_official.png'
|
||||
import QRCode from '@/components/icons/QRCode.vue'
|
||||
|
||||
const themeVars = useThemeVars()
|
||||
const render = useRender()
|
||||
|
@ -82,10 +83,6 @@ const preferencesOptions = computed(() => {
|
|||
type: 'divider',
|
||||
key: 'd1',
|
||||
},
|
||||
{
|
||||
label: 'menu.wechat_official',
|
||||
key: 'wechat_official',
|
||||
},
|
||||
{
|
||||
label: 'menu.about',
|
||||
key: 'about',
|
||||
|
@ -106,9 +103,6 @@ const onSelectPreferenceMenu = (key) => {
|
|||
case 'report':
|
||||
BrowserOpenURL('https://github.com/tiny-craft/tiny-rdm/issues')
|
||||
break
|
||||
case 'wechat_official':
|
||||
showWechat.value = true
|
||||
break
|
||||
case 'about':
|
||||
dialogStore.openAboutDialog()
|
||||
break
|
||||
|
@ -158,6 +152,13 @@ const exThemeVars = computed(() => {
|
|||
@select="onSelectPreferenceMenu">
|
||||
<icon-button :icon="Config" :size="iconSize" :stroke-width="3" class="nav-menu-button" />
|
||||
</n-dropdown>
|
||||
<icon-button
|
||||
v-if="prefStore.currentLanguage === 'zh'"
|
||||
:icon="QRCode"
|
||||
:size="iconSize"
|
||||
:tooltip="$t('ribbon.wechat_official')"
|
||||
class="nav-menu-button"
|
||||
@click="showWechat = true" />
|
||||
<icon-button
|
||||
:icon="Github"
|
||||
:size="iconSize"
|
||||
|
@ -246,7 +247,7 @@ const exThemeVars = computed(() => {
|
|||
|
||||
.nav-menu-item {
|
||||
align-items: center;
|
||||
padding: 10px 0;
|
||||
padding: 10px 0 15px;
|
||||
gap: 18px;
|
||||
--wails-draggable: none;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
"key_icon_style0": "Short",
|
||||
"key_icon_style1": "Full",
|
||||
"key_icon_style2": "Point",
|
||||
"key_icon_style3": "Key Icon",
|
||||
"key_icon_style3": "Common",
|
||||
"proxy": "Proxy",
|
||||
"use_system_proxy": "Use system proxy",
|
||||
"use_system_proxy_http": "Use system proxy only for HTTP(S) request",
|
||||
|
@ -143,6 +143,7 @@
|
|||
"server": "Server",
|
||||
"browser": "Data Browser",
|
||||
"log": "Log",
|
||||
"wechat_official": "Wechat Official Account",
|
||||
"github": "Github"
|
||||
},
|
||||
"dialogue": {
|
||||
|
@ -339,7 +340,6 @@
|
|||
"help": "Help",
|
||||
"check_update": "Check for Updates...",
|
||||
"report_bug": "Report a Bug",
|
||||
"wechat_official": "Wechat Official Account",
|
||||
"about": "About"
|
||||
},
|
||||
"log": {
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
"key_icon_style0": "紧凑类型",
|
||||
"key_icon_style1": "全称类型",
|
||||
"key_icon_style2": "圆点类型",
|
||||
"key_icon_style3": "键图标",
|
||||
"key_icon_style3": "通用图标",
|
||||
"proxy": "代理",
|
||||
"use_system_proxy": "使用系统代理",
|
||||
"use_system_proxy_http": "仅在HTTP请求时使用系统代理",
|
||||
|
@ -143,6 +143,7 @@
|
|||
"server": "服务器",
|
||||
"browser": "数据浏览",
|
||||
"log": "日志",
|
||||
"wechat_official": "微信公众号",
|
||||
"github": "Github"
|
||||
},
|
||||
"dialogue": {
|
||||
|
@ -339,7 +340,6 @@
|
|||
"help": "帮助",
|
||||
"check_update": "检查更新...",
|
||||
"report_bug": "报告错误",
|
||||
"wechat_official": "微信公众号",
|
||||
"about": "关于"
|
||||
},
|
||||
"log": {
|
||||
|
|
|
@ -16,6 +16,7 @@ export class TabItem {
|
|||
* @param {string} subTab secondary tab value
|
||||
* @param {string} [title] tab title
|
||||
* @param {string} [icon] tab icon
|
||||
* @param {string} [activatedKey] current activated key on displaying
|
||||
* @param {string[]} expandedKeys
|
||||
* @param {string[]} selectedKeys
|
||||
* @param {CheckedKey[]} checkedKeys
|
||||
|
@ -63,6 +64,7 @@ export class TabItem {
|
|||
this.blank = blank
|
||||
this.subTab = subTab
|
||||
this.icon = icon
|
||||
this.activatedKey = ''
|
||||
this.expandedKeys = expandedKeys
|
||||
this.selectedKeys = selectedKeys
|
||||
this.checkedKeys = checkedKeys
|
||||
|
|
|
@ -400,7 +400,7 @@ const useBrowserStore = defineStore('browser', {
|
|||
$message.error('load key summary fail: ' + msg)
|
||||
}
|
||||
// its danger to delete "non-exists" key, just remove from tree view
|
||||
await this.deleteKey(server, db, key, true)
|
||||
// await this.deleteKey(server, db, key, true)
|
||||
// TODO: show key not found page or check exists on server first?
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,11 +101,6 @@ const useTabStore = defineStore('tab', {
|
|||
return get(this.tabs, [this.activatedIndex, 'name'])
|
||||
},
|
||||
|
||||
currentSelectedKeys() {
|
||||
const tab = this.currentTab
|
||||
return get(tab, 'selectedKeys', [])
|
||||
},
|
||||
|
||||
currentCheckedKeys() {
|
||||
const tab = this.currentTab
|
||||
return get(tab, 'checkedKeys', [])
|
||||
|
@ -748,6 +743,23 @@ const useTabStore = defineStore('tab', {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* set activated key
|
||||
* @param {string} server
|
||||
* @param {string} key
|
||||
*/
|
||||
setActivatedKey(server, key) {
|
||||
/** @type TabItem**/
|
||||
let tab = find(this.tabList, { name: server })
|
||||
if (tab != null) {
|
||||
if (!isEmpty(key) && key !== tab.activatedKey) {
|
||||
tab.activatedKey = key
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue