From b5a418ec1618cb1a058aee3dd47baa63562c9194 Mon Sep 17 00:00:00 2001 From: maTh Date: Mon, 9 Jan 2023 10:40:38 +0100 Subject: Added: Dark mode for Origine +Origine compact themes (#4843) * first draft * fix: theme slider: properties box * improved colors * option to enable/disable dark mode * fixes * Update app/i18n/fr/conf.php Co-authored-by: Alexandre Alapetite * i18n english improved * fix dark background color for favorites + hover colors * select list: no, auto Co-authored-by: Alexandre Alapetite --- app/Models/ConfigurationSetter.php | 7 +++++++ app/Models/UserConfiguration.php | 1 + 2 files changed, 8 insertions(+) (limited to 'app/Models') diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php index c822bcf4d..258c2ad58 100644 --- a/app/Models/ConfigurationSetter.php +++ b/app/Models/ConfigurationSetter.php @@ -234,6 +234,13 @@ class FreshRSS_ConfigurationSetter { $data['sticky_post'] = $this->handleBool($value); } + private function _darkMode(&$data, $value) { + if (!in_array($value, [ 'no', 'auto'], true)) { + $value = 'no'; + } + $data['darkMode'] = $value; + } + private function _bottomline_date(&$data, $value) { $data['bottomline_date'] = $this->handleBool($value); } diff --git a/app/Models/UserConfiguration.php b/app/Models/UserConfiguration.php index 157737cb8..53b12cc2e 100644 --- a/app/Models/UserConfiguration.php +++ b/app/Models/UserConfiguration.php @@ -53,6 +53,7 @@ * @property bool $sides_close_article * @property bool $sticky_post * @property string $theme + * @property string $darkMode * @property string $token * @property bool $topline_date * @property bool $topline_display_authors -- cgit v1.2.3