mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
[PM-22253] fixed white background in darkmode (#15020)
* fixed white background in darkmode * removed tw-apperance-none typo * changed both Permission from simple to bit-select * Update apps/web/src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.html Co-authored-by: Vicki League <vleague2@Gmail.com> * ui change for permission * added SelectModule in Test file * added selectModule in access stories --------- Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com> Co-authored-by: Vicki League <vleague2@Gmail.com>
This commit is contained in:
@@ -1,22 +1,21 @@
|
|||||||
<!-- Please remove this disable statement when editing this file! -->
|
<!-- Please remove this disable statement when editing this file! -->
|
||||||
<!-- eslint-disable tailwindcss/no-custom-classname -->
|
<!-- eslint-disable tailwindcss/no-custom-classname -->
|
||||||
<div class="tw-flex" *ngIf="!hideMultiSelect">
|
<div class="tw-flex" *ngIf="!hideMultiSelect">
|
||||||
<bit-form-field *ngIf="permissionMode == 'edit'" class="tw-mr-3 tw-shrink-0">
|
<bit-form-field *ngIf="permissionMode == 'edit'" class="tw-mr-3 tw-shrink-0 tw-basis-2/5">
|
||||||
<bit-label>{{ "permission" | i18n }}</bit-label>
|
<bit-label>{{ "permission" | i18n }}</bit-label>
|
||||||
<select
|
<bit-select
|
||||||
bitInput
|
bitInput
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[(ngModel)]="initialPermission"
|
[(ngModel)]="initialPermission"
|
||||||
[ngModelOptions]="{ standalone: true }"
|
[ngModelOptions]="{ standalone: true }"
|
||||||
(blur)="handleBlur()"
|
(closed)="handleBlur()"
|
||||||
>
|
>
|
||||||
<option *ngFor="let p of permissionList" [value]="p.perm">
|
<bit-option *ngFor="let p of permissionList" [value]="p.perm" [label]="p.labelId | i18n">
|
||||||
{{ p.labelId | i18n }}
|
</bit-option>
|
||||||
</option>
|
</bit-select>
|
||||||
</select>
|
|
||||||
</bit-form-field>
|
</bit-form-field>
|
||||||
|
|
||||||
<bit-form-field class="tw-grow" *ngIf="!disabled">
|
<bit-form-field class="tw-grow tw-p-3" *ngIf="!disabled">
|
||||||
<bit-label>{{ selectorLabelText }}</bit-label>
|
<bit-label>{{ selectorLabelText }}</bit-label>
|
||||||
<bit-multi-select
|
<bit-multi-select
|
||||||
class="tw-w-full"
|
class="tw-w-full"
|
||||||
@@ -51,7 +50,7 @@
|
|||||||
[formGroupName]="i"
|
[formGroupName]="i"
|
||||||
[ngClass]="{ 'tw-text-muted': item.readonly }"
|
[ngClass]="{ 'tw-text-muted': item.readonly }"
|
||||||
>
|
>
|
||||||
<td bitCell [ngSwitch]="item.type">
|
<td bitCell [ngSwitch]="item.type" class="tw-w-5/12">
|
||||||
<div class="tw-flex tw-items-center" *ngSwitchCase="itemType.Member">
|
<div class="tw-flex tw-items-center" *ngSwitchCase="itemType.Member">
|
||||||
<bit-avatar size="small" class="tw-mr-3" text="{{ item.labelName }}"></bit-avatar>
|
<bit-avatar size="small" class="tw-mr-3" text="{{ item.labelName }}"></bit-avatar>
|
||||||
<div class="tw-flex tw-flex-col">
|
<div class="tw-flex tw-flex-col">
|
||||||
@@ -79,28 +78,22 @@
|
|||||||
|
|
||||||
<td bitCell *ngIf="permissionMode != 'hidden'">
|
<td bitCell *ngIf="permissionMode != 'hidden'">
|
||||||
<ng-container *ngIf="canEditItemPermission(item); else readOnlyPerm">
|
<ng-container *ngIf="canEditItemPermission(item); else readOnlyPerm">
|
||||||
<label class="tw-sr-only" [for]="'permission' + i"
|
<bit-form-field>
|
||||||
>{{ item.labelName }} {{ "permission" | i18n }}</label
|
<bit-label>{{ item.labelName }} {{ "permission" | i18n }}</bit-label>
|
||||||
>
|
<bit-select
|
||||||
<div class="tw-relative tw-inline-block">
|
|
||||||
<select
|
|
||||||
bitInput
|
bitInput
|
||||||
class="tw-apperance-none -tw-ml-3 tw-max-w-40 tw-appearance-none tw-overflow-ellipsis !tw-rounded tw-border-transparent !tw-bg-transparent tw-pr-6 tw-font-bold hover:tw-border-primary-700"
|
|
||||||
formControlName="permission"
|
formControlName="permission"
|
||||||
[id]="'permission' + i"
|
[id]="'permission' + i"
|
||||||
(blur)="handleBlur()"
|
(closed)="handleBlur()"
|
||||||
>
|
>
|
||||||
<option *ngFor="let p of permissionList" [value]="p.perm">
|
<bit-option
|
||||||
{{ p.labelId | i18n }}
|
*ngFor="let p of permissionList"
|
||||||
</option>
|
[value]="p.perm"
|
||||||
</select>
|
[label]="p.labelId | i18n"
|
||||||
<label
|
>
|
||||||
[for]="'permission' + i"
|
</bit-option>
|
||||||
class="tw-absolute tw-inset-y-0 tw-right-4 tw-mb-0 tw-flex tw-items-center"
|
</bit-select>
|
||||||
>
|
</bit-form-field>
|
||||||
<i class="bwi bwi-sm bwi-angle-down tw-leading-[0]"></i>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-template #readOnlyPerm>
|
<ng-template #readOnlyPerm>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
ButtonModule,
|
ButtonModule,
|
||||||
FormFieldModule,
|
FormFieldModule,
|
||||||
IconButtonModule,
|
IconButtonModule,
|
||||||
|
SelectModule,
|
||||||
TableModule,
|
TableModule,
|
||||||
TabsModule,
|
TabsModule,
|
||||||
} from "@bitwarden/components";
|
} from "@bitwarden/components";
|
||||||
@@ -71,6 +72,7 @@ describe("AccessSelectorComponent", () => {
|
|||||||
PreloadedEnglishI18nModule,
|
PreloadedEnglishI18nModule,
|
||||||
JslibModule,
|
JslibModule,
|
||||||
IconButtonModule,
|
IconButtonModule,
|
||||||
|
SelectModule,
|
||||||
],
|
],
|
||||||
declarations: [TestableAccessSelectorComponent, UserTypePipe],
|
declarations: [TestableAccessSelectorComponent, UserTypePipe],
|
||||||
providers: [],
|
providers: [],
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
DialogModule,
|
DialogModule,
|
||||||
FormFieldModule,
|
FormFieldModule,
|
||||||
IconButtonModule,
|
IconButtonModule,
|
||||||
|
SelectModule,
|
||||||
TableModule,
|
TableModule,
|
||||||
TabsModule,
|
TabsModule,
|
||||||
} from "@bitwarden/components";
|
} from "@bitwarden/components";
|
||||||
@@ -47,6 +48,7 @@ export default {
|
|||||||
TableModule,
|
TableModule,
|
||||||
JslibModule,
|
JslibModule,
|
||||||
IconButtonModule,
|
IconButtonModule,
|
||||||
|
SelectModule,
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user