diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php
index c94e15cfc..eae67fbac 100644
--- a/classes/pref/prefs.php
+++ b/classes/pref/prefs.php
@@ -301,7 +301,8 @@ class Pref_Prefs extends Handler_Protected {
@@ -396,12 +398,14 @@ class Pref_Prefs extends Handler_Protected {
@@ -507,6 +512,7 @@ class Pref_Prefs extends Handler_Protected {
@@ -623,30 +629,27 @@ class Pref_Prefs extends Handler_Protected {
} else if ($pref_name == "USER_CSS_THEME") {
- $themes = array_merge(glob("themes/*.php"), glob("themes/*.css"), glob("themes.local/*.css"));
- $themes = array_map("basename", $themes);
- $themes = array_filter($themes, "theme_exists");
- asort($themes);
+ $theme_files = array_map("basename",
+ array_merge(glob("themes/*.php"),
+ glob("themes/*.css"),
+ glob("themes.local/*.css")));
- if (!theme_exists($value)) $value = "";
+ asort($theme_files);
- print "";
+ = \Controls\select_hash($pref_name, $value, $themes) ?>
+ = \Controls\button_tag(\Controls\icon("palette") . " " . __("Customize"), "",
+ ["onclick" => "Helpers.Prefs.customizeCSS()"]) ?>
+ = \Controls\button_tag(\Controls\icon("open_in_new") . " " . __("More themes..."), "",
+ ["class" => "alt-info", "onclick" => "window.open(\"https://tt-rss.org/wiki/Themes\")"]) ?>
- print " ";
-
- print " ";
+ $is_disabled], "CB_$pref_name");
if ($pref_name == Prefs::DIGEST_ENABLE) {
- print \Controls\button_tag(__('Preview'), '', ['onclick' => 'Helpers.Digest.preview()', 'style' => 'margin-left : 10px']);
+ print \Controls\button_tag(\Controls\icon("info") . " " . __('Preview'), '',
+ ['onclick' => 'Helpers.Digest.preview()', 'style' => 'margin-left : 10px']);
}
} else if (in_array($pref_name, ['FRESH_ARTICLE_MAX_AGE',
@@ -699,11 +703,11 @@ class Pref_Prefs extends Handler_Protected {
$cert_serial = htmlspecialchars(self::_get_ssl_certificate_id());
$has_serial = ($cert_serial) ? true : false;
- print \Controls\button_tag(__('Register'), "", [
+ print \Controls\button_tag(\Controls\icon("security") . " " . __('Register'), "", [
"disabled" => !$has_serial,
"onclick" => "dijit.byId('SSL_CERT_SERIAL').attr('value', '$cert_serial')"]);
- print \Controls\button_tag(__('Clear'), "", [
+ print \Controls\button_tag(\Controls\icon("clear") . " " . __('Clear'), "", [
"class" => "alt-danger",
"onclick" => "dijit.byId('SSL_CERT_SERIAL').attr('value', '')"]);
@@ -763,19 +767,21 @@ class Pref_Prefs extends Handler_Protected {
-
= __('Save configuration') ?>
+
= __('Save configuration') ?>
- = __("Save and exit preferences") ?>
+ = __("Save and exit") ?>
@@ -978,9 +984,12 @@ class Pref_Prefs extends Handler_Protected {
+
= 10) { ?>
diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js
index a7e793b9c..ea26ee515 100644
--- a/js/CommonDialogs.js
+++ b/js/CommonDialogs.js
@@ -474,7 +474,7 @@ const CommonDialogs = {
diff --git a/js/CommonFilters.js b/js/CommonFilters.js
index 606cf2076..1450458f8 100644
--- a/js/CommonFilters.js
+++ b/js/CommonFilters.js
@@ -229,7 +229,7 @@ const Filters = {
@@ -313,7 +313,7 @@ const Filters = {
"filterDlg_actionParamPlugin")}
@@ -511,13 +511,13 @@ const Filters = {
diff --git a/js/PrefLabelTree.js b/js/PrefLabelTree.js
index 6792413b1..39e3f8315 100644
--- a/js/PrefLabelTree.js
+++ b/js/PrefLabelTree.js
@@ -69,7 +69,6 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
const dialog = new fox.SingleUseDialog({
id: "labelEditDlg",
title: __("Edit label"),
- style: "width: 650px",
setLabelColor: function (id, fg, bg) {
let kind = '';
@@ -121,10 +120,10 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
content: `