re-stub frontend sharing center

This commit is contained in:
Kyle Spearrin 2017-03-16 22:44:54 -04:00
parent 51d81dea9f
commit acf124c81e
13 changed files with 89 additions and 248 deletions

View File

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26228.9
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "bitwarden-web", ".", "{25BEDEF4-2CAF-445A-807D-63C17FF85694}"
ProjectSection(WebsiteProperties) = preProject

View File

@ -15,7 +15,7 @@
'bit.global',
'bit.accounts',
'bit.vault',
'bit.shared',
'bit.sharing',
'bit.settings',
'bit.tools',
'bit.organization'

View File

@ -104,17 +104,11 @@ angular
controller: 'toolsController',
data: { pageTitle: 'Tools' }
})
.state('backend.user.shared', {
url: '^/shared',
templateUrl: 'app/shared/views/shared.html',
controller: 'sharedController',
data: { pageTitle: 'Shared' }
})
.state('backend.user.sharedMe', {
url: '^/shared/me',
templateUrl: 'app/shared/views/sharedMe.html',
controller: 'sharedMeController',
data: { pageTitle: 'Shared with Me' }
.state('backend.user.sharing', {
url: '^/sharing',
templateUrl: 'app/sharing/views/sharing.html',
controller: 'sharingController',
data: { pageTitle: 'Sharing Center' }
})
.state('backend.org', {
templateUrl: 'app/views/organizationLayout.html',

View File

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

View File

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

View File

@ -1,2 +0,0 @@
angular
.module('bit.shared', ['ui.bootstrap', 'ngclipboard']);

View File

@ -1,102 +0,0 @@
<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,96 +0,0 @@
<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

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

View File

@ -0,0 +1,2 @@
angular
.module('bit.sharing', ['ui.bootstrap', 'ngclipboard']);

View File

@ -0,0 +1,69 @@
<section class="content-header">
<h1>
Sharing Center
<small>{{subvaults.length > 0 ? subvaults.length - 1 : 0}} subvaults, {{logins.length}} logins</small>
</h1>
</section>
<section class="content">
<div ng-show="loading && !subvaults.length">
<p>Loading...</p>
</div>
<div ng-show="!loading && !subvaults.length">
<p>No subvaults.</p>
</div>
<div class="box" ng-repeat="subvault in subvaults | orderBy: ['name']"
ng-show="subvaults.length && (!main.searchVaultText || subvaultLogins.length)">
<div class="box-header with-border">
<h3 class="box-title">
<i class="fa fa-server"></i>
{{subvault.name}} <small>{{subvaultLogins.length}} logins</small>
</h3>
<div class="box-tools">
<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': subvaultLogins.length}">
<div ng-show="!subvaultLogins.length">
<p>No logins in this folder.</p>
<button type="button" ng-click="addLogin(folder)" class="btn btn-default btn-flat">Add a Login</button>
</div>
<div class="table-responsive" ng-show="subvaultLogins.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 subvaultLogins = (logins | filter: { subvaultId: subvault.id } |
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="editLogin(login)" class="btn btn-link btn-table"
uib-tooltip="View/Edit">
<i class="fa fa-lg fa-pencil"></i>
</button>
</td>
<td ng-click="editLogin(login)">
<span ng-click="$event.stopPropagation()">
{{login.name}}
<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>
</section>

View File

@ -55,25 +55,8 @@
</li>
</ul>
</li>
<li class="treeview"
ng-class="{active: $state.is('backend.user.shared') || $state.is('backend.user.sharedMe')}">
<a ui-sref="backend.user.shared">
<small class="label pull-right bg-yellow">beta</small>
<i class="fa fa-share-alt fa-fw"></i> <span>Sharing Center</span>
</a>
<ul class="treeview-menu" ng-class="{'menu-open': $state.is('backend.user.shared')
|| $state.is('backend.user.sharedMe')}">
<li ng-class="{active: $state.is('backend.user.shared')}">
<a ui-sref="backend.user.shared">
<i class="fa fa-fw fa-circle-o"></i> My Shares
</a>
</li>
<li ng-class="{active: $state.is('backend.user.sharedMe')}">
<a ui-sref="backend.user.sharedMe">
<i class="fa fa-fw fa-circle-o"></i> Shared with Me
</a>
</li>
</ul>
<li class="treeview" ng-class="{active: $state.is('backend.user.sharing')}">
<a ui-sref="backend.user.sharing"><i class="fa fa-share-alt fa-fw"></i> <span>Sharing Center</span></a>
</li>
<li class="treeview" ng-class="{active: $state.is('backend.user.tools')}">
<a ui-sref="backend.user.tools"><i class="fa fa-wrench fa-fw"></i> <span>Tools</span></a>

View File

@ -116,9 +116,8 @@
<script src="app/vault/vaultEditFolderController.js"></script>
<script src="app/vault/vaultAddFolderController.js"></script>
<script src="app/shared/sharedModule.js"></script>
<script src="app/shared/sharedController.js"></script>
<script src="app/shared/sharedMeController.js"></script>
<script src="app/sharing/sharingModule.js"></script>
<script src="app/sharing/sharingController.js"></script>
<script src="app/organization/organizationModule.js"></script>
<script src="app/organization/organizationDashboardController.js"></script>