Persist cookies in views and browse window

This commit is contained in:
Max Goodhart
2020-06-19 08:25:07 -07:00
parent 1c5201e544
commit e80b0075f6
2 changed files with 6 additions and 2 deletions

View File

@@ -75,7 +75,9 @@ export default class StreamWindow extends EventEmitter {
const views = [] const views = []
for (let idx = 0; idx <= 9; idx++) { for (let idx = 0; idx <= 9; idx++) {
const view = new BrowserView() const view = new BrowserView({
webPreferences: { partition: 'persist:session' },
})
view.setBackgroundColor('#000') view.setBackgroundColor('#000')
const machine = viewStateMachine const machine = viewStateMachine

View File

@@ -66,7 +66,9 @@ async function main() {
streamWindow.reloadView(msg.viewIdx) streamWindow.reloadView(msg.viewIdx)
} else if (msg.type === 'browse') { } else if (msg.type === 'browse') {
if (!browseWindow || browseWindow.isDestroyed()) { if (!browseWindow || browseWindow.isDestroyed()) {
browseWindow = new BrowserWindow() browseWindow = new BrowserWindow({
webPreferences: { partition: 'persist:session' },
})
} }
browseWindow.loadURL(msg.url) browseWindow.loadURL(msg.url)
} }