mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
09435ecf76
no issue Keeps component JS backing files and template files in the same directory which avoids hunting across directories when working with components. Also lets you see all components when looking at one directory, whereas previously template-only or js-only components may not have been obvious without looking at both directories. - ran [codemod](https://github.com/ember-codemods/ember-component-template-colocation-migrator/) for app-level components - manually moved in-repo-addon component templates in `lib/koenig-editor` - removed all explicit `layout` imports as JS/template associations are now made at build-time removing the need for them - updated `.embercli` to default to new flat component structure
35 lines
1.2 KiB
Handlebars
35 lines
1.2 KiB
Handlebars
{{#if this.file}}
|
|
{{!-- Upload in progress! --}}
|
|
{{#if this.failureMessage}}
|
|
<div class="failed">{{this.failureMessage}}</div>
|
|
{{/if}}
|
|
<div class="progress-container">
|
|
<div class="progress">
|
|
<div class="bar {{if this.failureMessage "fail"}}" style={{this.progressStyle}}></div>
|
|
</div>
|
|
</div>
|
|
{{#if this.failureMessage}}
|
|
<button class="gh-btn gh-btn-green" {{action "reset"}}><span>Try Again</span></button>
|
|
{{/if}}
|
|
{{else}}
|
|
{{!-- file selection/drag-n-drop --}}
|
|
<div class="upload-form">
|
|
<GhFileInput @multiple={{false}} @alt={{this.description}} @action={{action "fileSelected"}} @accept={{this.accept}}>
|
|
<div class="gh-btn gh-btn-outline" data-test-file-input-description><span>{{this.description}}</span></div>
|
|
</GhFileInput>
|
|
|
|
{{#if (and this.allowUnsplash this.settings.unsplash.isActive)}}
|
|
<div class="gh-image-uploader-unsplash" {{action (toggle "_showUnsplash" this)}}>
|
|
{{svg-jar "unsplash"}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if this._showUnsplash}}
|
|
<GhUnsplash
|
|
@select={{action "addUnsplashPhoto"}}
|
|
@close={{action (toggle "_showUnsplash" this)}}
|
|
/>
|
|
{{/if}}
|