Vanessa 2025-12-01 21:23:14 +08:00
parent 8677e3be9c
commit 70c5e267fb
2 changed files with 7 additions and 3 deletions

View file

@ -3,12 +3,12 @@ import {getIdFromSYProtocol, isLocalPath, isSYProtocol, pathPosix} from "../util
import {shell, ipcRenderer} from "electron"; import {shell, ipcRenderer} from "electron";
/// #endif /// #endif
import {getSearch} from "../util/functions"; import {getSearch} from "../util/functions";
import {openByMobile} from "../protyle/util/compatibility";
import {Constants} from "../constants"; import {Constants} from "../constants";
import {showMessage} from "../dialog/message";
/// #if !MOBILE /// #if !MOBILE
import {openAsset, openBy, openFile, openFileById} from "./util"; import {openAsset, openBy, openFile, openFileById} from "./util";
/// #endif /// #endif
import {showMessage} from "../dialog/message";
import {openByMobile} from "../protyle/util/compatibility";
import {App} from "../index"; import {App} from "../index";
import {fetchPost} from "../util/fetch"; import {fetchPost} from "../util/fetch";
import {checkFold} from "../util/noRelyPCFunction"; import {checkFold} from "../util/noRelyPCFunction";

View file

@ -3,6 +3,8 @@ import {fetchPost, fetchSyncPost} from "../../util/fetch";
import {Constants} from "../../constants"; import {Constants} from "../../constants";
/// #if !BROWSER /// #if !BROWSER
import {clipboard, ipcRenderer} from "electron"; import {clipboard, ipcRenderer} from "electron";
/// #endif
/// #if MOBILE
import {processSYLink} from "../../editor/openLink"; import {processSYLink} from "../../editor/openLink";
/// #endif /// #endif
@ -54,10 +56,11 @@ export const openByMobile = (uri: string) => {
if (!uri) { if (!uri) {
return; return;
} }
//https://github.com/siyuan-note/siyuan/issues/15892 /// #if MOBILE
if (processSYLink(window.siyuan.ws.app, uri)) { if (processSYLink(window.siyuan.ws.app, uri)) {
return; return;
} }
/// #endif
if (isInIOS()) { if (isInIOS()) {
if (uri.startsWith("assets/")) { if (uri.startsWith("assets/")) {
// iOS 16.7 之前的版本uri 需要 encodeURIComponent // iOS 16.7 之前的版本uri 需要 encodeURIComponent
@ -564,3 +567,4 @@ export const initFocusFix = () => {
}; };
}; };
/// #endif /// #endif