mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
* Migrate coming soon and about dialog to Rust * Migrate confirm close and close all * Migrate dialog error * Improve keyboard navigation throughout UI * Cleanup and fix panic dialog * Reduce css spacing to better match old dialogs * Add new document modal * Fix crash when generating default name * Populate rust about graphite data on startup * Code review changes * Move one more :focus CSS rule into App.vue * Add a dialog message and move dialogs * Split out keyboard input navigation from this branch * Improvements including simplifying panic dialog code Co-authored-by: Keavon Chambers <keavon@keavon.com>
73 lines
1.3 KiB
Rust
73 lines
1.3 KiB
Rust
use super::clipboards::Clipboard;
|
|
use crate::message_prelude::*;
|
|
|
|
use graphene::LayerId;
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[remain::sorted]
|
|
#[impl_message(Message, Portfolio)]
|
|
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
|
|
pub enum PortfolioMessage {
|
|
// Sub-messages
|
|
#[remain::unsorted]
|
|
#[child]
|
|
Document(DocumentMessage),
|
|
|
|
// Messages
|
|
AutoSaveActiveDocument,
|
|
AutoSaveDocument {
|
|
document_id: u64,
|
|
},
|
|
CloseActiveDocumentWithConfirmation,
|
|
CloseAllDocuments,
|
|
CloseDocument {
|
|
document_id: u64,
|
|
},
|
|
CloseDocumentWithConfirmation {
|
|
document_id: u64,
|
|
},
|
|
Copy {
|
|
clipboard: Clipboard,
|
|
},
|
|
Cut {
|
|
clipboard: Clipboard,
|
|
},
|
|
NewDocument,
|
|
NewDocumentWithName {
|
|
name: String,
|
|
},
|
|
NextDocument,
|
|
OpenDocument,
|
|
OpenDocumentFile {
|
|
document_name: String,
|
|
document_serialized_content: String,
|
|
},
|
|
OpenDocumentFileWithId {
|
|
document_id: u64,
|
|
document_name: String,
|
|
document_is_saved: bool,
|
|
document_serialized_content: String,
|
|
},
|
|
Paste {
|
|
clipboard: Clipboard,
|
|
},
|
|
PasteIntoFolder {
|
|
clipboard: Clipboard,
|
|
folder_path: Vec<LayerId>,
|
|
insert_index: isize,
|
|
},
|
|
PasteSerializedData {
|
|
data: String,
|
|
},
|
|
PrevDocument,
|
|
SelectDocument {
|
|
document_id: u64,
|
|
},
|
|
SetActiveDocument {
|
|
document_id: u64,
|
|
},
|
|
UpdateDocumentBar,
|
|
UpdateOpenDocumentsList,
|
|
}
|