mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: add pwd handling to session and update related components
This commit is contained in:
1 parent
fba92dad46
commit
26e79690f8
7 files changed
+16
-4
No files matched your search
@@ -51,6 +51,7 @@ const useSession = defineStore('session', {
|
||||
this.session = {
|
||||
...session,
|
||||
graph: new FileGraph(session.graph),
|
||||
pwd: '/home/commander',
|
||||
}
|
||||
term.reset()
|
||||
await socket.connect(this.session)
|
||||
@@ -105,6 +106,9 @@ const useSession = defineStore('session', {
|
||||
socket.on('graph', (event: FileGraphUpdateEvent) => {
|
||||
if (!this.session) return
|
||||
this.session.graph.handleEvent(event)
|
||||
if (event.pwd) {
|
||||
this.session.pwd = event.pwd
|
||||
}
|
||||
})
|
||||
socket.on('update', (update: SessionUpdate) => {
|
||||
this.newUpdate(update)
|
||||
|
||||
Reference in new issue
Block a user