vue-advanced-chat icon indicating copy to clipboard operation
vue-advanced-chat copied to clipboard

How to disable room message input?

Open catthecreator opened this issue 2 years ago • 9 comments

In some cases, I want to disable the ability to enter a message. For example, a user has blocked the ability to send messages to him.

At the same time, opening the room and reading the history should still be available.

The show-footer attribute allows you to hide the footer completely, but how can you show the user a message with a reason why he can't write a message?

Thank you for the answer :)

catthecreator avatar Oct 21 '22 12:10 catthecreator

I can add a prop to disable the input. But the reason should be managed outside the library. For example you could add a click listener to the input, and show an alert

antoine92190 avatar Oct 24 '22 12:10 antoine92190

I think it would be great to be able to display a custom slot when the user has no way to type a message

catthecreator avatar Oct 28 '22 16:10 catthecreator

Indeed that could offer more flexibility. I will add that soon:

  • add prop to disable the message input
  • custom slot for footer

antoine92190 avatar Oct 28 '22 21:10 antoine92190

Also looking forward to this feature

palewithout avatar Apr 11 '23 03:04 palewithout

A slot for room-footer would be great

arufonsekun avatar Apr 19 '23 20:04 arufonsekun

Another problem is that when typing Esc on the keyboard, the already entered content will be cleared. Sometimes the multilingual input method forgets to switch languages, and Esc will be used to cancel the input of the current few characters, but I don’t want to clear everything. If there is a room-footer slot, I can implement a similar function by myself image image Like the picture above, esc on the github input box will not clear all the string

palewithout avatar May 15 '23 07:05 palewithout

Any update about this prop to disable the text input? I would like to make some chat rooms read-only under certain conditions.

despatates avatar Aug 17 '23 16:08 despatates

Any update about this prop to disable the text input?

+1, Every chat needs this functionality

seyfer avatar Sep 12 '23 14:09 seyfer

Any update? I know you can toggle the footer on and off but this looks weird, better to grey out the input / disable the input and leave it in place.

vesper8 avatar Nov 23 '23 22:11 vesper8