feat: 键 tab 自动打开, 去掉右上角键按钮
- keys tab 和 status tab 一样不可关闭 (closable: false) - 连接成功时自动打开 status + keys 两个 tab - 右上角按钮组移除键按钮
This commit is contained in:
@@ -50,7 +50,7 @@ function makeTab(type: Tab['type']): Tab {
|
|||||||
type,
|
type,
|
||||||
title: titles[type],
|
title: titles[type],
|
||||||
icon: icons[type],
|
icon: icons[type],
|
||||||
closable: type !== 'status',
|
closable: type !== 'status' && type !== 'keys',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ function restoreTabState(connId: string) {
|
|||||||
tabs.value = state.tabs
|
tabs.value = state.tabs
|
||||||
activeTabId.value = state.activeTabId
|
activeTabId.value = state.activeTabId
|
||||||
} else {
|
} else {
|
||||||
tabs.value = [makeTab('status')]
|
tabs.value = [makeTab('status'), makeTab('keys')]
|
||||||
activeTabId.value = tabs.value[0].id
|
activeTabId.value = tabs.value[0].id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -266,9 +266,6 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
<!-- Tab open buttons (when connected) -->
|
<!-- Tab open buttons (when connected) -->
|
||||||
<div class="tab-opener" v-if="connStore.isConnected">
|
<div class="tab-opener" v-if="connStore.isConnected">
|
||||||
<button class="opener-btn" @click="openTab('keys')" :title="t('key.title')">
|
|
||||||
<el-icon><Document /></el-icon>
|
|
||||||
</button>
|
|
||||||
<button class="opener-btn" @click="openTab('cli')" :title="t('cli.title')">
|
<button class="opener-btn" @click="openTab('cli')" :title="t('cli.title')">
|
||||||
<el-icon><Monitor /></el-icon>
|
<el-icon><Monitor /></el-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user