mirror of https://github.com/xwiki-labs/cryptpad
Disable crowdfunding message for premium users
This commit is contained in:
parent
6257b23f16
commit
1895d6cbd8
|
@ -13,6 +13,8 @@ define(function () {
|
|||
storageKey: 'filesData',
|
||||
tokenKey: 'loginToken',
|
||||
displayPadCreationScreen: 'displayPadCreationScreen',
|
||||
deprecatedKey: 'deprecated'
|
||||
deprecatedKey: 'deprecated',
|
||||
// Sub
|
||||
plan: 'CryptPad_plan'
|
||||
};
|
||||
});
|
||||
|
|
|
@ -2330,6 +2330,9 @@ define([
|
|||
UIElements.displayCrowdfunding = function (common) {
|
||||
if (crowdfundingState) { return; }
|
||||
if (AppConfig.disableCrowdfundingMessages) { return; }
|
||||
var priv = common.getMetadataMgr().getPrivateData();
|
||||
if (priv.plan) { return; }
|
||||
|
||||
crowdfundingState = true;
|
||||
setTimeout(function () {
|
||||
common.getAttribute(['general', 'crowdfunding'], function (err, val) {
|
||||
|
|
|
@ -1433,7 +1433,7 @@ define([
|
|||
postMessage("INIT_RPC", null, waitFor(function (obj) {
|
||||
console.log('RPC handshake complete');
|
||||
if (obj.error) { return; }
|
||||
localStorage.plan = obj.plan;
|
||||
localStorage[Constants.plan] = obj.plan;
|
||||
}));
|
||||
} else if (PINNING_ENABLED) {
|
||||
console.log('not logged in. pads will not be pinned');
|
||||
|
|
|
@ -262,6 +262,7 @@ define([
|
|||
donateURL: Cryptpad.donateURL,
|
||||
upgradeURL: Cryptpad.upgradeURL
|
||||
},
|
||||
plan: localStorage[Utils.Constants.plan],
|
||||
isNewFile: isNewFile,
|
||||
isDeleted: isNewFile && window.location.hash.length > 0,
|
||||
forceCreationScreen: forceCreationScreen,
|
||||
|
|
Loading…
Reference in New Issue