mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 05:18:19 +00:00
Dialog redesign and content revamp (#1409)
* Revamp the content and design of dialogs * Add the Licenses dialog
This commit is contained in:
parent
5acb2cff06
commit
a112ab27cf
52 changed files with 798 additions and 453 deletions
|
@ -354,8 +354,11 @@ impl JsEditorHandle {
|
|||
}
|
||||
|
||||
#[wasm_bindgen(js_name = requestAboutGraphiteDialogWithLocalizedCommitDate)]
|
||||
pub fn request_about_graphite_dialog_with_localized_commit_date(&self, localized_commit_date: String) {
|
||||
let message = DialogMessage::RequestAboutGraphiteDialogWithLocalizedCommitDate { localized_commit_date };
|
||||
pub fn request_about_graphite_dialog_with_localized_commit_date(&self, localized_commit_date: String, localized_commit_year: String) {
|
||||
let message = DialogMessage::RequestAboutGraphiteDialogWithLocalizedCommitDate {
|
||||
localized_commit_date,
|
||||
localized_commit_year,
|
||||
};
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,24 +8,13 @@ use wasm_bindgen::prelude::*;
|
|||
|
||||
/// When a panic occurs, notify the user and log the error to the JS console before the backend dies
|
||||
pub fn panic_hook(info: &panic::PanicInfo) {
|
||||
let header = "The editor crashed — sorry about that";
|
||||
let description = "
|
||||
An internal error occurred. Please report this by filing an issue on GitHub.\n\
|
||||
\n\
|
||||
Reload the editor to continue. If this happens immediately on repeated reloads, clear saved data.
|
||||
"
|
||||
.trim();
|
||||
|
||||
error!("{}", info);
|
||||
|
||||
JS_EDITOR_HANDLES.with(|instances| {
|
||||
instances.borrow_mut().values_mut().for_each(|instance| {
|
||||
instance.send_frontend_message_to_js_rust_proxy(FrontendMessage::DisplayDialogPanic {
|
||||
panic_info: info.to_string(),
|
||||
header: header.to_string(),
|
||||
description: description.to_string(),
|
||||
})
|
||||
})
|
||||
instances
|
||||
.borrow_mut()
|
||||
.values_mut()
|
||||
.for_each(|instance| instance.send_frontend_message_to_js_rust_proxy(FrontendMessage::DisplayDialogPanic { panic_info: info.to_string() }))
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue