is isOverPinLimit in toolbar

pull/1/head
ansuz 8 years ago
parent fce0a37f50
commit 9195c0cd12

@ -664,13 +664,17 @@ define([
}); });
} }
}; };
var limit = Cryptpad.account.limit;
var usage = Cryptpad.account.usage; Cryptpad.isOverPinLimit(function (e, isOver, data) {
var limit = data.limit;
var usage = data.usage;
if (typeof(limit) !== 'number' || typeof(usage) !== 'number') { if (typeof(limit) !== 'number' || typeof(usage) !== 'number') {
todo("invalid types"); todo("invalid types");
} else if (Cryptpad.isLoggedIn() && usage >= limit) { } else if (Cryptpad.isLoggedIn() && usage >= limit) {
todo(void 0, true); todo(void 0, true);
} else { todo(void 0, false); } } else { todo(void 0, false); }
});
return $limit; return $limit;
}; };

Loading…
Cancel
Save