lint compliance

pull/1/head
yflory 4 years ago
parent baddf8ae11
commit 4c17cfcf44

@ -23,7 +23,6 @@
--checkmark-radio-size: @checkmark-radio-size; --checkmark-radio-size: @checkmark-radio-size;
} }
& { & {
// XXX DARK
@cp_checkmark-back0: @cp_forms-bg; @cp_checkmark-back0: @cp_forms-bg;
@cp_checkmark-back0-active: @cp_forms-disabled; @cp_checkmark-back0-active: @cp_forms-disabled;
@cp_checkmark-back1: @cp_forms-border; @cp_checkmark-back1: @cp_forms-border;

@ -15,7 +15,7 @@
.cp-export-progress-bar-container { .cp-export-progress-bar-container {
height: 24px; height: 24px;
background: white; background: white;
border: 1px solid ; border: 1px solid @cryptpad_color_grey;
width: 80%; width: 80%;
margin: auto; margin: auto;
position: relative; position: relative;

@ -421,15 +421,13 @@ define([
Messages.settings_colortheme_custom = "Custom"; Messages.settings_colortheme_custom = "Custom";
makeBlock('colortheme', function (cb) { makeBlock('colortheme', function (cb) {
var store = window.cryptpadStore;
var theme = window.cryptpadStore.store['colortheme'] || 'default'; var theme = window.cryptpadStore.store['colortheme'] || 'default';
var os = window.cryptpadStore.store['colortheme_default'] || 'light'; var os = window.cryptpadStore.store['colortheme_default'] || 'light';
var values = ['default', 'light', 'dark', 'custom']; var values = ['default', 'light', 'dark', 'custom'];
var defaultTheme = Messages['settings_colortheme_'+os]; var defaultTheme = Messages['settings_colortheme_'+os];
var opts = h('div.cp-settings-radio-container', [ 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, return UI.createRadio('cp-colortheme-radio', 'cp-colortheme-radio-'+key,
Messages._getKey('settings_colortheme_' + key, [defaultTheme]), Messages._getKey('settings_colortheme_' + key, [defaultTheme]),
key === theme, { key === theme, {
@ -469,51 +467,6 @@ define([
spinner.done(); 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); }, true);
create['delete'] = function() { create['delete'] = function() {

Loading…
Cancel
Save