mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
Full headers (#16184)
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
This commit is contained in:
@@ -153,15 +153,12 @@ export class SendAddEditDialogComponent {
|
||||
* @returns The header text.
|
||||
*/
|
||||
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"));
|
||||
}
|
||||
const isEditMode = mode === "edit" || mode === "partial-edit";
|
||||
const translation = {
|
||||
[SendType.Text]: isEditMode ? "editItemHeaderTextSend" : "newItemHeaderTextSend",
|
||||
[SendType.File]: isEditMode ? "editItemHeaderFileSend" : "newItemHeaderFileSend",
|
||||
};
|
||||
return this.i18nService.t(translation[type]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user