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:
@@ -6,7 +6,6 @@ pub type DataSourceId = u16;
|
||||
pub enum DataSourceType {
|
||||
Weather,
|
||||
Media,
|
||||
Xtb,
|
||||
Rss,
|
||||
HttpJson,
|
||||
Webhook,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
mod widget_config;
|
||||
mod data_source;
|
||||
mod layout_preset;
|
||||
mod widget_config;
|
||||
|
||||
pub use widget_config::{WidgetConfig, WidgetId};
|
||||
pub use data_source::{DataSource, DataSourceId, DataSourceType, DataSourceConfig, DataSourceValidationError};
|
||||
pub use data_source::{
|
||||
DataSource, DataSourceConfig, DataSourceId, DataSourceType, DataSourceValidationError,
|
||||
};
|
||||
pub use layout_preset::{LayoutPreset, LayoutPresetId};
|
||||
pub use widget_config::{WidgetConfig, WidgetId};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use std::collections::BTreeMap;
|
||||
use crate::value_objects::{DisplayHint, KeyMapping, Value, WidgetState};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
pub type WidgetId = u16;
|
||||
pub type DataSourceId = u16;
|
||||
@@ -58,7 +58,8 @@ impl WidgetConfig {
|
||||
fn truncate_value(value: Value, max_bytes: usize) -> Value {
|
||||
match value {
|
||||
Value::String(s) if s.len() > max_bytes => {
|
||||
let truncated: String = s.char_indices()
|
||||
let truncated: String = s
|
||||
.char_indices()
|
||||
.take_while(|(i, _)| *i < max_bytes)
|
||||
.map(|(_, c)| c)
|
||||
.collect();
|
||||
|
||||
Reference in New Issue
Block a user