forked from 1b-agent/opencadstudio-upstream
feat: Reference Manager help window with web shortcomings
The toolbar Help button was a disabled tip that could never be clicked. It now opens a modal window explaining the manager on the web build: read-only reference list, disabled Attach/Refresh/Change Path (no filesystem access or native file pickers, so no add/reload/repath and no previews), nested read-only rows, and saved-drawing requirement for relative paths. Includes a Report-an-issue button opening the GitHub issues page and a Close button; wired as ModalKind::XrefHelp through the shared modal frame so dismissal works on native and web.
This commit is contained in:
1 parent
8e05ed552c
commit
ef0c6bf403
6 files changed
+122
-2
No files matched your search
@@ -1854,6 +1854,8 @@ pub enum ModalKind {
|
||||
/// means and what usually fixes it. Queued once per verdict; the status
|
||||
/// bar's ⚠ pill reopens it.
|
||||
GpuWarning,
|
||||
/// Reference Manager help window (toolbar Help button).
|
||||
XrefHelp,
|
||||
}
|
||||
|
||||
/// A property group controlled by a layer state's restore mask.
|
||||
@@ -2473,6 +2475,8 @@ pub enum Message {
|
||||
XrefManagerRefreshMenu,
|
||||
/// Toggle the Change Path dropdown menu.
|
||||
XrefManagerPathMenu,
|
||||
/// Open the Reference Manager help window.
|
||||
XrefHelpOpen,
|
||||
/// Close all palette dropdown menus (overlay dismissal).
|
||||
XrefManagerDismissMenus,
|
||||
/// Open the file picker for Select New Path (anchor entry).
|
||||
|
||||
@@ -2395,6 +2395,10 @@ impl OpenCADStudio {
|
||||
self.xref_manager.refresh_open = false;
|
||||
Task::none()
|
||||
}
|
||||
Message::XrefHelpOpen => {
|
||||
self.active_modal = Some(super::ModalKind::XrefHelp);
|
||||
Task::none()
|
||||
}
|
||||
Message::XrefManagerDismissMenus => {
|
||||
self.xref_manager.attach_open = false;
|
||||
self.xref_manager.refresh_open = false;
|
||||
|
||||
@@ -56,6 +56,7 @@ impl OpenCADStudio {
|
||||
Some(K::MissingFonts) => crate::t!("Missing fonts").into_owned(),
|
||||
Some(K::RecoveryPrompt) => crate::tr!("modal", "recovery-prompt"),
|
||||
Some(K::GpuWarning) => crate::tr!("gpu", "title"),
|
||||
Some(K::XrefHelp) => crate::t!("Reference Manager Help").into_owned(),
|
||||
None => String::new(),
|
||||
}
|
||||
}
|
||||
@@ -85,6 +86,9 @@ impl OpenCADStudio {
|
||||
super::super::ModalKind::About => {
|
||||
automatic_flow(ex, crate::ui::window::about::view_window)
|
||||
}
|
||||
super::super::ModalKind::XrefHelp => {
|
||||
automatic_flow(ex, crate::ui::window::xref_help::view_window)
|
||||
}
|
||||
super::super::ModalKind::Shortcuts => {
|
||||
// Keys claimed by two rows — the cells turn red and a
|
||||
// persistent warning names the command already using each
|
||||
|
||||
Reference in new issue
Block a user