1
0
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:
Konrad
2025-09-16 16:53:36 +02:00
committed by GitHub
parent 59396f0262
commit d06d47e26a
12 changed files with 231 additions and 163 deletions

View File

@@ -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]);
}
/**