mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
navigation state is more nicely and completely serialized into URL
This commit is contained in:
@@ -15,7 +15,7 @@ let mainWindow;
|
||||
/** @type {Electron.BrowserWindow} */
|
||||
let setupWindow;
|
||||
|
||||
async function createExtraWindow(notePath, hoistedNoteId = 'root', viewScope = {}) {
|
||||
async function createExtraWindow(extraWindowHash) {
|
||||
const spellcheckEnabled = optionService.getOptionBool('spellCheckEnabled');
|
||||
|
||||
const {BrowserWindow} = require('electron');
|
||||
@@ -35,13 +35,13 @@ async function createExtraWindow(notePath, hoistedNoteId = 'root', viewScope = {
|
||||
});
|
||||
|
||||
win.setMenuBarVisibility(false);
|
||||
win.loadURL(`http://127.0.0.1:${port}/?extraWindow=1&extraHoistedNoteId=${hoistedNoteId}&extraViewScope=${JSON.stringify(viewScope)}#${notePath}`);
|
||||
win.loadURL(`http://127.0.0.1:${port}/?extraWindow=1${extraWindowHash}`);
|
||||
|
||||
configureWebContents(win.webContents, spellcheckEnabled);
|
||||
}
|
||||
|
||||
ipcMain.on('create-extra-window', (event, arg) => {
|
||||
createExtraWindow(arg.notePath, arg.hoistedNoteId, arg.viewScope);
|
||||
createExtraWindow(arg.extraWindowHash);
|
||||
});
|
||||
|
||||
async function createMainWindow(app) {
|
||||
|
||||
Reference in New Issue
Block a user