From 4c17cfcf44ba71310321acc250519f8ba4673101 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 25 Jan 2021 18:09:30 +0100 Subject: [PATCH] lint compliance --- .../src/less2/include/checkmark.less | 1 - customize.dist/src/less2/include/export.less | 2 +- www/settings/inner.js | 49 +------------------ 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/customize.dist/src/less2/include/checkmark.less b/customize.dist/src/less2/include/checkmark.less index 17a434fd3..f638cb8cf 100644 --- a/customize.dist/src/less2/include/checkmark.less +++ b/customize.dist/src/less2/include/checkmark.less @@ -23,7 +23,6 @@ --checkmark-radio-size: @checkmark-radio-size; } & { - // XXX DARK @cp_checkmark-back0: @cp_forms-bg; @cp_checkmark-back0-active: @cp_forms-disabled; @cp_checkmark-back1: @cp_forms-border; diff --git a/customize.dist/src/less2/include/export.less b/customize.dist/src/less2/include/export.less index 548bc6ec6..208832851 100644 --- a/customize.dist/src/less2/include/export.less +++ b/customize.dist/src/less2/include/export.less @@ -15,7 +15,7 @@ .cp-export-progress-bar-container { height: 24px; background: white; - border: 1px solid ; + border: 1px solid @cryptpad_color_grey; width: 80%; margin: auto; position: relative; diff --git a/www/settings/inner.js b/www/settings/inner.js index 3171519d6..45bc91ce4 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -421,15 +421,13 @@ define([ Messages.settings_colortheme_custom = "Custom"; makeBlock('colortheme', function (cb) { - var store = window.cryptpadStore; - var theme = window.cryptpadStore.store['colortheme'] || 'default'; var os = window.cryptpadStore.store['colortheme_default'] || 'light'; var values = ['default', 'light', 'dark', 'custom']; var defaultTheme = Messages['settings_colortheme_'+os]; var opts = h('div.cp-settings-radio-container', [ - values.map(function (key, i) { + values.map(function (key) { return UI.createRadio('cp-colortheme-radio', 'cp-colortheme-radio-'+key, Messages._getKey('settings_colortheme_' + key, [defaultTheme]), key === theme, { @@ -469,51 +467,6 @@ define([ spinner.done(); }); }); - - return; - var $cbox = $(UI.createCheckbox('cp-settings-cache', - Messages.settings_cacheCheckbox, - false, { label: { class: 'noTitle' } })); - var spinner = UI.makeSpinner($cbox); - - // Checkbox: "Enable safe links" - var $checkbox = $(opts).find('.cp-radio-colortheme input').on('change', function() { - spinner.spin(); - var val = !$checkbox.is(':checked') ? '1' : undefined; - store.put('disableCache', val, function () { - sframeChan.query('Q_CACHE_DISABLE', { - disabled: Boolean(val) - }, function () { - spinner.done(); - }); - }); - }); - - store.get('disableCache', function (val) { - if (!val) { - $checkbox.attr('checked', 'checked'); - } - }); - - var button = h('button.btn.btn-danger', [ - h('i.fa.fa-trash-o'), - h('span', Messages.settings_cacheButton) - ]); - var buttonContainer = h('div.cp-settings-clear-cache', button); - var spinner2 = UI.makeSpinner($(buttonContainer)); - UI.confirmButton(button, { - classes: 'btn-danger' - }, function () { - spinner2.spin(); - sframeChan.query('Q_CLEAR_CACHE', null, function() { - spinner2.done(); - }); - }); - - cb([ - $cbox[0], - buttonContainer - ]); }, true); create['delete'] = function() {