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,7 +1,5 @@
|
||||
use domain::{
|
||||
LayoutNode, ContainerNode, LayoutChild, Direction, Sizing,
|
||||
};
|
||||
use client_domain::{BoundingBox, LayoutEngine};
|
||||
use domain::{ContainerNode, Direction, LayoutChild, LayoutNode, Sizing};
|
||||
|
||||
fn screen() -> BoundingBox {
|
||||
BoundingBox::screen(240, 320)
|
||||
@@ -14,8 +12,14 @@ fn diff_detects_moved_widget_after_layout_change() {
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
children: vec![
|
||||
LayoutChild { sizing: Sizing::Flex(1), node: LayoutNode::Leaf(1) },
|
||||
LayoutChild { sizing: Sizing::Flex(1), node: LayoutNode::Leaf(2) },
|
||||
LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(1),
|
||||
},
|
||||
LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(2),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -24,8 +28,14 @@ fn diff_detects_moved_widget_after_layout_change() {
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
children: vec![
|
||||
LayoutChild { sizing: Sizing::Flex(1), node: LayoutNode::Leaf(1) },
|
||||
LayoutChild { sizing: Sizing::Flex(1), node: LayoutNode::Leaf(2) },
|
||||
LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(1),
|
||||
},
|
||||
LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(2),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -44,8 +54,14 @@ fn diff_returns_empty_for_identical_layouts() {
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
children: vec![
|
||||
LayoutChild { sizing: Sizing::Flex(1), node: LayoutNode::Leaf(1) },
|
||||
LayoutChild { sizing: Sizing::Flex(1), node: LayoutNode::Leaf(2) },
|
||||
LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(1),
|
||||
},
|
||||
LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(2),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -61,18 +77,20 @@ fn diff_detects_added_and_removed_widgets() {
|
||||
direction: Direction::Row,
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
children: vec![
|
||||
LayoutChild { sizing: Sizing::Flex(1), node: LayoutNode::Leaf(1) },
|
||||
],
|
||||
children: vec![LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(1),
|
||||
}],
|
||||
});
|
||||
|
||||
let layout_b = LayoutNode::Container(ContainerNode {
|
||||
direction: Direction::Row,
|
||||
gap: 0,
|
||||
padding: 0,
|
||||
children: vec![
|
||||
LayoutChild { sizing: Sizing::Flex(1), node: LayoutNode::Leaf(2) },
|
||||
],
|
||||
children: vec![LayoutChild {
|
||||
sizing: Sizing::Flex(1),
|
||||
node: LayoutNode::Leaf(2),
|
||||
}],
|
||||
});
|
||||
|
||||
let tree_a = LayoutEngine::compute(&layout_a, screen());
|
||||
|
||||
Reference in New Issue
Block a user