forked from 1b-agent/opencadstudio-upstream
feat(io): add user-approved recovery
This commit is contained in:
1 parent
25515fa33c
commit
9e90e50662
25 files changed
+2723
-198
No files matched your search
@@ -41,6 +41,8 @@ impl OpenCADStudio {
|
||||
Some(K::PointStyle) => crate::tr!("modal-point-style"),
|
||||
Some(K::AttributeEditor) => crate::tr!("modal-attribute-editor"),
|
||||
Some(K::SaveDialog) => crate::tr!("modal-save-drawing-as"),
|
||||
Some(K::Recovery) => crate::tr!("modal-recovery-report"),
|
||||
Some(K::RecoveryPrompt) => crate::tr!("modal-recovery-prompt"),
|
||||
None => String::new(),
|
||||
}
|
||||
}
|
||||
@@ -1289,6 +1291,27 @@ impl OpenCADStudio {
|
||||
)
|
||||
})
|
||||
}
|
||||
super::super::ModalKind::Recovery => {
|
||||
let report = self.recovery_report.as_ref()?;
|
||||
sized_flow(ex, 680, 460, |flow| {
|
||||
crate::ui::window::recovery::view_window(
|
||||
report,
|
||||
self.pending_opens.is_empty(),
|
||||
flow,
|
||||
)
|
||||
})
|
||||
}
|
||||
super::super::ModalKind::RecoveryPrompt => {
|
||||
let opening = self.opening.as_ref()?;
|
||||
let error = opening.recovery_error.as_deref()?;
|
||||
automatic_flow(ex, |flow| {
|
||||
crate::ui::window::recovery::view_prompt(
|
||||
&opening.name,
|
||||
error,
|
||||
flow,
|
||||
)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user