kopia lustrzana https://github.com/backface/turtlestitch
Merge pull request #2028 from bromagosa/newer-cloud
Checking if user is verified on session initupd4.2
commit
20aa454b00
1
cloud.js
1
cloud.js
|
@ -208,6 +208,7 @@ Cloud.prototype.checkCredentials = function (onSuccess, onError, response) {
|
|||
function (user) {
|
||||
if (user.username) {
|
||||
myself.username = user.username;
|
||||
myself.verified = user.verified;
|
||||
}
|
||||
if (onSuccess) {
|
||||
onSuccess.call(
|
||||
|
|
25
gui.js
25
gui.js
|
@ -276,6 +276,22 @@ IDE_Morph.prototype.openIn = function (world) {
|
|||
function (username) {
|
||||
if (username) {
|
||||
myself.source = 'cloud';
|
||||
if (!SnapCloud.verified) {
|
||||
new DialogBoxMorph().inform(
|
||||
'Unverified account',
|
||||
'Your account is still unverified.\n' +
|
||||
'Please use the verification link that\n' +
|
||||
'was sent to your email address when you\n' +
|
||||
'signed up.\n\n' +
|
||||
'If you cannot find that email, please\n' +
|
||||
'check your spam folder. If you still\n' +
|
||||
'cannot find it, please use the "Resend\n' +
|
||||
'Verification Email..." option in the cloud\n' +
|
||||
'menu.',
|
||||
world,
|
||||
myself.cloudIcon(null, new Color(0, 180, 0))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -5161,11 +5177,16 @@ IDE_Morph.prototype.initializeCloud = function () {
|
|||
if (!isNil(response.days_left)) {
|
||||
new DialogBoxMorph().inform(
|
||||
'Unverified account: ' + response.days_left + ' days left',
|
||||
'You are now logged in, but your account\n' +
|
||||
'has not been verified yet.\n' +
|
||||
'You are now logged in, and your account\n' +
|
||||
'is enabled for three days.\n' +
|
||||
'Please use the verification link that\n' +
|
||||
'was sent to your email address when you\n' +
|
||||
'signed up.\n\n' +
|
||||
'If you cannot find that email, please\n' +
|
||||
'check your spam folder. If you still\n' +
|
||||
'cannot find it, please use the "Resend\n' +
|
||||
'Verification Email..." option in the cloud\n' +
|
||||
'menu.\n\n' +
|
||||
'You have ' + response.days_left + ' days left.',
|
||||
world,
|
||||
myself.cloudIcon(null, new Color(0, 180, 0))
|
||||
|
|
Ładowanie…
Reference in New Issue