This commit is contained in:
Vanessa 2023-10-28 23:49:07 +08:00
parent 4314143292
commit 6ee3761bc4
3 changed files with 7 additions and 0 deletions

View file

@ -30,6 +30,7 @@ import "./assets/scss/base.scss";
export class App { export class App {
public plugins: import("./plugin").Plugin[] = []; public plugins: import("./plugin").Plugin[] = [];
public appId: string;
constructor() { constructor() {
/// #if BROWSER /// #if BROWSER
@ -38,6 +39,8 @@ export class App {
addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");
addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");
addBaseURL(); addBaseURL();
this.appId =Constants.SIYUAN_APPID;
window.siyuan = { window.siyuan = {
zIndex: 10, zIndex: 10,
transactions: [], transactions: [],

View file

@ -29,6 +29,7 @@ import {Menu} from "../plugin/Menu";
class App { class App {
public plugins: import("../plugin").Plugin[] = []; public plugins: import("../plugin").Plugin[] = [];
public appId:string;
constructor() { constructor() {
if (!window.webkit?.messageHandlers && !window.JSAndroid) { if (!window.webkit?.messageHandlers && !window.JSAndroid) {
@ -37,6 +38,7 @@ class App {
addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");
addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");
addBaseURL(); addBaseURL();
this.appId =Constants.SIYUAN_APPID;
window.siyuan = { window.siyuan = {
zIndex: 10, zIndex: 10,
notebooks: [], notebooks: [],

View file

@ -23,11 +23,13 @@ import {loadPlugins} from "../plugin/loader";
class App { class App {
public plugins: import("../plugin").Plugin[] = []; public plugins: import("../plugin").Plugin[] = [];
public appId:string;
constructor() { constructor() {
addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");
addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");
addBaseURL(); addBaseURL();
this.appId =Constants.SIYUAN_APPID;
window.siyuan = { window.siyuan = {
zIndex: 10, zIndex: 10,
transactions: [], transactions: [],