mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-24 08:09:59 +02:00
fix analytics
This commit is contained in:
parent
e1626dfc43
commit
76eeb4e41d
@ -43,6 +43,8 @@ import { AuthService } from 'jslib/services/auth.service';
|
||||
import { ConstantsService } from 'jslib/services/constants.service';
|
||||
import { StateService } from 'jslib/services/state.service';
|
||||
|
||||
import { Analytics } from 'jslib/misc/analytics';
|
||||
|
||||
import { PopupUtilsService } from './popup-utils.service';
|
||||
|
||||
function getBgService<T>(service: string) {
|
||||
@ -71,13 +73,21 @@ export function initFactory(i18nService: I18nService, storageService: StorageSer
|
||||
window.document.body.classList.add('body-sm');
|
||||
}
|
||||
|
||||
if (i18nService != null) {
|
||||
window.document.documentElement.classList.add('locale_' + i18nService.translationLocale);
|
||||
authService.init();
|
||||
}
|
||||
|
||||
stateService.save(ConstantsService.disableFaviconKey,
|
||||
await storageService.get<boolean>(ConstantsService.disableFaviconKey));
|
||||
|
||||
if (BrowserApi.getBackgroundPage() != null) {
|
||||
window.document.documentElement.classList.add('locale_' + i18nService.translationLocale);
|
||||
authService.init();
|
||||
|
||||
new Analytics(window, () => BrowserApi.gaFilter(), null, null, null, () => {
|
||||
const bgPage = BrowserApi.getBackgroundPage();
|
||||
if (bgPage == null || bgPage.bitwardenMain == null) {
|
||||
throw 'Cannot resolve background page main.';
|
||||
}
|
||||
return bgPage.bitwardenMain;
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="left">
|
||||
<app-pop-out [show]="!inSidebar"></app-pop-out>
|
||||
<button type="button" appBlurClick (click)="refresh()" title="{{'refresh' | i18n}}" *ngIf="inSidebar">
|
||||
<i class="fa fa-refresh fa-lg fa-fw"></i>
|
||||
<i class="fa fa-retweet fa-lg fa-fw"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="search">
|
||||
|
Loading…
Reference in New Issue
Block a user