kopia lustrzana https://github.com/backface/turtlestitch
fixed cloud scope issues
that were introduced when we de-globalized the SnapCloud into a property of the IDEupd4.2
rodzic
9c5bbd5401
commit
4f89cdccc9
28
gui.js
28
gui.js
|
@ -75,7 +75,7 @@ isRetinaSupported, SliderMorph, Animation, BoxMorph, MediaRecorder*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.gui = '2018-June-15';
|
modules.gui = '2018-June-17';
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ IDE_Morph.prototype.openIn = function (world) {
|
||||||
function (username) {
|
function (username) {
|
||||||
if (username) {
|
if (username) {
|
||||||
myself.source = 'cloud';
|
myself.source = 'cloud';
|
||||||
if (!this.cloud.verified) {
|
if (!myself.cloud.verified) {
|
||||||
new DialogBoxMorph().inform(
|
new DialogBoxMorph().inform(
|
||||||
'Unverified account',
|
'Unverified account',
|
||||||
'Your account is still unverified.\n' +
|
'Your account is still unverified.\n' +
|
||||||
|
@ -409,7 +409,7 @@ IDE_Morph.prototype.openIn = function (world) {
|
||||||
} else {
|
} else {
|
||||||
this.rawOpenProjectString(getURL(hash));
|
this.rawOpenProjectString(getURL(hash));
|
||||||
}
|
}
|
||||||
applyFlags(this.cloud.parseDict(location.hash.substr(5)));
|
applyFlags(myself.cloud.parseDict(location.hash.substr(5)));
|
||||||
} else if (location.hash.substr(0, 9) === '#present:') {
|
} else if (location.hash.substr(0, 9) === '#present:') {
|
||||||
this.shield = new Morph();
|
this.shield = new Morph();
|
||||||
this.shield.color = this.color;
|
this.shield.color = this.color;
|
||||||
|
@ -418,10 +418,10 @@ IDE_Morph.prototype.openIn = function (world) {
|
||||||
myself.showMessage('Fetching project\nfrom the cloud...');
|
myself.showMessage('Fetching project\nfrom the cloud...');
|
||||||
|
|
||||||
// make sure to lowercase the username
|
// make sure to lowercase the username
|
||||||
dict = this.cloud.parseDict(location.hash.substr(9));
|
dict = myself.cloud.parseDict(location.hash.substr(9));
|
||||||
dict.Username = dict.Username.toLowerCase();
|
dict.Username = dict.Username.toLowerCase();
|
||||||
|
|
||||||
this.cloud.getPublicProject(
|
myself.cloud.getPublicProject(
|
||||||
dict.ProjectName,
|
dict.ProjectName,
|
||||||
dict.Username,
|
dict.Username,
|
||||||
function (projectData) {
|
function (projectData) {
|
||||||
|
@ -459,9 +459,9 @@ IDE_Morph.prototype.openIn = function (world) {
|
||||||
myself.showMessage('Fetching project\nfrom the cloud...');
|
myself.showMessage('Fetching project\nfrom the cloud...');
|
||||||
|
|
||||||
// make sure to lowercase the username
|
// make sure to lowercase the username
|
||||||
dict = this.cloud.parseDict(location.hash.substr(7));
|
dict = myself.cloud.parseDict(location.hash.substr(7));
|
||||||
|
|
||||||
this.cloud.getPublicProject(
|
myself.cloud.getPublicProject(
|
||||||
dict.ProjectName,
|
dict.ProjectName,
|
||||||
dict.Username,
|
dict.Username,
|
||||||
function (projectData) {
|
function (projectData) {
|
||||||
|
@ -495,10 +495,10 @@ IDE_Morph.prototype.openIn = function (world) {
|
||||||
myself.showMessage('Fetching project\nfrom the cloud...');
|
myself.showMessage('Fetching project\nfrom the cloud...');
|
||||||
|
|
||||||
// make sure to lowercase the username
|
// make sure to lowercase the username
|
||||||
dict = this.cloud.parseDict(location.hash.substr(4));
|
dict = myself.cloud.parseDict(location.hash.substr(4));
|
||||||
dict.Username = dict.Username.toLowerCase();
|
dict.Username = dict.Username.toLowerCase();
|
||||||
|
|
||||||
this.cloud.getPublicProject(
|
myself.cloud.getPublicProject(
|
||||||
dict.ProjectName,
|
dict.ProjectName,
|
||||||
dict.Username,
|
dict.Username,
|
||||||
function (projectData) {
|
function (projectData) {
|
||||||
|
@ -6067,7 +6067,7 @@ ProjectDialogMorph.prototype.setSource = function (source) {
|
||||||
case 'cloud':
|
case 'cloud':
|
||||||
msg = myself.ide.showMessage('Updating\nproject list...');
|
msg = myself.ide.showMessage('Updating\nproject list...');
|
||||||
this.projectList = [];
|
this.projectList = [];
|
||||||
this.cloud.getProjectList(
|
myself.ide.cloud.getProjectList(
|
||||||
function (response) {
|
function (response) {
|
||||||
// Don't show cloud projects if user has since switch panes.
|
// Don't show cloud projects if user has since switch panes.
|
||||||
if (myself.source === 'cloud') {
|
if (myself.source === 'cloud') {
|
||||||
|
@ -6256,7 +6256,7 @@ ProjectDialogMorph.prototype.installCloudProjectList = function (pl) {
|
||||||
myself.preview.texture = '';
|
myself.preview.texture = '';
|
||||||
myself.preview.drawNew();
|
myself.preview.drawNew();
|
||||||
// we ask for the thumbnail when selecting a project
|
// we ask for the thumbnail when selecting a project
|
||||||
myself.cloud.getThumbnail(
|
myself.ide.cloud.getThumbnail(
|
||||||
null, // username is implicit
|
null, // username is implicit
|
||||||
item.projectname,
|
item.projectname,
|
||||||
function (thumbnail) {
|
function (thumbnail) {
|
||||||
|
@ -6362,7 +6362,7 @@ ProjectDialogMorph.prototype.openCloudProject = function (project, delta) {
|
||||||
|
|
||||||
ProjectDialogMorph.prototype.rawOpenCloudProject = function (proj, delta) {
|
ProjectDialogMorph.prototype.rawOpenCloudProject = function (proj, delta) {
|
||||||
var myself = this;
|
var myself = this;
|
||||||
this.cloud.getProject(
|
this.ide.cloud.getProject(
|
||||||
proj.projectname,
|
proj.projectname,
|
||||||
delta,
|
delta,
|
||||||
function (clouddata) {
|
function (clouddata) {
|
||||||
|
@ -6375,7 +6375,7 @@ ProjectDialogMorph.prototype.rawOpenCloudProject = function (proj, delta) {
|
||||||
location.hash = '';
|
location.hash = '';
|
||||||
if (proj.ispublic) {
|
if (proj.ispublic) {
|
||||||
location.hash = '#present:Username=' +
|
location.hash = '#present:Username=' +
|
||||||
encodeURIComponent(myself.cloud.username) +
|
encodeURIComponent(myself.ide.cloud.username) +
|
||||||
'&ProjectName=' +
|
'&ProjectName=' +
|
||||||
encodeURIComponent(proj.projectname);
|
encodeURIComponent(proj.projectname);
|
||||||
}
|
}
|
||||||
|
@ -6441,7 +6441,7 @@ ProjectDialogMorph.prototype.saveProject = function () {
|
||||||
ProjectDialogMorph.prototype.saveCloudProject = function () {
|
ProjectDialogMorph.prototype.saveCloudProject = function () {
|
||||||
var myself = this;
|
var myself = this;
|
||||||
this.ide.showMessage('Saving project\nto the cloud...');
|
this.ide.showMessage('Saving project\nto the cloud...');
|
||||||
this.cloud.saveProject(
|
this.ide.cloud.saveProject(
|
||||||
this.ide,
|
this.ide,
|
||||||
function () {
|
function () {
|
||||||
myself.ide.source = 'cloud';
|
myself.ide.source = 'cloud';
|
||||||
|
|
|
@ -4162,6 +4162,10 @@ in development:
|
||||||
------
|
------
|
||||||
* BYOB: fixed #2043 (regression)
|
* BYOB: fixed #2043 (regression)
|
||||||
|
|
||||||
|
180617
|
||||||
|
------
|
||||||
|
* GUI: fixed cloud scope issues
|
||||||
|
|
||||||
|
|
||||||
=== v4.2 major release (draft) ===
|
=== v4.2 major release (draft) ===
|
||||||
|
|
||||||
|
@ -4170,6 +4174,7 @@ v4.2 New Features:
|
||||||
* vector paint editor, thanks, Carles Paredes and Bernat Romagosa!
|
* vector paint editor, thanks, Carles Paredes and Bernat Romagosa!
|
||||||
* "When I am stopped" event option, runs one atomic frame before terminating, use-case: stop robots when a user hits the stop button
|
* "When I am stopped" event option, runs one atomic frame before terminating, use-case: stop robots when a user hits the stop button
|
||||||
* experimental JIT compiler for atomic HOFs, used in new "Bigger Data" library
|
* experimental JIT compiler for atomic HOFs, used in new "Bigger Data" library
|
||||||
|
* new library for programmatically creating variables, thanks, Brian Harvey!
|
||||||
* added options for sprite attributes to the SET block
|
* added options for sprite attributes to the SET block
|
||||||
* added "name" selector to the "Pixels" library
|
* added "name" selector to the "Pixels" library
|
||||||
* added drop-down menu to "letter _ of _ ", adjusted all translations (thanks, Joan!)
|
* added drop-down menu to "letter _ of _ ", adjusted all translations (thanks, Joan!)
|
||||||
|
|
Ładowanie…
Reference in New Issue