fix some production build warnings

This commit is contained in:
Tykayn 2021-02-12 14:51:17 +01:00 committed by tykayn
parent 3c3dddafa5
commit 2993fc5cb5
6 changed files with 64 additions and 56 deletions

View File

@ -22,9 +22,12 @@
<p class="subtitle">
{{ 'creation.want' | translate }}
</p>
<!-- <app-kind-select [form]="form"></app-kind-select>-->
<!-- <app-base-config [form]="form"></app-base-config>-->
<app-date-select *ngIf="form.value.configuration.isAboutDate" [form]="form"></app-date-select>
<app-kind-select [form]="form"></app-kind-select>
<app-base-config [form]="form"></app-base-config>
<app-date-select
*ngIf="form.value.configuration && form.value.configuration.isAboutDate"
[form]="form"
></app-date-select>
<!-- <app-text-select ng-if="!form.value.isAboutDate" [form]="form"></app-text-select>-->
<button

View File

@ -26,7 +26,7 @@ export class FormComponent implements OnInit {
private uuidService: UuidService,
private toastService: ToastService,
private pollService: PollService,
private apiService: ApiService,
public apiService: ApiService,
private router: Router,
@Inject(DOCUMENT) private document: any
) {}

View File

@ -1,55 +1,53 @@
<div class="form-field">
<form [formGroup]="form">
<span>
<span class="columns">
<span class="column">
<button class="btn is-primary" (click)="addChoice()">
<i class="fa fa-plus"></i>
Ajouter un choix
</button>
</span>
<span class="column pull-right">
<button class="btn is-warning" (click)="reinitChoices()">
<i class="fa fa-recycle"></i>
Réinitialiser
</button>
</span>
<span class="columns">
<span class="column">
<button class="btn is-primary" (click)="addChoice()">
<i class="fa fa-plus"></i>
Ajouter un choix
</button>
</span>
<p class="hint">
{{ 'creation.choices_hint' | translate }}
</p>
<span *ngFor="let choice of choices.controls; let i = index">
<div class="form-row" [formGroup]="choice">
<div class="columns">
<div class="column">
<button class="btn btn-warning" (click)="deleteChoiceField(i)">
<i class="fa fa-times"></i>
</button>
{{ i * 1 + 1 }})
</div>
<div class="column">
<label [for]="'choice_label_' + i" class="hidden">label</label>
<input
formControlName="label"
[id]="'choice_label_' + i"
placeholder="Enter a choice description"
(keyup)="keyOnChoice($event, i)"
(keyup.backspace)="deleteChoiceField(i)"
/>
<br />
<label [for]="'image_url_' + i" class="hidden">image Url</label>
<input
formControlName="imageUrl"
[id]="'image_url_' + i"
placeholder="URL de l' image"
(keyup)="keyOnChoice($event, i)"
(keyup.backspace)="deleteChoiceField(i)"
/>
</div>
</div>
</div>
<span class="column pull-right">
<button class="btn is-warning" (click)="reinitChoices()">
<i class="fa fa-recycle"></i>
Réinitialiser
</button>
</span>
</span>
<span class="hint">
{{ 'creation.choices_hint' | translate }}
</span>
<div *ngFor="let choice of choices; let i = index">
<div class="form-row" [formGroup]="choice">
<div class="columns">
<div class="column">
<button class="btn btn-warning" (click)="deleteChoiceField(i)">
<i class="fa fa-times"></i>
</button>
{{ i * 1 + 1 }})
</div>
<div class="column">
<label [for]="'choice_label_' + i" class="hidden">label</label>
<input
formControlName="label"
[id]="'choice_label_' + i"
placeholder="Enter a choice description"
(keyup)="keyOnChoice($event, i)"
(keyup.backspace)="deleteChoiceField(i)"
/>
<br />
<label [for]="'image_url_' + i" class="hidden">image Url</label>
<input
formControlName="imageUrl"
[id]="'image_url_' + i"
placeholder="URL de l' image"
(keyup)="keyOnChoice($event, i)"
(keyup.backspace)="deleteChoiceField(i)"
/>
</div>
</div>
</div>
</div>
</form>
</div>

View File

@ -9,8 +9,13 @@ import { FormGroup } from '@angular/forms';
export class TextSelectComponent implements OnInit {
@Input()
public form: FormGroup;
public choices = [];
constructor() {}
ngOnInit(): void {}
reinitChoices(): void {}
addChoice(): void {}
deleteChoiceField(i): void {}
keyOnChoice($event, i): void {}
}

View File

@ -100,7 +100,7 @@
suffit donc de les convertir en nombre et faire des opérations plus ou moins complexes avec.
</div>
Voici un texte que l'on voudrait chiffrer: <br />
<input type="text" [(ngModel)]="plainText" (ngModelChange)="encrypt(plainText)" />
<input type="text" [(ngModel)]="plainText" (ngModelChange)="encrypt(codingMatrice, plainText)" />
<br />
Vous pouvez le changer, la page se met à jour automatiquement. Le texte clair fait
{{ plainText.length }} caractères.
@ -194,7 +194,7 @@
<h3 class="title">Déchiffrement simple</h3>
Collez ici le texte chiffré à convertir en truc lisible par l'opération
<strike>du saint esprit</strike> réalisée dans l'autre sens.
<s>du saint esprit</s> réalisée dans l'autre sens.
<br />
<input type="text" [(ngModel)]="cipheredText" />
<br />
@ -229,7 +229,9 @@
<tbody></tbody>
<tr>
<td>{{ getEntropy(plainText).toFixed(3) }}</td>
<td><input type="text" [(ngModel)]="plainText" (ngModelChange)="encrypt(plainText)" /></td>
<td>
<input type="text" [(ngModel)]="plainText" (ngModelChange)="encrypt(codingMatrice, plainText)" />
</td>
</tr>
<tr>
<td>{{ getEntropy(simpleCipheredText).toFixed(3) }}</td>

View File

@ -26,7 +26,7 @@ export class CipheringComponent implements OnInit {
public dico: string[];
public separatedCouples: any[];
public codingMatrice = '2 3 5 8';
private cipheredTextCIL: string;
public cipheredTextCIL: string;
constructor() {
this.alphab = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .+-*/_!?,éèêëàçôî'âù()@&$";