Cloud #signup URL switch

adding #signup to the URL directly opens the cloud signup dialog.
http://snap.berkeley.edu/snapsource/snap.html#signup
pull/3/merge
jmoenig 2013-03-18 16:07:39 +01:00
rodzic 78ab4de381
commit f593f67d50
4 zmienionych plików z 11 dodań i 3 usunięć

7
gui.js
Wyświetl plik

@ -233,6 +233,8 @@ IDE_Morph.prototype.openIn = function (world) {
} else if (location.hash.substr(0, 6) === '#lang:') {
this.setLanguage(location.hash.substr(6));
this.newProject();
} else if (location.hash.substr(0, 7) === '#signup') {
this.createCloudAccount();
}
};
@ -2860,6 +2862,11 @@ IDE_Morph.prototype.initializeCloud = function () {
IDE_Morph.prototype.createCloudAccount = function () {
var myself = this,
world = this.world();
/*
// force-logout, commented out for now:
delete localStorage['-snap-user'];
SnapCloud.clear();
*/
new DialogBoxMorph(
null,
function (user) {

Wyświetl plik

@ -1527,4 +1527,5 @@ ______
130318
------
* GUI, Blocks, BYOB, Widgets: Scaling Blocks and Scripts (shift-click on settings menu)
* Widets: numerical prompts
* Widets: numerical prompts
* GUI: #signup URL switch

Wyświetl plik

@ -7,7 +7,7 @@ saving, loading, exporting, importing
artefacts: projects, blocks, sprites
URL options: #run: #open:
URL options: #run: #open: #lang: #signup
supported browsers, problems with the Android virtual keyboard

File diff suppressed because one or more lines are too long