1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

separated BrowserUtils from generic Utils

This commit is contained in:
Kyle Spearrin
2018-01-04 12:32:10 -05:00
parent ac0126b210
commit 0dd711471b
42 changed files with 474 additions and 451 deletions

View File

@@ -1,10 +1,10 @@
angular
.module('bit.accounts')
.controller('accountsHintController', function ($scope, $state, apiService, toastr, $q, utilsService,
.controller('accountsHintController', function ($scope, $state, apiService, toastr, $q, browserUtilsService,
$analytics, i18nService, $timeout) {
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
document.getElementById('email').focus();
}, 500);

View File

@@ -2,9 +2,9 @@ angular
.module('bit.accounts')
.controller('accountsLoginController', function ($scope, $state, $stateParams, authService, userService, toastr,
utilsService, $analytics, i18nService, $timeout) {
browserUtilsService, $analytics, i18nService, $timeout) {
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
if ($stateParams.email) {
document.getElementById('master-password').focus();
}

View File

@@ -1,11 +1,11 @@
angular
.module('bit.accounts')
.controller('accountsLoginTwoFactorController', function ($scope, $state, authService, toastr, utilsService, SweetAlert,
.controller('accountsLoginTwoFactorController', function ($scope, $state, authService, toastr, browserUtilsService, SweetAlert,
$analytics, i18nService, $stateParams, $filter, constantsService, $timeout, $window, cryptoService, apiService,
environmentService) {
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
$scope.i18n = i18nService;
@@ -130,7 +130,7 @@ angular
var provider = $filter('filter')(constants.twoFactorProviderInfo, { type: keys[i], active: true });
if (provider.length && provider[0].priority > providerPriority) {
if (provider[0].type == constants.twoFactorProvider.u2f && (typeof $window.u2f === 'undefined') &&
!utilsService.isChrome() && !utilsService.isOpera()) {
!browserUtilsService.isChrome() && !browserUtilsService.isOpera()) {
continue;
}
@@ -183,8 +183,8 @@ angular
params = providers[constants.twoFactorProvider.email];
$scope.twoFactorEmail = params.Email;
if (chrome.extension.getViews({ type: 'popup' }).length > 0 && !utilsService.inSidebar($window) &&
!utilsService.inTab($window) && !utilsService.inPopout($window)) {
if (chrome.extension.getViews({ type: 'popup' }).length > 0 && !browserUtilsService.inSidebar($window) &&
!browserUtilsService.inTab($window) && !browserUtilsService.inPopout($window)) {
SweetAlert.swal({
title: i18nService.twoStepLogin,
text: i18nService.popup2faCloseMessage,

View File

@@ -3,9 +3,9 @@ angular
.controller(
'accountsRegisterController',
function ($scope, $state, cryptoService, toastr, $q, apiService, utilsService, $analytics, i18nService, $timeout) {
function ($scope, $state, cryptoService, toastr, $q, apiService, browserUtilsService, $analytics, i18nService, $timeout) {
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
document.getElementById('email').focus();
}, 500);

View File

@@ -1,4 +1,4 @@
angular
angular
.module('bit.accounts')
.controller('accountsTwoFactorMethodsController', function ($scope, $state, $stateParams, constantsService,
@@ -25,7 +25,8 @@
if (providers.hasOwnProperty(constants.twoFactorProvider.duo)) {
add(constants.twoFactorProvider.duo);
}
if (providers.hasOwnProperty(constants.twoFactorProvider.u2f) && (utilsService.isChrome() || utilsService.isOpera())) {
if (providers.hasOwnProperty(constants.twoFactorProvider.u2f) &&
(browserUtilsService.isChrome() || browserUtilsService.isOpera())) {
add(constants.twoFactorProvider.u2f);
}

View File

@@ -1,6 +1,6 @@
import * as template from './action-buttons.component.html';
import { UtilsService } from '../../../services/abstractions/utils.service';
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
export class ActionButtonsController implements ng.IController {
onView: Function;
@@ -11,7 +11,7 @@ export class ActionButtonsController implements ng.IController {
constants: any;
constructor(private i18nService: any, private $analytics: any, private constantsService: any, private toastr: any,
private $timeout: any, private $window: any, private utilsService: UtilsService) {
private $timeout: any, private $window: any, private browserUtilsService: BrowserUtilsService) {
this.i18n = i18nService;
this.constants = constantsService;
}
@@ -22,7 +22,7 @@ export class ActionButtonsController implements ng.IController {
if (self.cipher.login.uri.startsWith('http://') || self.cipher.login.uri.startsWith('https://')) {
self.$analytics.eventTrack('Launched Website From Listing');
chrome.tabs.create({ url: self.cipher.login.uri });
if (self.utilsService.inPopup(self.$window)) {
if (self.browserUtilsService.inPopup(self.$window)) {
self.$window.close();
}
}

View File

@@ -1,11 +1,11 @@
import * as template from './pop-out.component.html';
import { UtilsService } from '../../../services/abstractions/utils.service';
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
export class PopOutController implements ng.IController {
i18n: any;
constructor(private $analytics: any, private $window: any, private utilsService: UtilsService,
constructor(private $analytics: any, private $window: any, private browserUtilsService: BrowserUtilsService,
private i18nService: any) {
this.i18n = i18nService;
}
@@ -14,7 +14,7 @@ export class PopOutController implements ng.IController {
this.$analytics.eventTrack('Expand Vault');
let href = this.$window.location.href;
if (this.utilsService.isEdge()) {
if (this.browserUtilsService.isEdge()) {
const popupIndex = href.indexOf('/popup/');
if (popupIndex > -1) {
href = href.substring(popupIndex);
@@ -39,7 +39,7 @@ export class PopOutController implements ng.IController {
height: bodyRect.height,
});
if (this.utilsService.inPopup(this.$window)) {
if (this.browserUtilsService.inPopup(this.$window)) {
this.$window.close();
}
} else {

View File

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

View File

@@ -1,22 +1,22 @@
import * as angular from 'angular';
import * as template from './lock.component.html';
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
import { CryptoService } from '../../../services/abstractions/crypto.service';
import { UtilsService } from '../../../services/abstractions/utils.service';
export class LockController {
i18n: any;
masterPassword: string;
constructor(public $state: any, public i18nService: any, private $timeout: any, private utilsService: UtilsService,
public cryptoService: CryptoService, public toastr: any, public userService: any,
public SweetAlert: any) {
constructor(public $state: any, public i18nService: any, private $timeout: any,
private browserUtilsService: BrowserUtilsService, public cryptoService: CryptoService, public toastr: any,
public userService: any, public SweetAlert: any) {
this.i18n = i18nService;
}
$onInit() {
this.$timeout(() => {
this.utilsService.initListSectionItemListeners(document, angular);
this.browserUtilsService.initListSectionItemListeners(document, angular);
document.getElementById('master-password').focus();
}, 500);
}

View File

@@ -1,13 +1,13 @@
import { DeviceRequest } from '../../../models/request/deviceRequest';
import { TokenRequest } from '../../../models/request/tokenRequest';
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
import { CryptoService } from '../../../services/abstractions/crypto.service';
import { UtilsService } from '../../../services/abstractions/utils.service';
class AuthService {
constructor(public cryptoService: CryptoService, public apiService: any, public userService: any,
public tokenService: any, public $rootScope: any, public appIdService: any, public utilsService: UtilsService,
public constantsService: any) {
public tokenService: any, public $rootScope: any, public appIdService: any,
public browserUtilsService: BrowserUtilsService, public constantsService: any) {
}
async logIn(email: string, masterPassword: string, twoFactorProvider?: number,
@@ -19,7 +19,7 @@ class AuthService {
const storedTwoFactorToken = await this.tokenService.getTwoFactorToken(email);
const hashedPassword = await this.cryptoService.hashPassword(masterPassword, key);
const deviceRequest = new DeviceRequest(appId, this.utilsService);
const deviceRequest = new DeviceRequest(appId, this.browserUtilsService);
let request: TokenRequest;

View File

@@ -1,3 +1,4 @@
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
import { CryptoService } from '../../../services/abstractions/crypto.service';
import { StorageService } from '../../../services/abstractions/storage.service';
import { UtilsService } from '../../../services/abstractions/utils.service';
@@ -19,6 +20,7 @@ export const cipherService = getBackgroundService<CryptoService>('cipherService'
export const syncService = getBackgroundService<any>('syncService');
export const autofillService = getBackgroundService<any>('autofillService');
export const passwordGenerationService = getBackgroundService<any>('passwordGenerationService');
export const browserUtilsService = getBackgroundService<BrowserUtilsService>('browserUtilsService');
export const utilsService = getBackgroundService<UtilsService>('utilsService');
export const appIdService = getBackgroundService<any>('appIdService');
export const i18nService = getBackgroundService<any>('i18nService');

View File

@@ -20,6 +20,7 @@ export default angular
.factory('syncService', backgroundServices.syncService)
.factory('autofillService', backgroundServices.autofillService)
.factory('passwordGenerationService', backgroundServices.passwordGenerationService)
.factory('browserUtilsService', backgroundServices.browserUtilsService)
.factory('utilsService', backgroundServices.utilsService)
.factory('appIdService', backgroundServices.appIdService)
.factory('i18nService', backgroundServices.i18nService)

View File

@@ -1,5 +1,5 @@
import * as angular from 'angular';
import UtilsService from '../../../services/utils.service';
import BrowserUtilsService from '../../../services/browserUtils.service';
import * as template from './environment.component.html';
export class EnvironmentController {
@@ -10,12 +10,12 @@ export class EnvironmentController {
baseUrl: string;
i18n: any;
constructor(private i18nService: any, private $analytics: any, utilsService: UtilsService,
constructor(private i18nService: any, private $analytics: any, browserUtilsService: BrowserUtilsService,
private environmentService: any, private toastr: any, private $timeout: ng.ITimeoutService) {
this.i18n = i18nService;
$timeout(() => {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
this.baseUrl = environmentService.baseUrl || '';

View File

@@ -1,17 +1,18 @@
import * as angular from 'angular';
import { Folder } from '../../../../models/domain/folder';
import { UtilsService } from '../../../../services/abstractions/utils.service';
import * as template from './add-folder.component.html';
import { BrowserUtilsService } from '../../../../services/abstractions/browserUtils.service';
export class AddFolderController {
savePromise: any;
folder: {};
i18n: any;
constructor(private folderService: any, private $state: any, private toastr: any, utilsService: UtilsService,
private $analytics: any, private i18nService: any, $timeout: any) {
constructor(private folderService: any, private $state: any, private toastr: any,
browserUtilsService: BrowserUtilsService, private $analytics: any, private i18nService: any, $timeout: any) {
$timeout(() => {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
document.getElementById('name').focus();
}, 500);

View File

@@ -1,8 +1,9 @@
import * as angular from 'angular';
import { Folder } from '../../../../models/domain/folder';
import UtilsService from '../../../../services/utils.service';
import * as template from './edit-folder.component.html';
import { BrowserUtilsService } from '../../../../services/abstractions/browserUtils.service';
export class EditFolderController {
$transition$: any;
folderId: any;
@@ -11,12 +12,12 @@ export class EditFolderController {
folder: Folder;
constructor($scope: any, $stateParams: any, private folderService: any, private toastr: any, private $state: any,
private SweetAlert: any, utilsService: UtilsService, private $analytics: any, private i18nService: any,
$timeout: any) {
private SweetAlert: any, browserUtilsService: BrowserUtilsService, private $analytics: any,
private i18nService: any, $timeout: any) {
this.i18n = i18nService;
$timeout(() => {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
document.getElementById('name').focus();
}, 500);

View File

@@ -1,6 +1,6 @@
import * as angular from 'angular';
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
import { StorageService } from '../../../services/abstractions/storage.service';
import { UtilsService } from '../../../services/abstractions/utils.service';
import StateService from '../services/state.service';
import * as template from './options.component.html';
@@ -14,12 +14,12 @@ export class OptionsController {
i18n: any;
constructor(private i18nService: any, private $analytics: any, private constantsService: any,
private utilsService: UtilsService, private totpService: any, private stateService: StateService,
private browserUtilsService: BrowserUtilsService, private totpService: any, private stateService: StateService,
private storageService: StorageService, private $timeout: ng.ITimeoutService) {
this.i18n = i18nService;
$timeout(() => {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
this.loadSettings();
@@ -31,7 +31,7 @@ export class OptionsController {
const disableGa = await this.storageService.get<boolean>(
this.constantsService.disableGaKey);
this.disableGa = disableGa || (this.utilsService.isFirefox() && disableGa === undefined);
this.disableGa = disableGa || (this.browserUtilsService.isFirefox() && disableGa === undefined);
this.disableAddLoginNotification = await this.storageService.get<boolean>(
this.constantsService.disableAddLoginNotificationKey);

View File

@@ -1,8 +1,8 @@
import * as angular from 'angular';
import { BrowserType } from '../../../enums/browserType.enum';
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
import { CryptoService } from '../../../services/abstractions/crypto.service';
import { StorageService } from '../../../services/abstractions/storage.service';
import { UtilsService } from '../../../services/abstractions/utils.service';
import ConstantsService from '../../../services/constants.service';
import * as template from './settings.component.html';
@@ -27,17 +27,17 @@ export class SettingsController {
i18n: any;
showOnLocked: boolean;
constructor(private $state: any, private SweetAlert: any, private utilsService: UtilsService,
constructor(private $state: any, private SweetAlert: any, private browserUtilsService: BrowserUtilsService,
private $analytics: any, private i18nService: any, private constantsService: ConstantsService,
private cryptoService: CryptoService, private lockService: any, private storageService: StorageService,
private $timeout: ng.ITimeoutService) {
this.i18n = i18nService;
$timeout(() => {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
this.showOnLocked = !utilsService.isFirefox() && !utilsService.isEdge();
this.showOnLocked = !browserUtilsService.isFirefox() && !browserUtilsService.isEdge();
this.storageService.get(constantsService.lockOptionKey).then((lockOption: number) => {
if (lockOption != null) {
let option = lockOption.toString();
@@ -146,7 +146,7 @@ export class SettingsController {
rate() {
this.$analytics.eventTrack('Rate Extension');
chrome.tabs.create({
url: RateUrls[this.utilsService.getBrowser()],
url: RateUrls[this.browserUtilsService.getBrowser()],
});
}
}

View File

@@ -1,7 +1,7 @@
import * as angular from 'angular';
import * as template from './password-generator.component.html';
import { UtilsService } from '../../../services/abstractions/utils.service';
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
export class PasswordGeneratorController {
$transition$: any;
@@ -13,7 +13,7 @@ export class PasswordGeneratorController {
i18n: any;
constructor(private $state: any, private passwordGenerationService: any,
private toastr: any, private utilsService: UtilsService, private $analytics: any,
private toastr: any, private browserUtilsService: BrowserUtilsService, private $analytics: any,
private i18nService: any, private $timeout: any) {
this.i18n = i18nService;
@@ -41,9 +41,8 @@ export class PasswordGeneratorController {
this.showSelect = this.addState || this.editState;
const self = this;
this.$timeout(() => {
self.utilsService.initListSectionItemListeners(document, angular);
this.browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
}

View File

@@ -1,6 +1,6 @@
import * as template from './tools.component.html';
import { UtilsService } from '../../../services/abstractions/utils.service';
import { BrowserUtilsService } from '../../../services/abstractions/browserUtils.service';
export class ToolsController {
showExport: boolean;
@@ -8,10 +8,10 @@ export class ToolsController {
private webVaultBaseUrl: string = 'https://vault.bitwarden.com';
constructor(private SweetAlert: any, private i18nService: any,
private $analytics: any, private utilsService: UtilsService,
private $analytics: any, private browserUtilsService: BrowserUtilsService,
private environmentService: any) {
this.i18n = i18nService;
this.showExport = !utilsService.isEdge();
this.showExport = !browserUtilsService.isEdge();
if (environmentService.baseUrl) {
this.webVaultBaseUrl = environmentService.baseUrl;
} else if (environmentService.webVaultUrl) {

View File

@@ -2,7 +2,7 @@ angular
.module('bit.vault')
.controller('vaultAddCipherController', function ($scope, $state, $stateParams, cipherService, folderService,
cryptoService, toastr, utilsService, $analytics, i18nService, constantsService, $timeout) {
cryptoService, toastr, browserUtilsService, $analytics, i18nService, constantsService, $timeout) {
$scope.i18n = i18nService;
$scope.constants = constantsService;
$scope.addFieldType = constantsService.fieldType.text.toString();
@@ -31,7 +31,7 @@ angular
}
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
if (!$stateParams.cipher && $scope.cipher.name && $scope.cipher.login && $scope.cipher.login.uri) {
document.getElementById('loginUsername').focus();
@@ -49,7 +49,7 @@ angular
$scope.cipher.type = parseInt($scope.selectedType);
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
};
@@ -106,7 +106,7 @@ angular
});
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
};

View File

@@ -2,9 +2,9 @@ angular
.module('bit.vault')
.controller('vaultAttachmentsController', function ($scope, $state, $stateParams, cipherService, toastr,
SweetAlert, utilsService, $analytics, i18nService, cryptoService, tokenService, $timeout) {
SweetAlert, browserUtilsService, $analytics, i18nService, cryptoService, tokenService, $timeout) {
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
$scope.i18n = i18nService;

View File

@@ -2,14 +2,14 @@ angular
.module('bit.vault')
.controller('vaultController', function ($scope, $rootScope, cipherService, folderService, $q, $state, $stateParams, toastr,
syncService, utilsService, $analytics, i18nService, stateService, $timeout, $window, collectionService, $filter) {
syncService, browserUtilsService, $analytics, i18nService, stateService, $timeout, $window, collectionService, $filter) {
var stateKey = 'vault',
state = stateService.getState(stateKey) || {};
stateService.removeState('viewGrouping');
$scope.i18n = i18nService;
$scope.showGroupingCounts = !utilsService.isEdge();
$scope.disableSearch = utilsService.isEdge();
$scope.showGroupingCounts = !browserUtilsService.isEdge();
$scope.disableSearch = browserUtilsService.isEdge();
document.getElementById('search').focus();
var syncOnLoad = $stateParams.syncOnLoad;

View File

@@ -2,15 +2,15 @@ angular
.module('bit.vault')
.controller('vaultEditCipherController', function ($scope, $state, $stateParams, cipherService, folderService,
cryptoService, toastr, SweetAlert, utilsService, $analytics, i18nService, constantsService, $timeout) {
cryptoService, toastr, SweetAlert, browserUtilsService, $analytics, i18nService, constantsService, $timeout) {
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
document.getElementById('name').focus();
}, 500);
$scope.i18n = i18nService;
$scope.constants = constantsService;
$scope.showAttachments = !utilsService.isEdge();
$scope.showAttachments = !browserUtilsService.isEdge();
$scope.addFieldType = constantsService.fieldType.text.toString();
$scope.selectedType = constantsService.cipherType.login.toString();
var cipherId = $stateParams.cipherId;
@@ -40,7 +40,7 @@ angular
$scope.cipher.type = parseInt($scope.selectedType);
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
};
@@ -123,7 +123,7 @@ angular
});
$timeout(function () {
utilsService.initListSectionItemListeners(document, angular);
browserUtilsService.initListSectionItemListeners(document, angular);
}, 500);
};

View File

@@ -2,11 +2,11 @@ angular
.module('bit.vault')
.controller('vaultViewCipherController', function ($scope, $state, $stateParams, cipherService, toastr,
$analytics, i18nService, utilsService, totpService, $timeout, tokenService, $window, cryptoService, SweetAlert,
$analytics, i18nService, browserUtilsService, totpService, $timeout, tokenService, $window, cryptoService, SweetAlert,
constantsService) {
$scope.constants = constantsService;
$scope.i18n = i18nService;
$scope.showAttachments = !utilsService.isEdge();
$scope.showAttachments = !browserUtilsService.isEdge();
var from = $stateParams.from,
totpInterval = null;
@@ -30,7 +30,7 @@ angular
if (model.login.uri) {
$scope.cipher.showLaunch = model.login.uri.startsWith('http://') || model.login.uri.startsWith('https://');
var domain = utilsService.getDomain(model.login.uri);
var domain = browserUtilsService.getDomain(model.login.uri);
if (domain) {
$scope.cipher.login.website = domain;
}

View File

@@ -2,7 +2,7 @@ angular
.module('bit.vault')
.controller('vaultViewGroupingController', function ($scope, cipherService, folderService, $q, $state, $stateParams, toastr,
syncService, $analytics, i18nService, stateService, utilsService, $timeout, $window, collectionService) {
syncService, $analytics, i18nService, stateService, browserUtilsService, $timeout, $window, collectionService) {
var stateKey = 'viewGrouping',
state = stateService.getState(stateKey) || {};
@@ -60,7 +60,7 @@ angular
var cipherPromise = cipherService.getAllDecryptedForGrouping($scope.grouping.id, $scope.folderGrouping)
.then(function (ciphers) {
if (utilsService.isEdge()) {
if (browserUtilsService.isEdge()) {
// Edge is super slow at sorting
decCiphers = ciphers;
}