forked from 1b-agent/opencadstudio-upstream
fix(start): enable Send Feedback / Release Notes on the start tab
The start (welcome) tab blocks any command that isn't NEW/OPEN/EXIT/QUIT, so the Contribute and Release Notes buttons did nothing but print "No drawing open". REPORT and CHANGELOG (and ABOUT) only open a URL or a dialog and need no drawing, so allow them through. Also rename the "Contribute" button to "Send Feedback" (#44) and update the REPORT status line to match. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
036ac7dd86
commit
3522637f65
2 files changed
+8
-3
No files matched your search
+7
-2
@@ -32,7 +32,12 @@ impl OpenCADStudio {
|
||||
// command would silently do nothing. Allow only the commands that
|
||||
// make sense there (create / open a document, or quit) and tell the
|
||||
// user otherwise instead of running a no-op. See #96.
|
||||
if self.tabs[i].is_start && !matches!(cmd, "NEW" | "OPEN" | "EXIT" | "QUIT") {
|
||||
if self.tabs[i].is_start
|
||||
&& !matches!(
|
||||
cmd,
|
||||
"NEW" | "OPEN" | "EXIT" | "QUIT" | "REPORT" | "CHANGELOG" | "ABOUT"
|
||||
)
|
||||
{
|
||||
self.command_line
|
||||
.push_info("No drawing open. Use NEW or OPEN to start a drawing.");
|
||||
return Task::none();
|
||||
@@ -2663,7 +2668,7 @@ impl OpenCADStudio {
|
||||
|
||||
"REPORT" => {
|
||||
let _ = open::that("https://github.com/HakanSeven12/OpenCADStudio/issues/new");
|
||||
self.command_line.push_info("Opening GitHub issue page...");
|
||||
self.command_line.push_info("Opening feedback page...");
|
||||
}
|
||||
|
||||
"ABOUT" => {
|
||||
|
||||
+1
-1
@@ -3730,7 +3730,7 @@ pub(super) fn start_page_view<'a>() -> Element<'a, Message> {
|
||||
|
||||
let secondary_row = row![
|
||||
outline_btn(
|
||||
"Contribute",
|
||||
"Send Feedback",
|
||||
Message::RibbonToolClick {
|
||||
tool_id: "REPORT".to_string(),
|
||||
event: crate::modules::ModuleEvent::Command("REPORT".to_string()),
|
||||
|
||||
Reference in new issue
Block a user