From 449c3ac36e086ef33adb83ea21c7ff1ec3f493b3 Mon Sep 17 00:00:00 2001 From: mdwriter-09idI Date: Sat, 9 Mar 2024 01:18:56 +0800 Subject: [PATCH] feat: Keep Un stored Documents When Opening Space --- package.json | 2 +- src/renderer/src/components/space/EditSpace.tsx | 2 +- src/renderer/src/store/tree.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3bf1271f..50fe107a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bluestone", - "version": "0.20.1", + "version": "0.20.2", "description": "", "main": "./out/main/index.js", "license": "AGPL-3.0", diff --git a/src/renderer/src/components/space/EditSpace.tsx b/src/renderer/src/components/space/EditSpace.tsx index 21fa438b..6e3279ae 100644 --- a/src/renderer/src/components/space/EditSpace.tsx +++ b/src/renderer/src/components/space/EditSpace.tsx @@ -145,7 +145,7 @@ export const EditSpace = observer(() => { icon={} onClick={() => { MainApi.openDialog({ - properties: ['createDirectory'] + properties: ['createDirectory', 'openDirectory'] }).then(res => { if (res.filePaths?.length) { form.setFieldValue('filePath', res.filePaths[0]) diff --git a/src/renderer/src/store/tree.tsx b/src/renderer/src/store/tree.tsx index d7086935..cef1b2a8 100644 --- a/src/renderer/src/store/tree.tsx +++ b/src/renderer/src/store/tree.tsx @@ -287,7 +287,7 @@ export class TreeStore { } const tabs:Tab[] = [] for (const t of this.tabs) { - if (!t.current || t.current.spaceId === this.root?.cid) { + if (!t.current || t.current.spaceId === this.root?.cid || t.current?.ghost) { tabs.push(t) } }