2016-02-26 16:25:47 +03:00
|
|
|
{{#if file}}
|
|
|
|
{{!-- Upload in progress! --}}
|
|
|
|
{{#if failureMessage}}
|
|
|
|
<div class="failed">{{failureMessage}}</div>
|
|
|
|
{{/if}}
|
|
|
|
<div class="progress-container">
|
|
|
|
<div class="progress">
|
|
|
|
<div class="bar {{if failureMessage "fail"}}" style={{progressStyle}}></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{#if failureMessage}}
|
2017-02-16 22:50:05 +03:00
|
|
|
<button class="gh-btn gh-btn-green" {{action "reset"}}><span>Try Again</span></button>
|
2016-02-26 16:25:47 +03:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2017-03-03 11:59:01 +03:00
|
|
|
{{!-- file selection/drag-n-drop --}}
|
|
|
|
<div class="upload-form">
|
|
|
|
{{#gh-file-input multiple=false alt=description action=(action "fileSelected") accept=accept}}
|
2017-03-17 20:13:38 +03:00
|
|
|
<div class="gh-btn gh-btn-outline" data-test-file-input-description><span>{{description}}</span></div>
|
2017-03-03 11:59:01 +03:00
|
|
|
{{/gh-file-input}}
|
2017-08-02 10:05:59 +03:00
|
|
|
|
2017-09-20 13:19:48 +03:00
|
|
|
{{#if (and allowUnsplash settings.unsplash.isActive)}}
|
2017-08-02 10:05:59 +03:00
|
|
|
<div class="gh-image-uploader-unsplash" {{action (toggle "_showUnsplash" this)}}>
|
|
|
|
{{inline-svg "unsplash"}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2017-03-03 11:59:01 +03:00
|
|
|
</div>
|
2016-02-26 16:25:47 +03:00
|
|
|
{{/if}}
|
2017-08-02 10:05:59 +03:00
|
|
|
|
|
|
|
{{#if _showUnsplash}}
|
|
|
|
{{gh-unsplash
|
|
|
|
insert=(action "addUnsplashPhoto")
|
|
|
|
close=(action (toggle "_showUnsplash" this))
|
|
|
|
}}
|
|
|
|
{{/if}}
|