mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-11-01 10:21:20 +00:00
Make deploy button texts configurable from config.ts
This commit is contained in:
parent
b3f7e65413
commit
79a4017386
@ -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,
|
||||
|
@ -26,13 +26,13 @@
|
||||
[class.deploy]="deployButtonState === DeployButtonState.DEPLOYING"
|
||||
[class.disabled]="deployButtonState === DeployButtonState.DEPLOYING || deployButtonState === DeployButtonState.DEPLOYED"
|
||||
[class.failed]="deployButtonState === DeployButtonState.FAILED">
|
||||
<span *ngIf="deployButtonState === DeployButtonState.TODEPLOY">Deploy</span>
|
||||
<span *ngIf="deployButtonState === DeployButtonState.TODEPLOY">{{deployButtonText['TODEPLOY']}}</span>
|
||||
<span *ngIf="deployButtonState === DeployButtonState.DEPLOYED">
|
||||
<img src="images/greentick_icon.svg"/>
|
||||
<span>Deployed</span>
|
||||
<span>{{deployButtonText['DEPLOYED']}}</span>
|
||||
</span>
|
||||
<span *ngIf="deployButtonState === DeployButtonState.DEPLOYING"><div class="loader"></div>Reloading app...</span>
|
||||
<span *ngIf="deployButtonState === DeployButtonState.FAILED">Deployment failed. Retry</span>
|
||||
<span *ngIf="deployButtonState === DeployButtonState.DEPLOYING"><div class="loader"></div>{{deployButtonText['DEPLOYING']}}</span>
|
||||
<span *ngIf="deployButtonState === DeployButtonState.FAILED">{{deployButtonText['FAILED']}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user