NetsBlox / Snap--Build-Your-Own-Blocks

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
3 stars 6 forks source link

Logging out discards the current project #1521

Open dragazo opened 8 months ago

dragazo commented 8 months ago

It looks like logging out of your account also closes the current project without prompting and without saving.

gsteinLTU commented 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.

dragazo commented 8 months ago

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.

gsteinLTU commented 8 months ago

Good idea, hopefully it's that simple, although do we need to decide on things like what should happen if you're collaborating?

gsteinLTU commented 8 months ago

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."