feat: 为文件视图添加侧边栏标签页

This commit is contained in:
liumangmang
2026-03-24 17:34:27 +08:00
parent f7fd41b88f
commit 43207e24bf
4 changed files with 426 additions and 134 deletions

View File

@@ -1,7 +1,8 @@
<script setup lang="ts">
import { computed, ref, onMounted, watch } from 'vue'
import { computed, ref, onMounted, watch } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useConnectionsStore } from '../stores/connections'
import { useSftpTabsStore } from '../stores/sftpTabs'
import { useTerminalTabsStore } from '../stores/terminalTabs'
import type { Connection, ConnectionCreateRequest } from '../api/connections'
import ConnectionForm from '../components/ConnectionForm.vue'
@@ -19,9 +20,10 @@ import {
} from 'lucide-vue-next'
const router = useRouter()
const route = useRoute()
const store = useConnectionsStore()
const tabsStore = useTerminalTabsStore()
const route = useRoute()
const store = useConnectionsStore()
const tabsStore = useTerminalTabsStore()
const sftpTabsStore = useSftpTabsStore()
const showForm = ref(false)
const editingConn = ref<Connection | null>(null)
@@ -95,6 +97,7 @@ function openTerminal(conn: Connection) {
}
function openSftp(conn: Connection) {
sftpTabsStore.openOrFocus(conn)
router.push(`/sftp/${conn.id}`)
}