Compare commits

..

No commits in common. "b0dfe348bdb1b6193c3f708c2103332411c08a75" and "ca9f0a08e1127e676623020fddd3a5c6ecbe6263" have entirely different histories.

2 changed files with 4 additions and 7 deletions

View File

@ -386,10 +386,9 @@ const useBrowserStore = defineStore('browser', {
* @param {number} db * @param {number} db
* @param {string|number[]} [key] null or blank indicate that update tab to display normal content (blank content or server status) * @param {string|number[]} [key] null or blank indicate that update tab to display normal content (blank content or server status)
* @param {boolean} [clearValue] * @param {boolean} [clearValue]
* @param {boolean} [redirect] redirect to key detail tab
* @return {Promise<void>} * @return {Promise<void>}
*/ */
async loadKeySummary({ server, db, key, clearValue, redirect = true }) { async loadKeySummary({ server, db, key, clearValue }) {
try { try {
const tab = useTabStore() const tab = useTabStore()
if (!isEmpty(key)) { if (!isEmpty(key)) {
@ -403,7 +402,7 @@ const useBrowserStore = defineStore('browser', {
const k = nativeRedisKey(key) const k = nativeRedisKey(key)
const binaryKey = k !== key const binaryKey = k !== key
tab.upsertTab({ tab.upsertTab({
subTab: redirect === false ? null : BrowserTabType.KeyDetail, subTab: BrowserTabType.KeyDetail,
server, server,
db, db,
type, type,
@ -493,7 +492,7 @@ const useBrowserStore = defineStore('browser', {
if (showLoading) { if (showLoading) {
tab.updateLoading({ server, db, loading: true }) tab.updateLoading({ server, db, loading: true })
} }
await this.loadKeySummary({ server, db, key, clearValue: true, redirect: false }) await this.loadKeySummary({ server, db, key, clearValue: true })
await this.loadKeyDetail({ await this.loadKeyDetail({
server, server,
db, db,

View File

@ -3,7 +3,6 @@ import { defineStore } from 'pinia'
import { TabItem } from '@/objects/tabItem.js' import { TabItem } from '@/objects/tabItem.js'
import useBrowserStore from 'stores/browser.js' import useBrowserStore from 'stores/browser.js'
import { i18nGlobal } from '@/utils/i18n.js' import { i18nGlobal } from '@/utils/i18n.js'
import { BrowserTabType } from '@/consts/browser_tab_type.js'
const useTabStore = defineStore('tab', { const useTabStore = defineStore('tab', {
/** /**
@ -180,7 +179,6 @@ const useTabStore = defineStore('tab', {
}) { }) {
let tabIndex = findIndex(this.tabList, { name: server }) let tabIndex = findIndex(this.tabList, { name: server })
if (tabIndex === -1) { if (tabIndex === -1) {
subTab = subTab || BrowserTabType.KeyDetail
const tabItem = new TabItem({ const tabItem = new TabItem({
name: server, name: server,
title: server, title: server,
@ -204,7 +202,7 @@ const useTabStore = defineStore('tab', {
} else { } else {
const tab = this.tabList[tabIndex] const tab = this.tabList[tabIndex]
tab.blank = false tab.blank = false
tab.subTab = subTab || tab.subTab tab.subTab = subTab
// tab.title = db !== undefined ? `${server}/db${db}` : `${server}` // tab.title = db !== undefined ? `${server}/db${db}` : `${server}`
tab.title = server tab.title = server
tab.server = server tab.server = server