mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-11 10:10:25 +01:00
[PM-7902] Create V2 Note Component View (#10150)
* Rename <additional-information> component to <additional-options>
The Figma designs show and update to the Additional Information section. The heading changed to "Additional options". It probably makes sense to update the component name to match.
* Make view note header "note" lowercase.
* Add new translation messages for view header.
* Revert "Add new translation messages for view header."
This reverts commit 4e8877fe71
.
* Make cipher headers lowercase via toLowerCase function
* Remove unused import.
* run npm ci && npm run prettier
* add back missing import
This commit is contained in:
parent
0bbbe5e139
commit
3b54bbd168
@ -84,13 +84,16 @@ export class ViewV2Component {
|
||||
setHeader(type: CipherType) {
|
||||
switch (type) {
|
||||
case CipherType.Login:
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeLogin"));
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeLogin").toLowerCase());
|
||||
case CipherType.Card:
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeCard"));
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeCard").toLowerCase());
|
||||
case CipherType.Identity:
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("typeIdentity"));
|
||||
return this.i18nService.t(
|
||||
"viewItemHeader",
|
||||
this.i18nService.t("typeIdentity").toLowerCase(),
|
||||
);
|
||||
case CipherType.SecureNote:
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("note"));
|
||||
return this.i18nService.t("viewItemHeader", this.i18nService.t("note").toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<bit-section>
|
||||
<bit-section-header>
|
||||
<h2 bitTypography="h6">{{ "additionalInformation" | i18n }}</h2>
|
||||
<h2 bitTypography="h6">{{ "additionalOptions" | i18n }}</h2>
|
||||
</bit-section-header>
|
||||
<bit-card>
|
||||
<label class="tw-text-xs tw-text-muted tw-select-none">
|
@ -13,8 +13,8 @@ import {
|
||||
} from "@bitwarden/components";
|
||||
|
||||
@Component({
|
||||
selector: "app-additional-information",
|
||||
templateUrl: "additional-information.component.html",
|
||||
selector: "app-additional-options",
|
||||
templateUrl: "additional-options.component.html",
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
@ -28,6 +28,6 @@ import {
|
||||
FormFieldModule,
|
||||
],
|
||||
})
|
||||
export class AdditionalInformationComponent {
|
||||
export class AdditionalOptionsComponent {
|
||||
@Input() notes: string;
|
||||
}
|
@ -8,9 +8,9 @@
|
||||
>
|
||||
</app-item-details-v2>
|
||||
|
||||
<!-- ADDITIONAL INFORMATION -->
|
||||
<!-- ADDITIONAL OPTIONS -->
|
||||
<ng-container *ngIf="cipher.notes">
|
||||
<app-additional-information [notes]="cipher.notes"> </app-additional-information>
|
||||
<app-additional-options [notes]="cipher.notes"> </app-additional-options>
|
||||
</ng-container>
|
||||
|
||||
<!-- CUSTOM FIELDS -->
|
||||
|
@ -17,7 +17,7 @@ import { PopupFooterComponent } from "../../../../apps/browser/src/platform/popu
|
||||
import { PopupHeaderComponent } from "../../../../apps/browser/src/platform/popup/layout/popup-header.component";
|
||||
import { PopupPageComponent } from "../../../../apps/browser/src/platform/popup/layout/popup-page.component";
|
||||
|
||||
import { AdditionalInformationComponent } from "./additional-information/additional-information.component";
|
||||
import { AdditionalOptionsComponent } from "./additional-options/additional-options.component";
|
||||
import { AttachmentsV2ViewComponent } from "./attachments/attachments-v2-view.component";
|
||||
import { CustomFieldV2Component } from "./custom-fields/custom-fields-v2.component";
|
||||
import { ItemDetailsV2Component } from "./item-details/item-details-v2.component";
|
||||
@ -35,7 +35,7 @@ import { ItemHistoryV2Component } from "./item-history/item-history-v2.component
|
||||
PopupHeaderComponent,
|
||||
PopupFooterComponent,
|
||||
ItemDetailsV2Component,
|
||||
AdditionalInformationComponent,
|
||||
AdditionalOptionsComponent,
|
||||
AttachmentsV2ViewComponent,
|
||||
ItemHistoryV2Component,
|
||||
CustomFieldV2Component,
|
||||
|
Loading…
Reference in New Issue
Block a user