mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Show exact matches for the URL at the top of the matching sites list (#108)
This commit is contained in:
committed by
Kyle Spearrin
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) {
|
$scope.$on('syncCompleted', function (event, successfully) {
|
||||||
if ($scope.loaded) {
|
if ($scope.loaded) {
|
||||||
setTimeout(loadVault, 500);
|
setTimeout(loadVault, 500);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<div class="list-grouped">
|
<div class="list-grouped">
|
||||||
<a href="javascript:void(0)" ng-click="fillLogin(login)" class="list-grouped-item condensed"
|
<a href="javascript:void(0)" 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: ['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}}"
|
<span class="btn-list" href="" ng-click="$event.stopPropagation()" 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)"
|
||||||
|
|||||||
Reference in New Issue
Block a user