mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
🚨
This commit is contained in:
parent
85d2faa158
commit
5f09312ae1
3 changed files with 18 additions and 18 deletions
|
@ -92,14 +92,14 @@ const renderProvider = (provider: number) => {
|
|||
};
|
||||
|
||||
const bindProviderEvent = () => {
|
||||
const reposDataElement = repos.element.querySelector("#reposData")
|
||||
const loadingElement = repos.element.querySelector("#reposLoading")
|
||||
const reposDataElement = repos.element.querySelector("#reposData");
|
||||
const loadingElement = repos.element.querySelector("#reposLoading");
|
||||
if (window.siyuan.config.sync.provider === 0) {
|
||||
if (needSubscribe("")) {
|
||||
loadingElement.classList.add("fn__none");
|
||||
let nextElement = reposDataElement
|
||||
let nextElement = reposDataElement;
|
||||
while (nextElement) {
|
||||
nextElement.classList.add("fn__none")
|
||||
nextElement.classList.add("fn__none");
|
||||
nextElement = nextElement.nextElementSibling;
|
||||
}
|
||||
return;
|
||||
|
@ -133,16 +133,16 @@ const bindProviderEvent = () => {
|
|||
</div>`;
|
||||
}
|
||||
});
|
||||
reposDataElement.classList.remove("fn__none")
|
||||
reposDataElement.classList.remove("fn__none");
|
||||
return;
|
||||
}
|
||||
loadingElement.classList.add("fn__none");
|
||||
let nextElement = reposDataElement.nextElementSibling
|
||||
let nextElement = reposDataElement.nextElementSibling;
|
||||
while (nextElement) {
|
||||
nextElement.classList.remove("fn__none")
|
||||
nextElement.classList.remove("fn__none");
|
||||
nextElement = nextElement.nextElementSibling;
|
||||
}
|
||||
reposDataElement.classList.add("fn__none")
|
||||
reposDataElement.classList.add("fn__none");
|
||||
const providerPanelElement = repos.element.querySelector("#syncProviderPanel");
|
||||
providerPanelElement.querySelectorAll(".b3-text-field").forEach(item => {
|
||||
item.addEventListener("blur", () => {
|
||||
|
@ -319,7 +319,7 @@ ${syncModeHTML}
|
|||
}
|
||||
repos.element.querySelector("#syncProviderPanel").innerHTML = renderProvider(window.siyuan.config.sync.provider);
|
||||
bindProviderEvent();
|
||||
syncConfigElement.innerHTML = ""
|
||||
syncConfigElement.innerHTML = "";
|
||||
});
|
||||
});
|
||||
const loadingElement = repos.element.querySelector("#reposLoading") as HTMLElement;
|
||||
|
|
|
@ -104,8 +104,8 @@ export class Gutter {
|
|||
}
|
||||
}
|
||||
});
|
||||
const doOperations: IOperation[] = []
|
||||
const undoOperations: IOperation[] = []
|
||||
const doOperations: IOperation[] = [];
|
||||
const undoOperations: IOperation[] = [];
|
||||
Array.from(foldElement.children).forEach((ulElement) => {
|
||||
if (ulElement.classList.contains("list")) {
|
||||
Array.from(ulElement.children).forEach((listItemElement) => {
|
||||
|
@ -120,12 +120,12 @@ export class Gutter {
|
|||
action: "setAttrs",
|
||||
id: listId,
|
||||
data: JSON.stringify({fold: hasFold ? "0" : "1"})
|
||||
})
|
||||
});
|
||||
undoOperations.push({
|
||||
action: "setAttrs",
|
||||
id: listId,
|
||||
data: JSON.stringify({fold: hasFold ? "1" : "0"})
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -169,8 +169,8 @@ export class Gutter {
|
|||
}
|
||||
}
|
||||
});
|
||||
const doOperations: IOperation[] = []
|
||||
const undoOperations: IOperation[] = []
|
||||
const doOperations: IOperation[] = [];
|
||||
const undoOperations: IOperation[] = [];
|
||||
Array.from(foldElement.parentElement.children).find((listItemElement) => {
|
||||
if (listItemElement.classList.contains("li")) {
|
||||
if (hasFold) {
|
||||
|
@ -183,12 +183,12 @@ export class Gutter {
|
|||
action: "setAttrs",
|
||||
id: listId,
|
||||
data: JSON.stringify({fold: hasFold ? "0" : "1"})
|
||||
})
|
||||
});
|
||||
undoOperations.push({
|
||||
action: "setAttrs",
|
||||
id: listId,
|
||||
data: JSON.stringify({fold: hasFold ? "1" : "0"})
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
transaction(protyle, doOperations, undoOperations);
|
||||
|
|
|
@ -124,7 +124,7 @@ const promiseTransaction = () => {
|
|||
// 仅在 alt+click 箭头折叠时才会触发
|
||||
protyle.wysiwyg.element.querySelectorAll('[data-type="NodeBlockQueryEmbed"]').forEach((item) => {
|
||||
if (item.querySelector(`[data-node-id="${doOperations[0].id}"]`)) {
|
||||
item.removeAttribute("data-render")
|
||||
item.removeAttribute("data-render");
|
||||
blockRender(protyle, item);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue