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,9 +1,8 @@
|
||||
use client_application::{ClientApp, RepaintCommand};
|
||||
use client_domain::BoundingBox;
|
||||
use protocol::{
|
||||
ServerMessage, WidgetDescriptor,
|
||||
WireDisplayHint, WireLayoutNode, WireContainerNode, WireLayoutChild,
|
||||
WireDirection, WireSizing, WireWidgetState, WireKeyValue, WireValue,
|
||||
ServerMessage, WidgetDescriptor, WireContainerNode, WireDirection, WireDisplayHint,
|
||||
WireKeyValue, WireLayoutChild, WireLayoutNode, WireSizing, WireValue, WireWidgetState,
|
||||
};
|
||||
|
||||
fn screen() -> BoundingBox {
|
||||
@@ -15,9 +14,10 @@ fn weather_descriptor(id: u16, temp: &str) -> WidgetDescriptor {
|
||||
id,
|
||||
display_hint: WireDisplayHint::IconValue,
|
||||
state: WireWidgetState {
|
||||
data: vec![
|
||||
WireKeyValue { key: "temperature".into(), value: WireValue::String(temp.into()) },
|
||||
],
|
||||
data: vec![WireKeyValue {
|
||||
key: "temperature".into(),
|
||||
value: WireValue::String(temp.into()),
|
||||
}],
|
||||
error: None,
|
||||
},
|
||||
}
|
||||
@@ -29,8 +29,14 @@ fn two_widget_layout() -> WireLayoutNode {
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
children: vec![
|
||||
WireLayoutChild { sizing: WireSizing::Flex(1), node: WireLayoutNode::Leaf(1) },
|
||||
WireLayoutChild { sizing: WireSizing::Flex(1), node: WireLayoutNode::Leaf(2) },
|
||||
WireLayoutChild {
|
||||
sizing: WireSizing::Flex(1),
|
||||
node: WireLayoutNode::Leaf(1),
|
||||
},
|
||||
WireLayoutChild {
|
||||
sizing: WireSizing::Flex(1),
|
||||
node: WireLayoutNode::Leaf(2),
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
@@ -116,8 +122,14 @@ fn second_screen_update_repaints_all_widgets_with_new_layout() {
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
children: vec![
|
||||
WireLayoutChild { sizing: WireSizing::Flex(1), node: WireLayoutNode::Leaf(1) },
|
||||
WireLayoutChild { sizing: WireSizing::Flex(1), node: WireLayoutNode::Leaf(2) },
|
||||
WireLayoutChild {
|
||||
sizing: WireSizing::Flex(1),
|
||||
node: WireLayoutNode::Leaf(1),
|
||||
},
|
||||
WireLayoutChild {
|
||||
sizing: WireSizing::Flex(1),
|
||||
node: WireLayoutNode::Leaf(2),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user