mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: update pwd
This commit is contained in:
1 parent
6b94b1ae81
commit
65bc838c83
2 files changed
+8
-4
No files matched your search
@@ -1,16 +1,16 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import FileNode from './FileNode.vue'
|
||||
import sessionManager from '../utils/session.js'
|
||||
|
||||
const pwd = ref('/home/rudeus')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="tree w-max h-max">
|
||||
<ul>
|
||||
<li>
|
||||
<FileNode :node="sessionManager.graph.value" :pwd="pwd" />
|
||||
<FileNode
|
||||
:node="sessionManager.graph.value"
|
||||
:pwd="sessionManager.pwd.value"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,7 @@ class SessionManager {
|
||||
discovered: false,
|
||||
})
|
||||
)
|
||||
this.pwd = ref('')
|
||||
}
|
||||
|
||||
getSession() {
|
||||
@@ -29,6 +30,9 @@ class SessionManager {
|
||||
if (event.discover) {
|
||||
this.graph.value.discover(event.discover)
|
||||
}
|
||||
if (event.pwd) {
|
||||
this.pwd.value = event.pwd
|
||||
}
|
||||
}
|
||||
|
||||
async createSession() {
|
||||
|
||||
Reference in new issue
Block a user