mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
🚨
This commit is contained in:
parent
cdae86d50b
commit
5b30b60bf7
5 changed files with 9 additions and 9 deletions
|
|
@ -467,14 +467,14 @@ export class Asset extends Model {
|
|||
const observer = new MutationObserver(() => {
|
||||
this.pdfObject = webViewerLoad(this.path.startsWith("file") ? this.path : document.getElementById("baseURL").getAttribute("href") + "/" + this.path,
|
||||
this.element, this.pdfPage, this.pdfId);
|
||||
this.element.setAttribute("data-loading", "true")
|
||||
this.element.setAttribute("data-loading", "true");
|
||||
observer.disconnect();
|
||||
});
|
||||
observer.observe(this.element, {attributeFilter: ["class"]});
|
||||
} else {
|
||||
this.pdfObject = webViewerLoad(this.path.startsWith("file") ? this.path : document.getElementById("baseURL").getAttribute("href") + "/" + this.path,
|
||||
this.element, this.pdfPage, this.pdfId);
|
||||
this.element.setAttribute("data-loading", "true")
|
||||
this.element.setAttribute("data-loading", "true");
|
||||
}
|
||||
}, Constants.TIMEOUT_BLOCKLOAD);
|
||||
/// #endif
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ export const viewCards = (deckID: string, title: string, cb:(response:IWebSocket
|
|||
|
||||
if (!nextElment) {
|
||||
getArticle(edit, "");
|
||||
listElement.innerHTML = `<div class="b3-list--empty">${window.siyuan.languages.emptyContent}</div>`
|
||||
listElement.innerHTML = `<div class="b3-list--empty">${window.siyuan.languages.emptyContent}</div>`;
|
||||
} else {
|
||||
getArticle(edit, nextElment.getAttribute("data-id"));
|
||||
listElement.querySelector(".b3-list-item--focus")?.classList.remove("b3-list-item--focus");
|
||||
|
|
|
|||
|
|
@ -581,12 +581,12 @@ export const copyTab = (tab: Tab) => {
|
|||
};
|
||||
|
||||
export const pdfIsLoading = (element: HTMLElement) => {
|
||||
const isLoading = element.querySelector('.layout-tab-container > [data-loading="true"]') ? true : false
|
||||
const isLoading = element.querySelector('.layout-tab-container > [data-loading="true"]') ? true : false;
|
||||
if (isLoading) {
|
||||
showMessage(window.siyuan.languages.pdfIsLoading);
|
||||
}
|
||||
return isLoading;
|
||||
}
|
||||
};
|
||||
|
||||
export const getInstanceById = (id: string, layout = window.siyuan.layout.centerLayout) => {
|
||||
const _getInstanceById = (item: Layout | Wnd, id: string) => {
|
||||
|
|
|
|||
|
|
@ -409,8 +409,8 @@ ${window.siyuan.languages.createdAt} ${dayjs(response.data.ial.id.substr(0, 14))
|
|||
return false;
|
||||
}
|
||||
this.element.setAttribute("data-node-id", protyle.block.rootID);
|
||||
if (response.data.ial['custom-riff-decks']) {
|
||||
this.element.setAttribute("custom-riff-decks", response.data.ial['custom-riff-decks']);
|
||||
if (response.data.ial["custom-riff-decks"]) {
|
||||
this.element.setAttribute("custom-riff-decks", response.data.ial["custom-riff-decks"]);
|
||||
}
|
||||
protyle.background.render(response.data.ial, protyle.block.rootID);
|
||||
protyle.wysiwyg.renderCustom(response.data.ial);
|
||||
|
|
|
|||
|
|
@ -448,8 +448,8 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b
|
|||
if (refElement) {
|
||||
nodeAttrHTML += refElement.outerHTML;
|
||||
}
|
||||
if (data.new['custom-riff-decks']) {
|
||||
protyle.title.element.setAttribute("custom-riff-decks", data.new['custom-riff-decks']);
|
||||
if (data.new["custom-riff-decks"]) {
|
||||
protyle.title.element.setAttribute("custom-riff-decks", data.new["custom-riff-decks"]);
|
||||
} else {
|
||||
protyle.title.element.removeAttribute("custom-riff-decks");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue