mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 08:53:13 +08:00

- 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>
36 lines
978 B
Handlebars
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}} |