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

rework share pages

This commit is contained in:
Kyle Spearrin 2017-02-23 00:45:54 -05:00
parent ccc527f329
commit bc5c738c25
18 changed files with 273 additions and 280 deletions

View File

@ -99,29 +99,17 @@ angular
controller: 'toolsController',
data: { pageTitle: 'Tools' }
})
.state('backend.sharedLogins', {
url: '^/shared/logins',
templateUrl: 'app/shared/views/sharedLogins.html',
controller: 'sharedLoginsController',
data: { pageTitle: 'Shared Logins' }
.state('backend.shared', {
url: '^/shared',
templateUrl: 'app/shared/views/shared.html',
controller: 'sharedController',
data: { pageTitle: 'Shared' }
})
.state('backend.sharedLoginsMe', {
url: '^/shared/logins/me',
templateUrl: 'app/shared/views/sharedLoginsMe.html',
controller: 'sharedLoginsMeController',
data: { pageTitle: 'Logins Shared with Me' }
})
.state('backend.sharedFolders', {
url: '^/shared/folders',
templateUrl: 'app/shared/views/sharedFolders.html',
controller: 'sharedFoldersController',
data: { pageTitle: 'Shared Folders' }
})
.state('backend.sharedFoldersMe', {
url: '^/shared/folders/me',
templateUrl: 'app/shared/views/sharedFoldersMe.html',
controller: 'sharedFoldersMeController',
data: { pageTitle: 'Folders Shared with Me' }
.state('backend.sharedMe', {
url: '^/shared/me',
templateUrl: 'app/shared/views/sharedMe.html',
controller: 'sharedMeController',
data: { pageTitle: 'Shared with Me' }
})
// Frontend

View File

@ -20,6 +20,8 @@ angular
if ($.AdminLTE.pushMenu) {
$.AdminLTE.pushMenu.expandOnHover();
}
$(document).off('click', '.sidebar li a');
}
});

View File

@ -12,7 +12,10 @@
<h3 class="box-title">Custom Equivalent Domains</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" ng-click="addEdit(null)">
<i class="fa fa-plus"></i> Add New
<i class="fa fa-plus-circle"></i> Add New
</button>
<button type="button" class="btn btn-box-tool" data-widget="collapse" uib-tooltip="Collapse/Expand">
<i class="fa fa-minus"></i>
</button>
</div>
</div>
@ -52,6 +55,11 @@
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">Global Equivalent Domains</h3>
<div class="box-tools pull-right">
<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 no-padding">
<div class="table-responsive">

View File

@ -0,0 +1,6 @@
angular
.module('bit.shared')
.controller('sharedController', function ($scope, apiService, cryptoService, cipherService, $analytics) {
});

View File

@ -1,6 +0,0 @@
angular
.module('bit.shared')
.controller('sharedFoldersController', function ($scope, apiService, cryptoService, cipherService, $analytics) {
});

View File

@ -1,6 +0,0 @@
angular
.module('bit.shared')
.controller('sharedFoldersMeController', function ($scope, apiService, cryptoService, cipherService, $analytics) {
});

View File

@ -1,6 +0,0 @@
angular
.module('bit.shared')
.controller('sharedLoginsController', function ($scope, apiService, cryptoService, cipherService, $analytics) {
});

View File

@ -1,6 +0,0 @@
angular
.module('bit.shared')
.controller('sharedLoginsMeController', function ($scope, apiService, cryptoService, cipherService, $analytics) {
});

View File

@ -0,0 +1,6 @@
angular
.module('bit.shared')
.controller('sharedMeController', function ($scope, apiService, cryptoService, cipherService, $analytics) {
});

View File

@ -0,0 +1,102 @@
<section class="content-header">
<h1>
Sharing Center
<small>items I'm sharing</small>
</h1>
</section>
<section class="content">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-folder-open"></i> Folders</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" ng-click="addFolder()" uib-tooltip="Share New Folder">
<i class="fa fa-plus-circle"></i> Add New
</button>
<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': folders.length}">
<div ng-show="loading && !folders.length">
Loading...
</div>
<div ng-show="!loading && !folders.length">
No shared folders.
</div>
<div class="table-responsive" ng-show="folders.length">
<table class="table table-striped table-hover">
<thead>
<tr>
<th style="width: 75px; min-width: 75px;"></th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="folder in folders">
<td>
<button type="button" ng-click="revoke(folder)" class="btn btn-link btn-table"
uib-tooltip="Revoke Access">
<i class="fa fa-lg fa-close"></i>
</button>
<button type="button" ng-click="edit(folder)" class="btn btn-link btn-table"
uib-tooltip="View/Edit">
<i class="fa fa-lg fa-pencil"></i>
</button>
</td>
<td>{{folder.name}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-globe"></i> Logins</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" ng-click="addFolder()" uib-tooltip="Share New Login">
<i class="fa fa-plus-circle"></i> Add New
</button>
<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': logins.length}">
<div ng-show="loading && !logins.length">
Loading...
</div>
<div ng-show="!loading && !logins.length">
No shared logins.
</div>
<div class="table-responsive" ng-show="logins.length">
<table class="table table-striped table-hover">
<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 logins">
<td>
<button type="button" ng-click="revoke(login)" class="btn btn-link btn-table"
uib-tooltip="Revoke Access">
<i class="fa fa-lg fa-close"></i>
</button>
<button type="button" ng-click="edit(login)" class="btn btn-link btn-table"
uib-tooltip="View/Edit">
<i class="fa fa-lg fa-pencil"></i>
</button>
</td>
<td>{{login.name}}</td>
<td>{{login.username}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>

View File

@ -1,47 +0,0 @@
<section class="content-header">
<h1>
Sharing Center
<small>folders</small>
</h1>
</section>
<section class="content">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a ui-sref="backend.sharedFolders">I've shared</a></li>
<li><a ui-sref="backend.sharedFoldersMe">Shared with me</a></li>
</ul>
<div class="tab-content">
<div ng-show="loading && !folders.length">
Loading...
</div>
<div ng-show="!loading && !folders.length">
No shared folders.
</div>
<div class="table-responsive" ng-show="folders.length">
<table class="table table-striped table-hover">
<thead>
<tr>
<th style="width: 75px; min-width: 75px;"></th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="folder in folders">
<td>
<button type="button" ng-click="revoke(folder)" class="btn btn-link btn-table"
uib-tooltip="Revoke Access">
<i class="fa fa-lg fa-close"></i>
</button>
<button type="button" ng-click="edit(folder)" class="btn btn-link btn-table"
uib-tooltip="View/Edit">
<i class="fa fa-lg fa-pencil"></i>
</button>
</td>
<td>{{folder.name}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>

View File

@ -1,47 +0,0 @@
<section class="content-header">
<h1>
Sharing Center
<small>folders</small>
</h1>
</section>
<section class="content">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li><a ui-sref="backend.sharedFolders">I've shared</a></li>
<li class="active"><a ui-sref="backend.sharedFoldersMe">Shared with me</a></li>
</ul>
<div class="tab-content">
<div ng-show="loading && !folders.length">
Loading...
</div>
<div ng-show="!loading && !folders.length">
No shared folders.
</div>
<div class="table-responsive" ng-show="folders.length">
<table class="table table-striped table-hover">
<thead>
<tr>
<th style="width: 75px; min-width: 75px;"></th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="folder in folders">
<td>
<button type="button" ng-click="revoke(folder)" class="btn btn-link btn-table"
uib-tooltip="Revoke Access">
<i class="fa fa-lg fa-close"></i>
</button>
<button type="button" ng-click="edit(folder)" class="btn btn-link btn-table"
uib-tooltip="View/Edit">
<i class="fa fa-lg fa-pencil"></i>
</button>
</td>
<td>{{folder.name}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>

View File

@ -1,49 +0,0 @@
<section class="content-header">
<h1>
Sharing Center
<small>logins</small>
</h1>
</section>
<section class="content">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a ui-sref="backend.sharedLogins">I've shared</a></li>
<li><a ui-sref="backend.sharedLoginsMe">Shared with me</a></li>
</ul>
<div class="tab-content">
<div ng-show="loading && !logins.length">
Loading...
</div>
<div ng-show="!loading && !logins.length">
No shared logins.
</div>
<div class="table-responsive" ng-show="logins.length">
<table class="table table-striped table-hover">
<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 logins">
<td>
<button type="button" ng-click="revoke(login)" class="btn btn-link btn-table"
uib-tooltip="Revoke Access">
<i class="fa fa-lg fa-close"></i>
</button>
<button type="button" ng-click="edit(login)" class="btn btn-link btn-table"
uib-tooltip="View/Edit">
<i class="fa fa-lg fa-pencil"></i>
</button>
</td>
<td>{{login.name}}</td>
<td>{{login.username}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>

View File

@ -1,49 +0,0 @@
<section class="content-header">
<h1>
Sharing Center
<small>logins</small>
</h1>
</section>
<section class="content">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li><a ui-sref="backend.sharedLogins">I've shared</a></li>
<li class="active"><a ui-sref="backend.sharedLoginsMe">Shared with me</a></li>
</ul>
<div class="tab-content">
<div ng-show="loading && !logins.length">
Loading...
</div>
<div ng-show="!loading && !logins.length">
No shared logins.
</div>
<div class="table-responsive" ng-show="logins.length">
<table class="table table-striped table-hover">
<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 logins">
<td>
<button type="button" ng-click="revoke(login)" class="btn btn-link btn-table"
uib-tooltip="Revoke Access">
<i class="fa fa-lg fa-close"></i>
</button>
<button type="button" ng-click="edit(login)" class="btn btn-link btn-table"
uib-tooltip="View/Edit">
<i class="fa fa-lg fa-pencil"></i>
</button>
</td>
<td>{{login.name}}</td>
<td>{{login.username}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>

View File

@ -0,0 +1,96 @@
<section class="content-header">
<h1>
Sharing Center
<small>shared with me</small>
</h1>
</section>
<section class="content">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-folder-open"></i> Folders</h3>
<div class="box-tools pull-right">
<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': folders.length}">
<div ng-show="loading && !folders.length">
Loading...
</div>
<div ng-show="!loading && !folders.length">
No folders shared with me.
</div>
<div class="table-responsive" ng-show="folders.length">
<table class="table table-striped table-hover">
<thead>
<tr>
<th style="width: 75px; min-width: 75px;"></th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="folder in folders">
<td>
<button type="button" ng-click="revoke(folder)" class="btn btn-link btn-table"
uib-tooltip="Revoke Access">
<i class="fa fa-lg fa-close"></i>
</button>
<button type="button" ng-click="edit(folder)" class="btn btn-link btn-table"
uib-tooltip="View/Edit">
<i class="fa fa-lg fa-pencil"></i>
</button>
</td>
<td>{{folder.name}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-globe"></i> Logins</h3>
<div class="box-tools pull-right">
<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': logins.length}">
<div ng-show="loading && !logins.length">
Loading...
</div>
<div ng-show="!loading && !logins.length">
No logins shared with me.
</div>
<div class="table-responsive" ng-show="logins.length">
<table class="table table-striped table-hover">
<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 logins">
<td>
<button type="button" ng-click="revoke(login)" class="btn btn-link btn-table"
uib-tooltip="Revoke Access">
<i class="fa fa-lg fa-close"></i>
</button>
<button type="button" ng-click="edit(login)" class="btn btn-link btn-table"
uib-tooltip="View/Edit">
<i class="fa fa-lg fa-pencil"></i>
</button>
</td>
<td>{{login.name}}</td>
<td>{{login.username}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>

View File

@ -11,16 +11,18 @@
<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> {{folder.name}} <small>{{folderLogins.length}} logins</small></h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" ng-click="addLogin(folder)" uib-tooltip="Add Login">
<i class="fa fa-plus"></i>
<div class="box-tools">
<button type="button" class="btn btn-box-tool" uib-tooltip="Share" ng-show="folder.id">
<i class="fa fa-user-plus"></i>
</button>
<button type="button" class="btn btn-box-tool" ng-click="deleteFolder(folder)" ng-show="canDeleteFolder(folder)" uib-tooltip="Delete">
<i class="fa fa-trash"></i>
</button>
<button type="button" class="btn btn-box-tool" ng-click="editFolder(folder)" ng-show="folder.id" uib-tooltip="Edit">
<i class="fa fa-pencil"></i>
<button type="button" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-bars"></i>
</button>
<ul class="dropdown-menu" role="menu" style="right: 0; left: auto;">
<li><a href="#" ng-click="addLogin(folder)">Add Login</a></li>
<li ng-show="folder.id"><a href="#" ng-click="editFolder(folder)">Edit Folder</a></li>
<li ng-show="canDeleteFolder(folder)"><a href="#" ng-click="deleteFolder(folder)">Delete Folder</a></li>
</ul>
<button type="button" class="btn btn-box-tool" data-widget="collapse" uib-tooltip="Collapse/Expand">
<i class="fa fa-minus"></i>
</button>

View File

@ -42,55 +42,56 @@
<ul class="sidebar-menu">
<li class="header">WEB VAULT</li>
<li class="treeview" ng-class="{active: $state.includes('backend.vault')}">
<a ui-sref="backend.vault"><i class="fa fa-lock"></i> <span>My Vault</span></a>
<ul class="treeview-menu menu-open">
<a ui-sref="backend.vault"><i class="fa fa-lock fa-fw"></i> <span>My Vault</span></a>
<ul class="treeview-menu" ng-class="{'menu-open': $state.includes('backend.vault')}">
<li>
<a href="javascript:void(0)" ng-click="addLogin()">
<i class="fa fa-plus"></i> New Login
<i class="fa fa-plus-circle fa-fw"></i> New Login
</a>
</li>
<li>
<a href="javascript:void(0)" ng-click="addFolder()">
<i class="fa fa-folder"></i> New Folder
<i class="fa fa-folder fa-fw"></i> New Folder
</a>
</li>
</ul>
</li>
<li class="treeview"
ng-class="{active: $state.includes('backend.sharedLogins') || $state.includes('backend.sharedLoginsMe') ||
$state.includes('backend.sharedFolders') || $state.includes('backend.sharedFoldersMe')}">
<a ui-sref="backend.sharedFolders"><i class="fa fa-users"></i> <span>Sharing Center</span></a>
<ul class="treeview-menu">
<li>
<a ui-sref="backend.sharedFolders">
<i class="fa fa-circle-o"></i> Shared Folders
ng-class="{active: $state.is('backend.shared') || $state.is('backend.sharedMe')}">
<a ui-sref="backend.shared"><i class="fa fa-users fa-fw"></i> <span>Sharing Center</span></a>
<ul class="treeview-menu" ng-class="{'menu-open': $state.is('backend.shared')
|| $state.is('backend.sharedMe')}">
<li ng-class="{active: $state.is('backend.shared')}">
<a ui-sref="backend.shared">
<i class="fa fa-fw fa-circle-o"></i> My Shares
</a>
</li>
<li>
<a ui-sref="backend.sharedLogins">
<i class="fa fa-circle-o"></i> Shared Logins
<li ng-class="{active: $state.is('backend.sharedMe')}">
<a ui-sref="backend.sharedMe">
<i class="fa fa-fw fa-circle-o"></i> Shared with Me
</a>
</li>
</ul>
</li>
<li class="treeview" ng-class="{active: $state.is('backend.tools')}">
<a ui-sref="backend.tools"><i class="fa fa-wrench fa-fw"></i> <span>Tools</span></a>
</li>
<li class="treeview"
ng-class="{active: $state.includes('backend.settings') || $state.includes('backend.settingsDomains')}">
<a ui-sref="backend.settings"><i class="fa fa-cogs"></i> <span>Settings</span></a>
<ul class="treeview-menu">
<li>
ng-class="{active: $state.is('backend.settings') || $state.is('backend.settingsDomains')}">
<a ui-sref="backend.settings"><i class="fa fa-cogs fa-fw"></i> <span>Settings</span></a>
<ul class="treeview-menu" ng-class="{'menu-open': $state.is('backend.settings')
|| $state.is('backend.settingsDomains')}">
<li ng-class="{active: $state.is('backend.settingsDomains')}">
<a ui-sref="backend.settingsDomains">
<i class="fa fa-circle-o"></i> Domain Rules
<i class="fa fa-fw fa-circle-o"></i> Domain Rules
</a>
</li>
</ul>
</li>
<li class="treeview" ng-class="{active: $state.includes('backend.tools')}">
<a ui-sref="backend.tools"><i class="fa fa-wrench"></i> <span>Tools</span></a>
</li>
<li>
<a href="https://help.bitwarden.com/" target="_blank"
analytics-on="click" analytics-event="Clicked Get Help">
<i class="fa fa-info-circle"></i> <span>Get Help</span>
<i class="fa fa-info-circle fa-fw"></i> <span>Get Help</span>
</a>
</li>
<li class="header">
@ -100,13 +101,13 @@
<li>
<a href="https://itunes.apple.com/us/app/bitwarden-free-password-manager/id1137397744?mt=8"
target="_blank" analytics-on="click" analytics-event="Clicked iOS">
<i class="fa fa-apple"></i> <span>iOS</span>
<i class="fa fa-apple fa-fw"></i> <span>iOS</span>
</a>
</li>
<li>
<a href="https://play.google.com/store/apps/details?id=com.x8bit.bitwarden"
target="_blank" analytics-on="click" analytics-event="Clicked Android">
<i class="fa fa-android"></i> <span>Android</span>
<i class="fa fa-android fa-fw"></i> <span>Android</span>
</a>
</li>
<li class="header">
@ -116,27 +117,27 @@
<li>
<a href="https://chrome.google.com/webstore/detail/bitwarden-free-password-m/nngceckbapebfimnlniiiahkandclblb"
target="_blank" analytics-on="click" analytics-event="Clicked Chrome">
<i class="fa fa-chrome"></i> <span>Chrome</span>
<i class="fa fa-chrome fa-fw"></i> <span>Chrome</span>
</a>
</li>
<li>
<a href="javascript:void(0)"
target="_blank" analytics-on="click" analytics-event="Clicked Firefox">
<small class="label pull-right bg-gray">coming very soon</small>
<i class="fa fa-firefox"></i> <span>Firefox</span>
<i class="fa fa-firefox fa-fw"></i> <span>Firefox</span>
</a>
</li>
<li>
<a href="https://addons.opera.com/extensions/details/bitwarden-free-password-manager/"
target="_blank" analytics-on="click" analytics-event="Clicked Opera">
<i class="fa fa-opera"></i> <span>Opera</span>
<i class="fa fa-opera fa-fw"></i> <span>Opera</span>
</a>
</li>
<li>
<a href="javascript:void(0)"
target="_blank" analytics-on="click" analytics-event="Clicked Edge">
<small class="label pull-right bg-gray">coming soon</small>
<i class="fa fa-edge"></i> <span>Edge</span>
<i class="fa fa-edge fa-fw"></i> <span>Edge</span>
</a>
</li>
</ul>

View File

@ -117,10 +117,8 @@
<script src="app/vault/vaultAddFolderController.js"></script>
<script src="app/shared/sharedModule.js"></script>
<script src="app/shared/sharedLoginsController.js"></script>
<script src="app/shared/sharedLoginsMeController.js"></script>
<script src="app/shared/sharedFoldersController.js"></script>
<script src="app/shared/sharedFoldersMeController.js"></script>
<script src="app/shared/sharedController.js"></script>
<script src="app/shared/sharedMeController.js"></script>
<script src="app/settings/settingsModule.js"></script>
<script src="app/settings/settingsController.js"></script>