Skip to content
Snippets Groups Projects
Commit bb4d8ca1 authored by Franz Raumschüssel's avatar Franz Raumschüssel
Browse files

added serveral improvments e.g language, latest versions, login

parent 4bd715d1
No related branches found
No related tags found
2 merge requests!4Popup,!1Popup
Showing
with 17538 additions and 1117 deletions
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
"compodoc": "npx compodoc -p tsconfig.app.json src",
"build": "ng build", "build": "ng build",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
...@@ -16,6 +17,7 @@ ...@@ -16,6 +17,7 @@
"@angular/common": "~10.0.5", "@angular/common": "~10.0.5",
"@angular/compiler": "~10.0.5", "@angular/compiler": "~10.0.5",
"@angular/core": "~10.0.5", "@angular/core": "~10.0.5",
"@angular/flex-layout": "^11.0.0-beta.33",
"@angular/forms": "~10.0.5", "@angular/forms": "~10.0.5",
"@angular/material": "^10.2.7", "@angular/material": "^10.2.7",
"@angular/platform-browser": "~10.0.5", "@angular/platform-browser": "~10.0.5",
...@@ -29,9 +31,10 @@ ...@@ -29,9 +31,10 @@
"zone.js": "~0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^0.1000.8", "@angular-devkit/build-angular": "^0.1100.1",
"@angular/cli": "~10.0.4", "@angular/cli": "~10.0.4",
"@angular/compiler-cli": "~10.0.5", "@angular/compiler-cli": "~10.0.5",
"@compodoc/compodoc": "^1.1.11",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
......
{
"name": "mit-ws",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"compodoc": "npx compodoc -p tsconfig.app.json src",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~10.0.5",
"@angular/cdk": "^10.2.7",
"@angular/common": "~10.0.5",
"@angular/compiler": "~10.0.5",
"@angular/core": "~10.0.5",
"@angular/flex-layout": "^11.0.0-beta.33",
"@angular/forms": "~10.0.5",
"@angular/material": "^10.2.7",
"@angular/platform-browser": "~10.0.5",
"@angular/platform-browser-dynamic": "~10.0.5",
"@angular/router": "~10.0.5",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"ngx-translate-cache": "^9.0.2",
"rxjs": "~6.5.5",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1100.1",
"@angular/cli": "~10.0.4",
"@angular/compiler-cli": "~10.0.5",
"@compodoc/compodoc": "^1.1.11",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
}
}
<div style="text-align:center"> <div style="text-align:center">
<h1> <h1>
Welcome User with E-Mail {{userName}}! Welcome User with E-Mail {{userName}}!
</h1> </h1>
<p> <p>
<button mat-button color="warn" (click)="logout()"> <button mat-button color="warn" (click)="logout()">
Logout Logout
</button> </button>
</p> </p>
</div> </div>
\ No newline at end of file
<div style="text-align:center">
<h1>
Welcome User with E-Mail {{userName}}!
</h1>
<p>
<button mat-button color="warn" (click)="logout()">
Logout
</button>
</p>
</div>
\ No newline at end of file
import { TestBed, async } from '@angular/core/testing'; import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { TranslateModule } from "@ngx-translate/core";
describe('AppComponent', () => { describe('AppComponent', () => {
beforeEach(async(() => { beforeEach(async(() => {
...@@ -7,6 +8,9 @@ describe('AppComponent', () => { ...@@ -7,6 +8,9 @@ describe('AppComponent', () => {
declarations: [ declarations: [
AppComponent AppComponent
], ],
imports: [
TranslateModule.forRoot(),
]
}).compileComponents(); }).compileComponents();
})); }));
......
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'mit-ws'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('mit-ws');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('mit-ws app is running!');
});
});
...@@ -6,5 +6,5 @@ import { Component } from '@angular/core'; ...@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.css'] styleUrls: ['./app.component.css']
}) })
export class AppComponent { export class AppComponent {
title = 'mit-ws-20-21'; title = 'thd-navi-app';
} }
<p>international works!</p> <p>{{'cInternationalText'|translate}}</p>
<p>international works!</p>
...@@ -2,15 +2,21 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; ...@@ -2,15 +2,21 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { InternationalComponent } from './international.component'; import { InternationalComponent } from './international.component';
import { TranslateModule } from "@ngx-translate/core";
describe('InternationalComponent', () => { describe('InternationalComponent', () => {
let component: InternationalComponent; let component: InternationalComponent;
let fixture: ComponentFixture<InternationalComponent>; let fixture: ComponentFixture<InternationalComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ InternationalComponent ] declarations: [InternationalComponent],
imports: [
TranslateModule.forRoot(),
]
//providers: [TranslateService]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { InternationalComponent } from './international.component';
describe('InternationalComponent', () => {
let component: InternationalComponent;
let fixture: ComponentFixture<InternationalComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ InternationalComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(InternationalComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
<div> <div>
<h2>{{'cLoginText'|translate}}</h2> <h2>{{'cLoginText'|translate}}</h2>
<form [formGroup]="loginForm" (ngSubmit)="login()"> <form [formGroup]="loginForm" (ngSubmit)="login()">
<p [ngClass]="{ 'has-error': isSubmitted && formControls.email.errors }"> <p [ngClass]="{ 'has-error': isSubmitted && formControls.email.errors }">
<input type="email" placeholder="E-Mail" formControlName="email"> <input type="email" placeholder="E-Mail" formControlName="email">
</p> </p>
<div *ngIf="isSubmitted && formControls.email.errors"> <div *ngIf="isSubmitted && formControls.email.errors">
<div *ngIf="formControls.email.errors.required">E-Mail is required</div> <div *ngIf="formControls.email.errors.required">E-Mail is required</div>
</div> </div>
<p [ngClass]="{ 'has-error': isSubmitted && formControls.password.errors }"> <p [ngClass]="{ 'has-error': isSubmitted && formControls.password.errors }">
<input type="password" placeholder="Password" formControlName="password"> <input type="password" placeholder="Password" formControlName="password">
</p> </p>
<div *ngIf="isSubmitted && formControls.password.errors"> <div *ngIf="isSubmitted && formControls.password.errors">
<div *ngIf="formControls.password.errors.required">Password is required</div> <div *ngIf="formControls.password.errors.required">Password is required</div>
</div> </div>
<p> <p>
<button mat-button type="submit" color="warn">LOGIN</button> <button mat-button type="submit" color="warn">LOGIN</button>
<!-- <input type="submit" value="Log in">--> <!-- <input type="submit" value="Log in">-->
</p> </p>
</form> </form>
</div> </div>
\ No newline at end of file
<div>
<h2>{{'cLoginText'|translate}}</h2>
<form [formGroup]="loginForm" (ngSubmit)="login()">
<p [ngClass]="{ 'has-error': isSubmitted && formControls.email.errors }">
<input type="email" placeholder="E-Mail" formControlName="email">
</p>
<div *ngIf="isSubmitted && formControls.email.errors">
<div *ngIf="formControls.email.errors.required">E-Mail is required</div>
</div>
<p [ngClass]="{ 'has-error': isSubmitted && formControls.password.errors }">
<input type="password" placeholder="Password" formControlName="password">
</p>
<div *ngIf="isSubmitted && formControls.password.errors">
<div *ngIf="formControls.password.errors.required">Password is required</div>
</div>
<p>
<button mat-button type="submit" color="warn">LOGIN</button>
<!-- <input type="submit" value="Log in">-->
</p>
</form>
</div>
\ No newline at end of file
<p>{{'cNavigationText'|translate}}</p>
<div class="rectangle"> <div class="rectangle">
<p align="center">A</p> <p align="center">A</p>
</div> </div>
......
<div class="rectangle">
<p align="center">A</p>
</div>
<div class="rectangle">
<p align="center">B</p>
</div>
<div class="rectangle_big">
<p align="center">C</p>
</div>
<br>
<div class="square">
<p align="center">C</p>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NavigationComponent } from './navigation.component'; import { NavigationComponent } from './navigation.component';
import { TranslateModule, TranslateService } from "@ngx-translate/core";
describe('NavigationComponent', () => { describe('NavigationComponent', () => {
let component: NavigationComponent; let component: NavigationComponent;
...@@ -8,9 +9,13 @@ describe('NavigationComponent', () => { ...@@ -8,9 +9,13 @@ describe('NavigationComponent', () => {
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ NavigationComponent ] declarations: [NavigationComponent],
imports: [
TranslateModule.forRoot(),
]
//providers: [TranslateService]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NavigationComponent } from './navigation.component';
describe('NavigationComponent', () => {
let component: NavigationComponent;
let fixture: ComponentFixture<NavigationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NavigationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NavigationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
<p>rooms works!</p> <p>{{'cRoomsText'|translate}}</p>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment