mirror of
https://github.com/bitwarden/browser
synced 2024-12-27 10:23:48 +01:00
Centralized BrowserAPI call to refresh firefox
This commit is contained in:
parent
1075fedad3
commit
4ea3acf80b
@ -213,4 +213,15 @@ export class BrowserApi {
|
||||
return chrome.runtime.reload();
|
||||
}
|
||||
}
|
||||
|
||||
static reloadOpenWindows() {
|
||||
if(!BrowserApi.isSafariApi)
|
||||
{
|
||||
var sidebarName : string = 'sidebar';
|
||||
var sidebarWindows = chrome.extension.getViews({ type: sidebarName });
|
||||
if(sidebarWindows && sidebarWindows.length > 0) {
|
||||
sidebarWindows[0].location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import {
|
||||
|
||||
import { ApiService } from 'jslib/abstractions/api.service';
|
||||
import { AuthService } from 'jslib/abstractions/auth.service';
|
||||
import BrowserPlatformUtilsService from '../../services/browserPlatformUtils.service';
|
||||
import { CryptoFunctionService } from 'jslib/abstractions/cryptoFunction.service';
|
||||
import { EnvironmentService } from 'jslib/abstractions/environment.service';
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
@ -18,6 +17,7 @@ import { StorageService } from 'jslib/abstractions/storage.service';
|
||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||
|
||||
import { SsoComponent as BaseSsoComponent } from 'jslib/angular/components/sso.component';
|
||||
import { BrowserApi } from '../../browser/browserApi';
|
||||
|
||||
@Component({
|
||||
selector: 'app-sso',
|
||||
@ -42,6 +42,9 @@ export class SsoComponent extends BaseSsoComponent {
|
||||
this.clientId = 'browser';
|
||||
|
||||
super.onSuccessfulLogin = () => {
|
||||
BrowserApi.reloadOpenWindows();
|
||||
const thisWindow = window.open('', '_self');
|
||||
thisWindow.close();
|
||||
return syncService.fullSync(true);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user