mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-22 06:54:08 +01:00
This commit is contained in:
parent
7604a0a930
commit
f687828a6b
14 changed files with 50 additions and 32 deletions
|
|
@ -445,11 +445,12 @@ ${response.data.replace("%pages", "<span class=totalPages></span>").replace("%pa
|
|||
</div></div>`);
|
||||
const pinElement = document.getElementById("pinWindow");
|
||||
pinElement.addEventListener("click", () => {
|
||||
pinElement.classList.toggle("toolbar__item--active");
|
||||
if (pinElement.classList.contains("toolbar__item--active")) {
|
||||
if (pinElement.getAttribute("aria-label") === window.siyuan.languages.pin) {
|
||||
pinElement.querySelector("use").setAttribute("xlink:href", "#iconUnpin");
|
||||
pinElement.setAttribute("aria-label", window.siyuan.languages.unpin);
|
||||
ipcRenderer.send(Constants.SIYUAN_CMD, "setAlwaysOnTopTrue");
|
||||
} else {
|
||||
pinElement.querySelector("use").setAttribute("xlink:href", "#iconPin");
|
||||
pinElement.setAttribute("aria-label", window.siyuan.languages.pin);
|
||||
ipcRenderer.send(Constants.SIYUAN_CMD, "setAlwaysOnTopFalse");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue