1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

move "in UI" methods to popup utils

This commit is contained in:
Kyle Spearrin
2018-01-11 15:30:58 -05:00
parent 9921d6dba3
commit 82e88eb1ba
6 changed files with 45 additions and 26 deletions

View File

@@ -8,6 +8,8 @@ import { UtilsService } from 'jslib/abstractions/utils.service';
import { AutofillService } from '../../../services/abstractions/autofill.service';
import PopupUtilsService from '../services/popupUtils.service';
export class CurrentController {
i18n: any;
pageDetails: any = [];
@@ -27,7 +29,7 @@ export class CurrentController {
private $state: any, private $timeout: ng.ITimeoutService, private autofillService: AutofillService,
private $analytics: any, private i18nService: any, private $filter: ng.IFilterService) {
this.i18n = i18nService;
this.inSidebar = platformUtilsService.inSidebar($window);
this.inSidebar = PopupUtilsService.inSidebar($window);
this.disableSearch = platformUtilsService.isEdge();
$scope.$on('syncCompleted', (event: any, successfully: boolean) => {
@@ -85,7 +87,7 @@ export class CurrentController {
if (totpCode && this.platformUtilsService.isFirefox()) {
this.utilsService.copyToClipboard(totpCode, document);
}
if (this.platformUtilsService.inPopup(this.$window)) {
if (PopupUtilsService.inPopup(this.$window)) {
this.$window.close();
}
}).catch(() => {