discourse/app/assets/javascripts/admin/addon/components/emoji-uploader.hbs
David Taylor 856182c7c6
DEV: Update emoji-uploader uppy usage (#29340)
Also moves this component to the admin bundle. It is only used in the admin panel, and has dependencies on admin-specific i18n strings.
2024-10-22 17:07:16 +01:00

52 lines
1.3 KiB
Handlebars

<div class="emoji-uploader form-horizontal">
<div class="control-group">
<span class="label">
{{i18n "admin.emoji.name"}}
</span>
<div class="input">
<Input
id="emoji-name"
name="name"
placeholder={{i18n "admin.emoji.name"}}
@value={{readonly this.name}}
{{on "input" (with-event-value (fn (mut this.name)))}}
/>
</div>
</div>
<div class="control-group">
<span class="label">
{{i18n "admin.emoji.group"}}
</span>
<div class="input">
<ComboBox
@name="group"
@id="emoji-group-selector"
@value={{this.group}}
@content={{this.newEmojiGroups}}
@onChange={{action "createEmojiGroup"}}
@valueProperty={{null}}
@nameProperty={{null}}
@options={{hash allowAny=true}}
/>
</div>
</div>
<div class="control-group">
<div class="input">
<input
{{did-insert this.uppyUpload.setup}}
class="hidden-upload-field"
disabled={{this.uppyUpload.uploading}}
type="file"
multiple="true"
accept=".png,.gif"
/>
<DButton
@translatedLabel={{this.buttonLabel}}
@icon="plus"
@action={{this.chooseFiles}}
@disabled={{this.uppyUpload.uploading}}
class="btn-primary"
/>
</div>
</div>
</div>