1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

add launch website button to vault listing

This commit is contained in:
Kyle Spearrin 2017-10-03 14:59:52 -04:00
parent ea65c40d1f
commit aa893af3e6
4 changed files with 26 additions and 0 deletions

View File

@ -153,6 +153,13 @@
toastr.info(type + i18nService.valueCopied); toastr.info(type + i18nService.valueCopied);
}; };
$scope.launchWebsite = function (login) {
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
$analytics.eventTrack('Launched Website From Listing');
chrome.tabs.create({ url: login.uri });
}
};
$scope.$on('syncCompleted', function (event, successfully) { $scope.$on('syncCompleted', function (event, successfully) {
$timeout(loadVault, 500); $timeout(loadVault, 500);
}); });

View File

@ -131,6 +131,13 @@
resetList(matchedLogins); resetList(matchedLogins);
}; };
$scope.launchWebsite = function (login) {
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
$analytics.eventTrack('Launched Website From Listing');
chrome.tabs.create({ url: login.uri });
}
};
function resetList(logins) { function resetList(logins) {
$scope.vaultLogins = logins; $scope.vaultLogins = logins;
$scope.pagedVaultLogins = []; $scope.pagedVaultLogins = [];

View File

@ -51,6 +51,10 @@
data-clipboard-text="{{login.username}}" ng-class="{'disabled': !login.username}"> data-clipboard-text="{{login.username}}" ng-class="{'disabled': !login.username}">
<i class="fa fa-lg fa-user"></i> <i class="fa fa-lg fa-user"></i>
</span> </span>
<span class="btn-list" stop-prop stop-click title="{{i18n.launchWebsite}}" ng-click="launchWebsite(login)"
ng-class="{'disabled': !login.uri}">
<i class="fa fa-lg fa-share-square-o"></i>
</span>
<span class="text"> <span class="text">
{{login.name}} {{login.name}}
<i class="fa fa-share-alt text-muted" ng-if="login.organizationId" title="{{i18n.shared}}"></i> <i class="fa fa-share-alt text-muted" ng-if="login.organizationId" title="{{i18n.shared}}"></i>
@ -79,6 +83,10 @@
data-clipboard-text="{{login.username}}" ng-class="{'disabled': !login.username}"> data-clipboard-text="{{login.username}}" ng-class="{'disabled': !login.username}">
<i class="fa fa-lg fa-user"></i> <i class="fa fa-lg fa-user"></i>
</span> </span>
<span class="btn-list" stop-prop stop-click title="{{i18n.launchWebsite}}" ng-click="launchWebsite(login)"
ng-class="{'disabled': !login.uri}">
<i class="fa fa-lg fa-share-square-o"></i>
</span>
<span class="text"> <span class="text">
{{login.name}} {{login.name}}
<i class="fa fa-share-alt text-muted" ng-if="login.organizationId" title="{{i18n.shared}}"></i> <i class="fa fa-share-alt text-muted" ng-if="login.organizationId" title="{{i18n.shared}}"></i>

View File

@ -32,6 +32,10 @@
data-clipboard-text="{{login.username}}" ng-class="{'disabled': !login.username}"> data-clipboard-text="{{login.username}}" ng-class="{'disabled': !login.username}">
<i class="fa fa-lg fa-user"></i> <i class="fa fa-lg fa-user"></i>
</span> </span>
<span class="btn-list" stop-prop stop-click title="{{i18n.launchWebsite}}" ng-click="launchWebsite(login)"
ng-class="{'disabled': !login.uri}">
<i class="fa fa-lg fa-share-square-o"></i>
</span>
<span class="text"> <span class="text">
{{login.name}} {{login.name}}
<i class="fa fa-share-alt text-muted" ng-if="login.organizationId" title="{{i18n.shared}}"></i> <i class="fa fa-share-alt text-muted" ng-if="login.organizationId" title="{{i18n.shared}}"></i>