This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/plugins/chat/assets/javascripts/discourse/components/chat-mention-warnings.hbs
Roman Rizzi 85e1a4934b
REFACTOR: Move mention warnings logic into a separate service. (#19465)
First follow-up to the feature introduced in #19034. We don't want to pollute main components like `chat-live-pane`, so we'll use a service to track and manage the state needed to display before-send warnings while composing a chat message.

We also move from acceptance tests to system specs.
2023-02-03 15:38:30 -03:00

24 lines
735 B
Handlebars

{{#if this.show}}
<div class="chat-mention-warnings">
<div class="chat-mention-warning__icon">
{{d-icon "exclamation-triangle"}}
</div>
<div class="chat-mention-warning__text">
<div class="chat-mention-warning__header">
{{this.warningHeaderText}}
</div>
<ul class={{this.listStyleClass}}>
{{#if this.hasTooManyMentions}}
<li>{{this.tooManyMentionsBody}}</li>
{{else}}
{{#if this.hasUnreachableGroupMentions}}
<li>{{this.unreachableBody}}</li>
{{/if}}
{{#if this.hasOverMembersLimitGroupMentions}}
<li>{{this.overMembersLimitBody}}</li>
{{/if}}
{{/if}}
</ul>
</div>
</div>
{{/if}}