1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

add support for add/edit/view of login uris

This commit is contained in:
Kyle Spearrin
2018-03-02 15:37:49 -05:00
parent d67b95421c
commit f952cd5642
9 changed files with 276 additions and 64 deletions

View File

@@ -28,20 +28,6 @@ angular
if (model.login.password) {
$scope.cipher.maskedPassword = $scope.maskValue(model.login.password);
}
if (model.login.uri) {
$scope.cipher.showLaunch = model.login.uri.startsWith('http://') || model.login.uri.startsWith('https://');
var domain = platformUtilsService.getDomain(model.login.uri);
if (domain) {
$scope.cipher.login.website = domain;
}
else {
$scope.cipher.login.website = model.login.uri;
}
}
else {
$scope.cipher.showLaunch = false;
}
}
if (model.login && model.login.totp && (cipherObj.organizationUseTotp || tokenService.getPremium())) {
@@ -90,11 +76,13 @@ angular
}
};
$scope.launchWebsite = function (cipher) {
if (cipher.showLaunch) {
$analytics.eventTrack('Launched Website');
BrowserApi.createNewTab(cipher.login.uri);
$scope.launch = function (uri) {
if (!uri.canLaunch) {
return;
}
$analytics.eventTrack('Launched Login URI');
BrowserApi.createNewTab(uri.uri);
};
$scope.clipboardError = function (e, password) {