mirror of
https://github.com/bitwarden/web
synced 2025-12-15 07:43:16 +00:00
subvault operations
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
angular
|
angular
|
||||||
.module('bit.organization')
|
.module('bit.organization')
|
||||||
|
|
||||||
.controller('organizationSubvaultsController', function ($scope, $state, apiService, $uibModal, cipherService, $filter) {
|
.controller('organizationSubvaultsController', function ($scope, $state, apiService, $uibModal, cipherService, $filter,
|
||||||
|
toastr) {
|
||||||
$scope.subvaults = [];
|
$scope.subvaults = [];
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
$scope.$on('$viewContentLoaded', function () {
|
$scope.$on('$viewContentLoaded', function () {
|
||||||
@@ -48,9 +49,17 @@
|
|||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
$scope.subvaults.splice(index, 1);
|
$scope.subvaults.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toastr.success(subvault.name + ' has been deleted.', 'Subvault Deleted');
|
||||||
|
}, function () {
|
||||||
|
toastr.error(subvault.name + ' was not able to be deleted.', 'Error');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.users = function (subvault) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
function loadList() {
|
function loadList() {
|
||||||
apiService.subvaults.listOrganization({ orgId: $state.params.orgId }, function (list) {
|
apiService.subvaults.listOrganization({ orgId: $state.params.orgId }, function (list) {
|
||||||
$scope.subvaults = cipherService.decryptSubvaults(list.Data, $state.params.orgId, true);
|
$scope.subvaults = cipherService.decryptSubvaults(list.Data, $state.params.orgId, true);
|
||||||
|
|||||||
@@ -33,10 +33,29 @@
|
|||||||
<button type="button" ng-click="add()" class="btn btn-default btn-flat">Add a Subvault</button>
|
<button type="button" ng-click="add()" class="btn btn-default btn-flat">Add a Subvault</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive" ng-show="subvaults.length">
|
<div class="table-responsive" ng-show="subvaults.length">
|
||||||
<table class="table table-striped table-hover">
|
<table class="table table-striped table-hover table-vmiddle">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="subvault in filteredSubvaults = (subvaults | filter: (filterSearch || '') |
|
<tr ng-repeat="subvault in filteredSubvaults = (subvaults | filter: (filterSearch || '') |
|
||||||
orderBy: ['name'])">
|
orderBy: ['name'])">
|
||||||
|
<td style="width: 70px;">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<i class="fa fa-cog"></i> <span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li>
|
||||||
|
<a href="javascript:void(0)" ng-click="users(subvault)">
|
||||||
|
<i class="fa fa-fw fa-users"></i> Users
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="javascript:void(0)" ng-click="delete(subvault)" class="text-red">
|
||||||
|
<i class="fa fa-fw fa-trash"></i> Delete
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<td valign="middle">
|
<td valign="middle">
|
||||||
<a href="javascript:void(0)" ng-click="edit(subvault)">
|
<a href="javascript:void(0)" ng-click="edit(subvault)">
|
||||||
{{subvault.name}}
|
{{subvault.name}}
|
||||||
|
|||||||
@@ -179,6 +179,11 @@ form .btn .loading-icon {
|
|||||||
|
|
||||||
.table td .label {
|
.table td .label {
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-header.with-border + .box-body .table > tbody > tr:first-child > td {
|
||||||
|
border-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callouts */
|
/* Callouts */
|
||||||
|
|||||||
Reference in New Issue
Block a user