sort current tab by last used
This commit is contained in:
parent
e01f3fd40c
commit
926e87c6fe
|
@ -94,6 +94,10 @@ angular
|
||||||
return url && url.startsWith(login.uri) ? 0 : 1;
|
return url && url.startsWith(login.uri) ? 0 : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.sortLastUsed = function (login) {
|
||||||
|
return login.localData && login.localData.lastUsedDate ? -1 * login.localData.lastUsedDate : 0;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.$on('syncCompleted', function (event, successfully) {
|
$scope.$on('syncCompleted', function (event, successfully) {
|
||||||
if ($scope.loaded) {
|
if ($scope.loaded) {
|
||||||
setTimeout(loadVault, 500);
|
setTimeout(loadVault, 500);
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
<div class="list-grouped">
|
<div class="list-grouped">
|
||||||
<a href="#" stop-click ng-click="fillLogin(login)" class="list-grouped-item condensed"
|
<a href="#" stop-click ng-click="fillLogin(login)" class="list-grouped-item condensed"
|
||||||
title="{{i18n.autoFill}} {{login.name}}"
|
title="{{i18n.autoFill}} {{login.name}}"
|
||||||
ng-repeat="login in theLogins = (logins | orderBy: [sortUriMatch, 'name', 'username']) track by $index">
|
ng-repeat="login in theLogins = (logins | orderBy: [sortUriMatch, sortLastUsed, 'name', 'username'])
|
||||||
|
track by $index">
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.copyPassword}}"
|
<span class="btn-list" stop-prop stop-click title="{{i18n.copyPassword}}"
|
||||||
ngclipboard ngclipboard-error="clipboardError(e)"
|
ngclipboard ngclipboard-error="clipboardError(e)"
|
||||||
ngclipboard-success="clipboardSuccess(e, i18n.password)"
|
ngclipboard-success="clipboardSuccess(e, i18n.password)"
|
||||||
|
|
Loading…
Reference in New Issue