diff --git a/src/app/components/shared/_dialogs/topic-cloud-filter/topic-cloud-filter.component.html b/src/app/components/shared/_dialogs/topic-cloud-filter/topic-cloud-filter.component.html index eb28beabb59b72f80211ad95595b34eaa017c2df..17b7d7a0da0867f5aeb29c8e8cfd2781de5b3a52 100644 --- a/src/app/components/shared/_dialogs/topic-cloud-filter/topic-cloud-filter.component.html +++ b/src/app/components/shared/_dialogs/topic-cloud-filter/topic-cloud-filter.component.html @@ -79,6 +79,7 @@ appearance="fill"> <mat-label>{{'content.brainstorming-question' | translate}}</mat-label> <input matInput + autofocus autocomplete="off" type="text" [(ngModel)]="question"> diff --git a/src/app/components/shared/_dialogs/worker-dialog/worker-dialog.component.html b/src/app/components/shared/_dialogs/worker-dialog/worker-dialog.component.html index 304144fbbcd0bd3bb605d09ce35a3a9c165195be..bdfdb2ab3958d5e101dac63cd154916c1251f9d8 100644 --- a/src/app/components/shared/_dialogs/worker-dialog/worker-dialog.component.html +++ b/src/app/components/shared/_dialogs/worker-dialog/worker-dialog.component.html @@ -34,7 +34,7 @@ </div> </details> <div mat-dialog-content style="padding-top: 0.75em;" *ngIf="inlined"> - <span>{{'worker-dialog.inline-header' | translate}} ({{getActiveRoomCount()}}):</span> + <h4>{{'worker-dialog.inline-header' | translate}} ({{getActiveRoomCount()}}):</h4> <div class="entry" *ngFor="let task of getRooms().values()"> <div class="entryRow"> <mat-icon svgIcon="meeting_room" matTooltip="{{'worker-dialog.room-name' | translate}}"></mat-icon> diff --git a/src/app/components/shared/_dialogs/worker-dialog/worker-dialog.component.scss b/src/app/components/shared/_dialogs/worker-dialog/worker-dialog.component.scss index 53fd0ec8a3606415c6673a89620b00d90c75d920..fdffcf6b3acca7c2570e4e0ea73b7f249d882390 100644 --- a/src/app/components/shared/_dialogs/worker-dialog/worker-dialog.component.scss +++ b/src/app/components/shared/_dialogs/worker-dialog/worker-dialog.component.scss @@ -20,6 +20,11 @@ button { #worker-content { padding-left: 5px; + + .mat-dialog-content { + margin: 0; + padding: 0; + } } .entry { diff --git a/src/app/components/shared/shared.module.ts b/src/app/components/shared/shared.module.ts index 5b9dcb0ae9792a6c9fa7fe9d43a433182d223bda..9cd33abc6679160ee477ec020816bac3c1049885 100644 --- a/src/app/components/shared/shared.module.ts +++ b/src/app/components/shared/shared.module.ts @@ -38,22 +38,23 @@ import { TopicCloudFilterComponent } from './_dialogs/topic-cloud-filter/topic-c import { SpacyDialogComponent } from './_dialogs/spacy-dialog/spacy-dialog.component'; import { TagCloudPopUpComponent } from './tag-cloud/tag-cloud-pop-up/tag-cloud-pop-up.component'; import { WorkerDialogComponent } from './_dialogs/worker-dialog/worker-dialog.component'; -import { DragDropModule } from "@angular/cdk/drag-drop"; +import { DragDropModule } from '@angular/cdk/drag-drop'; import { ActiveUserComponent } from './overlay/active-user/active-user.component'; +import { AutofocusDirective } from '../../directive/autofocus.directive'; @NgModule({ - imports: [ - CommonModule, - EssentialsModule, - SharedRoutingModule, - MatRippleModule, - ArsModule, - MarkdownModule, - QRCodeModule, - TagCloudModule, - ColorPickerModule, - DragDropModule - ], + imports: [ + CommonModule, + EssentialsModule, + SharedRoutingModule, + MatRippleModule, + ArsModule, + MarkdownModule, + QRCodeModule, + TagCloudModule, + ColorPickerModule, + DragDropModule + ], declarations: [ RoomJoinComponent, PageNotFoundComponent, @@ -84,26 +85,28 @@ import { ActiveUserComponent } from './overlay/active-user/active-user.component TopicCloudFilterComponent, SpacyDialogComponent, TagCloudPopUpComponent, - ActiveUserComponent + ActiveUserComponent, + WorkerDialogComponent, + AutofocusDirective ], - exports:[ - RoomJoinComponent, - PageNotFoundComponent, - RoomPageComponent, - RoomListComponent, - HeaderComponent, - FooterComponent, - CommentPageComponent, - CommentListComponent, - CreateCommentComponent, - PresentCommentComponent, - CommentComponent, - DialogActionButtonsComponent, - UserBonusTokenComponent, - CloudConfigurationComponent, - TagCloudPopUpComponent, - ActiveUserComponent - ] + exports: [ + RoomJoinComponent, + PageNotFoundComponent, + RoomPageComponent, + RoomListComponent, + HeaderComponent, + FooterComponent, + CommentPageComponent, + CommentListComponent, + CreateCommentComponent, + PresentCommentComponent, + CommentComponent, + DialogActionButtonsComponent, + UserBonusTokenComponent, + CloudConfigurationComponent, + TagCloudPopUpComponent, + ActiveUserComponent + ] }) export class SharedModule { } diff --git a/src/app/directive/autofocus.directive.spec.ts b/src/app/directive/autofocus.directive.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..550482e426fb93039b3f74c0844b817484a56265 --- /dev/null +++ b/src/app/directive/autofocus.directive.spec.ts @@ -0,0 +1,9 @@ +/*import { AutofocusDirective } from './autofocus.directive'; + +describe('AutofocusDirective', () => { + it('should create an instance', () => { + const directive = new AutofocusDirective(); + expect(directive).toBeTruthy(); + }); +}); +*/ diff --git a/src/app/directive/autofocus.directive.ts b/src/app/directive/autofocus.directive.ts new file mode 100644 index 0000000000000000000000000000000000000000..fffc34407d17eb889df0ae18ac10fa6b08db069d --- /dev/null +++ b/src/app/directive/autofocus.directive.ts @@ -0,0 +1,16 @@ +import { AfterViewInit, Directive, ElementRef } from '@angular/core'; + +@Directive({ + // eslint-disable-next-line @angular-eslint/directive-selector + selector: '[autofocus]' +}) +export class AutofocusDirective implements AfterViewInit { + + constructor(private host: ElementRef) { + } + + ngAfterViewInit() { + this.host.nativeElement.focus(); + } + +}