mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-29 17:38:04 +01:00
action buttons component
This commit is contained in:
parent
276be2fa87
commit
ad285a7605
@ -64,9 +64,18 @@
|
|||||||
"copyPassword": {
|
"copyPassword": {
|
||||||
"message": "Copy Password"
|
"message": "Copy Password"
|
||||||
},
|
},
|
||||||
|
"copyUri": {
|
||||||
|
"message": "Copy URI"
|
||||||
|
},
|
||||||
"copyUsername": {
|
"copyUsername": {
|
||||||
"message": "Copy Username"
|
"message": "Copy Username"
|
||||||
},
|
},
|
||||||
|
"copyNumber": {
|
||||||
|
"message": "Copy Number"
|
||||||
|
},
|
||||||
|
"copySecurityCode": {
|
||||||
|
"message": "Copy Security Code"
|
||||||
|
},
|
||||||
"autoFill": {
|
"autoFill": {
|
||||||
"message": "Auto-fill"
|
"message": "Auto-fill"
|
||||||
},
|
},
|
||||||
|
@ -140,6 +140,7 @@ var Login = function (obj, alreadyEncrypted, localData) {
|
|||||||
|
|
||||||
var Cipher = function (obj, alreadyEncrypted, localData) {
|
var Cipher = function (obj, alreadyEncrypted, localData) {
|
||||||
this.constantsService = chrome.extension.getBackgroundPage().bg_constantsService;
|
this.constantsService = chrome.extension.getBackgroundPage().bg_constantsService;
|
||||||
|
this.utilsService = chrome.extension.getBackgroundPage().bg_utilsService;
|
||||||
|
|
||||||
buildDomainModel(this, obj, {
|
buildDomainModel(this, obj, {
|
||||||
id: null,
|
id: null,
|
||||||
@ -417,6 +418,9 @@ function buildDomainModel(model, obj, map, alreadyEncrypted, notEncList) {
|
|||||||
case self.constantsService.cipherType.login:
|
case self.constantsService.cipherType.login:
|
||||||
model.login = decObj;
|
model.login = decObj;
|
||||||
model.subTitle = model.login.username;
|
model.subTitle = model.login.username;
|
||||||
|
if (model.login.uri) {
|
||||||
|
model.login.domain = self.utilsService.getDomain(model.login.uri);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case self.constantsService.cipherType.secureNote:
|
case self.constantsService.cipherType.secureNote:
|
||||||
model.secureNote = decObj;
|
model.secureNote = decObj;
|
||||||
|
@ -1,18 +1,41 @@
|
|||||||
angular
|
angular
|
||||||
.module('bit.components')
|
.module('bit.components')
|
||||||
|
|
||||||
.component('actionButtonsComponent', {
|
.component('actionButtons', {
|
||||||
bindings: {
|
bindings: {
|
||||||
uri: '<'
|
cipher: '<',
|
||||||
|
showView: '<',
|
||||||
|
onView: '&'
|
||||||
},
|
},
|
||||||
template: '',
|
templateUrl: 'app/components/views/actionButtons.html',
|
||||||
controller: function (stateService) {
|
controller: function (i18nService, $analytics, constantsService, toastr, $timeout, $window, utilsService) {
|
||||||
this.$onInit = (function () {
|
var ctrl = this;
|
||||||
|
|
||||||
}).bind(this);
|
|
||||||
|
|
||||||
this.$onChanges = (function () {
|
ctrl.$onInit = function () {
|
||||||
|
ctrl.i18n = i18nService;
|
||||||
}).bind(this);
|
ctrl.constants = constantsService;
|
||||||
|
|
||||||
|
ctrl.launch = function () {
|
||||||
|
$timeout(function () {
|
||||||
|
if (ctrl.cipher.login.uri.startsWith('http://') || ctrl.cipher.login.uri.startsWith('https://')) {
|
||||||
|
$analytics.eventTrack('Launched Website From Listing');
|
||||||
|
chrome.tabs.create({ url: ctrl.cipher.login.uri });
|
||||||
|
if (utilsService.inPopup($window)) {
|
||||||
|
$window.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
ctrl.clipboardError = function (e) {
|
||||||
|
toastr.info(i18n.browserNotSupportClipboard);
|
||||||
|
};
|
||||||
|
|
||||||
|
ctrl.clipboardSuccess = function (e, type, aType) {
|
||||||
|
e.clearSelection();
|
||||||
|
$analytics.eventTrack('Copied ' + aType);
|
||||||
|
toastr.info(type + i18nService.valueCopied);
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
38
src/popup/app/components/views/actionButtons.html
Normal file
38
src/popup/app/components/views/actionButtons.html
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<div class="action-buttons">
|
||||||
|
<div ng-if="$ctrl.cipher.type === $ctrl.constants.cipherType.login">
|
||||||
|
<span class="btn-list" stop-prop stop-click title="{{$ctrl.i18n.launchWebsite}}" ng-click="$ctrl.launch()"
|
||||||
|
ng-if="$ctrl.cipher.login.uri && !$ctrl.showView">
|
||||||
|
<i class="fa fa-lg fa-share-square-o"></i>
|
||||||
|
</span>
|
||||||
|
<span class="btn-list" ng-click="$ctrl.onView($ctrl.cipher)" stop-prop stop-click title="{{i18n.view}}"
|
||||||
|
ng-if="$ctrl.showView">
|
||||||
|
<i class="fa fa-lg fa-eye"></i>
|
||||||
|
</span>
|
||||||
|
<span class="btn-list" stop-prop stop-click title="{{$ctrl.i18n.copyUsername}}" ngclipboard
|
||||||
|
ngclipboard-error="$ctrl.clipboardError(e)"
|
||||||
|
ngclipboard-success="$ctrl.clipboardSuccess(e, $ctrl.i18n.username, 'Username')"
|
||||||
|
data-clipboard-text="{{$ctrl.cipher.login.username}}" ng-if="$ctrl.cipher.login.username">
|
||||||
|
<i class="fa fa-lg fa-user"></i>
|
||||||
|
</span>
|
||||||
|
<span class="btn-list" stop-prop stop-click title="{{$ctrl.i18n.copyPassword}}" ngclipboard
|
||||||
|
ngclipboard-error="$ctrl.clipboardError(e)"
|
||||||
|
ngclipboard-success="$ctrl.clipboardSuccess(e, $ctrl.i18n.password, 'Password')"
|
||||||
|
data-clipboard-text="{{$ctrl.cipher.login.password}}" ng-if="$ctrl.cipher.login.password">
|
||||||
|
<i class="fa fa-lg fa-key"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div ng-if="$ctrl.cipher.type === $ctrl.constants.cipherType.card">
|
||||||
|
<span class="btn-list" stop-prop stop-click title="{{$ctrl.i18n.copyNumber}}" ngclipboard
|
||||||
|
ngclipboard-error="$ctrl.clipboardError(e)"
|
||||||
|
ngclipboard-success="$ctrl.clipboardSuccess(e, $ctrl.i18n.number, 'Card Number')"
|
||||||
|
data-clipboard-text="{{$ctrl.cipher.card.number}}" ng-if="$ctrl.cipher.card.number">
|
||||||
|
<i class="fa fa-lg fa-hashtag"></i>
|
||||||
|
</span>
|
||||||
|
<span class="btn-list" stop-prop stop-click title="{{$ctrl.i18n.copySecurityCode}}" ngclipboard
|
||||||
|
ngclipboard-error="$ctrl.clipboardError(e)"
|
||||||
|
ngclipboard-success="$ctrl.clipboardSuccess(e, $ctrl.i18n.securityCode, 'Security Code')"
|
||||||
|
data-clipboard-text="{{$ctrl.cipher.card.code}}" ng-if="$ctrl.cipher.card.code">
|
||||||
|
<i class="fa fa-lg fa-key"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -25,15 +25,17 @@ angular
|
|||||||
url = tabs[0].url;
|
url = tabs[0].url;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.loaded = true;
|
$timeout(function () {
|
||||||
$scope.$apply();
|
$scope.loaded = true;
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
domain = utilsService.getDomain(url);
|
domain = utilsService.getDomain(url);
|
||||||
if (!domain) {
|
if (!domain) {
|
||||||
$scope.loaded = true;
|
$timeout(function () {
|
||||||
$scope.$apply();
|
$scope.loaded = true;
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,23 +44,15 @@ angular
|
|||||||
canAutofill = true;
|
canAutofill = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
loginService.getAllDecryptedForDomain(domain).then(function (logins) {
|
loginService.getAllDecryptedForDomain(domain).then(function (ciphers) {
|
||||||
$scope.loaded = true;
|
$timeout(function () {
|
||||||
$scope.ciphers = ciphers;
|
$scope.loaded = true;
|
||||||
|
$scope.ciphers = ciphers;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.clipboardError = function (e, password) {
|
|
||||||
toastr.info(i18n.browserNotSupportClipboard);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.clipboardSuccess = function (e, type) {
|
|
||||||
e.clearSelection();
|
|
||||||
toastr.info(type + i18nService.valueCopied);
|
|
||||||
$analytics.eventTrack('Copied ' + (type === i18nService.username ? 'Username' : 'Password'));
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.addCipher = function () {
|
$scope.addCipher = function () {
|
||||||
$state.go('addCipher', {
|
$state.go('addCipher', {
|
||||||
animation: 'in-slide-up',
|
animation: 'in-slide-up',
|
||||||
|
@ -21,23 +21,8 @@
|
|||||||
title="{{i18n.autoFill}} {{cipher.name}}"
|
title="{{i18n.autoFill}} {{cipher.name}}"
|
||||||
ng-repeat="cipher in theCiphers = (ciphers | orderBy: [sortUriMatch, sortLastUsed, 'name', 'subTitle'])
|
ng-repeat="cipher in theCiphers = (ciphers | orderBy: [sortUriMatch, sortLastUsed, 'name', 'subTitle'])
|
||||||
track by $index">
|
track by $index">
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.copyPassword}}"
|
<action-buttons cipher="cipher" show-view="true" on-view="viewCipher(cipher)"></action-buttons>
|
||||||
ngclipboard ngclipboard-error="clipboardError(e)"
|
<icon cipher="cipher"></icon>
|
||||||
ngclipboard-success="clipboardSuccess(e, i18n.password)"
|
|
||||||
data-clipboard-text="{{cipher.password}}" ng-class="{'disabled': !cipher.password}">
|
|
||||||
<i class="fa fa-lg fa-key"></i>
|
|
||||||
</span>
|
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.copyUsername}}"
|
|
||||||
ngclipboard ngclipboard-error="clipboardError(e)"
|
|
||||||
ngclipboard-success="clipboardSuccess(e, i18n.username)"
|
|
||||||
data-clipboard-text="{{cipher.username}}" ng-class="{'disabled': !cipher.username}">
|
|
||||||
<i class="fa fa-lg fa-user"></i>
|
|
||||||
</span>
|
|
||||||
<span class="btn-list" ng-click="viewCipher(cipher)" stop-prop stop-click
|
|
||||||
title="{{i18n.edit}} {{cipher.name}}">
|
|
||||||
<i class="fa fa-lg fa-pencil"></i>
|
|
||||||
</span>
|
|
||||||
<icon uri="cipher.uri"></icon>
|
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{cipher.name}}
|
{{cipher.name}}
|
||||||
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{i18n.shared}}"></i>
|
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{i18n.shared}}"></i>
|
||||||
|
@ -161,28 +161,6 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.clipboardError = function (e) {
|
|
||||||
toastr.info(i18n.browserNotSupportClipboard);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.clipboardSuccess = function (e, type) {
|
|
||||||
e.clearSelection();
|
|
||||||
$analytics.eventTrack('Copied ' + (type === i18nService.username ? 'Username' : 'Password'));
|
|
||||||
toastr.info(type + i18nService.valueCopied);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.launchWebsite = function (cipher) {
|
|
||||||
$timeout(function () {
|
|
||||||
if (cipher.uri.startsWith('http://') || cipher.uri.startsWith('https://')) {
|
|
||||||
$analytics.eventTrack('Launched Website From Listing');
|
|
||||||
chrome.tabs.create({ url: cipher.uri });
|
|
||||||
if (utilsService.inPopup($window)) {
|
|
||||||
$window.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.$on('syncCompleted', function (event, successfully) {
|
$scope.$on('syncCompleted', function (event, successfully) {
|
||||||
$timeout(loadVault, 500);
|
$timeout(loadVault, 500);
|
||||||
});
|
});
|
||||||
|
@ -111,9 +111,9 @@ angular
|
|||||||
return masked;
|
return masked;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.clipboardSuccess = function (e, type) {
|
$scope.clipboardSuccess = function (e, type, aType) {
|
||||||
e.clearSelection();
|
e.clearSelection();
|
||||||
$analytics.eventTrack('Copied ' + (type === i18nService.username ? 'Username' : 'Password'));
|
$analytics.eventTrack('Copied ' + aType);
|
||||||
toastr.info(type + i18nService.valueCopied);
|
toastr.info(type + i18nService.valueCopied);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -130,18 +130,6 @@
|
|||||||
resetList(matchedCiphers);
|
resetList(matchedCiphers);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.launchWebsite = function (cipher) {
|
|
||||||
$timeout(function () {
|
|
||||||
if (cipher.uri.startsWith('http://') || cipher.uri.startsWith('https://')) {
|
|
||||||
$analytics.eventTrack('Launched Website From Listing');
|
|
||||||
chrome.tabs.create({ url: cipher.uri });
|
|
||||||
if (utilsService.inPopup($window)) {
|
|
||||||
$window.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
function resetList(ciphers) {
|
function resetList(ciphers) {
|
||||||
$scope.vaultCiphers = ciphers;
|
$scope.vaultCiphers = ciphers;
|
||||||
$scope.pagedVaultCiphers = [];
|
$scope.pagedVaultCiphers = [];
|
||||||
@ -201,16 +189,6 @@
|
|||||||
}, 200);
|
}, 200);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.clipboardError = function (e) {
|
|
||||||
toastr.info(i18n.browserNotSupportClipboard);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.clipboardSuccess = function (e, type) {
|
|
||||||
e.clearSelection();
|
|
||||||
$analytics.eventTrack('Copied ' + (type === i18nService.username ? 'Username' : 'Password'));
|
|
||||||
toastr.info(type + i18nService.valueCopied);
|
|
||||||
};
|
|
||||||
|
|
||||||
function storeState() {
|
function storeState() {
|
||||||
angular.extend(state, {
|
angular.extend(state, {
|
||||||
scrollY: getScrollY(),
|
scrollY: getScrollY(),
|
||||||
|
@ -41,20 +41,7 @@
|
|||||||
class="list-grouped-item condensed" title="{{i18n.edit}} {{cipher.name}}"
|
class="list-grouped-item condensed" title="{{i18n.edit}} {{cipher.name}}"
|
||||||
ng-repeat="cipher in vaultFolderCiphers = (vaultCiphers | filter: { folderId: folder.id }
|
ng-repeat="cipher in vaultFolderCiphers = (vaultCiphers | filter: { folderId: folder.id }
|
||||||
| filter: searchCiphers() | orderBy: ['name', 'subTitle']) track by $index">
|
| filter: searchCiphers() | orderBy: ['name', 'subTitle']) track by $index">
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.copyPassword}}" ngclipboard
|
<action-buttons cipher="cipher"></action-buttons>
|
||||||
ngclipboard-error="clipboardError(e)" ngclipboard-success="clipboardSuccess(e, i18n.password)"
|
|
||||||
data-clipboard-text="{{cipher.password}}" ng-class="{'disabled': !cipher.password}">
|
|
||||||
<i class="fa fa-lg fa-key"></i>
|
|
||||||
</span>
|
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.copyUsername}}" ngclipboard
|
|
||||||
ngclipboard-error="clipboardError(e)" ngclipboard-success="clipboardSuccess(e, i18n.username)"
|
|
||||||
data-clipboard-text="{{cipher.username}}" ng-class="{'disabled': !cipher.username}">
|
|
||||||
<i class="fa fa-lg fa-user"></i>
|
|
||||||
</span>
|
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.launchWebsite}}" ng-click="launchWebsite(cipher)"
|
|
||||||
ng-class="{'disabled': !cipher.uri}">
|
|
||||||
<i class="fa fa-lg fa-share-square-o"></i>
|
|
||||||
</span>
|
|
||||||
<icon cipher="cipher"></icon>
|
<icon cipher="cipher"></icon>
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{cipher.name}}
|
{{cipher.name}}
|
||||||
@ -74,20 +61,7 @@
|
|||||||
class="list-section-item condensed" title="{{i18n.edit}} {{cipher.name}}"
|
class="list-section-item condensed" title="{{i18n.edit}} {{cipher.name}}"
|
||||||
ng-repeat="cipher in searchResults = (vaultCiphers | filter: searchCiphers() | orderBy: ['name', 'subTitle'])
|
ng-repeat="cipher in searchResults = (vaultCiphers | filter: searchCiphers() | orderBy: ['name', 'subTitle'])
|
||||||
track by $index">
|
track by $index">
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.copyPassword}}" ngclipboard
|
<action-buttons cipher="cipher"></action-buttons>
|
||||||
ngclipboard-error="clipboardError(e)" ngclipboard-success="clipboardSuccess(e, i18n.password)"
|
|
||||||
data-clipboard-text="{{cipher.password}}" ng-class="{'disabled': !cipher.password}">
|
|
||||||
<i class="fa fa-lg fa-key"></i>
|
|
||||||
</span>
|
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.copyUsername}}" ngclipboard
|
|
||||||
ngclipboard-error="clipboardError(e)" ngclipboard-success="clipboardSuccess(e, i18n.username)"
|
|
||||||
data-clipboard-text="{{cipher.username}}" ng-class="{'disabled': !cipher.username}">
|
|
||||||
<i class="fa fa-lg fa-user"></i>
|
|
||||||
</span>
|
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.launchWebsite}}" ng-click="launchWebsite(cipher)"
|
|
||||||
ng-class="{'disabled': !cipher.uri}">
|
|
||||||
<i class="fa fa-lg fa-share-square-o"></i>
|
|
||||||
</span>
|
|
||||||
<icon cipher="cipher"></icon>
|
<icon cipher="cipher"></icon>
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{cipher.name}}
|
{{cipher.name}}
|
||||||
|
@ -21,43 +21,58 @@
|
|||||||
</div>
|
</div>
|
||||||
<div ng-if="cipher.type === constants.cipherType.login">
|
<div ng-if="cipher.type === constants.cipherType.login">
|
||||||
<div class="list-section-item" ng-if="cipher.login.uri" title="{{cipher.login.uri}}">
|
<div class="list-section-item" ng-if="cipher.login.uri" title="{{cipher.login.uri}}">
|
||||||
<a class="btn-list" href="" title="{{i18n.launchWebsite}}" ng-click="launchWebsite(cipher)"
|
<div class="action-buttons">
|
||||||
ng-show="cipher.showLaunch">
|
<a class="btn-list" href="" title="{{i18n.launchWebsite}}" ng-click="launchWebsite(cipher)"
|
||||||
<i class="fa fa-lg fa-share-square-o"></i>
|
ng-show="cipher.showLaunch">
|
||||||
</a>
|
<i class="fa fa-lg fa-share-square-o"></i>
|
||||||
|
</a>
|
||||||
|
<a class="btn-list" href="" title="{{i18n.copyUri}}"
|
||||||
|
ngclipboard ngclipboard-error="clipboardError(e)"
|
||||||
|
ngclipboard-success="clipboardSuccess(e, i18n.uri, 'URI')"
|
||||||
|
data-clipboard-text="{{cipher.login.uri}}">
|
||||||
|
<i class="fa fa-lg fa-clipboard"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span class="item-label">{{i18n.website}}</span>
|
<span class="item-label">{{i18n.website}}</span>
|
||||||
{{cipher.login.website}}
|
{{cipher.login.website}}
|
||||||
</div>
|
</div>
|
||||||
<div class="list-section-item" ng-if="cipher.login.username">
|
<div class="list-section-item" ng-if="cipher.login.username">
|
||||||
<a class="btn-list" href="" title="{{i18n.copyUsername}}"
|
<div class="action-buttons">
|
||||||
ngclipboard ngclipboard-error="clipboardError(e)"
|
<a class="btn-list" href="" title="{{i18n.copyUsername}}"
|
||||||
ngclipboard-success="clipboardSuccess(e, i18n.username)"
|
ngclipboard ngclipboard-error="clipboardError(e)"
|
||||||
data-clipboard-text="{{cipher.login.username}}">
|
ngclipboard-success="clipboardSuccess(e, i18n.username, 'Username')"
|
||||||
<i class="fa fa-lg fa-clipboard"></i>
|
data-clipboard-text="{{cipher.login.username}}">
|
||||||
</a>
|
<i class="fa fa-lg fa-clipboard"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span class="item-label">{{i18n.username}}</span>
|
<span class="item-label">{{i18n.username}}</span>
|
||||||
<span id="username">{{cipher.login.username}}</span>
|
<span id="username">{{cipher.login.username}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-section-item" ng-if="cipher.login.password">
|
<div class="list-section-item" ng-if="cipher.login.password">
|
||||||
<a class="btn-list" href="" title="{{i18n.copyPassword}}"
|
<div class="action-buttons">
|
||||||
ngclipboard ngclipboard-error="clipboardError(e)"
|
<a class="btn-list" href="" title="{{i18n.togglePassword}}" ng-click="togglePassword()">
|
||||||
ngclipboard-success="clipboardSuccess(e, i18n.password)"
|
<i class="fa fa-lg" ng-class="[{'fa-eye': !showPassword}, {'fa-eye-slash': showPassword}]"></i>
|
||||||
data-clipboard-text="{{cipher.login.password}}">
|
</a>
|
||||||
<i class="fa fa-lg fa-clipboard"></i>
|
<a class="btn-list" href="" title="{{i18n.copyPassword}}"
|
||||||
</a>
|
ngclipboard ngclipboard-error="clipboardError(e)"
|
||||||
<a class="btn-list" href="" title="{{i18n.togglePassword}}" ng-click="togglePassword()">
|
ngclipboard-success="clipboardSuccess(e, i18n.password, 'Password')"
|
||||||
<i class="fa fa-lg" ng-class="[{'fa-eye': !showPassword}, {'fa-eye-slash': showPassword}]"></i>
|
data-clipboard-text="{{cipher.login.password}}">
|
||||||
</a>
|
<i class="fa fa-lg fa-clipboard"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span class="item-label">{{i18n.password}}</span>
|
<span class="item-label">{{i18n.password}}</span>
|
||||||
<span ng-show="!showPassword" class="monospaced">{{cipher.maskedPassword}}</span>
|
<span ng-show="!showPassword" class="monospaced">{{cipher.maskedPassword}}</span>
|
||||||
<span id="password" ng-show="showPassword" class="monospaced">{{cipher.login.password}}</span>
|
<span id="password" ng-show="showPassword" class="monospaced">{{cipher.login.password}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-section-item totp" ng-class="{'low': totpLow}" ng-if="cipher.login.totp && totpCode">
|
<div class="list-section-item totp" ng-class="{'low': totpLow}" ng-if="cipher.login.totp && totpCode">
|
||||||
<a class="btn-list" href="" title="{{i18n.copyVerificationCode}}"
|
<div class="action-buttons">
|
||||||
ngclipboard ngclipboard-error="clipboardError(e)"
|
<a class="btn-list" href="" title="{{i18n.copyVerificationCode}}"
|
||||||
ngclipboard-success="clipboardSuccess(e, i18n.verificationCodeTotp)" data-clipboard-text="{{totpCode}}">
|
ngclipboard ngclipboard-error="clipboardError(e)"
|
||||||
<i class="fa fa-lg fa-clipboard"></i>
|
ngclipboard-success="clipboardSuccess(e, i18n.verificationCodeTotp, 'TOTP')"
|
||||||
</a>
|
data-clipboard-text="{{totpCode}}">
|
||||||
|
<i class="fa fa-lg fa-clipboard"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span class="totp-countdown">
|
<span class="totp-countdown">
|
||||||
<span class="totp-sec">{{totpSec}}</span>
|
<span class="totp-sec">{{totpSec}}</span>
|
||||||
<svg>
|
<svg>
|
||||||
@ -70,26 +85,31 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="item-label">{{i18n.verificationCodeTotp}}</span>
|
<span class="item-label">{{i18n.verificationCodeTotp}}</span>
|
||||||
<span id="totp" class="totp-code">{{totpCodeFormatted}}</span>
|
<span id="totp" class="totp-code">{{totpCodeFormatted}}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="cipher.type === constants.cipherType.card">
|
<div ng-if="cipher.type === constants.cipherType.card">
|
||||||
<div class="list-section-item" ng-if="cipher.card.cardholderName">
|
<div class="list-section-item" ng-if="cipher.card.cardholderName">
|
||||||
<a class="btn-list" href="" title="{{i18n.copy}}"
|
<div class="action-buttons">
|
||||||
ngclipboard ngclipboard-error="clipboardError(e)"
|
<a class="btn-list" href="" title="{{i18n.copy}}"
|
||||||
ngclipboard-success="clipboardSuccess(e, i18n.cardholderName)"
|
ngclipboard ngclipboard-error="clipboardError(e)"
|
||||||
data-clipboard-text="{{cipher.card.cardholderName}}">
|
ngclipboard-success="clipboardSuccess(e, i18n.cardholderName, 'Cardholder Name')"
|
||||||
<i class="fa fa-lg fa-clipboard"></i>
|
data-clipboard-text="{{cipher.card.cardholderName}}">
|
||||||
</a>
|
<i class="fa fa-lg fa-clipboard"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span class="item-label">{{i18n.cardholderName}}</span>
|
<span class="item-label">{{i18n.cardholderName}}</span>
|
||||||
<span id="username">{{cipher.card.cardholderName}}</span>
|
<span id="username">{{cipher.card.cardholderName}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-section-item" ng-if="cipher.card.number">
|
<div class="list-section-item" ng-if="cipher.card.number">
|
||||||
<a class="btn-list" href="" title="{{i18n.copy}}"
|
<div class="action-buttons">
|
||||||
ngclipboard ngclipboard-error="clipboardError(e)"
|
<a class="btn-list" href="" title="{{i18n.copy}}"
|
||||||
ngclipboard-success="clipboardSuccess(e, i18n.number)"
|
ngclipboard ngclipboard-error="clipboardError(e)"
|
||||||
data-clipboard-text="{{cipher.card.number}}">
|
ngclipboard-success="clipboardSuccess(e, i18n.number, 'Number')"
|
||||||
<i class="fa fa-lg fa-clipboard"></i>
|
data-clipboard-text="{{cipher.card.number}}">
|
||||||
</a>
|
<i class="fa fa-lg fa-clipboard"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span class="item-label">{{i18n.number}}</span>
|
<span class="item-label">{{i18n.number}}</span>
|
||||||
<span id="username">{{cipher.card.number}}</span>
|
<span id="username">{{cipher.card.number}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -127,15 +147,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="list-section-items">
|
<div class="list-section-items">
|
||||||
<div class="list-section-item" ng-repeat="field in cipher.fields">
|
<div class="list-section-item" ng-repeat="field in cipher.fields">
|
||||||
<a class="btn-list" href="" title="{{i18n.copyValue}}" ngclipboard ngclipboard-error="clipboardError(e)"
|
<div class="action-buttons">
|
||||||
ngclipboard-success="clipboardSuccess(e, i18n.value)" data-clipboard-text="{{field.value}}"
|
<a class="btn-list" href="" title="{{i18n.toggleValue}}" ng-click="toggleFieldValue(field)"
|
||||||
ng-if="field.type !== constants.fieldType.boolean && field.value">
|
ng-if="field.type === constants.fieldType.hidden">
|
||||||
<i class="fa fa-lg fa-clipboard"></i>
|
<i class="fa fa-lg" ng-class="[{'fa-eye': !field.showValue}, {'fa-eye-slash': field.showValue}]"></i>
|
||||||
</a>
|
</a>
|
||||||
<a class="btn-list" href="" title="{{i18n.toggleValue}}" ng-click="toggleFieldValue(field)"
|
<a class="btn-list" href="" title="{{i18n.copyValue}}" ngclipboard ngclipboard-error="clipboardError(e)"
|
||||||
ng-if="field.type === constants.fieldType.hidden">
|
ngclipboard-success="clipboardSuccess(e, i18n.value, 'Field')" data-clipboard-text="{{field.value}}"
|
||||||
<i class="fa fa-lg" ng-class="[{'fa-eye': !field.showValue}, {'fa-eye-slash': field.showValue}]"></i>
|
ng-if="field.type !== constants.fieldType.boolean && field.value">
|
||||||
</a>
|
<i class="fa fa-lg fa-clipboard"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span class="item-label">{{field.name}}</span>
|
<span class="item-label">{{field.name}}</span>
|
||||||
<div ng-if="field.type === constants.fieldType.text">
|
<div ng-if="field.type === constants.fieldType.text">
|
||||||
{{field.value || ' '}}
|
{{field.value || ' '}}
|
||||||
|
@ -22,20 +22,8 @@
|
|||||||
<a href="#" stop-click ng-click="viewCipher(cipher)"
|
<a href="#" stop-click ng-click="viewCipher(cipher)"
|
||||||
class="list-section-item condensed" title="{{i18n.edit}} {{cipher.name}}"
|
class="list-section-item condensed" title="{{i18n.edit}} {{cipher.name}}"
|
||||||
ng-repeat="cipher in pagedVaultCiphers track by $index">
|
ng-repeat="cipher in pagedVaultCiphers track by $index">
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.copyPassword}}" ngclipboard
|
<action-buttons cipher="cipher"></action-buttons>
|
||||||
ngclipboard-error="clipboardError(e)" ngclipboard-success="clipboardSuccess(e, i18n.password)"
|
<icon cipher="cipher"></icon>
|
||||||
data-clipboard-text="{{cipher.password}}" ng-class="{'disabled': !cipher.password}">
|
|
||||||
<i class="fa fa-lg fa-key"></i>
|
|
||||||
</span>
|
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.copyUsername}}" ngclipboard
|
|
||||||
ngclipboard-error="clipboardError(e)" ngclipboard-success="clipboardSuccess(e, i18n.username)"
|
|
||||||
data-clipboard-text="{{cipher.username}}" ng-class="{'disabled': !cipher.username}">
|
|
||||||
<i class="fa fa-lg fa-user"></i>
|
|
||||||
</span>
|
|
||||||
<span class="btn-list" stop-prop stop-click title="{{i18n.launchWebsite}}" ng-click="launchWebsite(cipher)"
|
|
||||||
ng-class="{'disabled': !cipher.uri}">
|
|
||||||
<i class="fa fa-lg fa-share-square-o"></i>
|
|
||||||
</span>
|
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{cipher.name}}
|
{{cipher.name}}
|
||||||
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{i18n.shared}}"></i>
|
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{i18n.shared}}"></i>
|
||||||
|
@ -366,29 +366,34 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-list {
|
|
||||||
cursor: pointer;
|
|
||||||
|
.action-buttons {
|
||||||
float: right;
|
float: right;
|
||||||
display: block;
|
|
||||||
padding: 10px 8px 10px 8px;
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
color: @brand-primary;
|
|
||||||
|
|
||||||
&:hover, &:focus {
|
.btn-list {
|
||||||
color: darken(@brand-primary, 10%);
|
float: left;
|
||||||
}
|
cursor: pointer;
|
||||||
|
padding: 10px 8px;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: @brand-primary;
|
||||||
|
|
||||||
&.disabled {
|
&:hover, &:focus {
|
||||||
color: @list-icon-color;
|
color: darken(@brand-primary, 10%);
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: @list-icon-color;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&:first-child {
|
&.disabled {
|
||||||
padding-right: 2px !important;
|
color: @list-icon-color;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: @list-icon-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
padding-right: 2px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,8 +417,10 @@
|
|||||||
&.condensed {
|
&.condensed {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
|
|
||||||
.btn-list {
|
.action-buttons {
|
||||||
padding: 8px 5px;
|
.btn-list {
|
||||||
|
padding: 8px 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:hover):focus {
|
&:not(:hover):focus {
|
||||||
|
@ -284,7 +284,8 @@ function initLoginService() {
|
|||||||
ciphersToReturn = [];
|
ciphersToReturn = [];
|
||||||
|
|
||||||
for (var i = 0; i < ciphers.length; i++) {
|
for (var i = 0; i < ciphers.length; i++) {
|
||||||
if (ciphers[i].domain && matchingDomains.indexOf(ciphers[i].domain) > -1) {
|
if (ciphers[i].type === self.constantsService.cipherType.login && ciphers[i].login.domain &&
|
||||||
|
matchingDomains.indexOf(ciphers[i].login.domain) > -1) {
|
||||||
ciphersToReturn.push(ciphers[i]);
|
ciphersToReturn.push(ciphers[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user