[PM-13189] Send copy updates (#11619)
* Add more descriptive header text * Update hint under optional password field --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
parent
c9de05de95
commit
d298ac6edf
|
@ -2464,8 +2464,8 @@
|
|||
"message": "Optionally require a password for users to access this Send.",
|
||||
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||
},
|
||||
"sendPasswordDescV2": {
|
||||
"message": "Require this password to view the Send.",
|
||||
"sendPasswordDescV3": {
|
||||
"message": "Add an optional password for recipients to access this Send.",
|
||||
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||
},
|
||||
"sendNotesDesc": {
|
||||
|
@ -4494,9 +4494,15 @@
|
|||
"itemLocation": {
|
||||
"message": "Item Location"
|
||||
},
|
||||
"fileSend": {
|
||||
"message": "File Send"
|
||||
},
|
||||
"fileSends": {
|
||||
"message": "File Sends"
|
||||
},
|
||||
"textSend": {
|
||||
"message": "Text Send"
|
||||
},
|
||||
"textSends": {
|
||||
"message": "Text Sends"
|
||||
},
|
||||
|
|
|
@ -174,18 +174,25 @@ export class SendAddEditComponent {
|
|||
)
|
||||
.subscribe((config) => {
|
||||
this.config = config;
|
||||
this.headerText = this.getHeaderText(config.mode);
|
||||
this.headerText = this.getHeaderText(config.mode, config.sendType);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the header text based on the mode.
|
||||
* Gets the header text based on the mode and type.
|
||||
* @param mode The mode of the send form.
|
||||
* @param type The type of the send
|
||||
* @returns The header text.
|
||||
*/
|
||||
private getHeaderText(mode: SendFormMode) {
|
||||
return this.i18nService.t(
|
||||
mode === "edit" || mode === "partial-edit" ? "editSend" : "createSend",
|
||||
);
|
||||
private getHeaderText(mode: SendFormMode, type: SendType) {
|
||||
const headerKey =
|
||||
mode === "edit" || mode === "partial-edit" ? "editItemHeader" : "newItemHeader";
|
||||
|
||||
switch (type) {
|
||||
case SendType.Text:
|
||||
return this.i18nService.t(headerKey, this.i18nService.t("textSend"));
|
||||
case SendType.File:
|
||||
return this.i18nService.t(headerKey, this.i18nService.t("fileSend"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
[appCopyClick]="sendOptionsForm.get('password').value"
|
||||
showToast
|
||||
></button>
|
||||
<bit-hint>{{ "sendPasswordDescV2" | i18n }}</bit-hint>
|
||||
<bit-hint>{{ "sendPasswordDescV3" | i18n }}</bit-hint>
|
||||
</bit-form-field>
|
||||
<bit-form-control *ngIf="!disableHideEmail || originalSendView?.hideEmail">
|
||||
<input
|
||||
|
|
Loading…
Reference in New Issue