From 195259bb722a4dd5260a05bbe5dd77cbc6d0577e Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Tue, 21 Jan 2020 12:30:53 +0100 Subject: [PATCH] :bug: fix recursion in input erase button --- package.json | 2 +- src/app/config/PollConfig.ts | 14 + src/app/pages/home/home.component.html | 5 + .../erasable-input.component.html | 2 +- .../erasable-input.component.ts | 10 +- yarn.lock | 1815 ++++++++--------- 6 files changed, 825 insertions(+), 1023 deletions(-) diff --git a/package.json b/package.json index b0752bdc..831de722 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "ng": "ng", "start": "ng serve", "serve": "ng serve", - "build": "ng build", + "build": "ng build --crossOrigin=anonymous --aot=false", "build:demo": "ng build --crossOrigin=anonymous --extractCss=true --baseHref=https://framadate-api.cipherbliss.com --aot=true --progress=true --statsJson=true", "test": "ng test", "lint": "ng lint", diff --git a/src/app/config/PollConfig.ts b/src/app/config/PollConfig.ts index 24333d4c..1a3828ba 100644 --- a/src/app/config/PollConfig.ts +++ b/src/app/config/PollConfig.ts @@ -10,6 +10,13 @@ export interface DateOption { literal: string; } +const baseConfigValues = { + pollType: "classic", + title: "", + description: "", + myName: "", + myEmail: "", +}; /** * configuration of the poll, add new fields at will @@ -52,4 +59,11 @@ export class PollConfig { constructor() { } + + resetConfig() { + const self = this; + Object.keys(baseConfigValues).forEach((key) => { + self[key] = baseConfigValues[key]; + }) + } } diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index a1c7c2df..77b9dc71 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -9,6 +9,11 @@ > {{"creation.want"|translate}} +