From 79a4017386d8ef678efc1bc726c8f7244bc30ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 2 Oct 2018 11:26:39 +0200 Subject: [PATCH] Make deploy button texts configurable from config.ts --- src/app/config.ts | 6 ++++++ src/app/ide/ide.component.html | 8 ++++---- src/app/ide/ide.component.ts | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/app/config.ts b/src/app/config.ts index 38d631c..4479703 100644 --- a/src/app/config.ts +++ b/src/app/config.ts @@ -29,6 +29,12 @@ export const config = { defaultCode: 'Loading your file...', defaultLanguage: 'text', deployProcessName: 'webservice', + deployButtonText: { + 'TODEPLOY': 'Deploy', + 'DEPLOYED': 'Deployed', + 'DEPLOYING': 'Reloading app...', + 'FAILED': 'Deployment failed. Retry' + }, showDeployButton: true, reloadIframeOnDeploy: false, showConsoleOnDeploy: true, diff --git a/src/app/ide/ide.component.html b/src/app/ide/ide.component.html index a1ddb8e..4086fb2 100644 --- a/src/app/ide/ide.component.html +++ b/src/app/ide/ide.component.html @@ -26,13 +26,13 @@ [class.deploy]="deployButtonState === DeployButtonState.DEPLOYING" [class.disabled]="deployButtonState === DeployButtonState.DEPLOYING || deployButtonState === DeployButtonState.DEPLOYED" [class.failed]="deployButtonState === DeployButtonState.FAILED"> - Deploy + {{deployButtonText['TODEPLOY']}} - Deployed + {{deployButtonText['DEPLOYED']}} -
Reloading app...
- Deployment failed. Retry +
{{deployButtonText['DEPLOYING']}}
+ {{deployButtonText['FAILED']}} diff --git a/src/app/ide/ide.component.ts b/src/app/ide/ide.component.ts index a4bd127..9f57a1a 100644 --- a/src/app/ide/ide.component.ts +++ b/src/app/ide/ide.component.ts @@ -44,6 +44,7 @@ export class IdeComponent implements OnInit { codeState = CodeState.SAVED; deployButtonState = DeployButtonState.DEPLOYED; + deployButtonText = config.ide.deployButtonText; showDeployButton: boolean = config.ide.showDeployButton; autosave = null;