Show exact matches for the URL at the top of the matching sites list (#108)
This commit is contained in:
parent
0db94629be
commit
4676f045af
|
@ -106,6 +106,11 @@ angular
|
|||
});
|
||||
};
|
||||
|
||||
$scope.sortUriMatch = function(login) {
|
||||
// exact matches should sort earlier.
|
||||
return url && url.startsWith(login.uri) ? 0 : 1;
|
||||
}
|
||||
|
||||
$scope.$on('syncCompleted', function (event, successfully) {
|
||||
if ($scope.loaded) {
|
||||
setTimeout(loadVault, 500);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="list-grouped">
|
||||
<a href="javascript:void(0)" ng-click="fillLogin(login)" class="list-grouped-item condensed"
|
||||
title="{{i18n.autoFill}} {{login.name}}"
|
||||
ng-repeat="login in theLogins = (logins | orderBy: ['name', 'username']) track by $index">
|
||||
ng-repeat="login in theLogins = (logins | orderBy: [sortUriMatch, 'name', 'username']) track by $index">
|
||||
<span class="btn-list" href="" ng-click="$event.stopPropagation()" title="{{i18n.copyPassword}}"
|
||||
ngclipboard ngclipboard-error="clipboardError(e)"
|
||||
ngclipboard-success="clipboardSuccess(e, i18n.password)"
|
||||
|
|
Loading…
Reference in New Issue