Use the correct inactive time in anonymous drive

pull/1/head
yflory 4 years ago
parent c747a36910
commit 0008cff503

@ -1,5 +1,6 @@
define([ define([
'jquery', 'jquery',
'/api/config/',
'/common/toolbar.js', '/common/toolbar.js',
'json.sortify', 'json.sortify',
'/common/common-util.js', '/common/common-util.js',
@ -19,6 +20,7 @@ define([
'/customize/messages.js', '/customize/messages.js',
], function ( ], function (
$, $,
ApiConfig,
Toolbar, Toolbar,
JSONSortify, JSONSortify,
Util, Util,
@ -2339,8 +2341,10 @@ define([
msg = Messages._getKey('fm_info_sharedFolderHistory', [sfName]); msg = Messages._getKey('fm_info_sharedFolderHistory', [sfName]);
return $(common.fixLinks($box.html(msg))); return $(common.fixLinks($box.html(msg)));
} }
Messages.fm_info_anonymous = "You are not logged in so your pads will expire after {0} days (<a href=\"https://blog.cryptpad.fr/2017/05/17/You-gotta-log-in/\" target=\"_blank\">find out more</a>). They are stored in your browser so clearing history may make them disappear.<br><a href=\"/register/\">Sign up</a> or <a href=\"/login/\">Log in</a> to keep them alive.<br>"; // XXX XXX
// XXX update this key to use "{0} days" instead of "3 months"
if (!APP.loggedIn) { if (!APP.loggedIn) {
msg = APP.newSharedFolder ? Messages.fm_info_sharedFolder : Messages.fm_info_anonymous; msg = APP.newSharedFolder ? Messages.fm_info_sharedFolder : Messages._getKey('fm_info_anonymous', [ApiConfig.inactiveTime || 90]);
return $(common.fixLinks($box.html(msg))); return $(common.fixLinks($box.html(msg)));
} }
if (!msg || APP.store['hide-info-' + path[0]] === '1') { if (!msg || APP.store['hide-info-' + path[0]] === '1') {

Loading…
Cancel
Save