mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-11-01 12:31: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...',
|
defaultCode: 'Loading your file...',
|
||||||
defaultLanguage: 'text',
|
defaultLanguage: 'text',
|
||||||
deployProcessName: 'webservice',
|
deployProcessName: 'webservice',
|
||||||
|
deployButtonText: {
|
||||||
|
'TODEPLOY': 'Deploy',
|
||||||
|
'DEPLOYED': 'Deployed',
|
||||||
|
'DEPLOYING': 'Reloading app...',
|
||||||
|
'FAILED': 'Deployment failed. Retry'
|
||||||
|
},
|
||||||
showDeployButton: true,
|
showDeployButton: true,
|
||||||
reloadIframeOnDeploy: false,
|
reloadIframeOnDeploy: false,
|
||||||
showConsoleOnDeploy: true,
|
showConsoleOnDeploy: true,
|
||||||
|
@ -26,13 +26,13 @@
|
|||||||
[class.deploy]="deployButtonState === DeployButtonState.DEPLOYING"
|
[class.deploy]="deployButtonState === DeployButtonState.DEPLOYING"
|
||||||
[class.disabled]="deployButtonState === DeployButtonState.DEPLOYING || deployButtonState === DeployButtonState.DEPLOYED"
|
[class.disabled]="deployButtonState === DeployButtonState.DEPLOYING || deployButtonState === DeployButtonState.DEPLOYED"
|
||||||
[class.failed]="deployButtonState === DeployButtonState.FAILED">
|
[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">
|
<span *ngIf="deployButtonState === DeployButtonState.DEPLOYED">
|
||||||
<img src="images/greentick_icon.svg"/>
|
<img src="images/greentick_icon.svg"/>
|
||||||
<span>Deployed</span>
|
<span>{{deployButtonText['DEPLOYED']}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="deployButtonState === DeployButtonState.DEPLOYING"><div class="loader"></div>Reloading app...</span>
|
<span *ngIf="deployButtonState === DeployButtonState.DEPLOYING"><div class="loader"></div>{{deployButtonText['DEPLOYING']}}</span>
|
||||||
<span *ngIf="deployButtonState === DeployButtonState.FAILED">Deployment failed. Retry</span>
|
<span *ngIf="deployButtonState === DeployButtonState.FAILED">{{deployButtonText['FAILED']}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,6 +44,7 @@ export class IdeComponent implements OnInit {
|
|||||||
|
|
||||||
codeState = CodeState.SAVED;
|
codeState = CodeState.SAVED;
|
||||||
deployButtonState = DeployButtonState.DEPLOYED;
|
deployButtonState = DeployButtonState.DEPLOYED;
|
||||||
|
deployButtonText = config.ide.deployButtonText;
|
||||||
showDeployButton: boolean = config.ide.showDeployButton;
|
showDeployButton: boolean = config.ide.showDeployButton;
|
||||||
autosave = null;
|
autosave = null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user