mirror of
https://github.com/rhysd/Mstdn.git
synced 2025-01-21 20:52:11 +01:00
do not navigate to login page if destination of redirect is expected page
This commit is contained in:
parent
9c3f0fe970
commit
d70f264d46
@ -83,6 +83,9 @@ export default class Window {
|
|||||||
open(url: string) {
|
open(url: string) {
|
||||||
log.debug('Open URL:', url);
|
log.debug('Open URL:', url);
|
||||||
this.browser.webContents.once('did-get-redirect-request', (e: Event, _: string, newUrl: string) => {
|
this.browser.webContents.once('did-get-redirect-request', (e: Event, _: string, newUrl: string) => {
|
||||||
|
if (url === newUrl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
log.debug('Redirecting to ' + newUrl + '. Will navigate to login page for user using single user mode');
|
log.debug('Redirecting to ' + newUrl + '. Will navigate to login page for user using single user mode');
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.browser.loadURL(`https://${this.account.host}/auth/sign_in`);
|
this.browser.loadURL(`https://${this.account.host}/auth/sign_in`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user