aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-06-06 22:24:58 +0200
committerGravatar GitHub <noreply@github.com> 2024-06-06 22:24:58 +0200
commite98c57841b843ed881f06ce6ed1c9c89942c27b8 (patch)
tree7120e973e479e33474bcd48746566d6cc3de8bdc /app
parent86f48db4a7a422602407fc488b434bbfa3e81b24 (diff)
Default dark mode to auto (#5582)
* Default dark mode to auto Set default dark mode to automatic instead of disabled. Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4843 * Selected themes * For compatible themes only
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/configureController.php4
-rw-r--r--app/i18n/cs/conf.php3
-rw-r--r--app/i18n/de/conf.php3
-rw-r--r--app/i18n/el/conf.php3
-rw-r--r--app/i18n/en-us/conf.php3
-rw-r--r--app/i18n/en/conf.php3
-rw-r--r--app/i18n/es/conf.php3
-rw-r--r--app/i18n/fa/conf.php3
-rw-r--r--app/i18n/fr/conf.php3
-rw-r--r--app/i18n/he/conf.php3
-rw-r--r--app/i18n/hu/conf.php3
-rw-r--r--app/i18n/id/conf.php3
-rw-r--r--app/i18n/it/conf.php3
-rw-r--r--app/i18n/ja/conf.php3
-rw-r--r--app/i18n/ko/conf.php3
-rw-r--r--app/i18n/lv/conf.php3
-rw-r--r--app/i18n/nl/conf.php3
-rw-r--r--app/i18n/oc/conf.php3
-rw-r--r--app/i18n/pl/conf.php3
-rw-r--r--app/i18n/pt-br/conf.php3
-rw-r--r--app/i18n/ru/conf.php3
-rw-r--r--app/i18n/sk/conf.php3
-rw-r--r--app/i18n/tr/conf.php3
-rw-r--r--app/i18n/zh-cn/conf.php3
-rw-r--r--app/i18n/zh-tw/conf.php3
-rw-r--r--app/views/configure/display.phtml4
26 files changed, 54 insertions, 26 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index 8ec14fce9..f28369477 100644
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -27,7 +27,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
* The options available on the page are:
* - language (default: en)
* - theme (default: Origin)
- * - darkMode (default: no)
+ * - darkMode (default: auto)
* - content width (default: thin)
* - display of read action in header
* - display of favorite action in header
@@ -48,7 +48,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
FreshRSS_Context::userConf()->language = Minz_Request::paramString('language') ?: 'en';
FreshRSS_Context::userConf()->timezone = Minz_Request::paramString('timezone');
FreshRSS_Context::userConf()->theme = Minz_Request::paramString('theme') ?: FreshRSS_Themes::$defaultTheme;
- FreshRSS_Context::userConf()->darkMode = Minz_Request::paramString('darkMode') ?: 'no';
+ FreshRSS_Context::userConf()->darkMode = Minz_Request::paramString('darkMode') ?: 'auto';
FreshRSS_Context::userConf()->content_width = Minz_Request::paramString('content_width') ?: 'thin';
FreshRSS_Context::userConf()->topline_read = Minz_Request::paramBoolean('topline_read');
FreshRSS_Context::userConf()->topline_favorite = Minz_Request::paramBoolean('topline_favorite');
diff --git a/app/i18n/cs/conf.php b/app/i18n/cs/conf.php
index 1e0d7ed8e..489d82a93 100644
--- a/app/i18n/cs/conf.php
+++ b/app/i18n/cs/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Zobrazení',
'darkMode' => array(
- '_' => 'Automatický tmavý režim (beta)',
+ '_' => 'Automatický tmavý režim',
'auto' => 'Automatický',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Ne',
),
'icon' => array(
diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php
index 5503d6f73..91963fa3c 100644
--- a/app/i18n/de/conf.php
+++ b/app/i18n/de/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Anzeige',
'darkMode' => array(
- '_' => 'Automatischer Dunkel-Modus (Beta)',
+ '_' => 'Automatischer Dunkel-Modus',
'auto' => 'Automatisch',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Nein',
),
'icon' => array(
diff --git a/app/i18n/el/conf.php b/app/i18n/el/conf.php
index 755e0962d..c97aa291c 100644
--- a/app/i18n/el/conf.php
+++ b/app/i18n/el/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Display', // TODO
'darkMode' => array(
- '_' => 'Automatic dark mode (beta)', // TODO
+ '_' => 'Automatic dark mode', // TODO
'auto' => 'Auto', // TODO
+ 'help' => 'For compatible themes only', // TODO
'no' => 'No', // TODO
),
'icon' => array(
diff --git a/app/i18n/en-us/conf.php b/app/i18n/en-us/conf.php
index d932549bb..33a67cb3f 100644
--- a/app/i18n/en-us/conf.php
+++ b/app/i18n/en-us/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Display', // IGNORE
'darkMode' => array(
- '_' => 'Automatic dark mode (beta)', // IGNORE
+ '_' => 'Automatic dark mode', // IGNORE
'auto' => 'Auto', // IGNORE
+ 'help' => 'For compatible themes only', // IGNORE
'no' => 'No', // IGNORE
),
'icon' => array(
diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php
index 8ce8c5da8..83189a10a 100644
--- a/app/i18n/en/conf.php
+++ b/app/i18n/en/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Display',
'darkMode' => array(
- '_' => 'Automatic dark mode (beta)',
+ '_' => 'Automatic dark mode',
'auto' => 'Auto',
+ 'help' => 'For compatible themes only',
'no' => 'No',
),
'icon' => array(
diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.php
index 471dc7cf5..4fadb8be7 100644
--- a/app/i18n/es/conf.php
+++ b/app/i18n/es/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Visualización',
'darkMode' => array(
- '_' => 'Modo oscuro automatico (beta)',
+ '_' => 'Modo oscuro automatico',
'auto' => 'Automatico',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'No', // IGNORE
),
'icon' => array(
diff --git a/app/i18n/fa/conf.php b/app/i18n/fa/conf.php
index 90cec37a6..f2b940cba 100644
--- a/app/i18n/fa/conf.php
+++ b/app/i18n/fa/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => ' نمایش',
'darkMode' => array(
- '_' => ' حالت تاریک خودکار (بتا)',
+ '_' => ' حالت تاریک خودکار',
'auto' => ' خودکار',
+ 'help' => 'For compatible themes only', // TODO
'no' => ' شماره',
),
'icon' => array(
diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php
index 5812dd080..925fa8782 100644
--- a/app/i18n/fr/conf.php
+++ b/app/i18n/fr/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Affichage',
'darkMode' => array(
- '_' => 'Mode sombre automatique (bêta)',
+ '_' => 'Mode sombre automatique',
'auto' => 'Auto', // IGNORE
+ 'help' => 'Seulement pour les thèmes compatibles',
'no' => 'Non',
),
'icon' => array(
diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php
index 1b13d8908..68de3fdfa 100644
--- a/app/i18n/he/conf.php
+++ b/app/i18n/he/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'תצוגה',
'darkMode' => array(
- '_' => 'Automatic dark mode (beta)', // TODO
+ '_' => 'Automatic dark mode', // TODO
'auto' => 'Auto', // TODO
+ 'help' => 'For compatible themes only', // TODO
'no' => 'No', // TODO
),
'icon' => array(
diff --git a/app/i18n/hu/conf.php b/app/i18n/hu/conf.php
index 4777dd2df..641f408b8 100644
--- a/app/i18n/hu/conf.php
+++ b/app/i18n/hu/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Megjelenítés',
'darkMode' => array(
- '_' => 'Automatikus sötét mód (béta)',
+ '_' => 'Automatikus sötét mód',
'auto' => 'Automatikus',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Nem',
),
'icon' => array(
diff --git a/app/i18n/id/conf.php b/app/i18n/id/conf.php
index de8f2dc73..14a5a1a17 100644
--- a/app/i18n/id/conf.php
+++ b/app/i18n/id/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Tampilan',
'darkMode' => array(
- '_' => 'Mode gelap otomatis (beta)',
+ '_' => 'Mode gelap otomatis',
'auto' => 'Otomatis',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Tidak',
),
'icon' => array(
diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.php
index 2842b05bd..0f7785924 100644
--- a/app/i18n/it/conf.php
+++ b/app/i18n/it/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Visualizzazione',
'darkMode' => array(
- '_' => 'Modalità scura automatica (beta)',
+ '_' => 'Modalità scura automatica',
'auto' => 'Auto', // IGNORE
+ 'help' => 'For compatible themes only', // TODO
'no' => 'No', // IGNORE
),
'icon' => array(
diff --git a/app/i18n/ja/conf.php b/app/i18n/ja/conf.php
index debbb8d57..b3fcae76b 100644
--- a/app/i18n/ja/conf.php
+++ b/app/i18n/ja/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => '表示',
'darkMode' => array(
- '_' => '自動ダークモード (beta)',
+ '_' => '自動ダークモード',
'auto' => '自動',
+ 'help' => 'For compatible themes only', // TODO
'no' => '無効',
),
'icon' => array(
diff --git a/app/i18n/ko/conf.php b/app/i18n/ko/conf.php
index 8cc9eb193..5b68c827f 100644
--- a/app/i18n/ko/conf.php
+++ b/app/i18n/ko/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => '표시',
'darkMode' => array(
- '_' => '자동 다크 모드 (베타)',
+ '_' => '자동 다크 모드',
'auto' => '자동',
+ 'help' => 'For compatible themes only', // TODO
'no' => '끄기',
),
'icon' => array(
diff --git a/app/i18n/lv/conf.php b/app/i18n/lv/conf.php
index 70dd260bb..9e8aad468 100644
--- a/app/i18n/lv/conf.php
+++ b/app/i18n/lv/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Ekrāns',
'darkMode' => array(
- '_' => 'Automātiskais tumšais režīms (beta versija)',
+ '_' => 'Automātiskais tumšais režīms',
'auto' => 'Auto', // IGNORE
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Nē',
),
'icon' => array(
diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php
index f7d8ea805..31068f6ff 100644
--- a/app/i18n/nl/conf.php
+++ b/app/i18n/nl/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Opmaak',
'darkMode' => array(
- '_' => 'Automatische dark mode (beta)',
+ '_' => 'Automatische dark mode',
'auto' => 'Auto', // IGNORE
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Nee',
),
'icon' => array(
diff --git a/app/i18n/oc/conf.php b/app/i18n/oc/conf.php
index 22fd6b6fa..17b28ccba 100644
--- a/app/i18n/oc/conf.php
+++ b/app/i18n/oc/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Afichatge',
'darkMode' => array(
- '_' => 'Automatic dark mode (beta)', // TODO
+ '_' => 'Automatic dark mode', // TODO
'auto' => 'Auto', // TODO
+ 'help' => 'For compatible themes only', // TODO
'no' => 'No', // TODO
),
'icon' => array(
diff --git a/app/i18n/pl/conf.php b/app/i18n/pl/conf.php
index 1e960e45c..c48d76d14 100644
--- a/app/i18n/pl/conf.php
+++ b/app/i18n/pl/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Wyświetlanie',
'darkMode' => array(
- '_' => 'Tryb ciemny (beta)',
+ '_' => 'Tryb ciemny',
'auto' => 'Automatyczny',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Wyłączony',
),
'icon' => array(
diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php
index 83dd8320b..157026448 100644
--- a/app/i18n/pt-br/conf.php
+++ b/app/i18n/pt-br/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Exibição',
'darkMode' => array(
- '_' => 'Modo noturno automático (beta)',
+ '_' => 'Modo noturno automático',
'auto' => 'Automático',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Não',
),
'icon' => array(
diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.php
index 08af6d768..6b9023530 100644
--- a/app/i18n/ru/conf.php
+++ b/app/i18n/ru/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Отображение',
'darkMode' => array(
- '_' => 'Автоматический темный режим (beta)',
+ '_' => 'Автоматический темный режим',
'auto' => 'Авто',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Нет',
),
'icon' => array(
diff --git a/app/i18n/sk/conf.php b/app/i18n/sk/conf.php
index 88a6ec1eb..f817a2363 100644
--- a/app/i18n/sk/conf.php
+++ b/app/i18n/sk/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Zobrazenie',
'darkMode' => array(
- '_' => 'Automatický tmavý režim (beta)',
+ '_' => 'Automatický tmavý režim',
'auto' => 'Automaticky',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Nie',
),
'icon' => array(
diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.php
index 28c5d1805..85a82684f 100644
--- a/app/i18n/tr/conf.php
+++ b/app/i18n/tr/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => 'Görünüm',
'darkMode' => array(
- '_' => 'Otomatik karanlık mod (beta)',
+ '_' => 'Otomatik karanlık mod',
'auto' => 'Otomatik',
+ 'help' => 'For compatible themes only', // TODO
'no' => 'Kapalı',
),
'icon' => array(
diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php
index b6461e7e4..3e85f9033 100644
--- a/app/i18n/zh-cn/conf.php
+++ b/app/i18n/zh-cn/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => '显示',
'darkMode' => array(
- '_' => '自动黑暗模式(测试版)',
+ '_' => '自动黑暗模式',
'auto' => '启动',
+ 'help' => 'For compatible themes only', // TODO
'no' => '关闭',
),
'icon' => array(
diff --git a/app/i18n/zh-tw/conf.php b/app/i18n/zh-tw/conf.php
index 66aab8577..18c8e9279 100644
--- a/app/i18n/zh-tw/conf.php
+++ b/app/i18n/zh-tw/conf.php
@@ -33,8 +33,9 @@ return array(
'display' => array(
'_' => '顯示',
'darkMode' => array(
- '_' => '自動黑暗模式(beta)',
+ '_' => '自動黑暗模式',
'auto' => '自動',
+ 'help' => 'For compatible themes only', // TODO
'no' => '否',
),
'icon' => array(
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index d373c0bb5..ce140c439 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -84,6 +84,9 @@
<?php } ?>
<?= $theme['description'] ?>
</div>
+ <?php if (!empty($theme['theme-color']['dark'])) { ?>
+ <div class="darkMode">✔ <?= _t('conf.display.darkMode') ?></div>
+ <?php } ?>
<div class="page-number"><?= sprintf('%d/%d', $i, $slides) ?></div>
</div>
</li>
@@ -113,6 +116,7 @@
<option value="no"<?= FreshRSS_Context::userConf()->darkMode === 'no' ? ' selected' : '' ?>><?= _t('conf.display.darkMode.no') ?></option>
<option value="auto"<?= FreshRSS_Context::userConf()->darkMode === 'auto' ? ' selected' : '' ?>><?= _t('conf.display.darkMode.auto') ?></option>
</select>
+ <span class="help"><?= _i('help') ?> <?= _t('conf.display.darkMode.help') ?></span>
</div>
</div>