euv-example 0.5.32

An example application demonstrating the euv UI framework with reactive signals, custom components, and WebAssembly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// The default WebSocket server URL prefix used for the demo.
pub(crate) const WEBSOCKET_DEFAULT_URL_PREFIX: &str = "wss://ltpp.vip/api/chat?uuid=";

/// The placeholder text for the WebSocket message input.
pub(crate) const WEBSOCKET_MESSAGE_PLACEHOLDER: &str = "Enter message to send";

/// The maximum number of WebSocket messages to keep in the display list.
pub(crate) const WEBSOCKET_MAX_MESSAGES: usize = 100;

/// The interval in milliseconds for sending Ping messages to keep the connection alive.
pub(crate) const WEBSOCKET_PING_INTERVAL_MS: i32 = 30000;

/// The JSON template for sending a text message through the WebSocket.
pub(crate) const WEBSOCKET_TEXT_MESSAGE_TEMPLATE: &str = r#"{"type":"Text","data":""#;

/// The JSON body for sending a Ping message through the WebSocket.
pub(crate) const WEBSOCKET_PING_MESSAGE: &str = r#"{"type":"Ping","data":""}"#;