mirror of
https://github.com/bitwarden/browser
synced 2025-01-29 20:50:58 +01:00
setup UI pages for sharing center
This commit is contained in:
parent
a37a5fa1b5
commit
877eb4d423
@ -15,6 +15,7 @@
|
||||
'bit.global',
|
||||
'bit.accounts',
|
||||
'bit.vault',
|
||||
'bit.shared',
|
||||
'bit.settings',
|
||||
'bit.tools'
|
||||
]);
|
||||
|
@ -99,6 +99,24 @@ 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.sharedFolders', {
|
||||
url: '^/shared/folders',
|
||||
templateUrl: 'app/shared/views/sharedFolders.html',
|
||||
controller: 'sharedFoldersController',
|
||||
data: { pageTitle: 'Shared Folders' }
|
||||
})
|
||||
.state('backend.sharedMe', {
|
||||
url: '^/shared/me',
|
||||
templateUrl: 'app/shared/views/sharedMe.html',
|
||||
controller: 'sharedMeController',
|
||||
data: { pageTitle: 'Shared with Me' }
|
||||
})
|
||||
|
||||
// Frontend
|
||||
.state('frontend', {
|
||||
|
6
src/app/shared/sharedFoldersController.js
Normal file
6
src/app/shared/sharedFoldersController.js
Normal file
@ -0,0 +1,6 @@
|
||||
angular
|
||||
.module('bit.shared')
|
||||
|
||||
.controller('sharedFoldersController', function ($scope, apiService, cryptoService, cipherService, $analytics) {
|
||||
|
||||
});
|
6
src/app/shared/sharedLoginsController.js
Normal file
6
src/app/shared/sharedLoginsController.js
Normal file
@ -0,0 +1,6 @@
|
||||
angular
|
||||
.module('bit.shared')
|
||||
|
||||
.controller('sharedLoginsController', function ($scope, apiService, cryptoService, cipherService, $analytics) {
|
||||
|
||||
});
|
6
src/app/shared/sharedMeController.js
Normal file
6
src/app/shared/sharedMeController.js
Normal file
@ -0,0 +1,6 @@
|
||||
angular
|
||||
.module('bit.shared')
|
||||
|
||||
.controller('sharedMeController', function ($scope, apiService, cryptoService, cipherService, $analytics) {
|
||||
|
||||
});
|
2
src/app/shared/sharedModule.js
Normal file
2
src/app/shared/sharedModule.js
Normal file
@ -0,0 +1,2 @@
|
||||
angular
|
||||
.module('bit.shared', ['ui.bootstrap', 'ngclipboard']);
|
39
src/app/shared/views/sharedFolders.html
Normal file
39
src/app/shared/views/sharedFolders.html
Normal file
@ -0,0 +1,39 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Sharing Center
|
||||
<small>folders I've shared</small>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div ng-show="loading && !folders.length">
|
||||
<p>Loading...</p>
|
||||
</div>
|
||||
<div ng-show="!loading && !folders.length">
|
||||
<p>No shared folders.</p>
|
||||
</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>
|
||||
</section>
|
41
src/app/shared/views/sharedLogins.html
Normal file
41
src/app/shared/views/sharedLogins.html
Normal file
@ -0,0 +1,41 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Sharing Center
|
||||
<small>logins I've shared</small>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div ng-show="loading && !logins.length">
|
||||
<p>Loading...</p>
|
||||
</div>
|
||||
<div ng-show="!loading && !logins.length">
|
||||
<p>No shared logins.</p>
|
||||
</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>
|
||||
</section>
|
9
src/app/shared/views/sharedMe.html
Normal file
9
src/app/shared/views/sharedMe.html
Normal file
@ -0,0 +1,9 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Sharing Center
|
||||
<small>shared with me</small>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
TODO
|
||||
</section>
|
@ -56,6 +56,27 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="treeview"
|
||||
ng-class="{active: $state.includes('backend.sharedLogins') || $state.includes('backend.sharedFolders') || $state.includes('backend.sharedMe')}">
|
||||
<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
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ui-sref="backend.sharedLogins">
|
||||
<i class="fa fa-circle-o"></i> Shared Logins
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ui-sref="backend.sharedMe">
|
||||
<i class="fa fa-circle-o"></i> Shared with Me
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</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>
|
||||
|
@ -116,6 +116,11 @@
|
||||
<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/sharedLoginsController.js"></script>
|
||||
<script src="app/shared/sharedFoldersController.js"></script>
|
||||
<script src="app/shared/sharedMeController.js"></script>
|
||||
|
||||
<script src="app/settings/settingsModule.js"></script>
|
||||
<script src="app/settings/settingsController.js"></script>
|
||||
<script src="app/settings/settingsChangePasswordController.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user