Remove opening status display when try open an opened connection
This commit is contained in:
parent
a402c6ac30
commit
e1f6aed33b
|
@ -145,7 +145,7 @@ const renderPrefix = ({ option }) => {
|
|||
NIcon,
|
||||
{ size: 20 },
|
||||
{
|
||||
default: () => h(ToggleServer, { modelValue: !!connecte }),
|
||||
default: () => h(ToggleServer, { modelValue: !!connected }),
|
||||
}
|
||||
)
|
||||
}
|
||||
|
@ -166,10 +166,12 @@ const onUpdateSelectedKeys = (keys, option, meta) => {
|
|||
*/
|
||||
const openConnection = async (name) => {
|
||||
try {
|
||||
if (!connectionStore.isConnected(name)) {
|
||||
openingConnection.value = true
|
||||
await connectionStore.openConnection(name)
|
||||
}
|
||||
tabStore.upsertTab({
|
||||
server: name,
|
||||
server: nam,
|
||||
})
|
||||
} catch (e) {
|
||||
message.error(e.message)
|
||||
|
|
|
@ -168,7 +168,7 @@ const renderPrefix = ({ option }) => {
|
|||
NIcon,
|
||||
{ size: 20 },
|
||||
{
|
||||
default: () => h(ToggleDb, { modelValue: option.opened === true },
|
||||
default: () => h(ToggleDb, { modelValue: option.opened === true }),
|
||||
}
|
||||
)
|
||||
case ConnectionType.RedisKey:
|
||||
|
@ -331,11 +331,11 @@ const handleOutsideContextMenu = () => {
|
|||
:data="connectionStore.databases[props.server] || []"
|
||||
:expand-on-click="false"
|
||||
:expanded-keys="expandedKeys"
|
||||
:selected-keys="selectedKeys"
|
||||
:on-update:selected-keys="onUpdateSelectedKeys"
|
||||
:node-props="nodeProps"
|
||||
:on-load="onLoadTree"
|
||||
:on-update:expanded-keys="onUpdateExpanded"
|
||||
:selected-keys="selectedKeys"
|
||||
:render-label="renderLabel"
|
||||
:render-prefix="renderPrefix"
|
||||
:render-suffix="renderSuffix"
|
||||
|
|
|
@ -109,7 +109,7 @@ const useTabStore = defineStore('tab', {
|
|||
type,
|
||||
ttl,
|
||||
key,
|
||||
valu,
|
||||
value,
|
||||
})
|
||||
tabIndex = this.tabList.length - 1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue