mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-06 15:41:48 +01:00
This commit is contained in:
parent
d02381d3f2
commit
7aa4aacfc3
4 changed files with 16 additions and 10 deletions
|
|
@ -6,6 +6,7 @@ import {setStorageVal, writeText} from "../protyle/util/compatibility";
|
|||
import {getAllModels} from "../layout/getAll";
|
||||
import {focusByRange} from "../protyle/util/selection";
|
||||
import {Constants} from "../constants";
|
||||
import {showMessage} from "../dialog/message";
|
||||
|
||||
export const initAnno = (element: HTMLElement, pdf: any, pdfConfig: any) => {
|
||||
getConfig(pdf);
|
||||
|
|
@ -696,6 +697,8 @@ const getConfig = (pdf: any) => {
|
|||
let config = {};
|
||||
if (response.code !== 1) {
|
||||
config = JSON.parse(response.data.data);
|
||||
} else {
|
||||
showMessage(window.siyuan.languages.emptyContent);
|
||||
}
|
||||
pdf.appConfig.config = config;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import {webViewerPageNumberChanged} from "./pdf/app";
|
|||
import {fetchPost} from "../util/fetch";
|
||||
import {setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||
import {App} from "../index";
|
||||
import {showMessage} from "../dialog/message";
|
||||
|
||||
export class Asset extends Model {
|
||||
public path: string;
|
||||
|
|
@ -58,6 +59,8 @@ export class Asset extends Model {
|
|||
} else {
|
||||
this.pdfPage = undefined;
|
||||
}
|
||||
} else {
|
||||
showMessage(window.siyuan.languages.emptyContent);
|
||||
}
|
||||
cb();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue