mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 21:50:15 +00:00
Refactor access tab label in collection dialog component to use a getter for improved readability and localization support.
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
</bit-select>
|
||||
</bit-form-field>
|
||||
</bit-tab>
|
||||
<bit-tab label="{{ 'access' | i18n }}">
|
||||
<bit-tab [label]="accessTabLabel">
|
||||
<div class="tw-mb-3">
|
||||
<ng-container *ngIf="dialogReadonly">
|
||||
<span>{{ "readOnlyCollectionAccess" | i18n }}</span>
|
||||
|
||||
@@ -361,6 +361,12 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
|
||||
return this.params.readonly === true;
|
||||
}
|
||||
|
||||
protected get accessTabLabel(): string {
|
||||
return this.dialogReadonly
|
||||
? this.i18nService.t("viewAccess")
|
||||
: this.i18nService.t("editAccess");
|
||||
}
|
||||
|
||||
protected async cancel() {
|
||||
this.close(CollectionDialogAction.Canceled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user