From 2a50e303c93a60febcbb6472ce46daf6cf131915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Thu, 29 Aug 2019 17:27:02 +0200 Subject: [PATCH] Fix scrolling of account-deletion dialog --- .../room-creator-page.component.ts | 1 - .../delete-account.component.html | 28 ++++++++++--------- .../shared/header/header.component.ts | 3 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/app/components/creator/room-creator-page/room-creator-page.component.ts b/src/app/components/creator/room-creator-page/room-creator-page.component.ts index b9b06e474..4b9017a7e 100644 --- a/src/app/components/creator/room-creator-page/room-creator-page.component.ts +++ b/src/app/components/creator/room-creator-page/room-creator-page.component.ts @@ -135,7 +135,6 @@ export class RoomCreatorPageComponent extends RoomPageComponent implements OnIni return; } else { if (result instanceof CommentSettingsDialog) { - console.log(result); this.updateCommentSettings(result); this.saveChanges(); } diff --git a/src/app/components/shared/_dialogs/delete-account/delete-account.component.html b/src/app/components/shared/_dialogs/delete-account/delete-account.component.html index 21d030478..eec7f1dd4 100644 --- a/src/app/components/shared/_dialogs/delete-account/delete-account.component.html +++ b/src/app/components/shared/_dialogs/delete-account/delete-account.component.html @@ -1,14 +1,16 @@ -<h3>{{ 'header.sure' | translate }}</h3> -<mat-divider></mat-divider> -<p>{{ 'header.really-delete-account' | translate }}</p> -<mat-list *ngFor="let room of rooms; let i = index"> - <mat-list-item><strong>{{ i+1 }}: {{ room.name }}</strong></mat-list-item> -</mat-list> -<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> - <button mat-raised-button class="abort" (click)="close('abort')"> - {{ 'header.abort' | translate }} - </button> - <button mat-raised-button class="delete" (click)="close('delete')"> - {{ 'header.delete' | translate }} - </button> +<div mat-dialog-content> + <h3>{{ 'header.sure' | translate }}</h3> + <mat-divider></mat-divider> + <p>{{ 'header.really-delete-account' | translate }}</p> + <mat-list *ngFor="let room of rooms; let i = index"> + <mat-list-item><strong>{{ i + 1 }}: {{ room.name }}</strong></mat-list-item> + </mat-list> + <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> + <button mat-raised-button class="abort" (click)="close('abort')"> + {{ 'header.abort' | translate }} + </button> + <button mat-raised-button class="delete" (click)="close('delete')"> + {{ 'header.delete' | translate }} + </button> + </div> </div> diff --git a/src/app/components/shared/header/header.component.ts b/src/app/components/shared/header/header.component.ts index 4d9bf53be..9206dbf60 100644 --- a/src/app/components/shared/header/header.component.ts +++ b/src/app/components/shared/header/header.component.ts @@ -116,7 +116,8 @@ export class HeaderComponent implements OnInit { openDeleteUserDialog() { const dialogRef = this.dialog.open(DeleteAccountComponent, { - width: '600px' + width: '600px', + autoFocus: false }); dialogRef.afterClosed() .subscribe(result => { -- GitLab