Merge pull request from bromagosa/newer-cloud

Checking if user is verified on session init
upd4.2
Jens Mönig 2018-02-20 16:28:07 +01:00 zatwierdzone przez GitHub
commit 20aa454b00
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 24 dodań i 2 usunięć

Wyświetl plik

@ -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
Wyświetl plik

@ -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))