Skip to content

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

:bug: fix https://github.com/siyuan-note/siyuan/issues/5118

Vanessa785cb50e8598
diff --git a/app/src/layout/Tab.ts b/app/src/layout/Tab.ts
index dcc8f9a34f..c9525b6ba2 100644
--- a/app/src/layout/Tab.ts
+++ b/app/src/layout/Tab.ts
@@ -44,17 +44,16 @@ export class Tab {
this.headElement.addEventListener("mouseenter", (event) => {
event.stopPropagation();
event.preventDefault();
- if (!(this.model as Editor).editor) {
- return;
+ if (this.model instanceof Editor && this.model.editor?.protyle?.block?.rootID) {
+ fetchPost("/api/filetree/getFullHPathByID", {
+ id: (this.model as Editor).editor.protyle.block.rootID
+ }, (response) => {
+ if (!this.headElement.getAttribute("aria-label")) {
+ showTooltip(escapeHtml(response.data), this.headElement);
+ }
+ this.headElement.setAttribute("aria-label", escapeHtml(response.data));
+ });
}
- fetchPost("/api/filetree/getFullHPathByID", {
- id: (this.model as Editor).editor.protyle.block.rootID
- }, (response) => {
- if (!this.headElement.getAttribute("aria-label")) {
- showTooltip(escapeHtml(response.data), this.headElement);
- }
- this.headElement.setAttribute("aria-label", escapeHtml(response.data));
- });
});
this.headElement.addEventListener("dragstart", (event: DragEvent & { target: HTMLElement }) => {
window.getSelection().removeAllRanges();
diff --git a/app/src/mobile/util/menu.ts b/app/src/mobile/util/menu.ts
index 6ad524a2ee..840795274d 100644
--- a/app/src/mobile/util/menu.ts
+++ b/app/src/mobile/util/menu.ts
@@ -43,6 +43,10 @@ const showAccountInfo = (modelElement: HTMLElement, modelMainElement: Element) =
<button class="b3-button b3-button--cancel" id="logout">
${window.siyuan.languages.logout}
</button>
+ <span class="fn__space"></span>
+ <button class="b3-button b3-button--cancel" id="deactivateUser">
+ ${window.siyuan.languages.deactivateUser}
+ </button>
<span class="fn__flex-1"></span>
<button class="b3-button b3-button--cancel" id="refresh">
<svg><use xlink:href="#iconRefresh"></use></svg>