From 6bb9157396616b90d0213ed5d9c6d03e8c890fb2 Mon Sep 17 00:00:00 2001 From: pilloumatou Date: Wed, 14 May 2025 17:05:17 +0200 Subject: [PATCH 1/3] create new function for buttons --- .../components/spb2aug/spb2aug.component.ts | 21 +++++++++++++++++++ src/app/components/tile/tile.component.ts | 12 +++++++++++ src/app/services/functions.service.ts | 3 +++ src/assets/multilinguism.json | 9 ++++++-- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/app/components/spb2aug/spb2aug.component.ts b/src/app/components/spb2aug/spb2aug.component.ts index 9547ff279..ea6a4cd77 100644 --- a/src/app/components/spb2aug/spb2aug.component.ts +++ b/src/app/components/spb2aug/spb2aug.component.ts @@ -227,6 +227,7 @@ export class Spb2augComponent implements OnInit { } else { gridElement.x = Number(tabResPos[0]) + 1; } + this.assignFunctionToButton(gridElement); gridElement.y = Number(tabResPos[1]); gridElement.rows = Number(tabResSpan[1]); gridElement.cols = Number(tabResSpan[0]); @@ -257,6 +258,26 @@ export class Spb2augComponent implements OnInit { } } + /** + * assign the function to the button by mathching his text + * @param element current grid element + */ + assignFunctionToButton(element:GridElement){ + if(element.ElementFormsList[0].DisplayedText.toLowerCase() == "retour"){ + element.InteractionsList[0].ActionList = []; + element.InteractionsList[0].ActionList.push({ID:'back', Options: []}); + }else if(element.ElementFormsList[0].DisplayedText.toLowerCase() == "monter le son"){ + element.InteractionsList[0].ActionList = []; + element.InteractionsList[0].ActionList.push({ID:'turnupvolume', Options: []}); + }else if(element.ElementFormsList[0].DisplayedText.toLowerCase() == "baisser le son"){ + element.InteractionsList[0].ActionList = []; + element.InteractionsList[0].ActionList.push({ID:'turndownvolume', Options: []}); + }else if(element.ElementFormsList[0].DisplayedText.toLowerCase() == "couper le son"){ + element.InteractionsList[0].ActionList = []; + element.InteractionsList[0].ActionList.push({ID:'mute', Options: []}); + } + } + /** * this function check if we need a new page, if yes I add a new page and a button to go in * @param gridElement current gridElement I am checking if he can be filled in the page or if we need more diff --git a/src/app/components/tile/tile.component.ts b/src/app/components/tile/tile.component.ts index 974f67143..6b39c7a6c 100644 --- a/src/app/components/tile/tile.component.ts +++ b/src/app/components/tile/tile.component.ts @@ -186,6 +186,18 @@ export class TileComponent implements OnInit, OnDestroy { this.boardService.backToPreviousFolder(); } else if (action.ID === 'backHome') { this.boardService.backHome(); + } else if ((action.ID) === 'turndownvolume'){ + this.configurationService.VOLUME -= 0.1; + if(this.configurationService.VOLUME < 0) { + this.configurationService.VOLUME = 0; + } + } else if ((action.ID) === 'turnupvolume'){ + this.configurationService.VOLUME += 0.1; + if(this.configurationService.VOLUME > 1){ + this.configurationService.VOLUME = 1; + } + } else if ((action.ID) === 'mute'){ + this.configurationService.VOLUME = 0; } }); } diff --git a/src/app/services/functions.service.ts b/src/app/services/functions.service.ts index 815101f3d..f71d33128 100644 --- a/src/app/services/functions.service.ts +++ b/src/app/services/functions.service.ts @@ -39,6 +39,9 @@ export class FunctionsService { 'otherforms', 'back', 'backHome', + 'turndownvolume', + 'turnupvolume', + 'mute', ) } diff --git a/src/assets/multilinguism.json b/src/assets/multilinguism.json index fedeedc77..52efa085a 100644 --- a/src/assets/multilinguism.json +++ b/src/assets/multilinguism.json @@ -373,7 +373,12 @@ { "id" : "focusSelection", "FR": "Sélection par fixation", "EN": "Selection by focus"}, { "id" : "WordNameFile", "FR": "ClavierAugCom", "EN": "GridFileAugcom"}, { "id" : "WordTitle", "FR": "Clavier Augcom", "EN": "AugCom main grid"}, - { "id" : "WordFolder", "FR": "Sous Dossier", "EN": "Folder"} - + { "id" : "WordFolder", "FR": "Sous Dossier", "EN": "Folder"}, + { "id" : "OpenTheFolder", "FR": "Ouvre le dossier", "EN": "Open the folder"}, + { "id" : "functionDescription", "FR": "L'élément créé sera un bouton qui effectue des actions", "EN": "The element created will be a button that performs the following actions"}, + { "id" : "Retour", "FR": "Retour", "EN": "Back"}, + { "id" : "turndownvolume", "FR": "Baisser le son", "EN": "Turn down the sound"}, + { "id" : "turnupvolume", "FR": "Monter le son", "EN": "Turn up the sound"}, + { "id" : "mute", "FR": "Couper le volume", "EN": "Mute"} ] } From e0e6208b26647007b80c4a2ff4ad8ab59d9a79e2 Mon Sep 17 00:00:00 2001 From: pilloumatou Date: Wed, 14 May 2025 17:26:13 +0200 Subject: [PATCH 2/3] try to trigger workflow with a space --- src/app/components/edition/edition.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/components/edition/edition.component.ts b/src/app/components/edition/edition.component.ts index ab1e19f4c..06e63c5a2 100644 --- a/src/app/components/edition/edition.component.ts +++ b/src/app/components/edition/edition.component.ts @@ -262,6 +262,7 @@ export class EditionComponent implements OnInit, ComponentCanDeactivate { } } + /** * Creates a new button and adds it to the board, given the information of this class, updated by the edition html panel */ From 7c3ad7312a3f251242c3e3aaec8b1a32a0f9c774 Mon Sep 17 00:00:00 2001 From: pilloumatou Date: Fri, 16 May 2025 15:13:46 +0200 Subject: [PATCH 3/3] remove syntax bug on multilinguism.json --- src/assets/multilinguism.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/multilinguism.json b/src/assets/multilinguism.json index 24256f374..44c653268 100644 --- a/src/assets/multilinguism.json +++ b/src/assets/multilinguism.json @@ -383,6 +383,6 @@ { "id" : "mute", "FR": "Couper le volume", "EN": "Mute"}, { "id" : "path", "FR": "Chemin", "EN": "Path"}, { "id" : "titlePage", "FR": "Titre de la page", "EN": "Title of the page"}, - { "id" : "visualisationPath", "FR": "Visualisation du chemin", "EN": "Path visualization"}, + { "id" : "visualisationPath", "FR": "Visualisation du chemin", "EN": "Path visualization"} ] }