mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 11:30:42 +08:00
This commit is contained in:
parent
990b31dc00
commit
1f98334c60
@ -673,11 +673,6 @@ app.whenReady().then(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
ipcMain.on("siyuan-closetab", (event, data) => {
|
|
||||||
BrowserWindow.getAllWindows().forEach(item => {
|
|
||||||
item.webContents.send("siyuan-closetab", data);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
ipcMain.on("siyuan-export-pdf", (event, data) => {
|
ipcMain.on("siyuan-export-pdf", (event, data) => {
|
||||||
BrowserWindow.fromId(data.id).webContents.send("siyuan-export-pdf", data);
|
BrowserWindow.fromId(data.id).webContents.send("siyuan-export-pdf", data);
|
||||||
});
|
});
|
||||||
@ -851,6 +846,11 @@ app.whenReady().then(() => {
|
|||||||
item.webContents.send("siyuan-lock-screen");
|
item.webContents.send("siyuan-lock-screen");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
ipcMain.on("siyuan-closetab", (event, data) => {
|
||||||
|
BrowserWindow.getAllWindows().forEach(item => {
|
||||||
|
item.webContents.send("siyuan-closetab", data);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
if (firstOpen) {
|
if (firstOpen) {
|
||||||
const firstOpenWindow = new BrowserWindow({
|
const firstOpenWindow = new BrowserWindow({
|
||||||
|
@ -79,19 +79,17 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
|||||||
name,
|
name,
|
||||||
type: "notebook"
|
type: "notebook"
|
||||||
}));
|
}));
|
||||||
}
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
label: window.siyuan.languages.config,
|
||||||
label: window.siyuan.languages.config,
|
icon: "iconSettings",
|
||||||
icon: "iconSettings",
|
click: () => {
|
||||||
click: () => {
|
fetchPost("/api/notebook/getNotebookConf", {
|
||||||
fetchPost("/api/notebook/getNotebookConf", {
|
notebook: notebookId
|
||||||
notebook: notebookId
|
}, (data) => {
|
||||||
}, (data) => {
|
onGetnotebookconf(data.data);
|
||||||
onGetnotebookconf(data.data);
|
});
|
||||||
});
|
}
|
||||||
}
|
}).element);
|
||||||
}).element);
|
|
||||||
if (!window.siyuan.config.readonly) {
|
|
||||||
sortMenu("notebook", parseInt(liElement.parentElement.getAttribute("data-sortmode")), (sort) => {
|
sortMenu("notebook", parseInt(liElement.parentElement.getAttribute("data-sortmode")), (sort) => {
|
||||||
fetchPost("/api/notebook/setNotebookConf", {
|
fetchPost("/api/notebook/setNotebookConf", {
|
||||||
notebook: notebookId,
|
notebook: notebookId,
|
||||||
@ -116,6 +114,15 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
|
label: window.siyuan.languages.riffCard,
|
||||||
|
iconHTML: '<svg class="b3-menu__icon" style="color: var(--b3-theme-secondary)"><use xlink:href="#iconRiffCard"></use></svg>',
|
||||||
|
click: () => {
|
||||||
|
fetchPost("/api/riff/getNotebookRiffDueCards", {notebook: notebookId}, (response) => {
|
||||||
|
openCardByData(response.data, `<span data-id="${notebookId}" class="fn__flex-center">${escapeHtml(name)}</span>`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).element);
|
||||||
/// #if !MOBILE
|
/// #if !MOBILE
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
label: window.siyuan.languages.search,
|
label: window.siyuan.languages.search,
|
||||||
@ -125,13 +132,15 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
|||||||
openSearch(window.siyuan.config.keymap.general.search.custom, undefined, notebookId);
|
openSearch(window.siyuan.config.keymap.general.search.custom, undefined, notebookId);
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
if (!window.siyuan.config.readonly) {
|
||||||
label: window.siyuan.languages.replace,
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
accelerator: window.siyuan.config.keymap.general.replace.custom,
|
label: window.siyuan.languages.replace,
|
||||||
click() {
|
accelerator: window.siyuan.config.keymap.general.replace.custom,
|
||||||
openSearch(window.siyuan.config.keymap.general.replace.custom, undefined, notebookId);
|
click() {
|
||||||
}
|
openSearch(window.siyuan.config.keymap.general.replace.custom, undefined, notebookId);
|
||||||
}).element);
|
}
|
||||||
|
}).element);
|
||||||
|
}
|
||||||
/// #endif
|
/// #endif
|
||||||
if (!window.siyuan.config.readonly) {
|
if (!window.siyuan.config.readonly) {
|
||||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||||
|
Loading…
Reference in New Issue
Block a user