1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00

load orgs manually from vault

This commit is contained in:
Kyle Spearrin
2018-07-11 11:39:48 -04:00
parent 2d2192f2f6
commit 455df290bf
2 changed files with 11 additions and 4 deletions

View File

@@ -34,7 +34,9 @@ export class OrganizationsComponent implements OnInit {
private syncService: SyncService) { }
async ngOnInit() {
await this.load();
if (this.vault) {
await this.load();
}
}
async load() {

View File

@@ -17,9 +17,12 @@ import { CipherView } from 'jslib/models/view/cipherView';
import { ModalComponent } from '../modal.component';
import { OrganizationsComponent } from '../settings/organizations.component';
import { AddEditComponent } from './add-edit.component';
import { AttachmentsComponent } from './attachments.component';
import { BulkDeleteComponent } from './bulk-delete.component';
import { BulkMoveComponent } from './bulk-move.component';
import { BulkShareComponent } from './bulk-share.component';
import { CiphersComponent } from './ciphers.component';
import { CollectionsComponent } from './collections.component';
import { FolderAddEditComponent } from './folder-add-edit.component';
@@ -28,8 +31,6 @@ import { ShareComponent } from './share.component';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { SyncService } from 'jslib/abstractions/sync.service';
import { BulkMoveComponent } from './bulk-move.component';
import { BulkShareComponent } from './bulk-share.component';
@Component({
selector: 'app-vault',
@@ -38,6 +39,7 @@ import { BulkShareComponent } from './bulk-share.component';
export class VaultComponent implements OnInit {
@ViewChild(GroupingsComponent) groupingsComponent: GroupingsComponent;
@ViewChild(CiphersComponent) ciphersComponent: CiphersComponent;
@ViewChild(OrganizationsComponent) organizationsComponent: OrganizationsComponent;
@ViewChild('attachments', { read: ViewContainerRef }) attachmentsModalRef: ViewContainerRef;
@ViewChild('folderAddEdit', { read: ViewContainerRef }) folderAddEditModalRef: ViewContainerRef;
@ViewChild('cipherAddEdit', { read: ViewContainerRef }) cipherAddEditModalRef: ViewContainerRef;
@@ -61,7 +63,10 @@ export class VaultComponent implements OnInit {
async ngOnInit() {
this.route.queryParams.subscribe(async (params) => {
await this.syncService.fullSync(false);
await this.groupingsComponent.load();
await Promise.all([
this.groupingsComponent.load(),
this.organizationsComponent.load(),
]);
if (params == null) {
this.groupingsComponent.selectedAll = true;