We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6325921 + 69ca57a commit 46c43e5Copy full SHA for 46c43e5
src/lib/ImportForm.svelte
@@ -38,6 +38,8 @@
38
let notebooks = []
39
let toNotebookId
40
let toNotebookName
41
+ //用户指南不应该作为可以写入的笔记本
42
+ const hiddenNotebook: Set<string> = new Set(["思源笔记用户指南", "SiYuan User Guide"]);
43
44
const startImport = async (
45
event: InputEvent & {
@@ -153,6 +155,10 @@
153
155
const res = await pluginInstance.kernelApi.lsNotebooks()
154
156
const data = res.data as any
157
notebooks = data.notebooks ?? []
158
+ //没有必要把所有笔记本都列出来
159
+ notebooks = notebooks.filter(
160
+ notebook => !notebook.closed && !hiddenNotebook.has(notebook.name)
161
+ );
162
// 选中,若是没保存,获取第一个
163
toNotebookId = importerConfig?.notebook ?? notebooks[0].id
164
const currentNotebook = notebooks.find((n) => n.id === toNotebookId)
0 commit comments