refactor: Move device settings from home screen to Settings page
This commit is contained in:
+18
-13
@@ -333,11 +333,17 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
|||||||
].width(iced::Length::Fill).padding(10);
|
].width(iced::Length::Fill).padding(10);
|
||||||
|
|
||||||
if state.current_screen == Screen::Settings {
|
if state.current_screen == Screen::Settings {
|
||||||
let content = column![
|
let settings_box = container(
|
||||||
text("Settings").size(32).color(color_text),
|
column![
|
||||||
|
text("Settings").size(24).color(color_blue),
|
||||||
vertical_space(20.0),
|
vertical_space(20.0),
|
||||||
text("Future settings and controls will be added here.").size(16).color(color_subtext),
|
text("Device Settings (Optional Node Target IDs)").size(14).color(color_subtext),
|
||||||
vertical_space(40.0),
|
row![
|
||||||
|
text_input("Input Target", &state.input_device).on_input(AppMessage::InputDeviceChanged).style(t_style.clone()).padding(8),
|
||||||
|
horizontal_space(),
|
||||||
|
text_input("Output Target", &state.output_device).on_input(AppMessage::OutputDeviceChanged).style(t_style.clone()).padding(8),
|
||||||
|
].spacing(10),
|
||||||
|
vertical_space(30.0),
|
||||||
button(
|
button(
|
||||||
text("Back")
|
text("Back")
|
||||||
.size(16)
|
.size(16)
|
||||||
@@ -349,7 +355,13 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
|||||||
.width(iced::Length::Fixed(150.0))
|
.width(iced::Length::Fixed(150.0))
|
||||||
]
|
]
|
||||||
.align_x(iced::alignment::Horizontal::Center)
|
.align_x(iced::alignment::Horizontal::Center)
|
||||||
.spacing(10);
|
.spacing(10)
|
||||||
|
)
|
||||||
|
.style(c_style(color_mantle, color_surface, 12.0))
|
||||||
|
.padding(30)
|
||||||
|
.width(420);
|
||||||
|
|
||||||
|
let content = column![settings_box].align_x(iced::alignment::Horizontal::Center);
|
||||||
|
|
||||||
return container(content)
|
return container(content)
|
||||||
.width(iced::Length::Fill)
|
.width(iced::Length::Fill)
|
||||||
@@ -424,14 +436,7 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
|||||||
text("— OR —").size(12).color(color_surface).align_x(iced::alignment::Horizontal::Center),
|
text("— OR —").size(12).color(color_surface).align_x(iced::alignment::Horizontal::Center),
|
||||||
vertical_space(16.0),
|
vertical_space(16.0),
|
||||||
join_group,
|
join_group,
|
||||||
vertical_space(16.0),
|
vertical_space(10.0),
|
||||||
text("Device Settings (Optional Node Target IDs)").size(14).color(color_subtext),
|
|
||||||
row![
|
|
||||||
text_input("Input Target", &state.input_device).on_input(AppMessage::InputDeviceChanged).style(t_style.clone()).padding(8),
|
|
||||||
horizontal_space(),
|
|
||||||
text_input("Output Target", &state.output_device).on_input(AppMessage::OutputDeviceChanged).style(t_style.clone()).padding(8),
|
|
||||||
].spacing(10),
|
|
||||||
vertical_space(20.0),
|
|
||||||
status
|
status
|
||||||
]
|
]
|
||||||
.spacing(10)
|
.spacing(10)
|
||||||
|
|||||||
Reference in New Issue
Block a user