mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Persist banner across reloads
This commit is contained in:
parent
fd2fb12a0a
commit
620d57e9a7
@ -3394,6 +3394,9 @@ define([
|
||||
|
||||
var todo = function () {
|
||||
crowdfundingState = true;
|
||||
var recordShown = function () {
|
||||
common.getSframeChannel().query('Q_RECORD_CROWDFUNDING_SHOWN', {}, function () {});
|
||||
};
|
||||
var dontShowAgain = function () {
|
||||
common.setAttribute(['general', 'crowdfunding'], false);
|
||||
Feedback.send('CROWDFUNDING_NEVER');
|
||||
@ -3406,6 +3409,7 @@ define([
|
||||
className: 'cancel',
|
||||
iconClass: 'crowdfunding-snooze',
|
||||
onClick: function () {
|
||||
recordShown();
|
||||
Feedback.send('CROWDFUNDING_NO');
|
||||
}
|
||||
}
|
||||
@ -3416,6 +3420,7 @@ define([
|
||||
className: 'primary',
|
||||
iconClass: 'crowdfunding-donate',
|
||||
onClick: function () {
|
||||
recordShown();
|
||||
common.openURL(priv.accounts.donateURL);
|
||||
Feedback.send('CROWDFUNDING_YES');
|
||||
}
|
||||
@ -3428,6 +3433,7 @@ define([
|
||||
className: 'primary',
|
||||
iconClass: 'crowdfunding-donate2',
|
||||
onClick: function () {
|
||||
recordShown();
|
||||
common.openURL('/accounts/');
|
||||
Feedback.send('CROWDFUNDING_SUBSCRIBE');
|
||||
}
|
||||
@ -3438,6 +3444,7 @@ define([
|
||||
className: 'cancel left',
|
||||
iconClass: 'close',
|
||||
onClick: function () {
|
||||
recordShown();
|
||||
dontShowAgain();
|
||||
}
|
||||
});
|
||||
@ -3467,7 +3474,6 @@ define([
|
||||
return;
|
||||
}
|
||||
todo();
|
||||
common.getSframeChannel().query('Q_RECORD_CROWDFUNDING_SHOWN', {}, function () {});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@ -1020,7 +1020,7 @@ define([
|
||||
var CROWDFUNDING_PREFIX = 'cp_crowdfunding_';
|
||||
var CROWDFUNDING_DRIVE_KEY = ['general', 'crowdfunding_metrics'];
|
||||
// First action (opening or creating a document) count threshold before showing the banner
|
||||
var CROWDFUNDING_MIN_ACTIONS = 10;
|
||||
var CROWDFUNDING_MIN_ACTIONS = 5;
|
||||
// Additional actions required after each shown banner
|
||||
var CROWDFUNDING_ACTIONS_INTERVAL = 15;
|
||||
// Quota usage threshold for quota-based banner display
|
||||
|
||||
Loading…
Reference in New Issue
Block a user