mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	extra window now works in browsers too
This commit is contained in:
		
							
								
								
									
										6
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -3335,9 +3335,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "electron": {
 | 
			
		||||
      "version": "9.0.0-beta.18",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/electron/-/electron-9.0.0-beta.18.tgz",
 | 
			
		||||
      "integrity": "sha512-mOdPB4nPc4kO2uwpvvbNZz0RDrRDIko/C8XFmOZmz7k3JaU7r0h/tLxdeypiqfLwxW/Bu1n+uwqG1X34i3fTEw==",
 | 
			
		||||
      "version": "9.0.0-beta.20",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/electron/-/electron-9.0.0-beta.20.tgz",
 | 
			
		||||
      "integrity": "sha512-B3JDQRGYi/hS/a64wDx1Xnl8Z52rpBbysh+D4KOKL95NJ+MLVifgCzhu9yHIFNblB5fqz7PFzbyllJ6wAoQMQg==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@electron/get": "^1.0.1",
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,7 @@
 | 
			
		||||
    "yazl": "^2.5.1"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "electron": "9.0.0-beta.18",
 | 
			
		||||
    "electron": "9.0.0-beta.20",
 | 
			
		||||
    "electron-builder": "22.5.1",
 | 
			
		||||
    "electron-packager": "14.2.1",
 | 
			
		||||
    "electron-rebuild": "1.10.1",
 | 
			
		||||
 
 | 
			
		||||
@@ -108,9 +108,9 @@ class AppContext extends Component {
 | 
			
		||||
            ipcRenderer.send('create-extra-window', {notePath});
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            const url = 'http://127.0.0.1:37740/#' + notePath;
 | 
			
		||||
            const url = window.location.protocol + '//' + window.location.host + window.location.pathname + '?extra=1#' + notePath;
 | 
			
		||||
 | 
			
		||||
            window.open(url);
 | 
			
		||||
            window.open(url, '', 'width=1000,height=800');
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -18,8 +18,8 @@ let setupWindow;
 | 
			
		||||
async function createExtraWindow(notePath) {
 | 
			
		||||
    const {BrowserWindow} = require('electron');
 | 
			
		||||
    const win = new BrowserWindow({
 | 
			
		||||
        height: 600,
 | 
			
		||||
        width: 800,
 | 
			
		||||
        width: 1000,
 | 
			
		||||
        height: 800,
 | 
			
		||||
        title: 'Trilium Notes',
 | 
			
		||||
        webPreferences: {
 | 
			
		||||
            enableRemoteModule: true,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user