mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-02 08:30:14 +01:00
disable issues on edge
This commit is contained in:
parent
bf703b6880
commit
a18e17749f
@ -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,16 +62,18 @@
|
||||
$rootScope.vaultFolders = decFolders;
|
||||
$rootScope.vaultLogins = decLogins;
|
||||
|
||||
// compute item count for each folder
|
||||
for (var i = 0; i < decFolders.length; i++) {
|
||||
var itemCount = 0;
|
||||
for (var j = 0; j < decLogins.length; j++) {
|
||||
if (decLogins[j].folderId === decFolders[i].id) {
|
||||
itemCount++;
|
||||
if ($scope.showFolderCounts) {
|
||||
// compute item count for each folder
|
||||
for (var i = 0; i < decFolders.length; i++) {
|
||||
var itemCount = 0;
|
||||
for (var j = 0; j < decLogins.length; j++) {
|
||||
if (decLogins[j].folderId === decFolders[i].id) {
|
||||
itemCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$rootScope.vaultFolders[i].itemCount = itemCount;
|
||||
$rootScope.vaultFolders[i].itemCount = itemCount;
|
||||
}
|
||||
}
|
||||
|
||||
if (!delayLoad) {
|
||||
|
@ -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) {
|
||||
decLogins = logins.sort(loginSort);
|
||||
if (utilsService.isEdge()) {
|
||||
// Edge is super slow at sorting
|
||||
decLogins = logins;
|
||||
}
|
||||
else {
|
||||
decLogins = logins.sort(loginSort);
|
||||
}
|
||||
});
|
||||
promises.push(loginPromise);
|
||||
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user