diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 1279c5b43e693307657c1e5d9f88c5ec55913a05..6c6a00c9e93245a180b398fc02145d446b7c56e7 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,10 +1,10 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { LoginPageComponent } from './components/home/login-page/login-page.component'; import { FooterImprintComponent } from './components/shared/footer-imprint/footer-imprint.component'; import { PageNotFoundComponent } from './components/shared/page-not-found/page-not-found.component'; import { CreatorModule } from './components/creator/creator.module'; import { ParticipantModule } from './components/participant/participant.module'; +import { HomePageComponent } from './components/home/home-page/home-page.component'; const routes: Routes = [ { @@ -14,7 +14,7 @@ const routes: Routes = [ }, { path: 'home', - component: LoginPageComponent + component: HomePageComponent }, { path: 'creator', diff --git a/src/app/app.module.ts b/src/app/app.module.ts index a93f5b1b557af94cb1f9293f51fa11e77e890475..764f878156adb1a6bf6e97eafd3e5dc35a5498fa 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,13 +1,11 @@ import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; -import { LoginComponent } from './components/home/login/login.component'; import { RegisterComponent } from './components/home/_dialogs/register/register.component'; import { PasswordResetComponent } from './components/home/_dialogs/password-reset/password-reset.component'; import { AppRoutingModule } from './app-routing.module'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { UserService } from './services/http/user.service'; -import { LoginPageComponent } from './components/home/login-page/login-page.component'; import { NotificationService } from './services/util/notification.service'; import { AuthenticationService } from './services/http/authentication.service'; import { AuthenticationGuard } from './guards/authentication.guard'; @@ -24,17 +22,19 @@ import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { LanguageService } from './services/util/language.service'; import { MarkdownService, MarkedOptions } from 'ngx-markdown'; +import { NewLandingComponent } from './components/home/new-landing/new-landing.component'; +import { HomePageComponent } from './components/home/home-page/home-page.component'; export function dialogClose(dialogResult: any) { } @NgModule({ declarations: [ AppComponent, - LoginPageComponent, - LoginComponent, PasswordResetComponent, RegisterComponent, - UserActivationComponent + UserActivationComponent, + NewLandingComponent, + HomePageComponent ], entryComponents: [ RegisterComponent, 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 8d6b6c84d5933055dae5bd5467179e098e237431..b8ac7c16b6c2b5261e292993b0c826833693f6e1 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,7 +2,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { NotificationService } from '../../../../services/util/notification.service'; -import { RoomCreateComponent } from '../room-create/room-create.component'; +import { RoomCreateComponent } from '../../../shared/_dialogs/room-create/room-create.component'; import { RoomService } from '../../../../services/http/room.service'; import { Room } from '../../../../models/room'; 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 cd52da6b55c83b3f913907c2a7f75b9b31254972..b9f3a3cb7a3c503f529ce55bd20a3132be975df7 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 @@ -1,6 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { Room } from '../../../../models/room'; -import { RoomCreateComponent } from '../room-create/room-create.component'; +import { RoomCreateComponent } from '../../../shared/_dialogs/room-create/room-create.component'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; @Component({ diff --git a/src/app/components/creator/content-list/content-list.component.html b/src/app/components/creator/content-list/content-list.component.html index ff9b3013530bb8b885206e736564edaf1c825bff..f5e939b8abac85ab96d84b5b29a54552f2d38016 100644 --- a/src/app/components/creator/content-list/content-list.component.html +++ b/src/app/components/creator/content-list/content-list.component.html @@ -36,6 +36,9 @@ <mat-card-content> <mat-expansion-panel *ngFor="let content of contents"> <mat-expansion-panel-header> + <mat-panel-title> + {{ content.subject }} + </mat-panel-title> <button mat-icon-button color="accent" (click)="editContent(content);$event.stopPropagation();"> <mat-icon>create</mat-icon> </button> @@ -43,12 +46,9 @@ class="deleteButton"> <mat-icon>delete_forever</mat-icon> </button> - <mat-panel-title> - {{ content.subject }} - </mat-panel-title> </mat-expansion-panel-header> <mat-panel-description> - {{ content.body }} + {{ content.body }} </mat-panel-description> </mat-expansion-panel> </mat-card-content> diff --git a/src/app/components/creator/creator.module.ts b/src/app/components/creator/creator.module.ts index dafab2dc5774102d634182533f6dd58b3d629796..c23c99c1d5ebfe62683d1d2c960c9e05630a9a85 100644 --- a/src/app/components/creator/creator.module.ts +++ b/src/app/components/creator/creator.module.ts @@ -9,7 +9,6 @@ import { ContentYesNoCreatorComponent } from './content-yes-no-creator/content-y import { HomeCreatorPageComponent } from './home-creator-page/home-creator-page.component'; import { RoomCreatorPageComponent } from './room-creator-page/room-creator-page.component'; import { EssentialsModule } from '../essentials/essentials.module'; -import { RoomCreateComponent } from './_dialogs/room-create/room-create.component'; import { RoomDeleteComponent } from './_dialogs/room-delete/room-delete.component'; import { RoomEditComponent } from './_dialogs/room-edit/room-edit.component'; import { AnswerEditComponent } from './_dialogs/answer-edit/answer-edit.component'; @@ -45,7 +44,6 @@ import { ContentEditComponent } from './_dialogs/content-edit/content-edit.compo ContentYesNoCreatorComponent, HomeCreatorPageComponent, RoomCreatorPageComponent, - RoomCreateComponent, RoomDeleteComponent, RoomEditComponent, ContentCreatorComponent, @@ -53,7 +51,6 @@ import { ContentEditComponent } from './_dialogs/content-edit/content-edit.compo ContentEditComponent ], entryComponents: [ - RoomCreateComponent, RoomDeleteComponent, RoomEditComponent, AnswerEditComponent, diff --git a/src/app/components/creator/home-creator-page/home-creator-page.component.ts b/src/app/components/creator/home-creator-page/home-creator-page.component.ts index e406035e50c9d23305e36992785db6e8e9c4e06d..614f639e06761f1bddeb43da287a099defb1da98 100644 --- a/src/app/components/creator/home-creator-page/home-creator-page.component.ts +++ b/src/app/components/creator/home-creator-page/home-creator-page.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material'; -import { RoomCreateComponent } from '../_dialogs/room-create/room-create.component'; +import { RoomCreateComponent } from '../../shared/_dialogs/room-create/room-create.component'; import { TranslateService } from '@ngx-translate/core'; import { LanguageService } from '../../../services/util/language.service'; diff --git a/src/app/components/home/home-page/home-page.component.html b/src/app/components/home/home-page/home-page.component.html new file mode 100644 index 0000000000000000000000000000000000000000..e829c2b878c952b04e2258df948f295bd6b89d8c --- /dev/null +++ b/src/app/components/home/home-page/home-page.component.html @@ -0,0 +1,28 @@ +<div fxLayout="column" fxLayoutAlign="center" fxLayoutGap="20px" fxFill> + <div fxLayout="row" fxLayoutAlign="center" *ngIf="mobile === true"> + <h1> + <span class="main-heading-secondary">{{ 'login-page.welcome' | translate }}</span> + <span class="main-heading-primary">ARSnova</span> + </h1> + </div> + <div fxLayout="row" fxLayoutAlign="center"> + <mat-card class="outer"> + <mat-card-content> + <mat-card-header *ngIf="mobile === false"> + <mat-card-title> + <h1> + <span class="main-heading-secondary">{{ 'login-page.welcome' | translate }}</span> + <span class="main-heading-primary">ARSnova</span> + </h1> + </mat-card-title> + </mat-card-header> + <div fxLayout="column" fxLayoutAlign="center" fxLayoutGap="20px" fxFill> + <div fxLayout="row" fxLayoutAlign="center"> + <app-new-landing></app-new-landing> + </div> + </div> + </mat-card-content> + </mat-card> + </div> +</div> + diff --git a/src/app/components/home/login-page/login-page.component.scss b/src/app/components/home/home-page/home-page.component.scss similarity index 78% rename from src/app/components/home/login-page/login-page.component.scss rename to src/app/components/home/home-page/home-page.component.scss index f999211fecfc4c4e71a5dae794e299f5c3c5d591..91512460d0dcf1beb2bfafef6922d91b00a76b9f 100644 --- a/src/app/components/home/login-page/login-page.component.scss +++ b/src/app/components/home/home-page/home-page.component.scss @@ -1,23 +1,11 @@ @import '../../../../styles'; -.mat-raised-button { - margin-top: 2%; -} - -.inner { - min-width: 320px; - background-color: #f5f5f5; -} - .outer { - width: 500px; + width: 90%; + max-width: 500px; background-color: #bbdefb; } -.main-heading { - text-align: center; -} - .main-heading-primary { display: block; font-size: 150%; @@ -26,12 +14,13 @@ letter-spacing: 10px; color: mat-color($arsnova-primary,500); animation: moveInLeft 2s ease-out; + padding-top: 10px; } .main-heading-secondary { font-family: sans-serif; display: block; - font-size: 50%; + font-size: 60%; text-align: center; letter-spacing: 10px; color: mat-color($arsnova-accent,500); @@ -70,14 +59,6 @@ } } -.regButton { - min-width: 107px; -} - -.pwButton { - min-width: 178px; -} - mat-card-header { justify-content: center; } diff --git a/src/app/components/home/login-page/login-page.component.spec.ts b/src/app/components/home/home-page/home-page.component.spec.ts similarity index 54% rename from src/app/components/home/login-page/login-page.component.spec.ts rename to src/app/components/home/home-page/home-page.component.spec.ts index 667c26bdc70122ab768adaeb0c7a0066dadfda3a..e1803322c202e2507b561689292ee8a3b326ef93 100644 --- a/src/app/components/home/login-page/login-page.component.spec.ts +++ b/src/app/components/home/home-page/home-page.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { LoginPageComponent } from './login-page.component'; +import { HomePageComponent } from './home-page.component'; -describe('LoginComponentPageComponent', () => { - let component: LoginPageComponent; - let fixture: ComponentFixture<LoginPageComponent>; +describe('HomePageComponent', () => { + let component: HomePageComponent; + let fixture: ComponentFixture<HomePageComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ LoginPageComponent ] + declarations: [ HomePageComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(LoginPageComponent); + fixture = TestBed.createComponent(HomePageComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/components/home/home-page/home-page.component.ts b/src/app/components/home/home-page/home-page.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..b630f9533564845829998678511c6a22e9c0be36 --- /dev/null +++ b/src/app/components/home/home-page/home-page.component.ts @@ -0,0 +1,20 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-home-page', + templateUrl: './home-page.component.html', + styleUrls: ['./home-page.component.scss'] +}) +export class HomePageComponent implements OnInit { + + mobile: boolean = true; + + constructor() { } + + ngOnInit() { + if (window.innerWidth > 500) { + this.mobile = false; + } + } + +} diff --git a/src/app/components/home/login-page/login-page.component.html b/src/app/components/home/login-page/login-page.component.html deleted file mode 100644 index 0ff5ac2362fc73f0b0016a7863b47c58d0a8dc4a..0000000000000000000000000000000000000000 --- a/src/app/components/home/login-page/login-page.component.html +++ /dev/null @@ -1,46 +0,0 @@ -<div fxLayout="column" fxLayoutAlign="center" fxLayoutGap="20px" fxFill> - <div fxLayout="row" fxLayoutAlign="center"> - <mat-card class="outer"> - <mat-card-header> - <mat-card-title> - <h1> - <span class="main-heading-secondary">{{ 'login-page.welcome' | translate }}</span> - <span class="main-heading-primary">ARSnova</span> - </h1> - </mat-card-title> - </mat-card-header> - <mat-card-content> - <div fxLayout="column" fxLayoutAlign="center" fxLayoutGap="20px" fxFill> - <div fxLayout="row" fxLayoutAlign="center"> - <mat-card class="inner"> - <mat-tab-group class="login-tab-group"> - <mat-tab label="{{ 'login-page.creator' | translate }}"> - <div fxLayout="column" fxLayoutAlign="start" fxLayoutGap="20px"> - <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="5px"> - <app-login fxFill [role]="UserRole.CREATOR" [username]="username" [password]="password"></app-login> - </div> - </div> - </mat-tab> - <mat-tab label="{{ 'login-page.participant' | translate }}"> - <div fxLayout="column" fxLayoutAlign="start" fxLayoutGap="20px"> - <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="5px"> - <app-login fxFill [role]="UserRole.PARTICIPANT"></app-login> - </div> - </div> - </mat-tab> - </mat-tab-group> - <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="15px"> - <button mat-raised-button class="regButton" color="primary" (click)="openRegisterDialog()"> - {{ 'login-page.register' | translate }} - </button> - <button mat-raised-button class="pwButton" color="primary" (click)="openPasswordDialog()"> - {{ 'login-page.password-reset' | translate }} - </button> - </div> - </mat-card> - </div> - </div> - </mat-card-content> - </mat-card> - </div> -</div> diff --git a/src/app/components/home/login-page/login-page.component.ts b/src/app/components/home/login-page/login-page.component.ts deleted file mode 100644 index 05ba1d0157f30658ac913dfb601359d26ce048f1..0000000000000000000000000000000000000000 --- a/src/app/components/home/login-page/login-page.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { MatDialog } from '@angular/material'; -import { RegisterComponent } from '../_dialogs/register/register.component'; -import { PasswordResetComponent } from '../_dialogs/password-reset/password-reset.component'; -import { UserRole } from '../../../models/user-roles.enum'; - -@Component({ - selector: 'app-login-page', - templateUrl: './login-page.component.html', - styleUrls: ['./login-page.component.scss'] -}) -export class LoginPageComponent implements OnInit { - UserRole = UserRole; - username: string; - password: string; - - constructor(public dialog: MatDialog) { - } - - openRegisterDialog(): void { - this.dialog.open(RegisterComponent, { - width: '350px' - }).afterClosed().subscribe(result => { - this.username = result.username; - this.password = result.password; - }); - } - - openPasswordDialog(): void { - this.dialog.open(PasswordResetComponent, { - width: '350px' - }); - } - - ngOnInit() { - } - -} diff --git a/src/app/components/home/login/login.component.scss b/src/app/components/home/login/login.component.scss deleted file mode 100644 index 66474288ef25a5ef6577bdbc4be9c9072bd15e0f..0000000000000000000000000000000000000000 --- a/src/app/components/home/login/login.component.scss +++ /dev/null @@ -1,7 +0,0 @@ -form { - padding: 10px; -} - -.guestButton { - background-color: #bbdefb; -} diff --git a/src/app/components/home/new-landing/new-landing.component.html b/src/app/components/home/new-landing/new-landing.component.html new file mode 100644 index 0000000000000000000000000000000000000000..dcc8cccfa0965626cfdc1ca5d3693aeac7547948 --- /dev/null +++ b/src/app/components/home/new-landing/new-landing.component.html @@ -0,0 +1,7 @@ +<div fxLayout="column" fxLayoutAlign="center center" fxlayoutgap="20px" fxFill> + <app-room-join></app-room-join> + <button mat-fab class="fab-extended" color="primary" (click)="createSession()"> + <mat-icon class="add">add</mat-icon> + {{'home-page.create-session' | translate}} + </button> +</div> diff --git a/src/app/components/home/new-landing/new-landing.component.scss b/src/app/components/home/new-landing/new-landing.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..f43f1a749630219f8dcf7c61dfa990d6f411a158 --- /dev/null +++ b/src/app/components/home/new-landing/new-landing.component.scss @@ -0,0 +1,13 @@ +.fab-extended { + width: 75%; + height: 40px; + border-radius: 32px; + margin-bottom: 5%; + font-size: large; +} + +.add { + transform: scale(1.4); + padding-right: 5px; + padding-left: 5px; +} diff --git a/src/app/components/home/new-landing/new-landing.component.spec.ts b/src/app/components/home/new-landing/new-landing.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..d663781f660da0b40ecca554e4b3830e6e616da2 --- /dev/null +++ b/src/app/components/home/new-landing/new-landing.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NewLandingComponent } from './new-landing.component'; + +describe('NewLandingComponent', () => { + let component: NewLandingComponent; + let fixture: ComponentFixture<NewLandingComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ NewLandingComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NewLandingComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/home/new-landing/new-landing.component.ts b/src/app/components/home/new-landing/new-landing.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..ef110d46df204a791bafe053b3fb48659b36ff2b --- /dev/null +++ b/src/app/components/home/new-landing/new-landing.component.ts @@ -0,0 +1,62 @@ +import { Component, OnInit } from '@angular/core'; +import { RoomCreateComponent } from '../../shared/_dialogs/room-create/room-create.component'; +import { MatDialog } from '@angular/material'; +import { Router } from '@angular/router'; +import { TranslateService } from '@ngx-translate/core'; +import { LanguageService } from '../../../services/util/language.service'; +import { AuthenticationService } from '../../../services/http/authentication.service'; +import { User } from '../../../models/user'; +import { UserRole } from '../../../models/user-roles.enum'; +import { LoginComponent } from '../../shared/login/login.component'; + +@Component({ + selector: 'app-new-landing', + templateUrl: './new-landing.component.html', + styleUrls: ['./new-landing.component.scss'] +}) +export class NewLandingComponent implements OnInit { + + user: User; + + constructor(private router: Router, + public dialog: MatDialog, + private translateService: TranslateService, + protected langService: LanguageService, + public authenticationService: AuthenticationService) { + langService.langEmitter.subscribe(lang => translateService.use(lang)); + } + + ngOnInit() { + this.translateService.use(localStorage.getItem('currentLang')); + this.authenticationService.watchUser.subscribe(newUser => this.user = newUser); + } + + createSession() { + if (!this.user || this.user.isGuest) { + this.openLoginDialog(); + } else { + this.openCreateRoomDialog(); + } + } + + openCreateRoomDialog(): void { + this.dialog.open(RoomCreateComponent, { + width: '350px' + }); + } + + openLoginDialog(): void { + const dialogRef = this.dialog.open(LoginComponent, { + width: '350px' + }); + dialogRef.componentInstance.role = UserRole.CREATOR; + dialogRef.componentInstance.isStandard = false; + dialogRef.componentInstance.guestAllowed = false; + dialogRef.afterClosed() + .subscribe(result => { + if (this.user && !this.user.isGuest) { + this.openCreateRoomDialog(); + } + }); + } +} diff --git a/src/app/components/creator/_dialogs/room-create/room-create.component.html b/src/app/components/shared/_dialogs/room-create/room-create.component.html similarity index 100% rename from src/app/components/creator/_dialogs/room-create/room-create.component.html rename to src/app/components/shared/_dialogs/room-create/room-create.component.html diff --git a/src/app/components/creator/_dialogs/room-create/room-create.component.scss b/src/app/components/shared/_dialogs/room-create/room-create.component.scss similarity index 100% rename from src/app/components/creator/_dialogs/room-create/room-create.component.scss rename to src/app/components/shared/_dialogs/room-create/room-create.component.scss diff --git a/src/app/components/creator/_dialogs/room-create/room-create.component.spec.ts b/src/app/components/shared/_dialogs/room-create/room-create.component.spec.ts similarity index 100% rename from src/app/components/creator/_dialogs/room-create/room-create.component.spec.ts rename to src/app/components/shared/_dialogs/room-create/room-create.component.spec.ts diff --git a/src/app/components/creator/_dialogs/room-create/room-create.component.ts b/src/app/components/shared/_dialogs/room-create/room-create.component.ts similarity index 100% rename from src/app/components/creator/_dialogs/room-create/room-create.component.ts rename to src/app/components/shared/_dialogs/room-create/room-create.component.ts diff --git a/src/app/components/shared/content-groups/content-groups.component.html b/src/app/components/shared/content-groups/content-groups.component.html index 76764e7da23e29279607db640783aa27b118ab7b..105b7bcaffda409a817eb302be6603fc9626cd64 100644 --- a/src/app/components/shared/content-groups/content-groups.component.html +++ b/src/app/components/shared/content-groups/content-groups.component.html @@ -1,10 +1,10 @@ <mat-card *ngFor="let contentGroup of contentGroups" (click)="viewContents(contentGroup)"> <mat-card-header> <mat-card-title> - <h4 *ngIf="!(contentGroup.name == 'Default')">{{contentGroup.name}}<mat-icon color="accent" - matBadge="{{contentGroup.contentIds.length}}" matBadgePosition="after" matBadgeColor="accent"></mat-icon></h4> - <h4 *ngIf="contentGroup.name == 'Default'">{{'room-page.default-content-group' | translate}}<mat-icon color="accent" - matBadge="{{contentGroup.contentIds.length}}" matBadgePosition="after" matBadgeColor="accent"></mat-icon></h4> + <h4 *ngIf="!(contentGroup.name === 'Default')">{{contentGroup.name}}</h4> + <h4 *ngIf="contentGroup.name === 'Default'">{{'room-page.default-content-group' | translate}}</h4> </mat-card-title> + <mat-icon color="accent" matBadge="{{contentGroup.contentIds.length}}" + matBadgePosition="after" matBadgeColor="accent"></mat-icon> </mat-card-header> </mat-card> diff --git a/src/app/components/shared/content-groups/content-groups.component.scss b/src/app/components/shared/content-groups/content-groups.component.scss index 892932db7d11d4b3c8f68363bd8af4545626474e..ad4034c12d1a50c819deeca576fef6ab75e57181 100644 --- a/src/app/components/shared/content-groups/content-groups.component.scss +++ b/src/app/components/shared/content-groups/content-groups.component.scss @@ -8,7 +8,9 @@ top: 0; text-align: center; transition: all 0.25s; - margin-top: 1.5%; + margin-top: 10px; + max-height: 80px; + padding: 5px; &:hover { cursor: pointer; @@ -17,3 +19,7 @@ box-shadow: 0 12px 16px rgba(0, 0, 0, 0.2); } } + +mat-icon { + margin-top: 20px; +} diff --git a/src/app/components/shared/header/header.component.html b/src/app/components/shared/header/header.component.html index 68eee7c5ad1f9a1020e0362bbba8c904aa7085b9..8b775a21b0050a0817ade3a3b79fb659daebbfda 100644 --- a/src/app/components/shared/header/header.component.html +++ b/src/app/components/shared/header/header.component.html @@ -5,7 +5,7 @@ <span> {{ 'header.back' | translate }}</span> </button> <span class="fill-remaining-space"></span> - <span class="app-title" (click)="goToHomepage()">ARSnova</span> + <span *ngIf="router.url !== '/home'" class="app-title" (click)="goToHomepage()">ARSnova</span> <span class="fill-remaining-space"></span> <mat-menu #langMenu="matMenu" [overlapTrigger]="false"> @@ -18,11 +18,34 @@ </button> <mat-menu #appMenu="matMenu" [overlapTrigger]="false"> - <button mat-button (click)="logout()"> + <button mat-menu-item *ngIf="user && user.role === 1" routerLink="/creator"> + <mat-icon color="primary">style</mat-icon> + <span>{{'header.my-sessions' | translate}}</span> + </button> + <button mat-menu-item *ngIf="user && user.role === 0" routerLink="/participant"> + <mat-icon color="primary">turned_in</mat-icon> + <span>{{'header.visited-sessions' | translate}}</span> + </button> + <button mat-menu-item (click)="logout()"> <mat-icon color="warn">exit_to_app</mat-icon> <span>{{ 'header.logout' | translate }}</span> </button> </mat-menu> + + <mat-menu #userMenu="matMenu" [overlapTrigger]="false"> + <button mat-menu-item (click)=login(true)> + <mat-icon color="primary">record_voice_over</mat-icon> + <span>{{ 'login-page.creator' | translate }}</span> + </button> + <button mat-menu-item (click)=login(false)> + <mat-icon color="primary">supervisor_account</mat-icon> + <span>{{ 'login-page.participant' | translate }}</span> + </button> + </mat-menu> + + <button mat-icon-button *ngIf="!user" [matMenuTriggerFor]="userMenu"> + <mat-icon>account_box</mat-icon> + </button> <button mat-icon-button *ngIf="user" [matMenuTriggerFor]="appMenu"> <mat-icon *ngIf="user.role === 1" aria-label="Example icon-button with a heart icon" color="accent">record_voice_over</mat-icon> <mat-icon *ngIf="user.role === 0" aria-label="Example icon-button with a heart icon" color="accent">supervisor_account</mat-icon> diff --git a/src/app/components/shared/header/header.component.ts b/src/app/components/shared/header/header.component.ts index 8d72c3be780d0fa0d8e844308b201e455a99dd41..c5d28a7f134191acbeaa6ea96293c1ed3ca6203a 100644 --- a/src/app/components/shared/header/header.component.ts +++ b/src/app/components/shared/header/header.component.ts @@ -7,6 +7,8 @@ import { UserRole } from '../../../models/user-roles.enum'; import { Location } from '@angular/common'; import { TranslateService } from '@ngx-translate/core'; import { LanguageService } from '../../../services/util/language.service'; +import { MatDialog } from '@angular/material'; +import { LoginComponent } from '../login/login.component'; @Component({ selector: 'app-header', @@ -21,7 +23,8 @@ export class HeaderComponent implements OnInit { private notificationService: NotificationService, public router: Router, private translationService: TranslateService, - private langService: LanguageService) { + private langService: LanguageService, + public dialog: MatDialog) { } ngOnInit() { @@ -69,6 +72,15 @@ export class HeaderComponent implements OnInit { this.translationService.use(language); localStorage.setItem('currentLang', language); this.langService.langEmitter.emit(language); + } + login(isDozent: boolean) { + const dialogRef = this.dialog.open(LoginComponent, { + width: '350px' + }); + let role = (isDozent === true) ? UserRole.CREATOR : UserRole.PARTICIPANT; + dialogRef.componentInstance.role = role; + dialogRef.componentInstance.isStandard = true; } + } diff --git a/src/app/components/home/login/login.component.html b/src/app/components/shared/login/login.component.html similarity index 54% rename from src/app/components/home/login/login.component.html rename to src/app/components/shared/login/login.component.html index b0ee7ab3756ee9e5069865f56705960bdbac76c2..01e85e02defd5f7310021b121909e18c0ef8323a 100644 --- a/src/app/components/home/login/login.component.html +++ b/src/app/components/shared/login/login.component.html @@ -1,5 +1,4 @@ -<form (ngSubmit)="login(userEmail.value, userPassword.value)" fxLayout="column" fxLayoutAlign="space-around" - fxLayoutGap="10px"> +<form fxLayout="column" fxLayoutAlign="space-around" fxLayoutGap="5px"> <mat-form-field class="input-block"> <input matInput #userEmail placeholder="{{ 'login.email' | translate }}" [formControl]="usernameFormControl" [errorStateMatcher]="matcher" name="username"/> @@ -10,13 +9,24 @@ {{ 'login.email-required' | translate }} </mat-error> </mat-form-field> - <mat-form-field class="input-block"> + <mat-form-field> <input matInput #userPassword type="password" placeholder="{{ 'login.password' | translate }}" [formControl]="passwordFormControl" [errorStateMatcher]="matcher" name="password"/> <mat-error *ngIf="passwordFormControl.hasError('required')">{{ 'login.password-required' | translate }}</mat-error> </mat-form-field> - <button mat-raised-button color="accent" type="submit">{{ 'login.login' | translate }}</button> - <button mat-raised-button (click)="guestLogin()" type="button" class="guestButton"> + <button mat-raised-button color="accent" (click)="login(userEmail.value, userPassword.value)">{{ 'login.login' | translate }}</button> + <button mat-raised-button *ngIf="guestAllowed === true" color="primary" (click)="guestLogin()" type="button" class="guestButton"> {{ 'login.guest-login' | translate }} </button> + <div align="start"> + <button mat-button color="primary" class="pwReset" (click)="openPasswordDialog()"> + {{ 'login-page.password-reset' | translate }} + </button> + </div> + <div fxLayout="row"> + <p>Noch keinen Account?</p> + <button mat-button color="primary" class="regButton" (click)="openRegisterDialog()"> + {{ 'login-page.register' | translate }} + </button> + </div> </form> diff --git a/src/app/components/shared/login/login.component.scss b/src/app/components/shared/login/login.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..bdb5da25a13399581499b15b859b333f9d59bbbc --- /dev/null +++ b/src/app/components/shared/login/login.component.scss @@ -0,0 +1,16 @@ +.pwReset { + padding-left: 0px; +} + +.regButton { + margin-top: 20px; + padding: 0px; +} + +p { + font-size: small; + margin-bottom: 0px; + margin-top: 30px; + margin-left: 30px; + margin-right: 5px; +} \ No newline at end of file diff --git a/src/app/components/home/login/login.component.spec.ts b/src/app/components/shared/login/login.component.spec.ts similarity index 100% rename from src/app/components/home/login/login.component.spec.ts rename to src/app/components/shared/login/login.component.spec.ts diff --git a/src/app/components/home/login/login.component.ts b/src/app/components/shared/login/login.component.ts similarity index 73% rename from src/app/components/home/login/login.component.ts rename to src/app/components/shared/login/login.component.ts index c27b42247c48afc6315110660820ff42d2017172..e05319c1590dc2c6799ea78eba4d9d11f3b508de 100644 --- a/src/app/components/home/login/login.component.ts +++ b/src/app/components/shared/login/login.component.ts @@ -1,12 +1,14 @@ -import { Component, Input, OnInit, OnChanges, SimpleChanges } from '@angular/core'; +import { Component, Input, OnInit, OnChanges, SimpleChanges, Inject } from '@angular/core'; import { AuthenticationService } from '../../../services/http/authentication.service'; import { Router } from '@angular/router'; import { NotificationService } from '../../../services/util/notification.service'; -import { ErrorStateMatcher, MatDialog } from '@angular/material'; +import { ErrorStateMatcher, MatDialog, MAT_DIALOG_DATA } from '@angular/material'; import { FormControl, FormGroupDirective, NgForm, Validators } from '@angular/forms'; import { UserRole } from '../../../models/user-roles.enum'; import { TranslateService } from '@ngx-translate/core'; -import { UserActivationComponent } from '../_dialogs/user-activation/user-activation.component'; +import { UserActivationComponent } from '../../home/_dialogs/user-activation/user-activation.component'; +import { PasswordResetComponent } from '../../home/_dialogs/password-reset/password-reset.component'; +import { RegisterComponent } from '../../home/_dialogs/register/register.component'; export class LoginErrorStateMatcher implements ErrorStateMatcher { isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean { @@ -21,9 +23,11 @@ export class LoginErrorStateMatcher implements ErrorStateMatcher { styleUrls: ['./login.component.scss'] }) export class LoginComponent implements OnInit, OnChanges { - @Input() public role: UserRole; - @Input() public username: string; - @Input() public password: string; + role: UserRole; + username: string; + password: string; + isStandard = true; + guestAllowed = true; usernameFormControl = new FormControl('', [Validators.required, Validators.email]); passwordFormControl = new FormControl('', [Validators.required]); @@ -36,7 +40,8 @@ export class LoginComponent implements OnInit, OnChanges { public router: Router, private translationService: TranslateService, public notificationService: NotificationService, - public dialog: MatDialog) { + public dialog: MatDialog, + @Inject(MAT_DIALOG_DATA) public data: any) { } ngOnInit() { @@ -96,10 +101,13 @@ export class LoginComponent implements OnInit, OnChanges { this.translationService.get('login.login-successful').subscribe(message => { this.notificationService.show(message); }); - if (this.role === UserRole.CREATOR) { - this.router.navigate(['creator']); - } else { - this.router.navigate(['participant']); + this.dialog.closeAll(); + if (this.isStandard) { + if (this.role === UserRole.CREATOR) { + this.router.navigate(['creator']); + } else { + this.router.navigate(['participant']); + } } } else if (loginSuccessful === 'activation') { this.activateUser(); @@ -109,4 +117,19 @@ export class LoginComponent implements OnInit, OnChanges { }); } } + + openPasswordDialog(): void { + this.dialog.open(PasswordResetComponent, { + width: '350px' + }); + } + + openRegisterDialog(): void { + this.dialog.open(RegisterComponent, { + width: '350px' + }).afterClosed().subscribe(result => { + this.username = result.username; + this.password = result.password; + }); + } } diff --git a/src/app/components/shared/room-join/room-join.component.html b/src/app/components/shared/room-join/room-join.component.html index c26e85683c0107b338b9fd5b1a5959ecffa4a5e7..77eefa0677066cb78e6ec0ddca1bd4ac9185f4e6 100644 --- a/src/app/components/shared/room-join/room-join.component.html +++ b/src/app/components/shared/room-join/room-join.component.html @@ -1,15 +1,17 @@ +<div fxLayout="column" fxLayoutAlign="center center" fxlayoutgap="50px" fxFill> <form (ngSubmit)="joinRoom(roomId.value)"> - <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> - <mat-form-field class="input-block"> - <input matInput #roomId placeholder="{{ 'home-page.session-id' | translate}}" [formControl]="roomFormControl" - [errorStateMatcher]="matcher" maxlength="8"/> - <mat-hint align="end">{{roomId.value.length}} / 8</mat-hint> - <mat-error *ngIf="roomFormControl.hasError('required')">{{ 'home-page.please-enter' | translate}}</mat-error> - <mat-error *ngIf="roomFormControl.hasError('minlength')">{{ 'home-page.exactly-8' | translate}}</mat-error> - </mat-form-field> - <button mat-fab color="primary" type="submit"> - <mat-icon>input</mat-icon> - </button> - </div> + <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> + <mat-form-field class="number"> + <input matInput #roomId placeholder="Session-Id" [formControl]="roomFormControl" + [errorStateMatcher]="matcher" maxlength="8"/> + <mat-hint align="end">{{roomId.value.length}} / 8</mat-hint> + <mat-error *ngIf="roomFormControl.hasError('required')">{{ 'home-page.please-enter' | translate}}</mat-error> + <mat-error *ngIf="roomFormControl.hasError('minlength')">{{ 'home-page.exactly-8' | translate}}</mat-error> + </mat-form-field> + <button mat-fab color="accent" type="submit"> + <mat-icon>input</mat-icon> + </button> + </div> </form> -<button mat-button color="primary" (click)="joinDemo()">{{ 'home-page.join-demo-session' | translate}}<mat-icon color="accent">lightbulb_outline</mat-icon></button> +<button mat-button class="demo" color="primary" (click)="joinDemo()">Demo Session<mat-icon color="accent">lightbulb_outline</mat-icon></button> +</div> diff --git a/src/app/components/shared/room-join/room-join.component.scss b/src/app/components/shared/room-join/room-join.component.scss index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6a6e30f8821106ba6d07c08016c77d41d3c5d5c9 100644 --- a/src/app/components/shared/room-join/room-join.component.scss +++ b/src/app/components/shared/room-join/room-join.component.scss @@ -0,0 +1,20 @@ +mat-form-field { + font-size: x-large; +} + +form { + padding-top: 5%; +} + +.demo { + margin-bottom: 20px; +} + +mat-error { + font-size: small; +} + +.mat-fab { + width: 65px; + height: 65px; +} diff --git a/src/app/components/shared/room-join/room-join.component.ts b/src/app/components/shared/room-join/room-join.component.ts index e018ee7de467b7df33a414ce32c231e3be111b62..1a556ec7661b132707121ecef3e6f9fd20239d00 100644 --- a/src/app/components/shared/room-join/room-join.component.ts +++ b/src/app/components/shared/room-join/room-join.component.ts @@ -6,8 +6,11 @@ import { RegisterErrorStateMatcher } from '../../home/_dialogs/register/register import { FormControl, FormGroupDirective, NgForm, Validators } from '@angular/forms'; import { ErrorStateMatcher } from '@angular/material'; import { NotificationService } from '../../../services/util/notification.service'; -import {LanguageService} from "../../../services/util/language.service"; -import {TranslateService} from "@ngx-translate/core"; +import { TranslateService } from '@ngx-translate/core'; +import { AuthenticationService } from '../../../services/http/authentication.service'; +import { UserRole } from '../../../models/user-roles.enum'; +import { User } from '../../../models/user'; +import {log} from "util"; export class JoinErrorStateMatcher implements ErrorStateMatcher { isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean { @@ -24,7 +27,8 @@ export class JoinErrorStateMatcher implements ErrorStateMatcher { export class RoomJoinComponent implements OnInit { room: Room; - demoId = '26973546'; + demoId = '95680586'; + user: User; roomFormControl = new FormControl('', [Validators.required, Validators.minLength(8)]); @@ -33,10 +37,12 @@ export class RoomJoinComponent implements OnInit { constructor(private roomService: RoomService, private router: Router, public notificationService: NotificationService, - private translateService: TranslateService) { + private translateService: TranslateService, + public authenticationService: AuthenticationService) { } ngOnInit() { + this.authenticationService.watchUser.subscribe(newUser => this.user = newUser); } getRoom(id: string): void { @@ -48,8 +54,15 @@ export class RoomJoinComponent implements OnInit { this.notificationService.show(message); }); } else { - this.roomService.addToHistory(this.room.id); - this.router.navigate([`/participant/room/${this.room.shortId}`]); + if (!this.user) { + this.authenticationService.guestLogin(UserRole.PARTICIPANT).subscribe(loggedIn => { + if (loggedIn === 'true') { + this.addAndNavigate(); + } + }); + } else { + this.addAndNavigate(); + } } }); } @@ -60,6 +73,11 @@ export class RoomJoinComponent implements OnInit { } } + addAndNavigate() { + this.roomService.addToHistory(this.room.id); + this.router.navigate([`/participant/room/${this.room.shortId}`]); + } + joinDemo(): void { this.getRoom(this.demoId); } diff --git a/src/app/components/shared/room-list/room-list.component.html b/src/app/components/shared/room-list/room-list.component.html index 077c7bc8bb8118cc6921edf75e3d0df01792c15b..6b7c0dffe8f87dbec1bffcdefd7148092f96f790 100644 --- a/src/app/components/shared/room-list/room-list.component.html +++ b/src/app/components/shared/room-list/room-list.component.html @@ -20,8 +20,9 @@ {{ room.description }} </p> </mat-expansion-panel> -<mat-card *ngIf="rooms.length === 0"> +<mat-card *ngIf="rooms && rooms.length === 0"> <mat-card-header> - <mat-card-title>Sie haben noch keine Sessions erstellt!</mat-card-title> + <mat-card-title *ngIf="baseUrl === 'creator'">Sie haben noch keine Sessions erstellt!</mat-card-title> + <mat-card-title *ngIf="baseUrl === 'participant'">Sie sind noch keiner Session beigetreten!</mat-card-title> </mat-card-header> </mat-card> diff --git a/src/app/components/shared/shared.module.ts b/src/app/components/shared/shared.module.ts index 2fb1fe98c33730a62bb658be69c7993a893c62b8..483b2c167ec0d4784ee533323703e0d76d3d127f 100644 --- a/src/app/components/shared/shared.module.ts +++ b/src/app/components/shared/shared.module.ts @@ -7,7 +7,6 @@ import { FooterComponent } from './footer/footer.component'; import { FooterImprintComponent } from './footer-imprint/footer-imprint.component'; import { HeaderComponent } from './header/header.component'; import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; -import { RoomJoinComponent } from './room-join/room-join.component'; import { RoomListComponent } from './room-list/room-list.component'; import { RoomPageComponent } from './room-page/room-page.component'; import { StatisticsPageComponent } from './statistics-page/statistics-page.component'; @@ -19,6 +18,9 @@ import { SharedRoutingModule } from './shared-routing.module'; import { ListStatisticComponent } from './list-statistic/list-statistic.component'; import { ChartsModule } from 'ng2-charts'; import { StatisticComponent } from './statistic/statistic.component'; +import { RoomJoinComponent } from './room-join/room-join.component'; +import { RoomCreateComponent } from './_dialogs/room-create/room-create.component'; +import { LoginComponent } from './login/login.component'; @NgModule({ imports: [ @@ -44,7 +46,9 @@ import { StatisticComponent } from './statistic/statistic.component'; CommentListComponent, StatisticsPageComponent, ListStatisticComponent, - StatisticComponent + StatisticComponent, + RoomCreateComponent, + LoginComponent ], exports: [ RoomJoinComponent, @@ -62,6 +66,10 @@ import { StatisticComponent } from './statistic/statistic.component'; CommentCreatePageComponent, CommentListComponent, StatisticsPageComponent + ], + entryComponents: [ + RoomCreateComponent, + LoginComponent ] }) export class SharedModule { diff --git a/src/app/services/http/room.service.ts b/src/app/services/http/room.service.ts index 868f34ada03c2ebc9b30ffb8f581421ae7a34eb5..4566c05902de34f4fc2ef68f1db0f19dcd91516c 100644 --- a/src/app/services/http/room.service.ts +++ b/src/app/services/http/room.service.ts @@ -75,7 +75,7 @@ export class RoomService extends BaseHttpService { addToHistory(roomId: string): void { const connectionUrl = `${ this.apiUrl.base + this.apiUrl.user }/${ this.authService.getUser().id }/roomHistory`; - this.http.post(connectionUrl, { roomId: roomId, lastVisit: this.joinDate.getTime() }, httpOptions).subscribe(r => console.log(r)); + this.http.post(connectionUrl, { roomId: roomId, lastVisit: this.joinDate.getTime() }, httpOptions).subscribe(); } updateRoom(updatedRoom: Room): Observable<Room> { diff --git a/src/assets/i18n/creator/de.json b/src/assets/i18n/creator/de.json index 02f3c070b2eb0677e16da7f6dfdcf6a8355c56d7..d068d2e1958b32642a3bffc0bf1a1e96def05fc5 100644 --- a/src/assets/i18n/creator/de.json +++ b/src/assets/i18n/creator/de.json @@ -1,10 +1,9 @@ { "home-page": { - "create-session": "Neue Session erstellen", + "create-session": "Session erstellen", "no-empty-name": "Bitte geben Sie einen Namen ein.", "created-1": "Session '", "created-2": "' erfolgreich erstellt." - }, "room-page": { "comments": "Kommentare", diff --git a/src/assets/i18n/creator/en.json b/src/assets/i18n/creator/en.json index 9850dd2313ba06d4381d953339fef6c188b0fd3c..f808c42d83fdc855238855aefe09df95e2486849 100644 --- a/src/assets/i18n/creator/en.json +++ b/src/assets/i18n/creator/en.json @@ -1,6 +1,6 @@ { "home-page": { - "create-session": "Create new session ", + "create-session": "Create session", "no-empty-name": "Please enter a name.", "created-1": "Session '", "created-2": "' successfully created." diff --git a/src/assets/i18n/home/de.json b/src/assets/i18n/home/de.json index b98e6571ed9f61b70a5cc8bcca96610b169c3b23..422bf9395322cf759d6d29b85f7d14ff5f88b22e 100644 --- a/src/assets/i18n/home/de.json +++ b/src/assets/i18n/home/de.json @@ -5,15 +5,28 @@ "logout": "Abmelden", "guest": "Gast", "logged-out": "Ausloggen erfolgreich.", - "back": "Zurück" + "back": "Zurück", + "my-sessions": "Meine Sessions", + "visited-sessions": "Besuchte Sessions" }, "login-page": { "creator": "Dozent/in", "participant": "Student/in", - "password-reset": "Passwort zurücksetzen", + "password-reset": "Passwort vergessen?", "register": "Registrieren", "welcome": "Willkommen bei" }, + "home-page": { + "join-demo-session": "Demo-Session betreten", + "session-id": "Session-Id", + "no-room-found": "Es wurde keine Session mit dieser ID gefunden.", + "please-enter": "Bitte geben Sie eine Session-ID ein.", + "exactly-8": "Eine Session-ID hat genau 8 Ziffern.", + "create-session": "Session erstellen", + "no-empty-name": "Bitte geben Sie einen Namen ein.", + "created-1": "Session '", + "created-2": "' erfolgreich erstellt." + }, "login": { "email": "E-Mail", "email-invalid": "E-Mail Adresse ist ungültig", @@ -51,5 +64,11 @@ "register": "Registrieren", "register-successful": "Erfolgreich registriert. Bitte prüfen Sie Ihre E-Mails", "register-unsuccessful": "Bitte prüfen Sie Ihre Eingaben." - } + }, + "session": { + "session-name": "Name der Session", + "description": "Beschreibung", + "max-ls": "Max. Zeichen:", + "create-session": "Session erstellen" + } } diff --git a/src/assets/i18n/home/en.json b/src/assets/i18n/home/en.json index 9b01d54cbae0eb6d96d551086d2e8c8a6b550f3f..ad19e53b9a8110869772f856e2746b606aba8a68 100644 --- a/src/assets/i18n/home/en.json +++ b/src/assets/i18n/home/en.json @@ -5,15 +5,28 @@ "logout": "Logout", "guest": "Guest", "logged-out": "Logout successful.", - "back": "Back" + "back": "Back", + "my-sessions": "My Sessions", + "visited-sessions": "Visited Sessions" }, "login-page": { "creator": "Creator", "participant": "Participant", - "password-reset": "Reset password", + "password-reset": "Forgot your password?", "register": "Register", "welcome": "Welcome to" }, + "home-page": { + "join-demo-session": "Join demo-session", + "session-id": "Session-Id", + "no-room-found": "No session was found with this id.", + "please-enter": "Please enter a session-id.", + "exactly-8": "A session-id has exactly 8 digits.", + "create-session": "Create session", + "no-empty-name": "Please enter a name.", + "created-1": "Session '", + "created-2": "' successfully created." + }, "login": { "email": "E-Mail", "email-invalid": "E-Mail is invalid", @@ -51,5 +64,11 @@ "register": "Register", "register-successful": "Successfully registered. Please check your mail.", "register-unsuccessful": "Please check your data." - } + }, + "session": { + "session-name": "Session name", + "description": "Description", + "max-ls": "Max. letters / signs:", + "create-session": "Create session" + } } diff --git a/src/assets/i18n/participant/de.json b/src/assets/i18n/participant/de.json index 39c6bf45689a86f8bbd4e90e2022bc75c24dd2b1..586747705b5f9b49495791af8eb39b537a4a9ade 100644 --- a/src/assets/i18n/participant/de.json +++ b/src/assets/i18n/participant/de.json @@ -1,7 +1,5 @@ { "home-page": { - "join-demo-session": "Demo-Session betreten", - "session-id": "Session-Id", "no-room-found": "Es wurde keine Session mit dieser ID gefunden.", "please-enter": "Bitte geben Sie eine Session-ID ein.", "exactly-8": "Eine Session-ID hat genau 8 Ziffern." diff --git a/src/assets/i18n/participant/en.json b/src/assets/i18n/participant/en.json index 88f782bf7d433a8391593514931c79ebf4a240b5..fae2f848b46f21129afff61795c0ac1944eb80ef 100644 --- a/src/assets/i18n/participant/en.json +++ b/src/assets/i18n/participant/en.json @@ -1,7 +1,5 @@ { "home-page": { - "join-demo-session": "Join demo-session", - "session-id": "Session-Id", "no-room-found": "No session was found with this id.", "please-enter": "Please enter a session-id.", "exactly-8": "A session-id has exactly 8 digits." diff --git a/src/theme/_form.scss b/src/theme/_form.scss index 1931e193aeab49db2022eba63f3c50a7f08157b7..f5f588442e654e3cd2205aeb2b067db3db7bd418 100644 --- a/src/theme/_form.scss +++ b/src/theme/_form.scss @@ -2,6 +2,10 @@ mat-form-field.input-block { display: block; } -mat-dialog-container { - background-color: #bbdefb !important; +.mat-fab .mat-button-wrapper { + padding: 0!important; +} + +.mat-dialog-container { + background-color: #e0f2f1; }