compose: Show banner if user is not allowed to post in the stream.

We now show a banner on opening the compose box and changing the
stream in dropdown, if a user is not allowed to post in a stream.

The "Send" button is also disabled if user is not allowed to post
in the stream.

This commit also moved the CSS for disabled modal button in dark
theme below after the other CSS for modals as we are using the
same CSS for the "Send" button as well in disabled state.
This commit is contained in:
Sahil Batra
2023-04-23 17:48:48 +05:30
committed by Tim Abbott
parent e02111e458
commit 7eacd525b4
8 changed files with 58 additions and 5 deletions

View File

@@ -306,6 +306,10 @@ export function start(msg_type, opts) {
// Show a warning if topic is resolved
compose_validate.warn_if_topic_resolved(true);
if (msg_type === "stream") {
compose_recipient.check_stream_posting_policy_for_compose_box(opts.stream);
}
// Reset the `max-height` property of `compose-textarea` so that the
// compose-box do not cover the last messages of the current stream
// while writing a long message.