Refactor pages into separate files

This commit is contained in:
Jeremy Soller 2022-12-21 13:11:32 -07:00
parent e4af157406
commit 3f113016c5
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
8 changed files with 464 additions and 406 deletions

View file

@ -0,0 +1,24 @@
use cosmic::{
Element,
iced::widget::{column, text, toggler},
widget::{list_column, settings},
};
use super::{Message, Page, Window};
impl Window {
pub(super) fn view_bluetooth(&self) -> Element<Message> {
settings::view_column(vec![
self.page_title(Page::Bluetooth),
column!(
list_column()
.add(settings::item("Bluetooth", toggler(None, self.toggler_value, Message::TogglerToggled))),
text("Now visible as \"TODO\", just kidding")
).spacing(8).into(),
settings::view_section("Devices")
.add(settings::item("No devices found", text("")))
.into()
]).into()
}
}