[SG-300] Adding an Item defaults owner to selected vault (#2697)
This commit is contained in:
parent
7af2e9aa31
commit
58611fdd00
|
@ -95,6 +95,9 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||
if (params.cloneMode != null) {
|
||||
this.cloneMode = params.cloneMode === "true";
|
||||
}
|
||||
if (params.selectedVault) {
|
||||
this.organizationId = params.selectedVault;
|
||||
}
|
||||
await this.load();
|
||||
|
||||
if (!this.editMode || this.cloneMode) {
|
||||
|
|
|
@ -234,6 +234,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
|
|||
folderId: this.folderId,
|
||||
type: this.type,
|
||||
collectionId: this.collectionId,
|
||||
selectedVault: this.vaultFilter.selectedOrganizationId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -118,7 +118,13 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
addCipher() {
|
||||
this.router.navigate(["/add-cipher"], { queryParams: { name: this.hostname, uri: this.url } });
|
||||
this.router.navigate(["/add-cipher"], {
|
||||
queryParams: {
|
||||
name: this.hostname,
|
||||
uri: this.url,
|
||||
selectedVault: this.vaultFilterService.getVaultFilter().selectedOrganizationId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
viewCipher(cipher: CipherView) {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</header>
|
||||
<main tabindex="-1">
|
||||
<main tabindex="-1" cdk-scrollable>
|
||||
<app-vault-select (onVaultSelectionChanged)="vaultFilterChanged()"></app-vault-select>
|
||||
<div class="no-items" *ngIf="(!ciphers || !ciphers.length) && !showSearching()">
|
||||
<i class="bwi bwi-spinner bwi-spin bwi-3x" *ngIf="!loaded"></i>
|
||||
|
|
|
@ -266,7 +266,9 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
async addCipher() {
|
||||
this.router.navigate(["/add-cipher"]);
|
||||
this.router.navigate(["/add-cipher"], {
|
||||
queryParams: { selectedVault: this.vaultFilter.selectedOrganizationId },
|
||||
});
|
||||
}
|
||||
|
||||
async vaultFilterChanged() {
|
||||
|
|
|
@ -145,6 +145,7 @@ export class VaultSelectComponent implements OnInit {
|
|||
positionStrategy,
|
||||
maxHeight: viewPortHeight - 160,
|
||||
backdropClass: "cdk-overlay-transparent-backdrop",
|
||||
scrollStrategy: this.overlay.scrollStrategies.close(),
|
||||
});
|
||||
|
||||
const templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
|
||||
|
|
Loading…
Reference in New Issue