compose: Disable send button with a default cursor.

This commit is a pre commit to a change that will
introduce banners and tooltips as per various
unmet conditions while composing a message.

To accomodate future changes, the toggling is
switched to conditional addition/removal of the
`disabled-message-send-controls` class while
updating the status of the send button.

Also a default cursor is added and the send
area tooltips are disabled whenever the
`disabled-message-send-controls` class is
present.
This commit is contained in:
apoorvapendse
2024-12-22 14:41:52 +05:30
committed by Tim Abbott
parent 6a443c0418
commit 4b82e08b13
2 changed files with 6 additions and 3 deletions

View File

@@ -215,8 +215,11 @@ export function initialize(): void {
trigger: "mouseenter",
appendTo: () => document.body,
onShow(instance) {
// Don't show Send button tooltip if the popover is displayed.
if (popover_menus.is_scheduled_messages_popover_displayed()) {
// Don't show send-area tooltips if the popover is displayed or if the send button is disabled.
if (
popover_menus.is_scheduled_messages_popover_displayed() ||
$(".message-send-controls").hasClass("disabled-message-send-controls")
) {
return false;
}
if (user_settings.enter_sends) {