2023-07-27 01:46:02 +08:00
|
|
|
<DModal
|
|
|
|
class="add-upload-modal"
|
|
|
|
@title={{i18n "admin.customize.theme.add_upload"}}
|
|
|
|
@closeModal={{@closeModal}}
|
|
|
|
@flash={{this.flash}}
|
|
|
|
>
|
|
|
|
<:body>
|
|
|
|
<div class="inputs">
|
|
|
|
<section class="field">
|
|
|
|
<input
|
|
|
|
{{on "change" this.updateName}}
|
|
|
|
type="file"
|
|
|
|
id="file-input"
|
|
|
|
accept="*"
|
|
|
|
/>
|
|
|
|
<label for="file-input">
|
|
|
|
{{i18n "admin.customize.theme.upload_file_tip"}}
|
|
|
|
</label>
|
|
|
|
</section>
|
|
|
|
<section class="field">
|
|
|
|
<label for="theme-variable-name">
|
|
|
|
{{i18n "admin.customize.theme.variable_name"}}
|
|
|
|
</label>
|
|
|
|
<Input id="theme-variable-name" @value={{this.name}} />
|
|
|
|
</section>
|
|
|
|
{{#if this.fileSelected}}
|
|
|
|
{{#if this.errorMessage}}
|
|
|
|
<span class="alert alert-error">{{this.errorMessage}}</span>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</:body>
|
|
|
|
<:footer>
|
|
|
|
<DButton
|
|
|
|
@action={{this.upload}}
|
|
|
|
@disabled={{this.disabled}}
|
|
|
|
@icon="upload"
|
|
|
|
@label="admin.customize.theme.upload"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-primary"
|
2023-07-27 01:46:02 +08:00
|
|
|
/>
|
|
|
|
<DButton
|
|
|
|
@action={{@closeModal}}
|
|
|
|
@label="cancel"
|
2024-02-29 18:47:07 +08:00
|
|
|
class="btn-transparent d-modal-cancel"
|
2023-07-27 01:46:02 +08:00
|
|
|
/>
|
|
|
|
</:footer>
|
|
|
|
</DModal>
|