Lock Composer

: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 Likes

Thanks.

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

  • locked, when sending is enabled
  • open, when sending is locked
5 Likes

Thanks. I’ve swapped them around.

3 Likes

Would it be possible to, for example, lock the button and instead require users to first perform the AI Proofread action and make it mandatory? And possibly even trigger it via a custom button next to the “Reply” button?

That seems a little out of scope for this component, and I’m not sure if there is a way to even track that besides onclick of the Approve button. It can be done, I suppose. Perhaps it would be better to fork this and do it there?

1 Like