diff --git a/package-lock.json b/package-lock.json index 40c3b2a78c5a60d73d2e6b9442cfa7e556528463..b4e5363b00e659b474b015833fc580b4a59509ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9288,6 +9288,11 @@ "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", "dev": true }, + "ngx-konami": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ngx-konami/-/ngx-konami-1.6.0.tgz", + "integrity": "sha512-no/NocDjFnGw5XlNlj6LavP2YA3NxEg3eIHylU9dblkl5JgcfIEw3YntRs9/3OUSnVZGhZSNZkO35sY2AGtkoA==" + }, "ngx-material-file-input": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ngx-material-file-input/-/ngx-material-file-input-1.1.1.tgz", diff --git a/package.json b/package.json index 1a469f1b3c2750fd80c834633e1d3d9fed03ece0..f77a59680f2e006ff69365814fd41908f3aa829f 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "jalhyd": "file:../jalhyd", "material-design-icons": "^3.0.1", "mathjax": "^2.7.5", + "ngx-konami": "^1.6.0", "ngx-material-file-input": "^1.1.1", "ngx-md": "^8.0.0", "ngx-webstorage-service": "^4.0.1", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index c9ec24010f9eb43f0a83385406b6743c543b3043..19cc15e1ebd009882841e288864fa1c8243e5c56 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,6 +28,7 @@ import { import { MaterialFileInputModule } from "ngx-material-file-input"; import {TableModule} from "primeng/components/table/table"; +import { KonamiModule } from "ngx-konami"; import { FlexLayoutModule } from "@angular/flex-layout"; import { @@ -148,7 +149,8 @@ const appRoutes: Routes = [ } ), StorageServiceModule, - TableModule + TableModule, + KonamiModule ], declarations: [ // composants, pipes et directives AppComponent, diff --git a/src/app/components/calculator-list/calculator-list.component.html b/src/app/components/calculator-list/calculator-list.component.html index 1f83baffb89031c11fc161998bfbe66797bd0306..65ea10765799050325d4527513b944282a5db5ab 100644 --- a/src/app/components/calculator-list/calculator-list.component.html +++ b/src/app/components/calculator-list/calculator-list.component.html @@ -1,4 +1,4 @@ -<div class="container" fxLayout="row wrap" fxLayoutAlign="space-evenly stretch"> +<div class="container" fxLayout="row wrap" fxLayoutAlign="space-evenly stretch" (konami)="onKC()"> <mat-card class="welcome-card" *ngIf="nbOpenCalculators === 0"> diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts index c4acb05d66f1251e2ebc8a26f1fa66f927bd9a14..d58d2758e6b4c99f450a63ce4b63589e60513537 100644 --- a/src/app/components/calculator-list/calculator-list.component.ts +++ b/src/app/components/calculator-list/calculator-list.component.ts @@ -142,6 +142,13 @@ export class CalculatorListComponent implements OnInit { return ServiceFactory.instance.i18nService.localizeText("INFO_WELCOME_CONTENT"); } + public onKC() { + for (const i of this.items) { + i.image.path = "assets/images/themes/sp.jpg"; + i.image.credits = "lol"; + } + } + // interface Observer update(sender: any, data: any): void { diff --git a/src/assets/images/themes/sp.jpg b/src/assets/images/themes/sp.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7591c7594f0ae476461fb9aa4831e5ae8a8b9b11 Binary files /dev/null and b/src/assets/images/themes/sp.jpg differ