This commit is contained in:
2026-09-13 14:37:59 +01:00
parent b81eb967ee
commit 74f59be3f8
11 changed files with 87 additions and 37 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ use std::collections::{BTreeMap, BTreeSet};
use iced::window;
use common::{BarModule, Inbox, Service};
use common::{BarModule, Inbox, Modules, Service};
use toml::Table;
/// Application state: module registry, routing, popup bookkeeping.
@@ -12,7 +12,7 @@ pub(crate) struct Bar {
/// 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>),
pub(crate) order: (Vec<Modules>, Vec<Modules>, Vec<Modules>),
/// Surface id of the open popup.
pub(crate) popup_id: Option<window::Id>,
/// Fan-out routing table: module id -> services it wants.
@@ -25,7 +25,7 @@ pub(crate) struct Bar {
impl Bar {
pub(crate) fn new(
modules_config_table: &Table,
modules_order: (Vec<String>, Vec<String>, Vec<String>),
modules_order: (Vec<Modules>, Vec<Modules>, Vec<Modules>),
) -> Self {
// Registry owns construction: adding a module never edits this file.
let modules: BTreeMap<&'static str, Box<dyn BarModule>> =