mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
pass full cipher to view component
This commit is contained in:
@@ -500,7 +500,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (action === "view") {
|
if (action === "view") {
|
||||||
await this.viewCipherById(cipherId);
|
await this.viewCipherById(cipher);
|
||||||
} else {
|
} else {
|
||||||
await this.editCipherId(cipherId, false);
|
await this.editCipherId(cipherId, false);
|
||||||
}
|
}
|
||||||
@@ -879,10 +879,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Opens the view dialog for the given cipher unless password reprompt fails */
|
/** Opens the view dialog for the given cipher unless password reprompt fails */
|
||||||
async viewCipherById(id: string) {
|
async viewCipherById(cipher: CipherView) {
|
||||||
const cipher = await this.cipherService.get(id);
|
|
||||||
// If cipher exists (cipher is null when new) and MP reprompt
|
|
||||||
// is on for this cipher, then show password reprompt.
|
|
||||||
if (
|
if (
|
||||||
cipher &&
|
cipher &&
|
||||||
cipher.reprompt !== 0 &&
|
cipher.reprompt !== 0 &&
|
||||||
@@ -895,7 +892,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
const cipherFormConfig = await this.cipherFormConfigService.buildConfig(
|
const cipherFormConfig = await this.cipherFormConfigService.buildConfig(
|
||||||
cipher?.edit ? "edit" : "partial-edit",
|
cipher?.edit ? "edit" : "partial-edit",
|
||||||
id as CipherId,
|
cipher.id as CipherId,
|
||||||
cipher?.type,
|
cipher?.type,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user