mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
9dd686c58c
commit
7334b5f615
12 changed files with 52 additions and 10 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue