mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Merge pull request #2104 from cryptpad/oo_disable_history
Hide History button if history disabled
This commit is contained in:
commit
d58c996d49
@ -896,10 +896,6 @@ define([
|
||||
button = makeButton('print', 'cp-toolbar-icon-print', Messages.printButtonTitle2, Messages.printText);
|
||||
break;
|
||||
case 'history':
|
||||
if (!AppConfig.enableHistory) {
|
||||
button = $('<span>');
|
||||
break;
|
||||
}
|
||||
button = makeButton('history', 'cp-toolbar-icon-history', Messages.historyButton, Messages.historyText, Messages.historyButton);
|
||||
if (data.histConfig) {
|
||||
button.click(common.prepareFeedback(type)).on('click', function () {
|
||||
@ -907,6 +903,9 @@ define([
|
||||
UI.clearTooltipsDelay();
|
||||
});
|
||||
}
|
||||
if (!AppConfig.enableHistory) {
|
||||
button.css('display', 'none');
|
||||
}
|
||||
break;
|
||||
case 'mediatag':
|
||||
button = $(h('button.cp-toolbar-mediatag', {
|
||||
|
||||
@ -15,6 +15,7 @@ define([
|
||||
'/common/common-feedback.js',
|
||||
'/common/hyperscript.js',
|
||||
'/api/config',
|
||||
'/customize/application_config.js',
|
||||
'/customize/messages.js',
|
||||
'/components/chainpad/chainpad.dist.js',
|
||||
'/file/file-crypto.js',
|
||||
@ -44,6 +45,7 @@ define([
|
||||
Feedback,
|
||||
h,
|
||||
ApiConfig,
|
||||
AppConfig,
|
||||
Messages,
|
||||
ChainPad,
|
||||
FileCrypto,
|
||||
@ -3220,6 +3222,9 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
|
||||
text: Messages.historyText,
|
||||
tippy: Messages.historyButton
|
||||
});
|
||||
if (!AppConfig.enableHistory) {
|
||||
$historyButton.css('display', 'none');
|
||||
}
|
||||
|
||||
$historyButton.click(function () {
|
||||
ooChannel.historyLastHash = ooChannel.lastHash;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user