mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +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>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
|
||||||
import FileNode from './FileNode.vue'
|
import FileNode from './FileNode.vue'
|
||||||
import sessionManager from '../utils/session.js'
|
import sessionManager from '../utils/session.js'
|
||||||
|
|
||||||
const pwd = ref('/home/rudeus')
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="tree w-max h-max">
|
<div class="tree w-max h-max">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<FileNode :node="sessionManager.graph.value" :pwd="pwd" />
|
<FileNode
|
||||||
|
:node="sessionManager.graph.value"
|
||||||
|
:pwd="sessionManager.pwd.value"
|
||||||
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class SessionManager {
|
|||||||
discovered: false,
|
discovered: false,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
this.pwd = ref('')
|
||||||
}
|
}
|
||||||
|
|
||||||
getSession() {
|
getSession() {
|
||||||
@@ -29,6 +30,9 @@ class SessionManager {
|
|||||||
if (event.discover) {
|
if (event.discover) {
|
||||||
this.graph.value.discover(event.discover)
|
this.graph.value.discover(event.discover)
|
||||||
}
|
}
|
||||||
|
if (event.pwd) {
|
||||||
|
this.pwd.value = event.pwd
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async createSession() {
|
async createSession() {
|
||||||
|
|||||||
Reference in new issue
Block a user