Prevent users from creating a pad when visiting a deleted profile (read-only mode)

This commit is contained in:
yflory
2018-04-18 18:54:46 +02:00
parent a0d452bbd9
commit 206ac14438
5 changed files with 20 additions and 0 deletions

View File

@@ -435,6 +435,15 @@ define([
Feedback.init(feedback);
} catch (e) { Feedback.init(false); }
ctx.sframeChan.on('EV_LOADING_ERROR', function (err) {
if (err === 'DELETED') {
var msg = Messages.deletedError + '<br>' + Messages.errorRedirectToHome;
UI.errorLoadingScreen(msg, false, function () {
funcs.gotoURL('/drive/');
});
}
});
ctx.sframeChan.on('EV_LOGOUT', function () {
$(window).on('keyup', function (e) {
if (e.keyCode === 27) {