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

added favorites box to top of my vault listing

This commit is contained in:
Kyle Spearrin 2017-03-25 15:50:24 -04:00
parent f80ba6b87c
commit 8eaad64dd6

View File

@ -8,11 +8,76 @@
<div ng-show="loading && !folders.length">
<p>Loading...</p>
</div>
<div class="box box-primary" style="margin-bottom: 40px;">
<div class="box-header with-border">
<h3 class="box-title">
<i class="fa fa-star"></i>
Favorites <small>{{favoriteLogins.length}} logins</small>
</h3>
<div class="box-tools">
<div class="btn-group">
<button type="button" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown" uib-tooltip="Options">
<i class="fa fa-gear"></i>
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li>
<a href="#" ng-click="addLogin()">Add Login</a>
</li>
</ul>
</div>
<button type="button" class="btn btn-box-tool" data-widget="collapse" uib-tooltip="Collapse/Expand">
<i class="fa fa-minus"></i>
</button>
</div>
</div>
<div class="box-body" ng-class="{'no-padding': favoriteLogins.length}">
<div ng-show="!favoriteLogins.length">
<p>No favorite logins.</p>
<button type="button" ng-click="addLogin()" class="btn btn-default btn-flat">Add a Login</button>
</div>
<div class="table-responsive" ng-show="favoriteLogins.length">
<table class="table table-striped table-hover table-selectable">
<thead>
<tr>
<th style="width: 75px; min-width: 75px;"></th>
<th>Name</th>
<th style="width: 300px;">Username</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="login in favoriteLogins = (logins | filter: { favorite: true } |
filter: (main.searchVaultText || '') | orderBy: ['name', 'username'])">
<td class="actions">
<button type="button" ng-click="deleteLogin(login)" class="btn btn-link btn-table"
uib-tooltip="Delete">
<i class="fa fa-lg fa-trash"></i>
</button>
<button type="button" ng-click="share(login)" class="btn btn-link btn-table"
uib-tooltip="Share">
<i class="fa fa-lg fa-share-alt"></i>
</button>
</td>
<td ng-click="editLogin(login)">
<span ng-click="$event.stopPropagation()">
<a href="javascript:void(0)" ng-click="editLogin(login)">{{login.name}}</a>
<i class="fa fa-star text-muted" uib-tooltip="Favorite" ng-show="login.favorite"></i>
</span>
</td>
<td ng-click="editLogin(login)">
<span ng-click="$event.stopPropagation()">{{login.username}}</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="box" ng-repeat="folder in folders | orderBy: folderSort"
ng-show="folders.length && (!main.searchVaultText || folderLogins.length)">
<div class="box-header with-border">
<h3 class="box-title">
<i class="fa fa-folder-open"></i>
<i class="fa" ng-class="{'fa-folder-open': folder.id !== null, 'fa-folder-open-o': folder.id === null}"></i>
{{folder.name}} <small>{{folderLogins.length}} logins</small>
</h3>
<div class="box-tools">