Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:rotating_light:

Vanessa85aaede4261e
diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts
index f96e2a3df8..725da037cc 100644
--- a/app/src/editor/util.ts
+++ b/app/src/editor/util.ts
@@ -327,17 +327,17 @@ export const updatePanelByEditor = (protyle?: IProtyle, focus = true, pushBackSt
};
export const isCurrentEditor = (blockId: string) => {
- const activeElement = document.querySelector('.layout__wnd--active > .layout-tab-bar > .item--focus')
+ const activeElement = document.querySelector(".layout__wnd--active > .layout-tab-bar > .item--focus");
if (activeElement) {
- const tab = getInstanceById(activeElement.getAttribute("data-id"))
+ const tab = getInstanceById(activeElement.getAttribute("data-id"));
if (tab instanceof Tab && tab.model instanceof Editor) {
if (tab.model.editor.protyle.block.rootID !== blockId) {
return false;
}
}
}
- return true
-}
+ return true;
+};
const updateOutline = (models: IModels, protyle: IProtyle, reload = false) => {
models.outline.find(item => {
diff --git a/app/src/layout/dock/Graph.ts b/app/src/layout/dock/Graph.ts
index 1c4efe3b8a..d612227fe0 100644
--- a/app/src/layout/dock/Graph.ts
+++ b/app/src/layout/dock/Graph.ts
@@ -457,7 +457,7 @@ export class Graph extends Model {
}, response => {
element.classList.remove("fn__rotate");
if (id) {
- this.blockId = id
+ this.blockId = id;
}
if (!isCurrentEditor(this.blockId)) {
return;
diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts
index f652bb6567..49310bb272 100644
--- a/app/src/protyle/export/index.ts
+++ b/app/src/protyle/export/index.ts
@@ -122,19 +122,16 @@ const getExportPath = (option: { type: string, id: string }, pdfOption?: PrintTo
return;
}
- let exportType = "HTML (SiYuan)"
- let extension = "html"
+ let exportType = "HTML (SiYuan)";
switch (option.type) {
case "htmlmd":
exportType = "HTML (Markdown)";
break;
case "word":
exportType = "Word .docx";
- extension = "docx";
break;
case "pdf":
exportType = "PDF";
- extension = "pdf";
break;
}
diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts
index 22bc78db61..594fe6fc9d 100644
--- a/app/src/protyle/util/insertHTML.ts
+++ b/app/src/protyle/util/insertHTML.ts
@@ -65,12 +65,12 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false) =>
action: "update",
id,
data: oldHTML
- })
+ });
doOperation.push({
action: "update",
id,
data: blockElement.outerHTML
- })
+ });
}
const tempElement = document.createElement("template");
tempElement.innerHTML = html;