This commit is contained in:
Vanessa 2023-01-24 20:33:13 +08:00
parent c8b05a6b96
commit ac8748d161
13 changed files with 36 additions and 36 deletions

View file

@ -62,7 +62,7 @@ const showAccountInfo = (modelElement: HTMLElement, modelMainElement: Element) =
window.siyuan.user = null;
closePanel();
document.getElementById("menuAccount").innerHTML = `<svg class="b3-list-item__graphic"><use xlink:href="#iconAccount"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.login}</span>`;
processSync()
processSync();
});
});
modelMainElement.querySelector("#deactivateUser").addEventListener(getEventName(), () => {
@ -71,7 +71,7 @@ const showAccountInfo = (modelElement: HTMLElement, modelMainElement: Element) =
window.siyuan.user = null;
closePanel();
document.getElementById("menuAccount").innerHTML = `<svg class="b3-list-item__graphic"><use xlink:href="#iconAccount"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.login}</span>`;
processSync()
processSync();
});
});
});
@ -94,7 +94,7 @@ const showAccountInfo = (modelElement: HTMLElement, modelMainElement: Element) =
} else {
menuAccountElement.innerHTML = `<svg class="b3-list-item__graphic"><use xlink:href="#iconAccount"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.login}</span>`;
}
processSync()
processSync();
});
});
};
@ -174,7 +174,7 @@ ${accountHTML}
<svg class="b3-list-item__graphic"><use xlink:href="#iconQuit"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.safeQuit}</span>
</div>`;
// 只能用 click否则无法上下滚动 https://github.com/siyuan-note/siyuan/issues/6628
processSync()
processSync();
menuElement.addEventListener("click", (event) => {
let target = event.target as HTMLElement;
while (target && !target.isEqualNode(menuElement)) {
@ -669,7 +669,7 @@ ${accountHTML}
closePanel();
document.getElementById("menuAccount").innerHTML = `<img class="b3-list-item__graphic" src="${window.siyuan.user.userAvatarURL}"/>
<span class="b3-list-item__text">${window.siyuan.user.userName}</span>`;
processSync()
processSync();
});
});
});
@ -686,7 +686,7 @@ ${accountHTML}
closePanel();
document.getElementById("menuAccount").innerHTML = `<img class="b3-list-item__graphic" src="${window.siyuan.user.userAvatarURL}"/>
<span class="b3-list-item__text">${window.siyuan.user.userName}</span>`;
processSync()
processSync();
});
});
});