mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
♻️
This commit is contained in:
parent
5a206a770f
commit
968f666d19
7 changed files with 109 additions and 97 deletions
|
|
@ -752,24 +752,31 @@ export const openMenu = (src: string, onlyMenu = false) => {
|
|||
});
|
||||
/// #endif
|
||||
} else {
|
||||
/// #if !BROWSER
|
||||
submenu.push({
|
||||
label: window.siyuan.languages.useDefault,
|
||||
accelerator: "Click",
|
||||
click: () => {
|
||||
/// #if !BROWSER
|
||||
shell.openExternal(src).catch((e) => {
|
||||
console.log("openExternal error:" + e);
|
||||
showMessage(e);
|
||||
});
|
||||
/// #else
|
||||
if (window.siyuan.config.system.container === "ios") {
|
||||
window.location.href = src;
|
||||
} else {
|
||||
window.open(src);
|
||||
}
|
||||
/// #endif
|
||||
}
|
||||
});
|
||||
/// #endif
|
||||
}
|
||||
/// #if BROWSER
|
||||
submenu.push({
|
||||
label: window.siyuan.languages.useBrowserView,
|
||||
accelerator: "Click",
|
||||
click: () => {
|
||||
if (window.siyuan.config.system.container === "ios") {
|
||||
window.location.href = src;
|
||||
} else {
|
||||
window.open(src);
|
||||
}
|
||||
}
|
||||
});
|
||||
/// #endif
|
||||
if (onlyMenu) {
|
||||
return submenu;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue