2019-12-13 17:20:29 +03:00
|
|
|
{{#if this.file}}
|
2016-04-15 17:45:50 +03:00
|
|
|
{{!-- Upload in progress! --}}
|
2019-12-13 17:20:29 +03:00
|
|
|
{{#if this.failureMessage}}
|
|
|
|
<div class="failed">{{this.failureMessage}}</div>
|
2016-04-15 17:45:50 +03:00
|
|
|
{{/if}}
|
|
|
|
<div class="progress-container">
|
|
|
|
<div class="progress">
|
2019-12-13 17:20:29 +03:00
|
|
|
<div class="bar {{if this.failureMessage "fail"}}" style={{this.progressStyle}}></div>
|
2016-04-15 17:45:50 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-13 17:20:29 +03:00
|
|
|
{{#if this.failureMessage}}
|
2022-02-02 19:09:43 +03:00
|
|
|
<button class="gh-btn gh-btn-green" data-test-upload-try-again-button type="button" {{action "reset"}}><span>Try Again</span></button>
|
2016-04-15 17:45:50 +03:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
<div class="upload-form">
|
2020-01-16 18:14:03 +03:00
|
|
|
<GhFileInput @multiple={{false}} @alt={{this.labelText}} @action={{action "fileSelected"}} @accept={{this.accept}}>
|
2019-12-13 17:20:29 +03:00
|
|
|
<div class="description">{{this.labelText}}</div>
|
2020-01-16 18:14:03 +03:00
|
|
|
</GhFileInput>
|
2016-04-15 17:45:50 +03:00
|
|
|
</div>
|
|
|
|
{{/if}}
|