mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
This commit is contained in:
@@ -31,6 +31,7 @@ import {hideAllElements} from "./protyle/ui/hideElements";
|
||||
import {loadPlugins, reloadPlugin} from "./plugin/loader";
|
||||
import "./assets/scss/base.scss";
|
||||
import {reloadEmoji} from "./emoji";
|
||||
import {IOSPurchase} from "./util/iOSPurchase";
|
||||
|
||||
export class App {
|
||||
public plugins: import("./plugin").Plugin[] = [];
|
||||
@@ -208,4 +209,5 @@ window.openFileByURL = (openURL) => {
|
||||
window.showKeyboardToolbar = () => {
|
||||
// 防止 Pad 端报错
|
||||
};
|
||||
window.IOSPurchase = IOSPurchase;
|
||||
/// #endif
|
||||
|
||||
@@ -28,6 +28,7 @@ import {isNotEditBlock} from "../protyle/wysiwyg/getBlock";
|
||||
import {updateCardHV} from "../card/util";
|
||||
import {mobileKeydown} from "./util/keydown";
|
||||
import {correctHotkey} from "../boot/globalEvent/commonHotkey";
|
||||
import {IOSPurchase} from "../util/iOSPurchase";
|
||||
|
||||
class App {
|
||||
public plugins: import("../plugin").Plugin[] = [];
|
||||
@@ -162,6 +163,7 @@ window.reconnectWebSocket = () => {
|
||||
window.siyuan.mobile.popEditor.protyle.ws.send("ping", {});
|
||||
};
|
||||
window.goBack = goBack;
|
||||
window.IOSPurchase = IOSPurchase;
|
||||
window.showKeyboardToolbar = (height) => {
|
||||
document.getElementById("keyboardToolbar").setAttribute("data-keyboardheight", (height ? height : window.outerHeight / 2 - 42).toString());
|
||||
showKeyboardToolbar();
|
||||
|
||||
Vendored
+2
@@ -224,6 +224,8 @@ interface Window {
|
||||
|
||||
showKeyboardToolbar(height: number): void
|
||||
|
||||
IOSPurchase(data: string): void
|
||||
|
||||
hideKeyboardToolbar(): void
|
||||
|
||||
openFileByURL(URL: string): boolean
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export const IOSPurchase = (data:string) => {
|
||||
/// #if MOBILE
|
||||
document.querySelector("#modelMain").dispatchEvent(new CustomEvent("click", {
|
||||
detail: document.querySelector("#modelMain #refresh")
|
||||
}));
|
||||
/// #else
|
||||
document.querySelector('.config__tab-container[data-name="account"] #refresh').dispatchEvent(new Event("click"));
|
||||
/// #endif
|
||||
}
|
||||
Reference in New Issue
Block a user