This commit is contained in:
Vanessa 2023-02-24 15:25:04 +08:00
parent 9dd686c58c
commit 7334b5f615
12 changed files with 52 additions and 10 deletions

View file

@ -28,6 +28,7 @@ import {pdfResize} from "../asset/renderAssets";
import {Backlink} from "./dock/Backlink";
import {openFileById} from "../editor/util";
import {getSearch, isWindow} from "../util/functions";
import {showMessage} from "../dialog/message";
export const setPanelFocus = (element: Element) => {
if (element.classList.contains("layout__tab--active") || element.classList.contains("layout__wnd--active")) {
@ -579,6 +580,14 @@ export const copyTab = (tab: Tab) => {
});
};
export const pdfIsLoading = (element: HTMLElement) => {
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) => {
if (item.id === id) {