add SPA config UI, wire media/rss adapters, event-driven layout push
- React SPA: dashboard, data sources CRUD, widgets CRUD, layout builder, presets. TanStack Router + Query, shadcn/ui, Vite proxy to :3000 - wire media + rss adapters into polling loop, remove xtb source type - media adapter: read username/password from headers, proper subsonic auth - event handler: subscribe to LayoutChanged, push screen update to clients - fix clippy warnings across workspace (Default impls, collapsible ifs, redundant closures, is_none_or, unused imports)
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
mod config;
|
||||
mod event_handler;
|
||||
mod polling;
|
||||
|
||||
use std::sync::Arc;
|
||||
use anyhow::Result;
|
||||
use application::DataProjection;
|
||||
use config_sqlite::SqliteConfigStore;
|
||||
use tcp_server::{TcpBroadcaster, TcpEventBus, run_tcp_server};
|
||||
use http_api::AppState;
|
||||
use std::sync::Arc;
|
||||
use tcp_server::{TcpBroadcaster, TcpEventBus, run_tcp_server};
|
||||
use tokio::sync::Mutex;
|
||||
use tracing::{info, error};
|
||||
use tracing::{error, info};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
@@ -53,5 +54,19 @@ async fn main() -> Result<()> {
|
||||
|
||||
info!("K-Frame server running");
|
||||
|
||||
polling::run(config_store, broadcaster, projection, cfg.poll_interval_secs).await
|
||||
let ev_bus = event_bus.clone();
|
||||
let ev_config = config_store.clone();
|
||||
let ev_bc = broadcaster.clone();
|
||||
let ev_proj = projection.clone();
|
||||
tokio::spawn(async move {
|
||||
event_handler::run(ev_bus, ev_config, ev_bc, ev_proj).await;
|
||||
});
|
||||
|
||||
polling::run(
|
||||
config_store,
|
||||
broadcaster,
|
||||
projection,
|
||||
cfg.poll_interval_secs,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user