[x] refactor other main/renderer communication using invoke
[x] abstract renderer code into a util (e.g. startSketchesServer(dir).then(....))
[x] do same for opening sketches folder
[ ] very basic error alert system (just wrap window.alert for now)
[x] save using system menu
[x] save as using menu
[x] load using menu
[x] store sketches dir string in project data
[x] load sketches dir from project file (or use neighbour)
[ ] allow users to manually select sketches folder if project isn't linked
[x] main thread tidy code into handler files
[x] FIX: when loading the sketches dir for the first time, it's always going to be returned as absolute, but we'd rather save it as relative when possible. It can be saved in the store in whatever format, we can handle this with some logic when saving the project. Upon the next load, it will stay as relative with no issues.
[x] Also: sketches folder as a sibling/sibling-child
When a user saves a project next to their sketches folder, it should be stored in the project as a relative URL rather than absolute. This should also happen if the sketches folder is somewhere lower down than the project file (e.g. neighbouring directory to project.json). This means that when we load we don't actually have to go looking for sketches as a neighbour. We just know it's a relative URL and find it with the path given.
[x] json file load input
[x] main thread start sketches server
[x] render thread replace project data
[x] refactor other main/renderer communication using
invoke
[x] abstract renderer code into a util (e.g.
startSketchesServer(dir).then(....)
)[x] do same for opening sketches folder
[ ] very basic error alert system (just wrap
window.alert
for now)[x] save using system menu
[x] save as using menu
[x] load using menu
[x] store sketches dir string in project data
[x] load sketches dir from project file (or use neighbour)
[ ] allow users to manually select sketches folder if project isn't linked
[x] main thread tidy code into handler files
[x] FIX: when loading the sketches dir for the first time, it's always going to be returned as absolute, but we'd rather save it as relative when possible. It can be saved in the store in whatever format, we can handle this with some logic when saving the project. Upon the next load, it will stay as relative with no issues.
[x] Also: sketches folder as a sibling/sibling-child When a user saves a project next to their sketches folder, it should be stored in the project as a relative URL rather than absolute. This should also happen if the sketches folder is somewhere lower down than the project file (e.g. neighbouring directory to project.json). This means that when we load we don't actually have to go looking for
sketches
as a neighbour. We just know it's a relative URL and find it with the path given.