mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
[EC-1029][EC-1030][EC-1031] focus on dialogs in admin console (#4634)
* [EC-1031] focus on dialogs in vault * [EC-1031] remove extra permissionMode * [EC-1030] add focus to group dialog * [EC-1031] undo extra changes * Update apps/web/src/vault/app/vault/vault-items.component.html Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> --------- Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
This commit is contained in:
@@ -184,6 +184,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
|||||||
showConfirmButton: true,
|
showConfirmButton: true,
|
||||||
confirmButtonText: confirmText == null ? this.i18nService.t("ok") : confirmText,
|
confirmButtonText: confirmText == null ? this.i18nService.t("ok") : confirmText,
|
||||||
target: target != null ? target : "body",
|
target: target != null ? target : "body",
|
||||||
|
onOpen: () => Swal.getConfirmButton().focus(),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (bootstrapModal != null) {
|
if (bootstrapModal != null) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<bit-tab label="{{ 'groupInfo' | i18n }}">
|
<bit-tab label="{{ 'groupInfo' | i18n }}">
|
||||||
<bit-form-field>
|
<bit-form-field>
|
||||||
<bit-label>{{ "name" | i18n }}</bit-label>
|
<bit-label>{{ "name" | i18n }}</bit-label>
|
||||||
<input bitInput type="text" formControlName="name" />
|
<input bitInput appAutofocus type="text" formControlName="name" />
|
||||||
<bit-hint>{{ "characterMaximum" | i18n: 100 }}</bit-hint>
|
<bit-hint>{{ "characterMaximum" | i18n: 100 }}</bit-hint>
|
||||||
</bit-form-field>
|
</bit-form-field>
|
||||||
<bit-form-field>
|
<bit-form-field>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<bit-tab label="{{ 'collectionInfo' | i18n }}">
|
<bit-tab label="{{ 'collectionInfo' | i18n }}">
|
||||||
<bit-form-field>
|
<bit-form-field>
|
||||||
<bit-label>{{ "name" | i18n }}</bit-label>
|
<bit-label>{{ "name" | i18n }}</bit-label>
|
||||||
<input bitInput formControlName="name" />
|
<input bitInput appAutofocus formControlName="name" />
|
||||||
</bit-form-field>
|
</bit-form-field>
|
||||||
|
|
||||||
<bit-form-field>
|
<bit-form-field>
|
||||||
|
|||||||
@@ -43,8 +43,7 @@
|
|||||||
<bit-menu #headerMenu>
|
<bit-menu #headerMenu>
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<button
|
<button
|
||||||
class="dropdown-item"
|
bitMenuItem
|
||||||
appStopClick
|
|
||||||
(click)="bulkMove()"
|
(click)="bulkMove()"
|
||||||
*ngIf="!activeFilter.isDeleted && !organization"
|
*ngIf="!activeFilter.isDeleted && !organization"
|
||||||
>
|
>
|
||||||
@@ -52,19 +51,18 @@
|
|||||||
{{ "moveSelected" | i18n }}
|
{{ "moveSelected" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="dropdown-item"
|
bitMenuItem
|
||||||
appStopClick
|
|
||||||
(click)="bulkShare()"
|
(click)="bulkShare()"
|
||||||
*ngIf="!activeFilter.isDeleted && !organization"
|
*ngIf="!activeFilter.isDeleted && !organization"
|
||||||
>
|
>
|
||||||
<i class="bwi bwi-fw bwi-arrow-circle-right" aria-hidden="true"></i>
|
<i class="bwi bwi-fw bwi-arrow-circle-right" aria-hidden="true"></i>
|
||||||
{{ "moveSelectedToOrg" | i18n }}
|
{{ "moveSelectedToOrg" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
<button class="dropdown-item" (click)="bulkRestore()" *ngIf="activeFilter.isDeleted">
|
<button bitMenuItem (click)="bulkRestore()" *ngIf="activeFilter.isDeleted">
|
||||||
<i class="bwi bwi-fw bwi-undo" aria-hidden="true"></i>
|
<i class="bwi bwi-fw bwi-undo" aria-hidden="true"></i>
|
||||||
{{ "restoreSelected" | i18n }}
|
{{ "restoreSelected" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
<button class="dropdown-item text-danger" (click)="bulkDelete()">
|
<button bitMenuItem class="tw-text-danger" (click)="bulkDelete()">
|
||||||
<i class="bwi bwi-fw bwi-trash" aria-hidden="true"></i>
|
<i class="bwi bwi-fw bwi-trash" aria-hidden="true"></i>
|
||||||
{{
|
{{
|
||||||
(activeFilter.isDeleted ? "permanentlyDeleteSelected" : "deleteSelected") | i18n
|
(activeFilter.isDeleted ? "permanentlyDeleteSelected" : "deleteSelected") | i18n
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
@fadeIn
|
@fadeIn
|
||||||
>
|
>
|
||||||
<div class="tw-flex tw-flex-col tw-items-center tw-gap-2 tw-px-4 tw-pt-4 tw-text-center">
|
<div class="tw-flex tw-flex-col tw-items-center tw-gap-2 tw-px-4 tw-pt-4 tw-text-center">
|
||||||
<ng-content *ngIf="hasIcon; else elseBlock" select="[bit-dialog-icon]"></ng-content>
|
<ng-template *ngIf="hasIcon; else elseBlock">
|
||||||
|
<ng-content select="[bit-dialog-icon]"></ng-content>
|
||||||
|
</ng-template>
|
||||||
<ng-template #elseBlock>
|
<ng-template #elseBlock>
|
||||||
<i class="bwi bwi-exclamation-triangle tw-text-3xl tw-text-warning" aria-hidden="true"></i>
|
<i class="bwi bwi-exclamation-triangle tw-text-3xl tw-text-warning" aria-hidden="true"></i>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export class MenuTriggerForDirective implements OnDestroy {
|
|||||||
this.overlayRef.attach(templatePortal);
|
this.overlayRef.attach(templatePortal);
|
||||||
|
|
||||||
this.closedEventsSub = this.getClosedEvents().subscribe((event: KeyboardEvent | undefined) => {
|
this.closedEventsSub = this.getClosedEvents().subscribe((event: KeyboardEvent | undefined) => {
|
||||||
if (event?.key === "Tab") {
|
if (["Tab", "Escape"].includes(event?.key)) {
|
||||||
// Required to ensure tab order resumes correctly
|
// Required to ensure tab order resumes correctly
|
||||||
this.elementRef.nativeElement.focus();
|
this.elementRef.nativeElement.focus();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
[attr.role]="ariaRole"
|
[attr.role]="ariaRole"
|
||||||
[attr.aria-label]="ariaLabel"
|
[attr.aria-label]="ariaLabel"
|
||||||
cdkTrapFocus
|
cdkTrapFocus
|
||||||
[cdkTrapFocusAutoCapture]="true"
|
|
||||||
>
|
>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user