1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-09 03:53:53 +00:00

refactor hideIndividualFields to be more generic and hide favorite button

This commit is contained in:
Nick Krantz
2024-10-04 11:08:37 -05:00
parent 03b8a29a11
commit 787c962e95
4 changed files with 9 additions and 8 deletions

View File

@@ -80,8 +80,8 @@ type BaseCipherFormConfig = {
*/
organizations?: Organization[];
/** Hides the folder form field, useful in the Admin Console where folders aren't applicable */
hideFolderSelection?: true;
/** Hides the fields that are only applicable to individuals, useful in the Admin Console where folders aren't applicable */
hideIndividualVaultFields?: true;
};
/**

View File

@@ -2,6 +2,7 @@
<bit-section-header>
<h2 bitTypography="h6">{{ "itemDetails" | i18n }}</h2>
<button
*ngIf="!config.hideIndividualVaultFields"
slot="end"
type="button"
size="small"
@@ -21,7 +22,7 @@
<bit-form-field
*ngIf="showOwnership"
[disableMargin]="!showCollectionsControl"
[class.tw-col-span-2]="config.hideFolderSelection"
[class.tw-col-span-2]="config.hideIndividualVaultFields"
>
<bit-label>{{ "owner" | i18n }}</bit-label>
<bit-select formControlName="organizationId">
@@ -40,7 +41,7 @@
<bit-form-field
[class.tw-col-span-2]="!showOwnership"
[disableMargin]="!showCollectionsControl"
*ngIf="!config.hideFolderSelection"
*ngIf="!config.hideIndividualVaultFields"
>
<bit-label>{{ "folder" | i18n }}</bit-label>
<bit-select formControlName="folderId">