This page is for the Chatroom — from here you can manage chats and channels for your application .
In this Chatroom you can:
At the top you will see the heading:
Chatroom
and the subtitle:
Manage chats and channels for
On the right side there are two actions:
When you click Clear Channel msg, a confirmation popup appears:
“Clear ALL messages in this channel?”
After confirmation:
Clicking the New Channel button opens the Create Channel modal.
This page includes toast.php, which means a popup toast appears after every action:
The main layout has two parts:
The left sidebar contains the heading:
Channels
Each channel appears as a button:
The currently opened channel is highlighted as active.
Each channel has two icons:
Clicking the pencil icon calls the function:
openEdit(channel_id, name, cooldown_seconds)
This automatically converts cooldown seconds into a readable unit (seconds/minutes/hours) and fills the Edit modal fields.
Clicking the trash icon shows a confirmation:
“Delete channel?”
After confirmation, the channel will be deleted.
If there are no channels, the sidebar displays “No channels”.
On mobile devices, a dropdown is available to switch channels:
win/app/?page=chat&channel_id=IDOn desktop, the right side displays the heading “Messages”.
If there are no messages, a message appears in the center:
Waiting for messages…
Each message appears in a chat bubble.
Each message includes meta information above it:
If a user is muted, a small badge appears in the message meta (red tone):
Badge attributes:
The JS function startMuteCountdown() reduces the timer every second:
Client messages have a three dots icon on the right side of the bubble.
Clicking it opens the Mute action menu.
Inside the menu you can configure a mute:
Buttons:
After submission, the backend mutes the user and a success/error toast appears.
At the bottom there is an admin reply bar.
A small input field appears above the message box:
Target username (optional)
If you enter a username, the reply can be targeted to that specific user (depending on your backend logic).
You can type a message in the textarea:
The send button includes an arrow icon.
While typing in the textarea:
When the page loads, the messages container automatically scrolls to the bottom so the latest message is visible.
The script scrolls multiple times (50ms, 200ms, 500ms) to ensure correct scrolling even with rendering delays.
As you type in the textarea, its height automatically expands so the text does not get cut off.
Clicking the New Channel button opens this modal:
Create Channel
Buttons:
Clicking the pencil icon opens this modal:
Edit Channel
Buttons:
Note: The openEdit() function converts cooldown seconds into amount + unit and automatically fills the fields.