feat(ui): OCS Web button, prefilled feedback, drop Start About button

- Add an "OCS Web" button (bright ribbon-blue, desktop only) to the Start
  page that opens the web build at hakanseven12.github.io/OpenCADStudio.
- Send Feedback now opens the GitHub issue with the body pre-filled:
  app version + platform (OS/arch on desktop, browser user-agent on web),
  via sys::platform_info + sys::percent_encode.
- Remove the redundant About button from the Start page (ABOUT command /
  menu still opens it).

Native + web build; 75 tests pass.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-17 01:34:13 +03:00
1 parent a146795952
commit 17f7924e77
4 files changed
+95 -7

No files matched your search

+19 -2
View File
@@ -36,7 +36,7 @@ impl OpenCADStudio {
&& !matches!(
cmd,
"NEW" | "OPEN" | "EXIT" | "QUIT" | "REPORT" | "CHANGELOG" | "ABOUT"
| "PLUGINS" | "PLUGINMANAGER" | "DONATE"
| "PLUGINS" | "PLUGINMANAGER" | "DONATE" | "WEBVERSION"
)
{
self.command_line
@@ -2505,6 +2505,11 @@ impl OpenCADStudio {
self.command_line.push_info("Opening Patreon page...");
}
"WEBVERSION" => {
crate::sys::open_url("https://hakanseven12.github.io/OpenCADStudio/");
self.command_line.push_info("Opening OCS Web...");
}
// ── DWGPROPS — print round-trip-only HeaderVariables ─────────
// No UI dialog for these yet; the command surfaces them so
// users can confirm the values that the parser populated and
@@ -2681,7 +2686,19 @@ impl OpenCADStudio {
}
"REPORT" => {
crate::sys::open_url("https://github.com/HakanSeven12/OpenCADStudio/issues/new");
// Pre-fill the GitHub issue body with version + platform so
// reports arrive with the basics already filled in.
let body = format!(
"<!-- Describe the issue and the steps to reproduce it. -->\n\n\n\
---\n- Open CAD Studio: v{}\n- Platform: {}\n",
env!("CARGO_PKG_VERSION"),
crate::sys::platform_info(),
);
let url = format!(
"https://github.com/HakanSeven12/OpenCADStudio/issues/new?body={}",
crate::sys::percent_encode(&body)
);
crate::sys::open_url(&url);
self.command_line.push_info("Opening feedback page...");
}
+45 -5
View File
@@ -3779,7 +3779,7 @@ pub(super) fn start_page_view<'a>() -> Element<'a, Message> {
.spacing(12)
.align_y(iced::Center);
let secondary_row = row![
let mut secondary_row = row![
outline_btn(
"Send Feedback",
Message::RibbonToolClick {
@@ -3795,10 +3795,50 @@ pub(super) fn start_page_view<'a>() -> Element<'a, Message> {
},
),
outline_btn("Plugins", Message::PluginManagerOpen),
outline_btn("About", Message::AboutOpen),
]
.spacing(12)
.align_y(iced::Center);
];
// The web build is already in the browser, so only the desktop offers a
// link to the web version.
#[cfg(not(target_arch = "wasm32"))]
{
// Bright ribbon blue (matches the active-tool accent), filled.
secondary_row = secondary_row.push(
button(text("OCS Web").size(14).color(Color::WHITE))
.on_press(Message::RibbonToolClick {
tool_id: "WEBVERSION".to_string(),
event: crate::modules::ModuleEvent::Command("WEBVERSION".to_string()),
})
.padding([10, 22])
.style(|_: &Theme, status| button::Style {
background: Some(Background::Color(match status {
button::Status::Hovered => Color {
r: 0.15,
g: 0.45,
b: 0.78,
a: 1.0,
},
_ => Color {
r: 0.20,
g: 0.55,
b: 0.90,
a: 1.0,
},
})),
text_color: Color::WHITE,
border: Border {
color: Color {
r: 0.20,
g: 0.55,
b: 0.90,
a: 1.0,
},
width: 1.0,
radius: 6.0.into(),
},
..Default::default()
}),
);
}
let secondary_row = secondary_row.spacing(12).align_y(iced::Center);
let card_section = |heading: &'static str, sub: &'static str, body: &'static str| {
container(