Компоновщик Lock

:information_source: Summary Lock/unlock the composer to prevent accidental sending
:hammer_and_wrench: Repository GitHub - NateDhaliwal/discourse-lock-composer
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

This is a simple component to lock/unlock the composer to prevent accidental sending. Originally brought up in The awkward mishap of premature posting.

Locked:

Unlocked:

Toasts are also shown once you click on the lock icon (texts are customizable as locales).

image

image

Hope this helps!

9 лайков

Thanks.

But should icons work opposite way :thinking:
Now it is

  • locked, when sending is enabled
  • open, when sending is locked
5 лайков

Thanks. I’ve swapped them around.

3 лайка

Возможно ли, например, заблокировать кнопку и вместо этого потребовать от пользователей сначала выполнить действие «Исправление с помощью ИИ», сделав его обязательным? И, возможно, даже активировать его через пользовательскую кнопку рядом с кнопкой «Ответить»?

Это кажется немного выходящим за рамки данного компонента, и я не уверен, есть ли способ отслеживать это, кроме события onclick кнопки «Approve». В принципе, это можно сделать. Возможно, будет лучше форкнуть этот проект и реализовать это там?

1 лайк