diff options
author | Alphrag <34252790+Alphrag@users.noreply.github.com> | 2023-04-28 00:38:30 +0100 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2023-04-28 06:24:01 +0530 |
commit | b4724e034e2e3f88e6625ead891162cc8a776367 (patch) | |
tree | afd57bcb37430481eb63fd33d74e226a1c05658a /src | |
parent | 6.2.7-nightly.8 [skip ci] (diff) | |
download | ferdium-app-b4724e034e2e3f88e6625ead891162cc8a776367.tar.gz ferdium-app-b4724e034e2e3f88e6625ead891162cc8a776367.tar.zst ferdium-app-b4724e034e2e3f88e6625ead891162cc8a776367.zip |
Update electron
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Menu.ts | 15 | ||||
-rw-r--r-- | src/models/Service.ts | 42 |
2 files changed, 31 insertions, 26 deletions
diff --git a/src/lib/Menu.ts b/src/lib/Menu.ts index 5356ec2c6..b1510cec3 100644 --- a/src/lib/Menu.ts +++ b/src/lib/Menu.ts | |||
@@ -736,15 +736,18 @@ class FranzMenu implements StoresProps { | |||
736 | { | 736 | { |
737 | label: intl.formatMessage(menuItems.toggleDevTools), | 737 | label: intl.formatMessage(menuItems.toggleDevTools), |
738 | accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+I`, | 738 | accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+I`, |
739 | enabled: webContents.fromId(1) !== undefined, | ||
739 | click: () => { | 740 | click: () => { |
740 | const windowWebContents = webContents.fromId(1); | 741 | const windowWebContents = webContents.fromId(1); |
741 | const { isDevToolsOpened, openDevTools, closeDevTools } = | 742 | if (windowWebContents) { |
742 | windowWebContents; | 743 | const { isDevToolsOpened, openDevTools, closeDevTools } = |
744 | windowWebContents; | ||
743 | 745 | ||
744 | if (isDevToolsOpened()) { | 746 | if (isDevToolsOpened()) { |
745 | closeDevTools(); | 747 | closeDevTools(); |
746 | } else { | 748 | } else { |
747 | openDevTools({ mode: 'right' }); | 749 | openDevTools({ mode: 'right' }); |
750 | } | ||
748 | } | 751 | } |
749 | }, | 752 | }, |
750 | }, | 753 | }, |
diff --git a/src/models/Service.ts b/src/models/Service.ts index 493620ba4..0cbfa60e2 100644 --- a/src/models/Service.ts +++ b/src/models/Service.ts | |||
@@ -527,27 +527,29 @@ export default class Service { | |||
527 | this._didMediaPaused(); | 527 | this._didMediaPaused(); |
528 | }); | 528 | }); |
529 | 529 | ||
530 | webviewWebContents.on('login', (event, _, authInfo, callback) => { | 530 | if (webviewWebContents) { |
531 | // const authCallback = callback; | 531 | webviewWebContents.on('login', (event, _, authInfo, callback) => { |
532 | debug('browser login event', authInfo); | 532 | // const authCallback = callback; |
533 | event.preventDefault(); | 533 | debug('browser login event', authInfo); |
534 | 534 | event.preventDefault(); | |
535 | if (authInfo.isProxy && authInfo.scheme === 'basic') { | 535 | |
536 | debug('Sending service echo ping'); | 536 | if (authInfo.isProxy && authInfo.scheme === 'basic') { |
537 | webviewWebContents.send('get-service-id'); | 537 | debug('Sending service echo ping'); |
538 | 538 | webviewWebContents.send('get-service-id'); | |
539 | debug('Received service id', this.id); | 539 | |
540 | 540 | debug('Received service id', this.id); | |
541 | const ps = stores.settings.proxy[this.id]; | 541 | |
542 | 542 | const ps = stores.settings.proxy[this.id]; | |
543 | if (ps) { | 543 | |
544 | debug('Sending proxy auth callback for service', this.id); | 544 | if (ps) { |
545 | callback(ps.user, ps.password); | 545 | debug('Sending proxy auth callback for service', this.id); |
546 | } else { | 546 | callback(ps.user, ps.password); |
547 | debug('No proxy auth config found for', this.id); | 547 | } else { |
548 | debug('No proxy auth config found for', this.id); | ||
549 | } | ||
548 | } | 550 | } |
549 | } | 551 | }); |
550 | }); | 552 | } |
551 | } | 553 | } |
552 | 554 | ||
553 | initializeWebViewListener(): void { | 555 | initializeWebViewListener(): void { |