This commit is contained in:
Vanessa 2022-06-07 14:52:30 +08:00
parent d5548021af
commit 785cb50e85
2 changed files with 13 additions and 10 deletions

View file

@ -44,9 +44,7 @@ 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) => {
@ -55,6 +53,7 @@ export class Tab {
}
this.headElement.setAttribute("aria-label", escapeHtml(response.data));
});
}
});
this.headElement.addEventListener("dragstart", (event: DragEvent & { target: HTMLElement }) => {
window.getSelection().removeAllRanges();

View file

@ -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>