mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
c5294371c9
commit
b17ef47ea0
1 changed files with 11 additions and 3 deletions
|
|
@ -708,20 +708,23 @@ export const openMenu = (src: string, onlyMenu = false) => {
|
||||||
const submenu = [];
|
const submenu = [];
|
||||||
if (isLocalPath(src)) {
|
if (isLocalPath(src)) {
|
||||||
submenu.push({
|
submenu.push({
|
||||||
label: window.siyuan.languages.openInNewTab,
|
label: window.siyuan.languages.insertRight,
|
||||||
|
accelerator: "Click",
|
||||||
click() {
|
click() {
|
||||||
openAsset(src.trim(), parseInt(getSearch("page", src)));
|
openAsset(src.trim(), parseInt(getSearch("page", src)), "right");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/// #if !BROWSER
|
/// #if !BROWSER
|
||||||
submenu.push({
|
submenu.push({
|
||||||
label: window.siyuan.languages.useDefault,
|
label: window.siyuan.languages.useDefault,
|
||||||
|
accelerator: "⇧Click",
|
||||||
click() {
|
click() {
|
||||||
openBy(src, "app");
|
openBy(src, "app");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
submenu.push({
|
submenu.push({
|
||||||
label: window.siyuan.languages.showInFolder,
|
label: window.siyuan.languages.showInFolder,
|
||||||
|
accelerator: "⌘Click",
|
||||||
click: () => {
|
click: () => {
|
||||||
openBy(src, "folder");
|
openBy(src, "folder");
|
||||||
}
|
}
|
||||||
|
|
@ -730,13 +733,18 @@ export const openMenu = (src: string, onlyMenu = false) => {
|
||||||
} else {
|
} else {
|
||||||
submenu.push({
|
submenu.push({
|
||||||
label: window.siyuan.languages.useBrowserView,
|
label: window.siyuan.languages.useBrowserView,
|
||||||
|
accelerator: "Click",
|
||||||
click: () => {
|
click: () => {
|
||||||
/// #if !BROWSER
|
/// #if !BROWSER
|
||||||
shell.openExternal(src).catch((e) => {
|
shell.openExternal(src).catch((e) => {
|
||||||
console.log("openExternal error:" + e);
|
console.log("openExternal error:" + e);
|
||||||
});
|
});
|
||||||
/// #else
|
/// #else
|
||||||
|
if (window.siyuan.config.system.container === "ios") {
|
||||||
|
window.location.href = src;
|
||||||
|
} else {
|
||||||
window.open(src);
|
window.open(src);
|
||||||
|
}
|
||||||
/// #endif
|
/// #endif
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue