mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-01 00:10:39 +02:00
Expand vault all tabs. Search from curr. tab page.
This commit is contained in:
parent
1fa3df1151
commit
41dda3bb61
|
@ -112,7 +112,7 @@
|
|||
url: '/vault',
|
||||
templateUrl: 'app/vault/views/vault.html',
|
||||
controller: 'vaultController',
|
||||
params: { syncOnLoad: false }
|
||||
params: { syncOnLoad: false, searchText: null }
|
||||
})
|
||||
.state('tabs.settings', {
|
||||
url: '/settings',
|
||||
|
|
|
@ -12,6 +12,8 @@ angular
|
|||
|
||||
$scope.logins = [];
|
||||
$scope.loaded = false;
|
||||
$scope.searchText = null;
|
||||
$('#search').focus();
|
||||
|
||||
$scope.$on('$viewContentLoaded', function () {
|
||||
$timeout(loadVault, 100);
|
||||
|
@ -101,6 +103,12 @@ angular
|
|||
return login.localData && login.localData.lastUsedDate ? -1 * login.localData.lastUsedDate : 0;
|
||||
};
|
||||
|
||||
$scope.searchVault = function () {
|
||||
$state.go('tabs.vault', {
|
||||
searchText: $scope.searchText
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on('syncCompleted', function (event, successfully) {
|
||||
if ($scope.loaded) {
|
||||
setTimeout(loadVault, 500);
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
<div class="header">
|
||||
<div class="header header-search">
|
||||
<div class="left">
|
||||
<a href="" ng-click="main.expandVault()"><i class="fa fa-external-link fa-rotate-270 fa-lg"></i></a>
|
||||
</div>
|
||||
<div class="search" ng-style="{'visibility': main.disableSearch ? 'hidden' : 'visible'}">
|
||||
<input type="search" placeholder="{{i18n.searchVault}}" id="search" ng-model="searchText" ng-change="searchVault()" />
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="" ng-click="addLogin()"><i class="fa fa-plus fa-lg"></i></a>
|
||||
</div>
|
||||
<div class="title">{{i18n.currentTab}}</div>
|
||||
</div>
|
||||
<div class="content content-tabs">
|
||||
<div ng-if="logins.length">
|
||||
|
|
|
@ -9,6 +9,7 @@ angular
|
|||
self.xsBody = $window.screen.availHeight < 600;
|
||||
self.smBody = !self.xsBody && $window.screen.availHeight <= 800;
|
||||
self.lgBody = !self.xsBody && !self.smBody && utilsService && !utilsService.isFirefox() && !utilsService.isEdge();
|
||||
self.disableSearch = utilsService.isEdge();
|
||||
|
||||
$scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
|
||||
if (toParams.animation) {
|
||||
|
@ -20,6 +21,11 @@ angular
|
|||
}
|
||||
});
|
||||
|
||||
self.expandVault = function (e) {
|
||||
$analytics.eventTrack('Expand Vault');
|
||||
chrome.tabs.create({ url: $window.location.href });
|
||||
};
|
||||
|
||||
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
|
||||
if (msg.command === 'syncCompleted') {
|
||||
$scope.$broadcast('syncCompleted', msg.successfully);
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<div class="header">
|
||||
<div class="left">
|
||||
<a href="" ng-click="main.expandVault()"><i class="fa fa-external-link fa-rotate-270 fa-lg"></i></a>
|
||||
</div>
|
||||
<div class="title">{{i18n.settings}}</div>
|
||||
</div>
|
||||
<div class="content content-tabs">
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<div class="header">
|
||||
<div class="left">
|
||||
<a href="" ng-click="main.expandVault()"><i class="fa fa-external-link fa-rotate-270 fa-lg"></i></a>
|
||||
</div>
|
||||
<div class="title">{{i18n.tools}}</div>
|
||||
</div>
|
||||
<div class="content content-tabs">
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
$scope.i18n = i18nService;
|
||||
$scope.showFolderCounts = !utilsService.isEdge();
|
||||
$scope.showOnlyFolderView = utilsService.isEdge();
|
||||
$scope.disableSearch = utilsService.isEdge();
|
||||
$('#search').focus();
|
||||
|
||||
var syncOnLoad = $stateParams.syncOnLoad;
|
||||
|
@ -84,8 +83,8 @@
|
|||
}
|
||||
|
||||
$scope.searchText = null;
|
||||
if (state.searchText) {
|
||||
$scope.searchText = state.searchText;
|
||||
if (state.searchText || $stateParams.searchText) {
|
||||
$scope.searchText = state.searchText || $stateParams.searchText;
|
||||
}
|
||||
|
||||
$scope.folderSort = function (item) {
|
||||
|
@ -158,11 +157,6 @@
|
|||
$timeout(loadVault, 500);
|
||||
});
|
||||
|
||||
$scope.expandVault = function (e) {
|
||||
$analytics.eventTrack('Expand Vault');
|
||||
chrome.tabs.create({ url: '/popup/index.html#!/tab/vault' });
|
||||
};
|
||||
|
||||
function storeState() {
|
||||
stateService.saveState(stateKey, {
|
||||
scrollY: getScrollY(),
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div class="header header-search">
|
||||
<div class="left">
|
||||
<a href="" ng-click="expandVault()"><i class="fa fa-external-link fa-rotate-270 fa-lg"></i></a>
|
||||
<a href="" ng-click="main.expandVault()"><i class="fa fa-external-link fa-rotate-270 fa-lg"></i></a>
|
||||
</div>
|
||||
<div class="search" ng-style="{'visibility': disableSearch ? 'hidden' : 'visible'}">
|
||||
<input type="search" placeholder="{{i18n.searchVault}}" ng-model="searchText" id="search" />
|
||||
<div class="search" ng-style="{'visibility': main.disableSearch ? 'hidden' : 'visible'}">
|
||||
<input type="search" placeholder="{{i18n.searchVault}}" id="search" ng-model="searchText" />
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
<div class="right">
|
||||
|
|
|
@ -54,6 +54,11 @@
|
|||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.fa-external-link {
|
||||
vertical-align: 0;
|
||||
margin: 0 -5px 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
|
@ -117,11 +122,6 @@
|
|||
white-space: nowrap;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.fa-external-link {
|
||||
vertical-align: 0;
|
||||
margin: 0 -5px 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user