Alternatively, perhaps in sltt-app on close we can just have a dialog that says "Saving changes..." which stays up until the changes are saved, then the app is allowed to close? How does the main process know when the app is ready to close? (We could use ipc communication.)
Basically we need better support for saving passage documents during closing sltt-app window as we did for https://github.com/ubsicap/sltt/issues/914).
This react electron-agnostic approach seems promising. Start here: https://stackoverflow.com/a/71339813/24056785
Alternatively, perhaps in sltt-app on close we can just have a dialog that says "Saving changes..." which stays up until the changes are saved, then the app is allowed to close? How does the main process know when the app is ready to close? (We could use ipc communication.)
See other suggestions in https://stackoverflow.com/questions/45827709/confirm-beforeunload-in-electron