1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

disable issues on edge

This commit is contained in:
Kyle Spearrin 2017-08-29 09:30:19 -04:00
parent bf703b6880
commit a18e17749f
3 changed files with 22 additions and 12 deletions

View File

@ -7,6 +7,8 @@
state = stateService.getState(stateKey) || {};
$scope.i18n = i18nService;
$scope.showFolderCounts = !utilsService.isEdge();
$scope.disableSearch = utilsService.isEdge();
$('#search').focus();
var syncOnLoad = $stateParams.syncOnLoad;
@ -60,6 +62,7 @@
$rootScope.vaultFolders = decFolders;
$rootScope.vaultLogins = decLogins;
if ($scope.showFolderCounts) {
// compute item count for each folder
for (var i = 0; i < decFolders.length; i++) {
var itemCount = 0;
@ -71,6 +74,7 @@
$rootScope.vaultFolders[i].itemCount = itemCount;
}
}
if (!delayLoad) {
setScrollY();

View File

@ -2,7 +2,7 @@
.module('bit.vault')
.controller('vaultViewFolderController', function ($scope, loginService, folderService, $q, $state, $stateParams, toastr,
syncService, $analytics, i18nService, stateService) {
syncService, $analytics, i18nService, stateService, utilsService) {
var stateKey = 'viewFolder',
state = stateService.getState(stateKey) || {};
@ -41,7 +41,13 @@
var loginPromise = $q.when(loginService.getAllDecryptedForFolder($scope.folder.id));
loginPromise.then(function (logins) {
if (utilsService.isEdge()) {
// Edge is super slow at sorting
decLogins = logins;
}
else {
decLogins = logins.sort(loginSort);
}
});
promises.push(loginPromise);

View File

@ -3,7 +3,7 @@
<a href="" ng-click="expandVault()"><i class="fa fa-external-link fa-rotate-270 fa-lg"></i></a>
</div>
<div class="search">
<input type="search" placeholder="{{i18n.searchVault}}" ng-model="searchText" id="search" />
<input type="search" placeholder="{{i18n.searchVault}}" ng-model="searchText" id="search" ng-disabled="disableSearch" />
<i class="fa fa-search"></i>
</div>
<div class="right">
@ -22,7 +22,7 @@
ng-repeat="folder in vaultFolders | orderBy: folderSort track by $index">
{{folder.name}}
<i class="fa fa-chevron-right fa-lg"></i>
<span class="item-sub-label">{{folder.itemCount}}</span>
<span class="item-sub-label" ng-if="showFolderCounts">{{folder.itemCount}}</span>
</a>
</div>
</div>