mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
[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) {
|
if (params.cloneMode != null) {
|
||||||
this.cloneMode = params.cloneMode === "true";
|
this.cloneMode = params.cloneMode === "true";
|
||||||
}
|
}
|
||||||
|
if (params.selectedVault) {
|
||||||
|
this.organizationId = params.selectedVault;
|
||||||
|
}
|
||||||
await this.load();
|
await this.load();
|
||||||
|
|
||||||
if (!this.editMode || this.cloneMode) {
|
if (!this.editMode || this.cloneMode) {
|
||||||
|
@ -234,6 +234,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
|
|||||||
folderId: this.folderId,
|
folderId: this.folderId,
|
||||||
type: this.type,
|
type: this.type,
|
||||||
collectionId: this.collectionId,
|
collectionId: this.collectionId,
|
||||||
|
selectedVault: this.vaultFilter.selectedOrganizationId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,13 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addCipher() {
|
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) {
|
viewCipher(cipher: CipherView) {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<main tabindex="-1">
|
<main tabindex="-1" cdk-scrollable>
|
||||||
<app-vault-select (onVaultSelectionChanged)="vaultFilterChanged()"></app-vault-select>
|
<app-vault-select (onVaultSelectionChanged)="vaultFilterChanged()"></app-vault-select>
|
||||||
<div class="no-items" *ngIf="(!ciphers || !ciphers.length) && !showSearching()">
|
<div class="no-items" *ngIf="(!ciphers || !ciphers.length) && !showSearching()">
|
||||||
<i class="bwi bwi-spinner bwi-spin bwi-3x" *ngIf="!loaded"></i>
|
<i class="bwi bwi-spinner bwi-spin bwi-3x" *ngIf="!loaded"></i>
|
||||||
|
@ -266,7 +266,9 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async addCipher() {
|
async addCipher() {
|
||||||
this.router.navigate(["/add-cipher"]);
|
this.router.navigate(["/add-cipher"], {
|
||||||
|
queryParams: { selectedVault: this.vaultFilter.selectedOrganizationId },
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async vaultFilterChanged() {
|
async vaultFilterChanged() {
|
||||||
|
@ -145,6 +145,7 @@ export class VaultSelectComponent implements OnInit {
|
|||||||
positionStrategy,
|
positionStrategy,
|
||||||
maxHeight: viewPortHeight - 160,
|
maxHeight: viewPortHeight - 160,
|
||||||
backdropClass: "cdk-overlay-transparent-backdrop",
|
backdropClass: "cdk-overlay-transparent-backdrop",
|
||||||
|
scrollStrategy: this.overlay.scrollStrategies.close(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
|
const templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
|
||||||
|
Loading…
Reference in New Issue
Block a user