messages: Add spinner for messages sent on slow connections.

At times, it might get confusing for users who are on
slow connections if their messages has not been sent
even after 5s. Including a spinner that will only show
up after 5 seconds has elapsed will keep user informed
about their slow connection.

5s is set as minimum time because showing up a spinner
before than might be distracting for users on normal
connections.

Fixes: #19328.
This commit is contained in:
Lakshay Mittal
2023-03-18 00:24:09 +05:30
committed by Tim Abbott
parent 24d9d3d90c
commit e86fe4e57c
6 changed files with 78 additions and 0 deletions

View File

@@ -31,6 +31,10 @@
{{timestr}}
</a>
{{#if msg/locally_echoed}}
<span class="fa fa-circle-o-notch slow-send-spinner hidden"></span>
{{/if}}
{{> message_controls}}
{{#unless status_message}}