Fix embed-ui feature: correct rust-embed folder path

- Changed rust-embed folder from '../ui' to 'ui' (relative to crate root)
- Added conditional imports to eliminate unused import warnings
- Now UI files properly embed into botui binary during compilation
- Resolves production error: 'Asset suite/index.html not found in embedded binary'
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-02-06 09:26:30 -03:00
parent cdf8bea155
commit a1a30adb2c

View file

@ -20,11 +20,12 @@ use tokio_tungstenite::{
connect_async_tls_with_config, tungstenite, connect_async_tls_with_config, tungstenite,
tungstenite::protocol::Message as TungsteniteMessage, tungstenite::protocol::Message as TungsteniteMessage,
}; };
#[cfg(not(feature = "embed-ui"))]
use tower_http::services::{ServeDir, ServeFile}; use tower_http::services::{ServeDir, ServeFile};
#[cfg(feature = "embed-ui")] #[cfg(feature = "embed-ui")]
#[derive(RustEmbed)] #[derive(RustEmbed)]
#[folder = "../ui"] #[folder = "ui"]
struct Assets; struct Assets;
use crate::shared::AppState; use crate::shared::AppState;