fix some emotion bugs
This commit is contained in:
parent
bd28e201a2
commit
989e20757b
11 changed files with 1203 additions and 190 deletions
|
|
@ -163,6 +163,17 @@ pub fn ChatInput(
|
|||
apply_emotion(emotion_idx);
|
||||
ev.prevent_default();
|
||||
}
|
||||
} else if !msg.trim().is_empty() {
|
||||
// Send regular chat message
|
||||
ws_sender.with_value(|sender| {
|
||||
if let Some(send_fn) = sender {
|
||||
send_fn(ClientMessage::SendChatMessage {
|
||||
content: msg.trim().to_string(),
|
||||
});
|
||||
}
|
||||
});
|
||||
set_message.set(String::new());
|
||||
ev.prevent_default();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -282,7 +293,7 @@ fn EmoteListPopup(
|
|||
aria-label="Available emotions"
|
||||
>
|
||||
<div class="text-gray-400 text-xs mb-2 px-1">"Select an emotion:"</div>
|
||||
<div class="grid grid-cols-2 gap-1 max-h-64 overflow-y-auto">
|
||||
<div class="grid grid-cols-3 gap-1 max-h-64 overflow-y-auto">
|
||||
<For
|
||||
each=move || available_emotions()
|
||||
key=|(idx, _, _): &(u8, &str, Option<String>)| *idx
|
||||
|
|
@ -301,7 +312,7 @@ fn EmoteListPopup(
|
|||
emotion_path=preview_path.clone()
|
||||
/>
|
||||
<span class="text-white text-sm">
|
||||
":"
|
||||
":e "
|
||||
{emotion_name}
|
||||
</span>
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue