one time bind various props
This commit is contained in:
parent
0c8ae91d83
commit
358fb9b277
|
@ -242,6 +242,9 @@
|
|||
"edit": {
|
||||
"message": "Edit"
|
||||
},
|
||||
"view": {
|
||||
"message": "View"
|
||||
},
|
||||
"noItemsInList": {
|
||||
"message": "There are no items to list."
|
||||
},
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<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()"
|
||||
<span class="btn-list" stop-prop stop-click title="{{::$ctrl.i18n.launchWebsite}}" ng-click="$ctrl.launch()"
|
||||
ng-if="!$ctrl.showView" ng-class="{disabled: !$ctrl.cipher.login.uri}">
|
||||
<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}}"
|
||||
<span class="btn-list" ng-click="$ctrl.onView($ctrl.cipher)" stop-prop stop-click title="{{::$ctrl.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
|
||||
<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-class="{disabled: !$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
|
||||
<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-class="{disabled: !$ctrl.cipher.login.password}">
|
||||
|
@ -22,17 +22,17 @@
|
|||
</span>
|
||||
</div>
|
||||
<div ng-if="$ctrl.cipher.type === $ctrl.constants.cipherType.card">
|
||||
<span class="btn-list" ng-click="$ctrl.onView($ctrl.cipher)" stop-prop stop-click title="{{i18n.view}}"
|
||||
<span class="btn-list" ng-click="$ctrl.onView($ctrl.cipher)" stop-prop stop-click title="{{::$ctrl.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.copyNumber}}" ngclipboard
|
||||
<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-class="{disabled: !$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
|
||||
<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-class="{disabled: !$ctrl.cipher.card.code}">
|
||||
|
@ -40,7 +40,7 @@
|
|||
</span>
|
||||
</div>
|
||||
<div ng-if="$ctrl.cipher.type === $ctrl.constants.cipherType.identity">
|
||||
<span class="btn-list" ng-click="$ctrl.onView($ctrl.cipher)" stop-prop stop-click title="{{i18n.view}}"
|
||||
<span class="btn-list" ng-click="$ctrl.onView($ctrl.cipher)" stop-prop stop-click title="{{::$ctrl.i18n.view}}"
|
||||
ng-if="$ctrl.showView">
|
||||
<i class="fa fa-lg fa-eye"></i>
|
||||
</span>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<a href="#" stop-click ng-click="$ctrl.select(cipher)" class="list-section-item condensed"
|
||||
title="{{$ctrl.selectionTitle}}" ng-repeat="cipher in $ctrl.ciphers track by $index">
|
||||
title="{{::$ctrl.selectionTitle}}" ng-repeat="cipher in $ctrl.ciphers track by $index">
|
||||
<action-buttons cipher="cipher" show-view="true" on-view="$ctrl.view(cipher)"></action-buttons>
|
||||
<icon cipher="cipher"></icon>
|
||||
<span class="text">
|
||||
{{cipher.name}}
|
||||
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{$ctrl.i18n.shared}}"></i>
|
||||
<i class="fa fa-paperclip text-muted" ng-if="cipher.attachments" title="{{$ctrl.i18n.attachments}}"></i>
|
||||
<i class="fa fa-share-alt text-muted" ng-if="::cipher.organizationId" title="{{::$ctrl.i18n.shared}}"></i>
|
||||
<i class="fa fa-paperclip text-muted" ng-if="cipher.attachments" title="{{::$ctrl.i18n.attachments}}"></i>
|
||||
</span>
|
||||
<span class="detail">{{cipher.subTitle}}</span>
|
||||
</a>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<a href="" ng-click="main.expandVault()"><i class="fa fa-external-link fa-rotate-270 fa-lg"></i></a>
|
||||
</div>
|
||||
<div class="search" ng-style="{'visibility': main.disableSearch ? 'hidden' : 'visible'}">
|
||||
<input type="search" placeholder="{{i18n.searchVault}}" id="search" ng-model="searchText" />
|
||||
<input type="search" placeholder="{{::i18n.searchVault}}" id="search" ng-model="searchText" />
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
<div class="right">
|
||||
|
@ -16,7 +16,7 @@
|
|||
<div class="list">
|
||||
<div class="list-section" style="padding-bottom: 0;">
|
||||
<div class="list-section-header">
|
||||
{{i18n.folders}}
|
||||
{{::i18n.folders}}
|
||||
<span>{{vaultFolders.length}}</span>
|
||||
</div>
|
||||
<a href="#" stop-click ng-click="viewFolder(folder)" class="list-section-item"
|
||||
|
@ -38,15 +38,15 @@
|
|||
<i class="fa fa-folder-open"></i> {{folder.name}}
|
||||
</div>
|
||||
<a href="#" stop-click ng-click="viewCipher(cipher)"
|
||||
class="list-grouped-item condensed" title="{{i18n.edit}} {{cipher.name}}"
|
||||
class="list-grouped-item condensed" title="{{::i18n.view}}"
|
||||
ng-repeat="cipher in vaultFolderCiphers = (vaultCiphers | filter: { folderId: folder.id }
|
||||
| filter: searchCiphers() | orderBy: ['name', 'subTitle']) track by $index">
|
||||
<action-buttons cipher="cipher"></action-buttons>
|
||||
<icon cipher="cipher"></icon>
|
||||
<span class="text">
|
||||
{{cipher.name}}
|
||||
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{i18n.shared}}"></i>
|
||||
<i class="fa fa-paperclip text-muted" ng-if="cipher.attachments" title="{{i18n.attachments}}"></i>
|
||||
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{::i18n.shared}}"></i>
|
||||
<i class="fa fa-paperclip text-muted" ng-if="cipher.attachments" title="{{::i18n.attachments}}"></i>
|
||||
</span>
|
||||
<span class="detail">{{cipher.subTitle}}</span>
|
||||
</a>
|
||||
|
@ -58,15 +58,15 @@
|
|||
<div class="list">
|
||||
<div class="list-section" style="padding-top: 0; padding-bottom: 0;">
|
||||
<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.view}}"
|
||||
ng-repeat="cipher in searchResults = (vaultCiphers | filter: searchCiphers() | orderBy: ['name', 'subTitle'])
|
||||
track by $index">
|
||||
<action-buttons cipher="cipher"></action-buttons>
|
||||
<icon cipher="cipher"></icon>
|
||||
<span class="text">
|
||||
{{cipher.name}}
|
||||
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{i18n.shared}}"></i>
|
||||
<i class="fa fa-paperclip text-muted" ng-if="cipher.attachments" title="{{i18n.attachments}}"></i>
|
||||
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{::i18n.shared}}"></i>
|
||||
<i class="fa fa-paperclip text-muted" ng-if="cipher.attachments" title="{{::i18n.attachments}}"></i>
|
||||
</span>
|
||||
<span class="detail">{{cipher.subTitle}}</span>
|
||||
</a>
|
||||
|
@ -76,7 +76,7 @@
|
|||
<div class="centered-message" ng-if="loaded && !vaultCiphers.length">
|
||||
<p>
|
||||
{{i18n.noItemsInList}}
|
||||
<button ng-click="addCipher()" style="margin-top: 20px;" class="btn btn-link btn-block">{{i18n.addLogin}}</button>
|
||||
<button ng-click="addCipher()" style="margin-top: 20px;" class="btn btn-link btn-block">{{::i18n.addLogin}}</button>
|
||||
</p>
|
||||
</div>
|
||||
<div class="page-loading" ng-if="!loaded">
|
||||
|
|
Loading…
Reference in New Issue