Open dragazo opened 8 months ago
https://github.com/NetsBlox/Snap--Build-Your-Own-Blocks/blob/95d4e0d39a932776701404bfd8cf65d714296078/src/gui.js#L6495 could probably have a this.prompt in it if you currently have a project open.
That would help, but it seems like we should be able to just log out without discarding the session. Like that call to newProject()
at the end probably isn't necessary. If no one knows of any invisible consequences, I'll just make a PR to remove that.
Good idea, hopefully it's that simple, although do we need to decide on things like what should happen if you're collaborating?
I did a quick test of removing that line and it almost works. If you make a project and log out, it will keep it open, but trying to do anything will have it ask if you want to request to collaborate. Sometimes clicking yes will result in a popup asking if you (who is logged out) would like to make "null" a collaborator. Clicking yes will tell you "Login required."
It looks like logging out of your account also closes the current project without prompting and without saving.