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

rename browser utils to platform utils

This commit is contained in:
Kyle Spearrin
2018-01-05 16:30:15 -05:00
parent 01cf48bbed
commit 4a08bf6b71
39 changed files with 147 additions and 137 deletions

View File

@@ -1,6 +1,6 @@
import { CipherType } from '../../../enums/cipherType.enum';
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
import { PlatformUtilsService } from '../../../services/abstractions/platformUtils.service';
import { UtilsService } from '../../../services/abstractions/utils.service';
import * as template from './current.component.html';
@@ -18,13 +18,13 @@ export class CurrentController {
inSidebar: boolean = false;
disableSearch: boolean = false;
constructor($scope: any, private cipherService: any, private browserUtilsService: BrowserUtilsService,
constructor($scope: any, private cipherService: any, private platformUtilsService: PlatformUtilsService,
private utilsService: UtilsService, private toastr: any, private $window: any, private $state: any,
private $timeout: any, private autofillService: any, private $analytics: any, private i18nService: any,
private $filter: any) {
this.i18n = i18nService;
this.inSidebar = browserUtilsService.inSidebar($window);
this.disableSearch = browserUtilsService.isEdge();
this.inSidebar = platformUtilsService.inSidebar($window);
this.disableSearch = platformUtilsService.isEdge();
$scope.$on('syncCompleted', (event: any, successfully: boolean) => {
if (this.loaded) {
@@ -78,10 +78,10 @@ export class CurrentController {
fromBackground: false,
}).then((totpCode: string) => {
this.$analytics.eventTrack('Autofilled');
if (totpCode && this.browserUtilsService.isFirefox()) {
if (totpCode && this.platformUtilsService.isFirefox()) {
this.utilsService.copyToClipboard(totpCode, document);
}
if (this.browserUtilsService.inPopup(this.$window)) {
if (this.platformUtilsService.inPopup(this.$window)) {
this.$window.close();
}
}).catch(() => {
@@ -107,7 +107,7 @@ export class CurrentController {
return;
}
this.domain = this.browserUtilsService.getDomain(this.url);
this.domain = this.platformUtilsService.getDomain(this.url);
chrome.tabs.sendMessage(tabs[0].id, {
command: 'collectPageDetails',