Implement IndexedDB document auto-save (#422)

* removed all use of document indicies

* -add u64 support for wasm bridge

* fixed rust formating

* Cleaned up FrontendDocumentState in js-messages

* Tiny tweaks from code review

* - moved more of closeDocumentWithConfirmation to rust
- updated serde_wasm_bindgen to add feature flag

* working initial auto save impl

* auto save is a lifetime file

* - cargo fmt
- fixc error message
- move document version constant

* code review round 1

* generate seed for uuid in js when wasm is initialized

* Resolve PR feedback

* Further address PR feedback

* Fix failing test

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: otdavies <oliver@psyfer.io>
This commit is contained in:
mfish33
2021-12-27 01:56:47 -08:00
committed by Keavon Chambers
co-authored by Keavon Chambers otdavies
parent d5c5560c55
commit bfdd0dc7e2
17 changed files with 255 additions and 30 deletions
+3 -1
View File
@@ -3,7 +3,7 @@
extern crate graphite_proc_macros;
mod communication;
pub mod communication;
#[macro_use]
pub mod misc;
pub mod consts;
@@ -31,6 +31,8 @@ pub struct Editor {
}
impl Editor {
/// Construct a new editor instance.
/// Remember to provide a random seed with `editor::communication::set_uuid_seed(seed)` before any editors can be used.
pub fn new() -> Self {
Self { dispatcher: Dispatcher::new() }
}