diff --git a/package.json b/package.json index 41683b75d1f38b151c4d4b7199195247179ee1a4..f4331d2bcb0a7032a219d8d27d90455dec610f51 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "MIT", "scripts": { "ng": "ng", - "start": "ng serve --host 0.0.0.0 --proxy-config proxy.conf.json", + "start": "ng serve --proxy-config proxy.conf.json", "build": "ng build --prod", "test": "ng test --watch=false --browsers=ChromeHeadlessCustom", "lint": "ng lint", diff --git a/src/app/components/creator/_dialogs/comment-export/comment-export.component.html b/src/app/components/creator/_dialogs/comment-export/comment-export.component.html index 23e32f0519cf43377fb8e5fa18767ab08895bcdc..6851001b5035a3121ade77a313b7506257ea2950 100644 --- a/src/app/components/creator/_dialogs/comment-export/comment-export.component.html +++ b/src/app/components/creator/_dialogs/comment-export/comment-export.component.html @@ -6,12 +6,10 @@ <mat-radio-button value="semicolon"><h2>{{'comment-page.semicolon' | translate}}</h2></mat-radio-button> </div> </mat-radio-group> - <div fxLayout="row" fxLayoutAlign="center center" fxLayoutGap="20px"> - <button mat-raised-button class="abort" (click)="onNoClick()">{{'comment-page.abort' | translate}}</button> - <button mat-raised-button class="export" - (click)="dialogRef.close(exportType)">{{'comment-page.export' | translate}}</button> - </div> </div> - - - +<app-dialog-action-buttons + buttonsLabelSection="comment-page" + confirmButtonLabel="export" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildExportActionCallback()" +></app-dialog-action-buttons> diff --git a/src/app/components/creator/_dialogs/comment-export/comment-export.component.ts b/src/app/components/creator/_dialogs/comment-export/comment-export.component.ts index 1dc6f0ed2006f61bdb4bc22f3392abfabc023fc1..257fdb78e0dda146a5a1f3d4399f35f4ec3e0a42 100644 --- a/src/app/components/creator/_dialogs/comment-export/comment-export.component.ts +++ b/src/app/components/creator/_dialogs/comment-export/comment-export.component.ts @@ -16,8 +16,27 @@ export class CommentExportComponent implements OnInit { ngOnInit() { } - onNoClick(): void { + + /** + * Closes the dialog on call. + */ + closeDialog(): void { this.dialogRef.close(); } -} + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.closeDialog(); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildExportActionCallback(): () => void { + return () => this.dialogRef.close(this.exportType); + } +} diff --git a/src/app/components/creator/_dialogs/comment-settings/comment-settings.component.html b/src/app/components/creator/_dialogs/comment-settings/comment-settings.component.html index 038d90cb35619236437c26515c9dddb338571557..736afe0ff380062d85d1f377f10fb80bf6aeae33 100644 --- a/src/app/components/creator/_dialogs/comment-settings/comment-settings.component.html +++ b/src/app/components/creator/_dialogs/comment-settings/comment-settings.component.html @@ -32,15 +32,12 @@ <mat-icon>delete</mat-icon> {{ 'room-page.delete-all-comments' | translate }}</button> </div> - <mat-divider></mat-divider> - <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px" class="submit"> - <button mat-raised-button class="abort" (click)="dialogRef.close('abort')"> - {{ 'room-page.abort' | translate }} - </button> - <button mat-raised-button class="update" (click)="closeDialog()"> - {{ 'room-page.update' | translate }} - </button> - </div> + <app-dialog-action-buttons + buttonsLabelSection="room-page" + confirmButtonLabel="update" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildSaveActionCallback()" + ></app-dialog-action-buttons> </div> <div class="visually-hidden"> diff --git a/src/app/components/creator/_dialogs/comment-settings/comment-settings.component.ts b/src/app/components/creator/_dialogs/comment-settings/comment-settings.component.ts index ddaca7bddcdfa42d4af26fd910a80b65ff3786c3..af8d7d6a6004dc17db1be67af5d58fc2bdfbd428 100644 --- a/src/app/components/creator/_dialogs/comment-settings/comment-settings.component.ts +++ b/src/app/components/creator/_dialogs/comment-settings/comment-settings.component.ts @@ -143,4 +143,20 @@ export class CommentSettingsComponent implements OnInit { this.dialogRef.close(settingsReturn); }); } + + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.dialogRef.close('abort'); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildSaveActionCallback(): () => void { + return () => this.closeDialog(); + } } diff --git a/src/app/components/creator/_dialogs/delete-comment/delete-comment.component.html b/src/app/components/creator/_dialogs/delete-comment/delete-comment.component.html index 39d5b94feaa3273efec64619efdc3ce86af4d08c..481c7295862f174425fbec53d461ce923e73ca32 100644 --- a/src/app/components/creator/_dialogs/delete-comment/delete-comment.component.html +++ b/src/app/components/creator/_dialogs/delete-comment/delete-comment.component.html @@ -1,12 +1,10 @@ <h3>{{ 'room-page.sure' | translate }}</h3> <mat-divider></mat-divider> <p>{{ 'comment-list.really-delete' | translate }}</p> -<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> - <button mat-raised-button class="abort" (click)="close('abort')"> - {{ 'content.abort' | translate }} - </button> - <button mat-raised-button class="delete" (click)="close('delete')"> - {{ 'content.delete' | translate }} - </button> -</div> - +<app-dialog-action-buttons + buttonsLabelSection="content" + confirmButtonLabel="delete" + [confirmButtonType]=confirmButtonType + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildCommentDeleteActionCallback()" +></app-dialog-action-buttons> diff --git a/src/app/components/creator/_dialogs/delete-comment/delete-comment.component.ts b/src/app/components/creator/_dialogs/delete-comment/delete-comment.component.ts index f26f1a241fa5243e09c3dc3a243a1990411fff08..87f87f6d0844500f1f2cd0460891211a2460c457 100644 --- a/src/app/components/creator/_dialogs/delete-comment/delete-comment.component.ts +++ b/src/app/components/creator/_dialogs/delete-comment/delete-comment.component.ts @@ -1,6 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { RoomEditComponent } from '../room-edit/room-edit.component'; +import { DialogConfirmActionButtonType } from '../../../shared/dialog/dialog-action-buttons/dialog-action-buttons.component'; @Component({ selector: 'app-delete-comment', @@ -9,6 +10,12 @@ import { RoomEditComponent } from '../room-edit/room-edit.component'; }) export class DeleteCommentComponent implements OnInit { + /** + * The confirm button type of the dialog. + */ + confirmButtonType: DialogConfirmActionButtonType = DialogConfirmActionButtonType.Alert; + + constructor(public dialogRef: MatDialogRef<RoomEditComponent>, @Inject(MAT_DIALOG_DATA) public data: any) { } @@ -19,4 +26,19 @@ export class DeleteCommentComponent implements OnInit { this.dialogRef.close(type); } + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.close('abort'); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildCommentDeleteActionCallback(): () => void { + return () => this.close('delete'); + } } diff --git a/src/app/components/creator/_dialogs/delete-comments/delete-comments.component.html b/src/app/components/creator/_dialogs/delete-comments/delete-comments.component.html index 85738fe9c252b3418156103a49e80db54046390c..a1dd80b05386de871d3083c2287ec891644ffe61 100644 --- a/src/app/components/creator/_dialogs/delete-comments/delete-comments.component.html +++ b/src/app/components/creator/_dialogs/delete-comments/delete-comments.component.html @@ -1,11 +1,10 @@ <h1>{{ 'room-page.sure' | translate }}</h1> <mat-divider></mat-divider> <p>{{ 'room-page.really-delete-comments' | translate }}</p> -<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> - <button mat-raised-button class="abort" (click)="close('abort')"> - {{ 'content.abort' | translate }} - </button> - <button mat-raised-button class="delete" (click)="close('delete')"> - {{ 'content.delete' | translate }} - </button> -</div> +<app-dialog-action-buttons + buttonsLabelSection="content" + confirmButtonLabel="delete" + [confirmButtonType]=confirmButtonType + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildCommentsDeleteActionCallback()" +></app-dialog-action-buttons> diff --git a/src/app/components/creator/_dialogs/delete-comments/delete-comments.component.ts b/src/app/components/creator/_dialogs/delete-comments/delete-comments.component.ts index f8f3d9730140fc7d6b979aa7a5ad745bad4a0330..08da95e949f6111460bfaf81ce65a1e0a8b32bf7 100644 --- a/src/app/components/creator/_dialogs/delete-comments/delete-comments.component.ts +++ b/src/app/components/creator/_dialogs/delete-comments/delete-comments.component.ts @@ -2,6 +2,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { RoomEditComponent } from '../room-edit/room-edit.component'; import { LiveAnnouncer } from '@angular/cdk/a11y'; +import { DialogConfirmActionButtonType } from '../../../shared/dialog/dialog-action-buttons/dialog-action-buttons.component'; @Component({ selector: 'app-delete-comment', @@ -10,6 +11,12 @@ import { LiveAnnouncer } from '@angular/cdk/a11y'; }) export class DeleteCommentsComponent implements OnInit { + /** + * The confirm button type of the dialog. + */ + confirmButtonType: DialogConfirmActionButtonType = DialogConfirmActionButtonType.Alert; + + constructor(public dialogRef: MatDialogRef<RoomEditComponent>, @Inject(MAT_DIALOG_DATA) public data: any, private liveAnnouncer: LiveAnnouncer) { } @@ -18,12 +25,25 @@ export class DeleteCommentsComponent implements OnInit { ngOnInit() { this.announce(); } + + public announce() { this.liveAnnouncer.announce('Willst du wirklich alle Fragen dieser Session löschen?', 'assertive'); } - close(type: string): void { - this.dialogRef.close(type); + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.dialogRef.close('abort'); } + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildCommentsDeleteActionCallback(): () => void { + return () => this.dialogRef.close('delete'); + } } diff --git a/src/app/components/creator/_dialogs/moderator-delete/moderator-delete.component.html b/src/app/components/creator/_dialogs/moderator-delete/moderator-delete.component.html index 2f0f1df38b94114fa563ed02af0d80985ef2dac6..70788492ca85600b95e9f64dd624114bec4e0c79 100644 --- a/src/app/components/creator/_dialogs/moderator-delete/moderator-delete.component.html +++ b/src/app/components/creator/_dialogs/moderator-delete/moderator-delete.component.html @@ -2,11 +2,10 @@ <mat-divider></mat-divider> <h2>{{ 'room-page.really-remove-moderator' | translate }}</h2> <p>{{loginId}}</p> -<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> - <button mat-raised-button class="abort" (click)="close('abort')"> - {{ 'content.abort' | translate }} - </button> - <button mat-raised-button class="delete" (click)="close('delete')"> - {{ 'content.delete' | translate }} - </button> -</div> +<app-dialog-action-buttons + buttonsLabelSection="content" + confirmButtonLabel="delete" + [confirmButtonType]=confirmButtonType + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildModeratorDeleteActionCallback()" +></app-dialog-action-buttons> diff --git a/src/app/components/creator/_dialogs/moderator-delete/moderator-delete.component.ts b/src/app/components/creator/_dialogs/moderator-delete/moderator-delete.component.ts index 90a6fda8218ec1021f3424190bda49b8c2c8938b..a8838b3c95cad18870757d61608378aea65b6886 100644 --- a/src/app/components/creator/_dialogs/moderator-delete/moderator-delete.component.ts +++ b/src/app/components/creator/_dialogs/moderator-delete/moderator-delete.component.ts @@ -1,6 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { ModeratorsComponent } from '../moderators/moderators.component'; +import { DialogConfirmActionButtonType } from '../../../shared/dialog/dialog-action-buttons/dialog-action-buttons.component'; import { LiveAnnouncer } from '@angular/cdk/a11y'; @Component({ @@ -12,6 +13,13 @@ export class ModeratorDeleteComponent implements OnInit { loginId: string; + + /** + * The confirm button type of the dialog. + */ + confirmButtonType: DialogConfirmActionButtonType = DialogConfirmActionButtonType.Alert; + + constructor(public dialogRef: MatDialogRef<ModeratorsComponent>, @Inject(MAT_DIALOG_DATA) public data: any, private liveAnnouncer: LiveAnnouncer) { } @@ -20,11 +28,30 @@ export class ModeratorDeleteComponent implements OnInit { this.announce(); } + + public announce() { this.liveAnnouncer.announce('Willst du wirklich diesen Moderator löschen?', 'assertive'); } + + close(type: string): void { this.dialogRef.close(type); } + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.close('abort'); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildModeratorDeleteActionCallback(): () => void { + return () => this.close('delete'); + } } diff --git a/src/app/components/creator/_dialogs/moderators/moderators.component.html b/src/app/components/creator/_dialogs/moderators/moderators.component.html index 83feb176a7694e58ef2166cd7a8c17e35c4434c7..7233a9e93a05b8c7a9c6a164d4d5557c0649dad0 100644 --- a/src/app/components/creator/_dialogs/moderators/moderators.component.html +++ b/src/app/components/creator/_dialogs/moderators/moderators.component.html @@ -27,6 +27,10 @@ </button> </div> </div> + <app-dialog-action-buttons + buttonsLabelSection="content" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + ></app-dialog-action-buttons> </div> <div class="visually-hidden"> diff --git a/src/app/components/creator/_dialogs/moderators/moderators.component.ts b/src/app/components/creator/_dialogs/moderators/moderators.component.ts index 8791b12610e689b05be9ea2f58d83f0342faf848..6d1328816a3a8af4f5c94b3d3d485038ffa5c0be 100644 --- a/src/app/components/creator/_dialogs/moderators/moderators.component.ts +++ b/src/app/components/creator/_dialogs/moderators/moderators.component.ts @@ -86,4 +86,12 @@ export class ModeratorsComponent implements OnInit { }); this.moderators.splice(index, 1); } + + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.dialogRef.close(); + } } diff --git a/src/app/components/creator/_dialogs/room-delete/room-delete.component.html b/src/app/components/creator/_dialogs/room-delete/room-delete.component.html index ca5931c6eb8f588967d839718f00444c0f81bb4c..25960dfea3690b32cc5434c98c4147701d45391b 100644 --- a/src/app/components/creator/_dialogs/room-delete/room-delete.component.html +++ b/src/app/components/creator/_dialogs/room-delete/room-delete.component.html @@ -1,11 +1,10 @@ <h1>{{ 'room-page.sure' | translate }}</h1> <mat-divider></mat-divider> <p>{{ 'room-page.reallySession' | translate}}<strong>{{room.name}}</strong>{{ 'room-page.really2' | translate}}</p> -<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> - <button mat-raised-button class="abort" (click)="onNoClick()"> - {{ 'room-page.abort' | translate }} - </button> - <button mat-raised-button class="delete" (click)="dialogRef.close('delete')"> - {{ 'room-page.delete-room' | translate }} - </button> -</div> +<app-dialog-action-buttons + buttonsLabelSection="room-page" + confirmButtonLabel="delete-room" + [confirmButtonType]=confirmButtonType + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildRoomDeleteActionCallback()" +></app-dialog-action-buttons> diff --git a/src/app/components/creator/_dialogs/room-delete/room-delete.component.ts b/src/app/components/creator/_dialogs/room-delete/room-delete.component.ts index ac76ee5e8aa6607bf2a8049d15081fbf4cd4ad5d..d5c87a2fc6c965b27421e75b507a8556ad3a7689 100644 --- a/src/app/components/creator/_dialogs/room-delete/room-delete.component.ts +++ b/src/app/components/creator/_dialogs/room-delete/room-delete.component.ts @@ -2,9 +2,9 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { Room } from '../../../../models/room'; import { RoomEditComponent } from '../room-edit/room-edit.component'; +import { DialogConfirmActionButtonType } from '../../../shared/dialog/dialog-action-buttons/dialog-action-buttons.component'; import { LiveAnnouncer } from '@angular/cdk/a11y'; - @Component({ selector: 'app-room-delete', templateUrl: './room-delete.component.html', @@ -13,20 +13,48 @@ import { LiveAnnouncer } from '@angular/cdk/a11y'; export class RoomDeleteComponent implements OnInit { room: Room; + + /** + * The confirm button type of the dialog. + */ + confirmButtonType: DialogConfirmActionButtonType = DialogConfirmActionButtonType.Alert; + + constructor(public dialogRef: MatDialogRef<RoomEditComponent>, @Inject(MAT_DIALOG_DATA) public data: any, private liveAnnouncer: LiveAnnouncer) { } - onNoClick(): void { - this.dialogRef.close(); - } - ngOnInit() { this.announce(); } + + public announce() { this.liveAnnouncer.announce('Willst du die Session wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.', 'assertive'); + } + + + /** + * Closes the dialog on call. + */ + closeDialog(): void { + this.dialogRef.close(); + } + + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.closeDialog(); + } + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildRoomDeleteActionCallback(): () => void { + return () => this.dialogRef.close('delete'); } } diff --git a/src/app/components/creator/_dialogs/room-edit/room-edit.component.html b/src/app/components/creator/_dialogs/room-edit/room-edit.component.html index aa3947353025b094bf83e799bf84c550b51dcddb..23511fa81d62ce993b2d0ad3ef3984edd35b2f5b 100644 --- a/src/app/components/creator/_dialogs/room-edit/room-edit.component.html +++ b/src/app/components/creator/_dialogs/room-edit/room-edit.component.html @@ -20,15 +20,12 @@ {{ 'room-page.delete-room' | translate }}</button> </div> </div> - <mat-divider></mat-divider> - <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px" class="submit"> - <button mat-raised-button class="abort" (click)="dialogRef.close('abort')"> - {{ 'room-page.abort' | translate }} - </button> - <button mat-raised-button class="update" (click)="dialogRef.close('update')"> - {{ 'room-page.update' | translate }} - </button> - </div> + <app-dialog-action-buttons + buttonsLabelSection="room-page" + confirmButtonLabel="update" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildSaveActionCallback()" + ></app-dialog-action-buttons> </div> <div class="visually-hidden"> diff --git a/src/app/components/creator/_dialogs/room-edit/room-edit.component.ts b/src/app/components/creator/_dialogs/room-edit/room-edit.component.ts index 1f5cf486d18345d82f3f91c75827663dd27c7e07..418d60f24420697e75aa67448b9c1b60ec06dd40 100644 --- a/src/app/components/creator/_dialogs/room-edit/room-edit.component.ts +++ b/src/app/components/creator/_dialogs/room-edit/room-edit.component.ts @@ -51,8 +51,32 @@ export class RoomEditComponent implements OnInit { this.roomService.deleteRoom(room.id).subscribe(result => { const event = new RoomDeleted(room.id); this.eventService.broadcast(event.type, event.payload); - this.dialogRef.close('delete'); + this.closeDialog('delete'); this.router.navigate([`/user`]); }); } + + + /** + * Closes the dialog on call. + */ + closeDialog(type: string): void { + this.dialogRef.close(type); + } + + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.closeDialog('abort'); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildSaveActionCallback(email: HTMLInputElement): () => void { + return () => this.closeDialog('update'); + } } diff --git a/src/app/components/home/_dialogs/password-reset/password-reset.component.html b/src/app/components/home/_dialogs/password-reset/password-reset.component.html index bd180a4ec815fc9add2809d0839b34db8c9be669..cc64a0a561946477ca7134f3f0512f92aa54f48b 100644 --- a/src/app/components/home/_dialogs/password-reset/password-reset.component.html +++ b/src/app/components/home/_dialogs/password-reset/password-reset.component.html @@ -10,8 +10,10 @@ {{ 'password-reset.email-invalid' | translate }} </mat-error> </mat-form-field> - - <button mat-raised-button type="submit"> - {{ 'password-reset.reset-password' | translate }} - </button> </form> +<app-dialog-action-buttons + buttonsLabelSection="password-reset" + confirmButtonLabel="reset-password" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildPasswordResetActionCallback(email)" +></app-dialog-action-buttons> diff --git a/src/app/components/home/_dialogs/password-reset/password-reset.component.scss b/src/app/components/home/_dialogs/password-reset/password-reset.component.scss index 2e3cb176694b3187cb3f83859a1c4f4dc97c380e..5a113982addb7cd7ad11f078e0e001fcf3a8455a 100644 --- a/src/app/components/home/_dialogs/password-reset/password-reset.component.scss +++ b/src/app/components/home/_dialogs/password-reset/password-reset.component.scss @@ -2,7 +2,7 @@ mat-form-field { color: var(--on-surface); } -.mat-raised-button { +.mat-flat-button { color: var(--on-primary); background-color: var(--primary); } diff --git a/src/app/components/home/_dialogs/password-reset/password-reset.component.ts b/src/app/components/home/_dialogs/password-reset/password-reset.component.ts index ff2378684ec1305d9484eb63a1d7cb5928a8c75c..1ed8c70410eadde3733c96bd69c90d7af390f4fd 100644 --- a/src/app/components/home/_dialogs/password-reset/password-reset.component.ts +++ b/src/app/components/home/_dialogs/password-reset/password-reset.component.ts @@ -35,6 +35,15 @@ export class PasswordResetComponent implements OnInit { ngOnInit() { } + + /** + * Closes the room create dialog on call. + */ + closeDialog(): void { + this.dialogRef.close(); + } + + resetPassword(username: string): void { username = username.trim(); @@ -43,7 +52,7 @@ export class PasswordResetComponent implements OnInit { this.translationService.get('password-reset.reset-successful').subscribe(message => { this.notificationService.show(message); }); - this.dialogRef.close(); + this.closeDialog(); }); } else { this.translationService.get('password-reset.input-incorrect').subscribe(message => { @@ -52,4 +61,19 @@ export class PasswordResetComponent implements OnInit { } } + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.closeDialog(); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildPasswordResetActionCallback(email: HTMLInputElement): () => void { + return () => this.resetPassword(email.value); + } } diff --git a/src/app/components/home/_dialogs/register/register.component.html b/src/app/components/home/_dialogs/register/register.component.html index 16dfb46949628a31cd73459cc6c70f01a0a0cc9b..f157c3483a2a483527e47e74655c6ba636fc1936 100644 --- a/src/app/components/home/_dialogs/register/register.component.html +++ b/src/app/components/home/_dialogs/register/register.component.html @@ -37,7 +37,11 @@ {{ 'register.password-unmatch' | translate }} </mat-error> </mat-form-field> - - <button mat-raised-button color="accent" type="submit">{{ 'register.register' | translate }}</button> - + <app-dialog-action-buttons + buttonsLabelSection="register" + confirmButtonLabel="register" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildRegisterActionCallback(userName, userPassword1)" + ></app-dialog-action-buttons> </form> + diff --git a/src/app/components/home/_dialogs/register/register.component.scss b/src/app/components/home/_dialogs/register/register.component.scss index af3c380ca4d7a379a60eed34ff3e6e8ba3d545e2..5a113982addb7cd7ad11f078e0e001fcf3a8455a 100644 --- a/src/app/components/home/_dialogs/register/register.component.scss +++ b/src/app/components/home/_dialogs/register/register.component.scss @@ -2,7 +2,7 @@ mat-form-field { color: var(--on-surface); } -.mat-raised-button { +.mat-flat-button { color: var(--on-primary); background-color: var(--primary); } @@ -10,4 +10,3 @@ mat-form-field { input { caret-color: var(--on-surface); } - diff --git a/src/app/components/home/_dialogs/register/register.component.ts b/src/app/components/home/_dialogs/register/register.component.ts index 5a757e982821220a68cf55cbd80cdc1345208c6a..280ad6c5e184fa7ac29026b1eb7d28c7e41e090c 100644 --- a/src/app/components/home/_dialogs/register/register.component.ts +++ b/src/app/components/home/_dialogs/register/register.component.ts @@ -67,11 +67,20 @@ export class RegisterComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public data: any) { } - onNoClick(): void { - this.dialogRef.close(); + + /** + * Closes the register dialog on call. + */ + closeDialog(): void { + this.dialogRef.close([]); } + + /** + * @inheritDoc + */ ngOnInit() { + // nothing special yet } register(username: string, password: string): void { @@ -98,4 +107,20 @@ export class RegisterComponent implements OnInit { }); } } + + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.closeDialog(); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildRegisterActionCallback(userName: HTMLInputElement, password: HTMLInputElement): () => void { + return () => this.register(userName.value, password.value); + } } diff --git a/src/app/components/home/_dialogs/user-activation/user-activation.component.html b/src/app/components/home/_dialogs/user-activation/user-activation.component.html index 9b98385e699c7a9793b3484711b22f7e946589c9..0d7da6cb700c331a94f57ad3f5667aed3070a16a 100644 --- a/src/app/components/home/_dialogs/user-activation/user-activation.component.html +++ b/src/app/components/home/_dialogs/user-activation/user-activation.component.html @@ -5,5 +5,10 @@ [formControl]="activationKeyFormControl" name="activation-key"/> <mat-error *ngIf="activationKeyFormControl.hasError('required')">{{ 'login.activation-key-required' | translate }}</mat-error> </mat-form-field> - <button mat-raised-button color="primary" type="submit">{{ 'login.activate' | translate }}</button> </form> +<app-dialog-action-buttons + buttonsLabelSection="login" + confirmButtonLabel="activate" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildActivationActionCallback(userActivationKey)" +></app-dialog-action-buttons> diff --git a/src/app/components/home/_dialogs/user-activation/user-activation.component.ts b/src/app/components/home/_dialogs/user-activation/user-activation.component.ts index 74629868e8f34cb20109be64f5c71f2916e4c0bf..fcfe9cf186e638b3c581a233a8d991f11071b2de 100644 --- a/src/app/components/home/_dialogs/user-activation/user-activation.component.ts +++ b/src/app/components/home/_dialogs/user-activation/user-activation.component.ts @@ -40,4 +40,20 @@ export class UserActivationComponent implements OnInit { } ); } + + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.dialogRef.close(); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildActivationActionCallback(activationKey: HTMLInputElement): () => void { + return () => this.login(activationKey.value); + } } diff --git a/src/app/components/shared/_dialogs/create-comment/create-comment.component.html b/src/app/components/shared/_dialogs/create-comment/create-comment.component.html index 4665e71cc6f8e3bb689199759ecf9159a1816ca9..e2fb312f3898a1f577132f6bec29bdda30c0d1e7 100644 --- a/src/app/components/shared/_dialogs/create-comment/create-comment.component.html +++ b/src/app/components/shared/_dialogs/create-comment/create-comment.component.html @@ -5,10 +5,10 @@ <mat-placeholder class="placeholder">{{ 'comment-page.enter-comment' | translate}}</mat-placeholder> <mat-hint align="end">{{commentBody.value.length}} / 255</mat-hint> </mat-form-field> - <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="20px"> - <button mat-raised-button color="warn" - (click)="onNoClick()">{{ 'comment-page.abort' | translate}}</button> - <button mat-raised-button class="send" - (click)="closeDialog(commentBody.value)">{{ 'comment-page.send' | translate}}</button> - </div> </div> +<app-dialog-action-buttons + buttonsLabelSection="comment-page" + confirmButtonLabel="send" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildCreateCommentActionCallback(commentBody)" +></app-dialog-action-buttons> diff --git a/src/app/components/shared/_dialogs/create-comment/create-comment.component.ts b/src/app/components/shared/_dialogs/create-comment/create-comment.component.ts index 42965ca081bc69f6dc45e385577ab0b87d538275..4934b8e2c193176ae36141db55abd64368db827e 100644 --- a/src/app/components/shared/_dialogs/create-comment/create-comment.component.ts +++ b/src/app/components/shared/_dialogs/create-comment/create-comment.component.ts @@ -60,4 +60,20 @@ export class CreateCommentComponent implements OnInit { this.dialogRef.close(comment); } } + + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.onNoClick(); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildCreateCommentActionCallback(text: HTMLInputElement): () => void { + return () => this.closeDialog(text.value); + } } 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 4611f83d874878904afc9e45deec53b66932a8f5..17dbe121e85ecd60f8dd26183201c468574014d7 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,16 +1,17 @@ <div mat-dialog-content> - <h3>{{ 'header.sure' | translate }}</h3> - <mat-divider></mat-divider> - <p>{{ 'header.really-delete-account' | translate }}</p> - <ul *ngFor="let room of rooms"> - <li>{{ room.name }}</li> - </ul> - <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 style="overflow-y: scroll; max-height: 15rem"> + <h2>{{ 'header.sure' | translate }}</h2> + <mat-divider></mat-divider> + <p>{{ 'header.really-delete-account' | translate }}</p> + <ul *ngFor="let room of rooms"> + <li>{{ room.name }}</li> + </ul> </div> + <app-dialog-action-buttons + buttonsLabelSection="delete-account" + confirmButtonLabel="delete" + [confirmButtonType]=confirmButtonType + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildDeleteAccountActionCallback()" + ></app-dialog-action-buttons> </div> diff --git a/src/app/components/shared/_dialogs/delete-account/delete-account.component.scss b/src/app/components/shared/_dialogs/delete-account/delete-account.component.scss index 58f145905e35e7ec71b5c5f4a30fa6e7317e21fe..204936be45f20d0589c2571513d9f65317c73e27 100644 --- a/src/app/components/shared/_dialogs/delete-account/delete-account.component.scss +++ b/src/app/components/shared/_dialogs/delete-account/delete-account.component.scss @@ -7,20 +7,6 @@ p { margin-bottom: 0; } -button { - margin-top: 10px; -} - -.delete { - background-color: var(--red); - color: var(--on-secondary); -} - -.abort { - background-color: var(--secondary); - color: var(--on-secondary); -} - li { color: var(--on-surface); } diff --git a/src/app/components/shared/_dialogs/delete-account/delete-account.component.ts b/src/app/components/shared/_dialogs/delete-account/delete-account.component.ts index 3e303b59047bda82064ae64db3d29ae6d3e91fdd..692366ada47e9d9109b1567f98dca1d77800ffe4 100644 --- a/src/app/components/shared/_dialogs/delete-account/delete-account.component.ts +++ b/src/app/components/shared/_dialogs/delete-account/delete-account.component.ts @@ -3,6 +3,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { RoomEditComponent } from '../../../creator/_dialogs/room-edit/room-edit.component'; import { RoomService } from '../../../../services/http/room.service'; import { Room } from '../../../../models/room'; +import { DialogConfirmActionButtonType } from '../../dialog/dialog-action-buttons/dialog-action-buttons.component'; @Component({ selector: 'app-delete-account', @@ -13,6 +14,13 @@ export class DeleteAccountComponent implements OnInit { rooms: Room[]; + + /** + * The confirm button type of the delete account. + */ + confirmButtonType: DialogConfirmActionButtonType = DialogConfirmActionButtonType.Alert; + + constructor(public dialogRef: MatDialogRef<RoomEditComponent>, @Inject(MAT_DIALOG_DATA) public data: any, private roomService: RoomService) { } @@ -28,6 +36,23 @@ export class DeleteAccountComponent implements OnInit { this.dialogRef.close(type); } + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.close('abort'); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildDeleteAccountActionCallback(): () => void { + return () => this.close('delete'); + } + + sortRooms() { const roomList = this.rooms.sort((a, b) => { return a.name > b.name ? 1 : -1; diff --git a/src/app/components/shared/_dialogs/room-create/room-create.component.html b/src/app/components/shared/_dialogs/room-create/room-create.component.html index cc30ca3e6a516dadf2c0c5df2252745f04185e1f..742226b4db10fe5d3aa93d8f0bd000d6ebcb1da4 100644 --- a/src/app/components/shared/_dialogs/room-create/room-create.component.html +++ b/src/app/components/shared/_dialogs/room-create/room-create.component.html @@ -6,7 +6,11 @@ <mat-hint align="end" class="count" *ngIf="!emptyInputs">{{roomName.value.length}} / 20</mat-hint> <mat-hint align="start" class="error" *ngIf="emptyInputs"><strong>{{ 'home-page.no-empty-name' | translate }}</strong></mat-hint> </mat-form-field> - <button mat-raised-button type="submit">{{ 'session.create-session' | translate}} - </button> </div> </form> +<app-dialog-action-buttons + buttonsLabelSection="room-create" + confirmButtonLabel="create-room" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildRoomCreateActionCallback(roomName)" +></app-dialog-action-buttons> diff --git a/src/app/components/shared/_dialogs/room-create/room-create.component.scss b/src/app/components/shared/_dialogs/room-create/room-create.component.scss index dc09b64248bdf4663bd21c17b0b445bc16a2d492..f2c6f34965057e0b2af8c56e482a6dd6957e911f 100644 --- a/src/app/components/shared/_dialogs/room-create/room-create.component.scss +++ b/src/app/components/shared/_dialogs/room-create/room-create.component.scss @@ -1,8 +1,3 @@ -.mat-raised-button { - background-color: var(--primary); - color: var(--on-primary); -} - input { color: var(--on-surface); } diff --git a/src/app/components/shared/_dialogs/room-create/room-create.component.ts b/src/app/components/shared/_dialogs/room-create/room-create.component.ts index 5ba8ca0610ec22a2c761165c8a83a9c9aca62b83..ba0ebb0f062c2d23b30af2cb8817b7df96e4da97 100644 --- a/src/app/components/shared/_dialogs/room-create/room-create.component.ts +++ b/src/app/components/shared/_dialogs/room-create/room-create.component.ts @@ -65,7 +65,31 @@ export class RoomCreateComponent implements OnInit { this.authService.setAccess(room.shortId, UserRole.CREATOR); this.authService.assignRole(UserRole.CREATOR); this.router.navigate([`/creator/room/${this.room.shortId}`]); - this.dialogRef.close(); + this.closeDialog(); }); } + + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.closeDialog(); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildRoomCreateActionCallback(room: HTMLInputElement): () => void { + return () => this.addRoom(room.value); + } + + + /** + * Closes the room create dialog on call. + */ + closeDialog(): void { + this.dialogRef.close(); + } } diff --git a/src/app/components/shared/dialog/dialog-action-buttons/dialog-action-buttons.component.html b/src/app/components/shared/dialog/dialog-action-buttons/dialog-action-buttons.component.html new file mode 100644 index 0000000000000000000000000000000000000000..9abaa422c93c7612a3746a6509ef9c743c057340 --- /dev/null +++ b/src/app/components/shared/dialog/dialog-action-buttons/dialog-action-buttons.component.html @@ -0,0 +1,36 @@ +<div class="dialog-action-buttons"> + <mat-divider></mat-divider> + <div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="10px" class="buttons"> + <button + *ngIf="cancelButtonClickAction !== undefined" + mat-button + type="button" + class="cancel-button" + attr.aria-labelledby="{{ ariaPrefix + 'cancel' | translate }}" + (click)="performCancelButtonClickAction()" + >{{ buttonsLabelSection + '.cancel' | translate}}</button> + <button + *ngIf="confirmButtonClickAction !== undefined" + type="button" + mat-flat-button + class="mat-flat-button {{ confirmButtonType }}-confirm-button" + attr.aria-labelledby="{{ ariaPrefix + 'confirm' | translate }}" + (click)="performConfirmButtonClickAction()" + >{{ buttonsLabelSection + '.' + confirmButtonLabel | translate}}</button> + </div> + <!--Hidden Div's for a11y-Descriptions--> + <div class="visually-hidden"> + <div + *ngIf="cancelButtonClickAction !== undefined" + id="{{ ariaPrefix + 'cancel' | translate }}" + > + {{ buttonsLabelSection + '.cancel-description' | translate }} + </div> + <div + *ngIf="confirmButtonClickAction !== undefined" + id="{{ ariaPrefix + 'confirm' | translate }}" + > + {{ buttonsLabelSection + '.' + confirmButtonLabel + '-description' | translate }} + </div> + </div> +</div> diff --git a/src/app/components/shared/dialog/dialog-action-buttons/dialog-action-buttons.component.scss b/src/app/components/shared/dialog/dialog-action-buttons/dialog-action-buttons.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..4b74b4efcbf189cd873384f64639e7ad7f41c3c8 --- /dev/null +++ b/src/app/components/shared/dialog/dialog-action-buttons/dialog-action-buttons.component.scss @@ -0,0 +1,17 @@ +.dialog-action-buttons, .dialog-action-buttons .buttons { + margin-top: 1rem; +} + +.dialog-action-buttons .cancel-button { + color: var(--on-surface); +} + +.primary-confirm-button { + background-color: var(--primary); + color: var(--on-primary); +} + +.alert-confirm-button { + background-color: var(--red); + color: #fff; +} diff --git a/src/app/components/shared/dialog/dialog-action-buttons/dialog-action-buttons.component.ts b/src/app/components/shared/dialog/dialog-action-buttons/dialog-action-buttons.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..782942e14d939b2d113a5b540a688a9307e87147 --- /dev/null +++ b/src/app/components/shared/dialog/dialog-action-buttons/dialog-action-buttons.component.ts @@ -0,0 +1,81 @@ +import { Component, OnInit, Input, Output } from '@angular/core'; + +/** + * Available confirm button types. + */ +export enum DialogConfirmActionButtonType { + Primary = 'primary', + Alert = 'alert' +} + + +@Component({ + selector: 'app-dialog-action-buttons', + templateUrl: './dialog-action-buttons.component.html', + styleUrls: ['./dialog-action-buttons.component.scss'] +}) +export class DialogActionButtonsComponent implements OnInit { + + /** + * The button labels section. + */ + @Input() buttonsLabelSection: string; + + + /** + * The i18n label identifier of the confirm button. + */ + @Input() confirmButtonLabel: string; + + + /** + * The confirm button type. + */ + @Input() confirmButtonType: DialogConfirmActionButtonType = DialogConfirmActionButtonType.Primary; + + + /** + * A callback which will be executed if the confirm button was clicked. + */ + @Input() confirmButtonClickAction: (Function | undefined); + + + /** + * A callback which will be executed if the cancel button was clicked. + */ + @Input() cancelButtonClickAction: (Function | undefined); + + + /** + * The ARIA identifier prefix. + */ + private ariaPrefix: string = (new Date().getTime().toString()); + + + /** + * @inheritDoc + */ + ngOnInit() { + // nothing special yet + } + + + /** + * Performs the confirm button click action. + */ + public performConfirmButtonClickAction(): void { + if (this.confirmButtonClickAction !== undefined) { + this.confirmButtonClickAction(); + } + } + + + /** + * Performs the cancel button click action. + */ + public performCancelButtonClickAction(): void { + if (this.cancelButtonClickAction !== undefined) { + this.cancelButtonClickAction(); + } + } +} diff --git a/src/app/components/shared/header/header.component.ts b/src/app/components/shared/header/header.component.ts index 9206dbf607b6bce4f65fe6dd12fb025d5f7d8973..4d9bf53be925441ef99ebcb3746440ddae2312b1 100644 --- a/src/app/components/shared/header/header.component.ts +++ b/src/app/components/shared/header/header.component.ts @@ -116,8 +116,7 @@ export class HeaderComponent implements OnInit { openDeleteUserDialog() { const dialogRef = this.dialog.open(DeleteAccountComponent, { - width: '600px', - autoFocus: false + width: '600px' }); dialogRef.afterClosed() .subscribe(result => { diff --git a/src/app/components/shared/login/login.component.html b/src/app/components/shared/login/login.component.html index d4566622d61b260576aabb9de1f9686c6b9e1694..924151879b3ce0ac6f3165e995778da2cd50dea7 100644 --- a/src/app/components/shared/login/login.component.html +++ b/src/app/components/shared/login/login.component.html @@ -18,8 +18,6 @@ name="password" placeholder="{{ 'login.password' | translate }}" type="password"/> <mat-error *ngIf="passwordFormControl.hasError('required')">{{ 'login.password-required' | translate }}</mat-error> </mat-form-field> - <button (click)="login(userEmail.value, userPassword.value)" mat-raised-button - matTooltip="{{'login.login-tooltip' | translate}}">{{ 'login.login' | translate }}</button> <div> <button (click)="openPasswordDialog()" class="pwReset" mat-button> {{ 'login-page.password-reset' | translate }} @@ -33,3 +31,9 @@ </button> </div> </form> +<app-dialog-action-buttons + buttonsLabelSection="login-page" + confirmButtonLabel="login" + [cancelButtonClickAction]="buildCloseDialogActionCallback()" + [confirmButtonClickAction]="buildLoginActionCallback(userEmail, userPassword)" +></app-dialog-action-buttons> diff --git a/src/app/components/shared/login/login.component.ts b/src/app/components/shared/login/login.component.ts index 2543871737091bc0acb4db556db676a17be3547d..7b24e2ee1a4867ac26cbb00adce546a6bdb9d503 100644 --- a/src/app/components/shared/login/login.component.ts +++ b/src/app/components/shared/login/login.component.ts @@ -131,4 +131,20 @@ export class LoginComponent implements OnInit, OnChanges { } }); } + + + /** + * Returns a lambda which closes the dialog on call. + */ + buildCloseDialogActionCallback(): () => void { + return () => this.dialog.closeAll(); + } + + + /** + * Returns a lambda which executes the dialog dedicated action on call. + */ + buildLoginActionCallback(userEmail: HTMLInputElement, userPassword: HTMLInputElement): () => void { + return () => this.login(userEmail.value, userPassword.value); + } } diff --git a/src/app/components/shared/shared.module.ts b/src/app/components/shared/shared.module.ts index ed95e571c6a61c9b388dd276026f90d848afd29d..f46d0686c27284c793db12d0107a76ab440dc31c 100644 --- a/src/app/components/shared/shared.module.ts +++ b/src/app/components/shared/shared.module.ts @@ -25,6 +25,7 @@ import { CommentComponent } from './comment/comment.component'; import { CreateCommentComponent } from './_dialogs/create-comment/create-comment.component'; import { PresentCommentComponent } from './_dialogs/present-comment/present-comment.component'; import { DeleteAccountComponent } from './_dialogs/delete-account/delete-account.component'; +import { DialogActionButtonsComponent } from './dialog/dialog-action-buttons/dialog-action-buttons.component'; @NgModule({ imports: [ @@ -56,7 +57,8 @@ import { DeleteAccountComponent } from './_dialogs/delete-account/delete-account CommentComponent, CreateCommentComponent, PresentCommentComponent, - DeleteAccountComponent + DeleteAccountComponent, + DialogActionButtonsComponent ], exports: [ RoomJoinComponent, @@ -75,7 +77,8 @@ import { DeleteAccountComponent } from './_dialogs/delete-account/delete-account StatisticsPageComponent, CreateCommentComponent, PresentCommentComponent, - CommentComponent + CommentComponent, + DialogActionButtonsComponent ], entryComponents: [ RoomCreateComponent, diff --git a/src/assets/i18n/creator/de.json b/src/assets/i18n/creator/de.json index 9f716f13f79c7970a3c5c5d18edfc4d4e95e727e..070e614a2784f35f18455799d59c0582186c8a07 100644 --- a/src/assets/i18n/creator/de.json +++ b/src/assets/i18n/creator/de.json @@ -10,7 +10,10 @@ "create-content": "Frage erstellen", "live-feedback": "Live Feedback", "answer-statistics": "Statistiken", + "cancel": "Zurück", + "cancel-description": "Zurück", "delete-room": "Session löschen", + "delete-room-description": "Session löschen", "sure": "Bist du sicher?", "reallySession": "Willst du die Session ", "reallyContent": "Willst du die Frage ", @@ -64,6 +67,8 @@ "a11y-delete-moderator": "Löscht disen Moderator" }, "content": { + "cancel": "Zurück", + "cancel-description": "Zurück", "content": "Frage", "create": "Erstellen", "collection": "Sammlung", @@ -93,6 +98,7 @@ "undo": "Rückgängig", "points": "Punkte", "delete": "Löschen", + "delete-description": "Löschen", "abort": "Abbrechen", "delete-answer": "Antwort löschen", "edit-answer": "Antwort bearteiten", @@ -118,6 +124,8 @@ "no-answers": "Keine Antworten" }, "comment-page": { + "cancel": "Zurück", + "cancel-description": "Zurück", "enter-title": "Titel", "enter-comment": "Frage", "send": "Senden", @@ -129,6 +137,7 @@ "comma": "Microsoft Excel", "semicolon": "Standard CSV", "export": "Exportieren", + "export-description": "Exportieren", "no-comments": "Keine Fragen vorhanden", "mark-correct": "Frage bejahen", "mark-not-correct": "Frage nicht bejahen", diff --git a/src/assets/i18n/creator/en.json b/src/assets/i18n/creator/en.json index b0267aa471689ec5f281fa822b0285ea8ac74376..d2676dde582f886cfb68721ab9b00d57633891d0 100644 --- a/src/assets/i18n/creator/en.json +++ b/src/assets/i18n/creator/en.json @@ -10,7 +10,10 @@ "create-content": "Create content", "live-feedback": "Live feedback", "answer-statistics": "Statistics", + "cancel": "Cancel", + "cancel-description": "Cancel", "delete-room": "Delete session", + "delete-room-description": "Delete session", "sure": "Are you sure?", "reallySession": "Do you really want to delete session ", "reallyContent": "Do you really want to delete content ", @@ -64,6 +67,8 @@ "a11y-delete-moderator": "Delete this Moderator" }, "content": { + "cancel": "Cancel", + "cancel-description": "Cancel", "content": "Content", "create": "Create", "collection": "Collection", @@ -93,6 +98,7 @@ "undo": "Undo", "points": "Points", "delete": "Delete", + "delete-description": "Delete", "abort": "Abort", "delete-answer": "Delete answer", "edit-answer": "Edit answer", @@ -118,6 +124,8 @@ "no-answers": "No answers" }, "comment-page": { + "cancel": "Cancel", + "cancel-description": "Cancel", "enter-title": "Title", "enter-comment": "Question", "send": "Send", @@ -129,6 +137,7 @@ "comma": "Microsoft Excel", "semicolon": "Standard CSV", "export": "Export", + "export-description": "Export", "no-comments": "No questions yet", "mark-correct": "Mark as correct", "mark-not-correct": "Mark not as correct", diff --git a/src/assets/i18n/home/de.json b/src/assets/i18n/home/de.json index b40164c0e2d68a0a0b776c8091b204c4b53131a3..c94d337a49943163105697256955a1fa2ac593d1 100644 --- a/src/assets/i18n/home/de.json +++ b/src/assets/i18n/home/de.json @@ -19,14 +19,22 @@ "a11y-meeting_room": "Öffnet das Sitzungs-Menu mit Optionen für Benutzer, Pfeiltasten Oben und Unten für die Navigation innerhalb des Menus verwenden.", "a11Y-back": "Dieser Button führt zur vorher besuchten Seite." }, + "delete-account": { + "cancel": "Zurück", + "cancel-description": "Zurück", + "delete": "Löschen", + "delete-description": "Konto löschen" + }, "login-page": { + "cancel": "Zurück", + "cancel-description": "Zurück", "creator": "Dozent/in", "participant": "Student/in", "password-reset": "Passwort vergessen?", "not-registered": "Noch kein Konto?", "register": "Registrieren", "welcome": "Online fragen | Fragen voten", - "login": "Login" + "login": "Anmelden" }, "home-page": { "join-demo-session": "Öffentliche Session betreten", @@ -44,6 +52,8 @@ "install": "Installieren" }, "login": { + "cancel": "Zurück", + "cancel-description": "Zurück", "header": "Login", "email": "E-Mail", "email-invalid": "E-Mail-Adresse ungültig", @@ -64,14 +74,19 @@ "login-tooltip": "Sessions mit allen Fragen werden für 180 Tage gespeichert." }, "password-reset": { + "cancel": "Zurück", + "cancel-description": "Zurück", "email": "E-Mail", "email-invalid": "E-Mail-Adresse ungültig", "email-required": "E-Mail-Adresse erforderlich", "input-incorrect": "Bitte prüfe deine Eingaben.", "reset-password": "Passwort zurücksetzen", + "reset-password-description": "Passwort zurücksetzen", "reset-successful": "Passwort wurde zurückgesetzt. Bitte prüfe deine E-Mails." }, "register": { + "cancel": "Zurück", + "cancel-description": "Zurück", "email": "E-Mail", "email-verify": "E-Mail bestätigen", "email-invalid": "E-Mail-Adresse ungültig", @@ -82,6 +97,7 @@ "password-unmatch": "Passwörter stimmen nicht überein", "password-verify": "Passwort bestätigen", "register": "Registrieren", + "register-description": "Benutzer registrieren", "register-successful": "Erfolgreich registriert. Bitte prüfe deine E-Mails.", "register-unsuccessful": "Bitte prüfe deine Eingaben.", "register-request-error": "Etwas ist bei der Registierung fehlgeschlagen. Hast du dich vielleicht schon registriert?" @@ -109,6 +125,12 @@ "english": "Englisch", "german": "Deutsch" }, + "room-create": { + "cancel": "Zurück", + "cancel-description": "Zurück", + "create-room": "Session erstellen", + "create-room-description": "Neue Session erstellen" + }, "room-list": { "panel-session-name": "Name", "panel-session-id": "Session ID", diff --git a/src/assets/i18n/home/en.json b/src/assets/i18n/home/en.json index 3c833d1793ef66a8eeb5ecf0f6afa22c42043d1f..bf99df80109ef36c2b9f0ac1990a1fd69719944e 100644 --- a/src/assets/i18n/home/en.json +++ b/src/assets/i18n/home/en.json @@ -19,7 +19,15 @@ "a11y-meeting_room": "Opens the session menu with user options, up and down arrow keys for navigation within the menu.", "a11Y-back": "This button leads to the previously visited page." }, + "delete-account": { + "cancel": "Cancel", + "cancel-description": "Cancel account deletion", + "delete": "Delete", + "delete-description": "Delete your Account" + }, "login-page": { + "cancel": "Cancel", + "cancel-description": "Cancel", "creator": "Professor", "participant": "Student", "password-reset": "Forgot your password?", @@ -44,6 +52,8 @@ "install": "Install" }, "login": { + "cancel": "Cancel", + "cancel-description": "Cancel", "header": "Log in", "email": "E-mail", "email-invalid": "E-mail is invalid", @@ -64,14 +74,19 @@ "login-tooltip": "Sessions will be stored for 180 days." }, "password-reset": { + "cancel": "Cancel", + "cancel-description": "Cancel", "email": "E-mail", "email-invalid": "E-mail is invalid.", "email-required": "E-mail required", "input-incorrect": "Please check your data.", "reset-password": "Reset password", + "reset-password-description": "Reset password", "reset-successful": "Password was reset. Please check your mails." }, "register": { + "cancel": "Cancel", + "cancel-description": "Cancel", "email": "E-mail", "email-verify": "Verify e-mail", "email-invalid": "E-mail is invalid.", @@ -82,6 +97,7 @@ "password-unmatch": "Passwords do not match.", "password-verify": "Verify password", "register": "Register", + "register-description": "Register User", "register-successful": "Successfully registered. Please check your mails.", "register-unsuccessful": "Please check your data.", "register-request-error": "Something went wrong with the registration. Maybe you already made the account?" @@ -109,6 +125,12 @@ "english": "English", "german": "German" }, + "room-create": { + "cancel": "Cancel", + "cancel-description": "Cancel", + "create-room": "Create Session", + "create-room-description": "Create new session" + }, "room-list": { "panel-session-name": "Name", "panel-session-id": "Session ID", diff --git a/src/assets/i18n/participant/de.json b/src/assets/i18n/participant/de.json index 1050c82f0f76734380f3dfe960706883ad237961..7e202a2b22c5666140ffbcc95d455eb3d63c48e7 100644 --- a/src/assets/i18n/participant/de.json +++ b/src/assets/i18n/participant/de.json @@ -19,6 +19,8 @@ "a11y-announcer": "Sie befinden sich nun in der Session mit der von Ihnen eingegebenen ID." }, "comment-page": { + "cancel": "Zurück", + "cancel-description": "Zurück", "enter-title": "Titel", "enter-comment": "Deine Frage", "send": "Senden", diff --git a/src/assets/i18n/participant/en.json b/src/assets/i18n/participant/en.json index f18165aa9d58835bf887dd5b53700723b880409c..29250b3e867507ed17f0c0ecdc12c2d20945b8dd 100644 --- a/src/assets/i18n/participant/en.json +++ b/src/assets/i18n/participant/en.json @@ -19,6 +19,8 @@ "a11y-announcer": "You are now in the session with the ID you entered." }, "comment-page": { + "cancel": "Cancel", + "cancel-description": "Cancel", "enter-title": "Title", "enter-comment": "Your question", "send": "Send",