Description
File > Save should cause a request to the editor backend for a serialized document. We can give this a .gsvg
file extension ("Graphite SVG") which will then be replaced with .gdd
("Graphite Design Document") in version 0.2 when there is a proper document system and node graph. Then backend will then reply with the text of this file, which the Response Handler will receive and provide to the download(filename: string, svgData: string)
function in Document.vue (currently used for File > Export). Maybe rename svgData
in that function to fileData
.
File > Open should then make the browser display a file system browse prompt and the user can pick a .gsvg
file to open. This should then get sent to the backend and get deserialized. Then the appropriate message(s) can be sent to the frontend for creating the new tab, switching to that tab, and displaying its contents in the viewport.
This should probably be implemented before #233, so it can be considered a soft-blocker for it.