mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-16 02:41:56 +00:00
Disable buttons when they should not be used
This commit is contained in:
parent
c508f367d9
commit
3266854db8
@ -22,20 +22,20 @@
|
||||
<button type="submit"
|
||||
class="btn btn-secondary"
|
||||
(click)="sendCode(); deployCode()"
|
||||
[disabled]="deployButtonState === 'DEPLOYING'"
|
||||
[disabled]="deployButtonState === 'DEPLOYING' || deployButtonState === 'DEPLOYED'"
|
||||
[class.btn-success]="deployButtonState === 'DEPLOYED'"
|
||||
[class.btn-info]="deployButtonState === 'DEPLOYING'"
|
||||
[class.disabled]="deployButtonState === 'DEPLOYING'"
|
||||
[class.disabled]="deployButtonState === 'DEPLOYING' || deployButtonState === 'DEPLOYED'"
|
||||
><span *ngIf="deployButtonState === 'TODEPLOY'">Deploy</span>
|
||||
<span *ngIf="deployButtonState === 'DEPLOYED'">Deploy</span>
|
||||
<span *ngIf="deployButtonState === 'DEPLOYING'"><div class="loader"></div>Reloading app...</span></button>
|
||||
<button (click)="sendCode()"
|
||||
[disabled]="saveButtonState === 'SAVING'"
|
||||
[disabled]="saveButtonState === 'SAVING' || saveButtonState === 'SAVED'"
|
||||
type="submit"
|
||||
class="btn btn-secondary"
|
||||
[class.btn-success]="saveButtonState === 'SAVED'"
|
||||
[class.btn-warning]="saveButtonState === 'SAVING'"
|
||||
[class.disabled]="saveButtonState === 'SAVING'"
|
||||
[class.disabled]="saveButtonState === 'SAVING' || saveButtonState === 'SAVED'"
|
||||
><span *ngIf="saveButtonState === 'DIRTY'">Save</span>
|
||||
<span *ngIf="saveButtonState === 'SAVED'">Save</span>
|
||||
<span *ngIf="saveButtonState === 'SAVING'">Saving...</span></button>
|
||||
|
Loading…
Reference in New Issue
Block a user