Add DisplayError to show user errors from the backend

This commit is contained in:
Keavon Chambers
2021-08-08 16:52:09 -07:00
parent fbf2c012c3
commit 89ee35b831
8 changed files with 54 additions and 25 deletions

View File

@@ -13,6 +13,7 @@ pub enum FrontendMessage {
SetActiveTool { tool_name: String },
SetActiveDocument { document_index: usize },
UpdateOpenDocumentsList { open_documents: Vec<String> },
DisplayError { description: String },
DisplayConfirmationToCloseDocument { document_index: usize },
DisplayConfirmationToCloseAllDocuments,
UpdateCanvas { document: String },
@@ -42,6 +43,7 @@ impl MessageHandler<FrontendMessage, ()> for FrontendMessageHandler {
advertise_actions!(
FrontendMessageDiscriminant;
DisplayError,
CollapseFolder,
ExpandFolder,
SetActiveTool,