Joffrey JAFFEUX bdfd80bfe0
UI: chat composer step 2 (#21641)
- few improved alignments
- displays emoji picker button inline on desktop
- keeps composer focused when focusing dropdown button
- align buttons to bottom when increasing height of textarea
- max-height of textarea is now linked to the height of the screen

Co-authored-by: chapoi <charlie@discourse.org>
2023-05-22 17:00:50 +02:00

36 lines
978 B
Handlebars

{{#if @buttons.length}}
<Chat::Composer::Button
{{on "click" this.toggleExpand}}
@icon="plus"
title={{i18n "chat.composer.toggle_toolbar"}}
disabled={{@isDisabled}}
{{did-insert this.setupTrigger}}
class={{concat-class
"chat-composer-dropdown__trigger-btn"
(if @hasActivePanel "has-active-panel")
}}
...attributes
/>
{{#if this.isExpanded}}
<ul
class="chat-composer-dropdown__list"
{{did-insert this.setupPanel}}
{{will-destroy this.teardownPanel}}
>
{{#each @buttons as |button|}}
<li class={{concat-class "chat-composer-dropdown__item" button.id}}>
<DButton
@class={{concat-class
"chat-composer-dropdown__action-btn"
button.id
}}
@icon={{button.icon}}
@action={{fn this.onButtonClick button}}
@label={{button.label}}
/>
</li>
{{/each}}
</ul>
{{/if}}
{{/if}}