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',
|
storageKey: 'filesData',
|
||||||
tokenKey: 'loginToken',
|
tokenKey: 'loginToken',
|
||||||
displayPadCreationScreen: 'displayPadCreationScreen',
|
displayPadCreationScreen: 'displayPadCreationScreen',
|
||||||
deprecatedKey: 'deprecated'
|
deprecatedKey: 'deprecated',
|
||||||
|
// Sub
|
||||||
|
plan: 'CryptPad_plan'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -2330,6 +2330,9 @@ define([
|
||||||
UIElements.displayCrowdfunding = function (common) {
|
UIElements.displayCrowdfunding = function (common) {
|
||||||
if (crowdfundingState) { return; }
|
if (crowdfundingState) { return; }
|
||||||
if (AppConfig.disableCrowdfundingMessages) { return; }
|
if (AppConfig.disableCrowdfundingMessages) { return; }
|
||||||
|
var priv = common.getMetadataMgr().getPrivateData();
|
||||||
|
if (priv.plan) { return; }
|
||||||
|
|
||||||
crowdfundingState = true;
|
crowdfundingState = true;
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
common.getAttribute(['general', 'crowdfunding'], function (err, val) {
|
common.getAttribute(['general', 'crowdfunding'], function (err, val) {
|
||||||
|
|
|
@ -1433,7 +1433,7 @@ define([
|
||||||
postMessage("INIT_RPC", null, waitFor(function (obj) {
|
postMessage("INIT_RPC", null, waitFor(function (obj) {
|
||||||
console.log('RPC handshake complete');
|
console.log('RPC handshake complete');
|
||||||
if (obj.error) { return; }
|
if (obj.error) { return; }
|
||||||
localStorage.plan = obj.plan;
|
localStorage[Constants.plan] = obj.plan;
|
||||||
}));
|
}));
|
||||||
} else if (PINNING_ENABLED) {
|
} else if (PINNING_ENABLED) {
|
||||||
console.log('not logged in. pads will not be pinned');
|
console.log('not logged in. pads will not be pinned');
|
||||||
|
|
|
@ -262,6 +262,7 @@ define([
|
||||||
donateURL: Cryptpad.donateURL,
|
donateURL: Cryptpad.donateURL,
|
||||||
upgradeURL: Cryptpad.upgradeURL
|
upgradeURL: Cryptpad.upgradeURL
|
||||||
},
|
},
|
||||||
|
plan: localStorage[Utils.Constants.plan],
|
||||||
isNewFile: isNewFile,
|
isNewFile: isNewFile,
|
||||||
isDeleted: isNewFile && window.location.hash.length > 0,
|
isDeleted: isNewFile && window.location.hash.length > 0,
|
||||||
forceCreationScreen: forceCreationScreen,
|
forceCreationScreen: forceCreationScreen,
|
||||||
|
|
Loading…
Reference in New Issue