Skip to content

Commit

Permalink
feat: added instructions (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoalee authored Jul 11, 2024
1 parent dcc5235 commit 7e7f1db
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"typescript.tsdk": "node_modules/typescript/lib"
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@ <h3 *ngIf="subtitle" class="subtitle" [innerHTML]="subtitle"></h3>
[isStart]="buttonConfig.isStart"
[previousDisabled]="buttonConfig.previousDisabled"
[nextDisabled]="buttonConfig.nextDisabled"
[forwardButtonText]="nextButtonText"
[backButtonText]="previousButtonText"
></app-navigation-buttons>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnDestroy } from '@angular/core';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Subject } from 'rxjs';
import { getTextForLang, thisOrDefault } from 'src/app/common/commonMethods';
import { ComponentName } from 'src/app/services/component-factory.service';
Expand Down Expand Up @@ -52,7 +52,7 @@ export interface TaskDisplayComponentMetadata {
templateUrl: './task-display.component.html',
styleUrls: ['./task-display.component.scss'],
})
export class TaskDisplayComponent implements OnDestroy, Playable {
export class TaskDisplayComponent implements OnInit, OnDestroy, Playable {
// metadata variables
title: string = '';
subtitle: string = '';
Expand All @@ -75,6 +75,9 @@ export class TaskDisplayComponent implements OnDestroy, Playable {
timerCountDown: boolean = false;
showNavigationButtons: boolean = true;

nextButtonText: string = '';
previousButtonText: string = '';

// intervals/timers
interval: number;

Expand Down Expand Up @@ -163,6 +166,13 @@ export class TaskDisplayComponent implements OnDestroy, Playable {
}
}

ngOnInit(): void {
this.previousButtonText =
this.translateService.translations[this.translateService.currentLang]?.buttons?.previous ?? 'previous';
this.nextButtonText =
this.translateService.translations[this.translateService.currentLang]?.buttons?.next ?? 'next';
}

afterInit() {
if (this.skippable && this.cacheKey) {
const shouldSkip = this.config.getCacheValue(this.cacheKey);
Expand Down
Binary file modified src/assets/images/instructions/informationsearch/en/1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/instructions/informationsearch/en/2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/instructions/informationsearch/en/3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/instructions/informationsearch/en/4.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/instructions/informationsearch/en/5.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified src/assets/images/instructions/informationsearch/fr/1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/instructions/informationsearch/fr/2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/instructions/informationsearch/fr/3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/instructions/informationsearch/fr/4.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/instructions/informationsearch/fr/5.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
4 changes: 3 additions & 1 deletion src/assets/translate/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
"maxValidation": "Must be below"
},
"buttons": {
"submit": "submit"
"submit": "submit",
"next": "Next",
"previous": "Previous"
}
}
4 changes: 3 additions & 1 deletion src/assets/translate/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
"maxValidation": "Doit être inférieur à"
},
"buttons": {
"submit": "soumettre"
"submit": "soumettre",
"next": "Suivant",
"previous": "Précedent"
}
}

0 comments on commit 7e7f1db

Please sign in to comment.