Skip to content
Snippets Groups Projects
Commit b2b4f0d7 authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Add new landing-page component to try new design

parent 9a595d54
1 merge request!137Resolve "Direct entry"
......@@ -24,6 +24,8 @@ 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 { RoomCreateComponent } from './components/creator/_dialogs/room-create/room-create.component';
export function dialogClose(dialogResult: any) {
}
......@@ -34,12 +36,15 @@ export function dialogClose(dialogResult: any) {
LoginComponent,
PasswordResetComponent,
RegisterComponent,
UserActivationComponent
UserActivationComponent,
NewLandingComponent,
RoomCreateComponent
],
entryComponents: [
RegisterComponent,
PasswordResetComponent,
UserActivationComponent
UserActivationComponent,
RoomCreateComponent
],
imports: [
AppRoutingModule,
......
......@@ -13,7 +13,7 @@
<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-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">
......@@ -36,7 +36,8 @@
<button mat-raised-button class="pwButton" color="primary" (click)="openPasswordDialog()">
{{ 'login-page.password-reset' | translate }}
</button>
</div>
</div> -->
<app-new-landing></app-new-landing>
</mat-card>
</div>
</div>
......
<div fxLayout="column" fxLayoutAlign="center center" fxlayoutgap="50px" fxFill>
<form>
<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px">
<mat-form-field class="input-block">
<input matInput #roomId placeholder="Join Session!" maxlength="8" [matAutocomplete]="auto"/>
<mat-hint align="end">{{roomId.value.length}} / 8</mat-hint>
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let session of sessions" [value]="session.id">
{{session.name}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
<button mat-fab color="primary" type="submit">
<mat-icon>input</mat-icon>
</button>
</div>
</form>
<button mat-button class="demo" color="primary">Demo Session<mat-icon color="accent">lightbulb_outline</mat-icon></button>
<button mat-fab color="accent" (click)="openCreateRoomDialog()">
<mat-icon>add</mat-icon>
</button>
<h3>Neue Session erstellen!</h3>
</div>
.demo {
margin-bottom: 40px;
}
form {
padding-top: 40px;
}
h3 {
color: #4db6ac;
text-align: center;
}
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();
});
});
import { Component, OnInit } from '@angular/core';
import { RoomCreateComponent } from '../../creator/_dialogs/room-create/room-create.component';
import { MatDialog } from '@angular/material';
import { RoomService } from '../../../services/http/room.service';
import { ActivatedRoute, Router } from '@angular/router';
import { Room } from '../../../models/room';
export class Session {
name: string;
id: number;
constructor(name: string, id: number) {
this.id = id;
this.name = name;
}
}
@Component({
selector: 'app-new-landing',
templateUrl: './new-landing.component.html',
styleUrls: ['./new-landing.component.scss']
})
export class NewLandingComponent implements OnInit {
sessions: Session[] = new Array<Session>();
constructor(public dialog: MatDialog) {
}
ngOnInit() {
this.sessions[0] = new Session('Angular', 98299243);
this.sessions[1] = new Session('Typescript', 52009627);
this.sessions[2] = new Session('Angular', 48590407);
}
openCreateRoomDialog(): void {
this.dialog.open(RoomCreateComponent, {
width: '350px'
});
}
}
......@@ -23,6 +23,9 @@
<span>{{ 'header.logout' | translate }}</span>
</button>
</mat-menu>
<button mat-icon-button>
<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>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment