[PM-482] Desktop Application is Minimized When There is a Master Password Reprompt and Copying Vault Item Password (#5635)
This commit is contained in:
parent
b737c70712
commit
b2e5f7de33
|
@ -106,11 +106,15 @@ export class ViewComponent extends BaseViewComponent implements OnChanges {
|
||||||
this.onViewCipherPasswordHistory.emit(this.cipher);
|
this.onViewCipherPasswordHistory.emit(this.cipher);
|
||||||
}
|
}
|
||||||
|
|
||||||
async copy(value: string, typeI18nKey: string, aType: string) {
|
async copy(value: string, typeI18nKey: string, aType: string): Promise<boolean> {
|
||||||
super.copy(value, typeI18nKey, aType);
|
const hasCopied = await super.copy(value, typeI18nKey, aType);
|
||||||
|
if (hasCopied) {
|
||||||
this.messagingService.send("minimizeOnCopy");
|
this.messagingService.send("minimizeOnCopy");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return hasCopied;
|
||||||
|
}
|
||||||
|
|
||||||
onWindowHidden() {
|
onWindowHidden() {
|
||||||
this.showPassword = false;
|
this.showPassword = false;
|
||||||
this.showCardNumber = false;
|
this.showCardNumber = false;
|
||||||
|
|
|
@ -316,16 +316,16 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||||
this.platformUtilsService.launchUri(uri.launchUri);
|
this.platformUtilsService.launchUri(uri.launchUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
async copy(value: string, typeI18nKey: string, aType: string) {
|
async copy(value: string, typeI18nKey: string, aType: string): Promise<boolean> {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.passwordRepromptService.protectedFields().includes(aType) &&
|
this.passwordRepromptService.protectedFields().includes(aType) &&
|
||||||
!(await this.promptPassword())
|
!(await this.promptPassword())
|
||||||
) {
|
) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const copyOptions = this.win != null ? { window: this.win } : null;
|
const copyOptions = this.win != null ? { window: this.win } : null;
|
||||||
|
@ -343,6 +343,8 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||||
} else if (aType === "H_Field") {
|
} else if (aType === "H_Field") {
|
||||||
this.eventCollectionService.collect(EventType.Cipher_ClientCopiedHiddenField, this.cipherId);
|
this.eventCollectionService.collect(EventType.Cipher_ClientCopiedHiddenField, this.cipherId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
setTextDataOnDrag(event: DragEvent, data: string) {
|
setTextDataOnDrag(event: DragEvent, data: string) {
|
||||||
|
|
Loading…
Reference in New Issue