From fd4ed3ce3bb2dca9ac269938eca5c482db4573da Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 25 Jan 2018 12:10:46 +0100 Subject: [PATCH] Fix subscription button in settings --- www/settings/inner.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/settings/inner.js b/www/settings/inner.js index 18aa90b04..8df9c9564 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -10,6 +10,7 @@ define([ '/customize/messages.js', '/common/hyperscript.js', '/customize/application_config.js', + '/api/config', '/bower_components/file-saver/FileSaver.min.js', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', @@ -26,7 +27,8 @@ define([ Hash, Messages, h, - AppConfig + AppConfig, + ApiConfig ) { var saveAs = window.saveAs; @@ -84,6 +86,9 @@ define([ var displaynameIdx = categories.account.indexOf('cp-settings-displayname'); categories.account.splice(displaynameIdx, 1); } + if (!ApiConfig.allowSubscriptions) { + delete categories.subscription; + } var create = {}; @@ -801,6 +806,7 @@ define([ $category.click(function () { if (!Array.isArray(categories[key]) && categories[key].onClick) { categories[key].onClick(); + return; } active = key; $categories.find('.cp-leftside-active').removeClass('cp-leftside-active');