add initial crates and apps
This commit is contained in:
parent
5c87ba3519
commit
1ca300098f
113 changed files with 28169 additions and 0 deletions
38
crates/chattyness-user-ui/src/components/chat.rs
Normal file
38
crates/chattyness-user-ui/src/components/chat.rs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
//! Chat components for realm chat interface.
|
||||
|
||||
use leptos::prelude::*;
|
||||
|
||||
/// Chat input component (placeholder UI).
|
||||
///
|
||||
/// Displays a text input field for typing messages.
|
||||
/// Currently non-functional - just UI placeholder.
|
||||
#[component]
|
||||
pub fn ChatInput() -> impl IntoView {
|
||||
let (message, set_message) = signal(String::new());
|
||||
|
||||
view! {
|
||||
<div class="chat-input-container w-full max-w-4xl mx-auto">
|
||||
<div class="flex gap-2 items-center bg-gray-900/80 backdrop-blur-sm rounded-lg p-2 border border-gray-600">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Type a message..."
|
||||
class="flex-1 bg-transparent text-white placeholder-gray-500 px-3 py-2 outline-none"
|
||||
prop:value=move || message.get()
|
||||
on:input=move |ev| {
|
||||
set_message.set(event_target_value(&ev));
|
||||
}
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
disabled=move || message.get().trim().is_empty()
|
||||
>
|
||||
"Send"
|
||||
</button>
|
||||
</div>
|
||||
<p class="text-gray-500 text-xs mt-2 text-center">
|
||||
"Chat functionality coming soon"
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue