git.lucas.co / cce-system-interface
system settings
git clone https://git.lucas.co/cce-system-interface.git

commit207fc6bab80ff699f54151ac15a9d8de451c4d27
parent0df00b64c9
authorLucas Galante <[email protected]>
date2026-07-08 09:39
refactor: adapt Toggle/Checkbox fields to the cce-ui Phase 5 migration

Constructors now return Adapted<T>; concrete-typed struct fields become
Adapted<T>. Construction sites and method calls are unchanged (Deref +
Element forwards).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LkfJazPs9bRchkcozmxXCX

 src/pages/network.rs       | 6 +++---
 src/pages/notifications.rs | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/pages/network.rs b/src/pages/network.rs
index d420ee3..d7a6ba8 100644
--- a/src/pages/network.rs
+++ b/src/pages/network.rs
@@ -1,6 +1,6 @@
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use cce_ui::layout::{render_widget, PageLayoutBuilder, LayoutStrategy, RenderTarget};
-use cce_ui::widget::{List, Toggle, Element};
+use cce_ui::widget::{Adapted, List, Toggle, Element};
 
 #[derive(Debug, Clone)]
 pub struct WifiNetwork {
@@ -33,8 +33,8 @@ pub struct NetworkState {
     pub bt_devices: Vec<BluetoothDevice>,
     pub bt_scanning: bool,
     pub wifi_list_box: List,
-    pub wifi_toggle: Toggle,
-    pub bt_toggle: Toggle,
+    pub wifi_toggle: Adapted<Toggle>,
+    pub bt_toggle: Adapted<Toggle>,
 }
 
 impl Default for NetworkState {
diff --git a/src/pages/notifications.rs b/src/pages/notifications.rs
index a9f37a0..9f80ea0 100644
--- a/src/pages/notifications.rs
+++ b/src/pages/notifications.rs
@@ -18,7 +18,7 @@ pub struct NotificationsConfig {
 pub struct NotificationsState {
     pub loaded: bool,
     pub enable: bool,
-    pub enable_toggle: Toggle,
+    pub enable_toggle: cce_ui::widget::Adapted<Toggle>,
     pub bell: String,
     pub bell_menu: Dropdown,
     pub duration: i32,