This commit is contained in:
2026-09-12 21:50:09 +01:00
parent b20e03def7
commit b81eb967ee
17 changed files with 468 additions and 14 deletions
+7 -1
View File
@@ -11,6 +11,8 @@ pub(crate) struct Bar {
pub(crate) active_popup: Option<String>,
/// Module registry keyed by stable module id.
pub(crate) modules: BTreeMap<&'static str, Box<dyn BarModule>>,
/// Left, Middle, Right ; Module Order
pub(crate) order: (Vec<String>, Vec<String>, Vec<String>),
/// Surface id of the open popup.
pub(crate) popup_id: Option<window::Id>,
/// Fan-out routing table: module id -> services it wants.
@@ -21,7 +23,10 @@ pub(crate) struct Bar {
}
impl Bar {
pub(crate) fn new(modules_config_table: &Table) -> Self {
pub(crate) fn new(
modules_config_table: &Table,
modules_order: (Vec<String>, Vec<String>, Vec<String>),
) -> Self {
// Registry owns construction: adding a module never edits this file.
let modules: BTreeMap<&'static str, Box<dyn BarModule>> =
modules::all(modules_config_table.clone())
@@ -41,6 +46,7 @@ impl Bar {
Self {
active_popup: None,
modules,
order: modules_order,
popup_id: None,
routes,
inputs,