A free, self-hostable news aggregator…
New option to hide badges showing number of unread articles (#8844)
Alexandre Alapetite4b019ab697a8
diff --git a/README.fr.md b/README.fr.mdindex 5ae167fb3..5a93a6c00 100644--- a/README.fr.md+++ b/README.fr.md@@ -228,30 +228,30 @@ Voir le [dépôt dédié à ces extensions](https://github.com/FreshRSS/Extensio| Langage | Progression | || - | - | - || Čeština (cs) | ■■■■■■■■・・ 82% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fcs+%2F%28TODO%7CDIRTY%29%24%2F) |-| Deutsch (de) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fde+%2F%28TODO%7CDIRTY%29%24%2F) |+| Deutsch (de) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fde+%2F%28TODO%7CDIRTY%29%24%2F) || Ελληνικά (el) | ■■■・・・・・・・ 38% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fel+%2F%28TODO%7CDIRTY%29%24%2F) || English (en) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fen+%2F%28TODO%7CDIRTY%29%24%2F) || English (United States) (en-US) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fen-US+%2F%28TODO%7CDIRTY%29%24%2F) |-| Español (es) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fes+%2F%28TODO%7CDIRTY%29%24%2F) |+| Español (es) | ■■■■■■■■■・ 98% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fes+%2F%28TODO%7CDIRTY%29%24%2F) || فارسی (fa) | ■■■■■■■■■・ 90% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffa+%2F%28TODO%7CDIRTY%29%24%2F) |-| Suomi (fi) | ■■■■■■■■■・ 93% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffi+%2F%28TODO%7CDIRTY%29%24%2F) |+| Suomi (fi) | ■■■■■■■■■・ 92% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffi+%2F%28TODO%7CDIRTY%29%24%2F) || Français (fr) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffr+%2F%28TODO%7CDIRTY%29%24%2F) || עברית (he) | ■■■■・・・・・・ 42% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fhe+%2F%28TODO%7CDIRTY%29%24%2F) |-| Magyar (hu) | ■■■■■■■■■・ 97% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fhu+%2F%28TODO%7CDIRTY%29%24%2F) |-| Bahasa Indonesia (id) | ■■■■■■■■■・ 90% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fid+%2F%28TODO%7CDIRTY%29%24%2F) |-| Italiano (it) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fit+%2F%28TODO%7CDIRTY%29%24%2F) |+| Magyar (hu) | ■■■■■■■■■・ 96% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fhu+%2F%28TODO%7CDIRTY%29%24%2F) |+| Bahasa Indonesia (id) | ■■■■■■■■・・ 89% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fid+%2F%28TODO%7CDIRTY%29%24%2F) |+| Italiano (it) | ■■■■■■■■■・ 98% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fit+%2F%28TODO%7CDIRTY%29%24%2F) || 日本語 (ja) | ■■■■■■■■・・ 88% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fja+%2F%28TODO%7CDIRTY%29%24%2F) |-| 한국어 (ko) | ■■■■■■■■・・ 82% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fko+%2F%28TODO%7CDIRTY%29%24%2F) |+| 한국어 (ko) | ■■■■■■■■・・ 81% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fko+%2F%28TODO%7CDIRTY%29%24%2F) || Latviešu (lv) | ■■■■■■■■・・ 82% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Flv+%2F%28TODO%7CDIRTY%29%24%2F) |-| Nederlands (nl) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fnl+%2F%28TODO%7CDIRTY%29%24%2F) |-| Occitan (oc) | ■■■■■■■・・・ 75% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Foc+%2F%28TODO%7CDIRTY%29%24%2F) |-| Polski (pl) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpl+%2F%28TODO%7CDIRTY%29%24%2F) |+| Nederlands (nl) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fnl+%2F%28TODO%7CDIRTY%29%24%2F) |+| Occitan (oc) | ■■■■■■■・・・ 74% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Foc+%2F%28TODO%7CDIRTY%29%24%2F) |+| Polski (pl) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpl+%2F%28TODO%7CDIRTY%29%24%2F) || Português (Brasil) (pt-BR) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-BR+%2F%28TODO%7CDIRTY%29%24%2F) || Português (Portugal) (pt-PT) | ■■■■■■■■・・ 81% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-PT+%2F%28TODO%7CDIRTY%29%24%2F) || Русский (ru) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fru+%2F%28TODO%7CDIRTY%29%24%2F) |-| Slovenčina (sk) | ■■■■■■■■・・ 82% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fsk+%2F%28TODO%7CDIRTY%29%24%2F) |+| Slovenčina (sk) | ■■■■■■■■・・ 81% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fsk+%2F%28TODO%7CDIRTY%29%24%2F) || Türkçe (tr) | ■■■■■■■■・・ 89% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ftr+%2F%28TODO%7CDIRTY%29%24%2F) |-| Українська (uk) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fuk+%2F%28TODO%7CDIRTY%29%24%2F) |+| Українська (uk) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fuk+%2F%28TODO%7CDIRTY%29%24%2F) || 简体中文 (zh-CN) | ■■■■■■■■■・ 97% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fzh-CN+%2F%28TODO%7CDIRTY%29%24%2F) || 正體中文 (zh-TW) | ■■■■■■■■■・ 96% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fzh-TW+%2F%28TODO%7CDIRTY%29%24%2F) |diff --git a/README.md b/README.mdindex 7e9e5a0b8..acb3e3dbb 100644--- a/README.md+++ b/README.md@@ -124,30 +124,30 @@ See the [repository dedicated to those extensions](https://github.com/FreshRSS/E| Language | Progress | || - | - | - || Čeština (cs) | ■■■■■■■■・・ 82% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fcs+%2F%28TODO%7CDIRTY%29%24%2F) |-| Deutsch (de) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fde+%2F%28TODO%7CDIRTY%29%24%2F) |+| Deutsch (de) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fde+%2F%28TODO%7CDIRTY%29%24%2F) || Ελληνικά (el) | ■■■・・・・・・・ 38% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fel+%2F%28TODO%7CDIRTY%29%24%2F) || English (en) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fen+%2F%28TODO%7CDIRTY%29%24%2F) || English (United States) (en-US) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fen-US+%2F%28TODO%7CDIRTY%29%24%2F) |-| Español (es) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fes+%2F%28TODO%7CDIRTY%29%24%2F) |+| Español (es) | ■■■■■■■■■・ 98% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fes+%2F%28TODO%7CDIRTY%29%24%2F) || فارسی (fa) | ■■■■■■■■■・ 90% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffa+%2F%28TODO%7CDIRTY%29%24%2F) |-| Suomi (fi) | ■■■■■■■■■・ 93% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffi+%2F%28TODO%7CDIRTY%29%24%2F) |+| Suomi (fi) | ■■■■■■■■■・ 92% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffi+%2F%28TODO%7CDIRTY%29%24%2F) || Français (fr) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffr+%2F%28TODO%7CDIRTY%29%24%2F) || עברית (he) | ■■■■・・・・・・ 42% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fhe+%2F%28TODO%7CDIRTY%29%24%2F) |-| Magyar (hu) | ■■■■■■■■■・ 97% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fhu+%2F%28TODO%7CDIRTY%29%24%2F) |-| Bahasa Indonesia (id) | ■■■■■■■■■・ 90% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fid+%2F%28TODO%7CDIRTY%29%24%2F) |-| Italiano (it) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fit+%2F%28TODO%7CDIRTY%29%24%2F) |+| Magyar (hu) | ■■■■■■■■■・ 96% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fhu+%2F%28TODO%7CDIRTY%29%24%2F) |+| Bahasa Indonesia (id) | ■■■■■■■■・・ 89% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fid+%2F%28TODO%7CDIRTY%29%24%2F) |+| Italiano (it) | ■■■■■■■■■・ 98% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fit+%2F%28TODO%7CDIRTY%29%24%2F) || 日本語 (ja) | ■■■■■■■■・・ 88% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fja+%2F%28TODO%7CDIRTY%29%24%2F) |-| 한국어 (ko) | ■■■■■■■■・・ 82% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fko+%2F%28TODO%7CDIRTY%29%24%2F) |+| 한국어 (ko) | ■■■■■■■■・・ 81% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fko+%2F%28TODO%7CDIRTY%29%24%2F) || Latviešu (lv) | ■■■■■■■■・・ 82% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Flv+%2F%28TODO%7CDIRTY%29%24%2F) |-| Nederlands (nl) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fnl+%2F%28TODO%7CDIRTY%29%24%2F) |-| Occitan (oc) | ■■■■■■■・・・ 75% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Foc+%2F%28TODO%7CDIRTY%29%24%2F) |-| Polski (pl) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpl+%2F%28TODO%7CDIRTY%29%24%2F) |+| Nederlands (nl) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fnl+%2F%28TODO%7CDIRTY%29%24%2F) |+| Occitan (oc) | ■■■■■■■・・・ 74% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Foc+%2F%28TODO%7CDIRTY%29%24%2F) |+| Polski (pl) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpl+%2F%28TODO%7CDIRTY%29%24%2F) || Português (Brasil) (pt-BR) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-BR+%2F%28TODO%7CDIRTY%29%24%2F) || Português (Portugal) (pt-PT) | ■■■■■■■■・・ 81% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-PT+%2F%28TODO%7CDIRTY%29%24%2F) || Русский (ru) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fru+%2F%28TODO%7CDIRTY%29%24%2F) |-| Slovenčina (sk) | ■■■■■■■■・・ 82% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fsk+%2F%28TODO%7CDIRTY%29%24%2F) |+| Slovenčina (sk) | ■■■■■■■■・・ 81% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fsk+%2F%28TODO%7CDIRTY%29%24%2F) || Türkçe (tr) | ■■■■■■■■・・ 89% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ftr+%2F%28TODO%7CDIRTY%29%24%2F) |-| Українська (uk) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fuk+%2F%28TODO%7CDIRTY%29%24%2F) |+| Українська (uk) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fuk+%2F%28TODO%7CDIRTY%29%24%2F) || 简体中文 (zh-CN) | ■■■■■■■■■・ 97% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fzh-CN+%2F%28TODO%7CDIRTY%29%24%2F) || 正體中文 (zh-TW) | ■■■■■■■■■・ 96% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fzh-TW+%2F%28TODO%7CDIRTY%29%24%2F) |diff --git a/app/Controllers/categoryController.php b/app/Controllers/categoryController.phpindex f0b45f803..666743da6 100644--- a/app/Controllers/categoryController.php+++ b/app/Controllers/categoryController.php@@ -171,6 +171,8 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {$category->_attribute('defaultSort');}+ $category->_attribute('show_unread_count', Minz_Request::paramTernary('show_unread_count'));+$values = ['kind' => $category->kind(),'name' => Minz_Request::paramString('name'),diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.phpindex 5b4187b41..817e46f08 100644--- a/app/Controllers/configureController.php+++ b/app/Controllers/configureController.php@@ -75,6 +75,10 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {FreshRSS_Context::userConf()->bottomline_link = Minz_Request::paramBoolean('bottomline_link');FreshRSS_Context::userConf()->show_nav_buttons = Minz_Request::paramBoolean('show_nav_buttons');FreshRSS_Context::userConf()->show_title_unread = Minz_Request::paramBoolean('show_title_unread');+ $showUnreadCount = Minz_Request::paramString('show_unread_count');+ if (in_array($showUnreadCount, ['all', 'important', 'none'], true)) {+ FreshRSS_Context::userConf()->show_unread_count = $showUnreadCount;+ }FreshRSS_Context::userConf()->sidebar_hidden_by_default = Minz_Request::paramBoolean('sidebar_hidden_by_default');FreshRSS_Context::userConf()->html5_notif_timeout = max(0, Minz_Request::paramInt('html5_notif_timeout'));FreshRSS_Context::userConf()->html5_enable_notif = Minz_Request::paramBoolean('html5_enable_notif');diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.phpindex 89aca97b9..a71d424e6 100644--- a/app/Controllers/subscriptionController.php+++ b/app/Controllers/subscriptionController.php@@ -150,6 +150,9 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {$feed->_attribute('mark_updated_article_unread', Minz_Request::paramTernary('mark_updated_article_unread'));$feed->_attribute('read_upon_reception', Minz_Request::paramTernary('read_upon_reception'));$feed->_attribute('clear_cache', Minz_Request::paramTernary('clear_cache'));+ if (Minz_Request::hasParam('show_unread_count')) {+ $feed->_attribute('show_unread_count', Minz_Request::paramTernary('show_unread_count'));+ }$keep_max_n_unread = Minz_Request::paramTernary('keep_max_n_unread') === true ? Minz_Request::paramInt('keep_max_n_unread') : null;$feed->_attribute('keep_max_n_unread', $keep_max_n_unread >= 0 ? $keep_max_n_unread : null);diff --git a/app/Models/Category.php b/app/Models/Category.phpindex 8faec89d4..cae56008c 100644--- a/app/Models/Category.php+++ b/app/Models/Category.php@@ -118,6 +118,11 @@ class FreshRSS_Category extends Minz_Model {return []; // TODO (e.g., credentials for Dynamic OPML)}+ public function showUnreadCount(): bool {+ return $this->attributeBoolean('show_unread_count') ??+ (FreshRSS_Context::userConf()->show_unread_count === 'all');+ }+/*** @return array<int,FreshRSS_Feed> where the key is the feed ID* @throws Minz_ConfigurationNamespaceExceptiondiff --git a/app/Models/Feed.php b/app/Models/Feed.phpindex e36505ac9..1c27d22c8 100644--- a/app/Models/Feed.php+++ b/app/Models/Feed.php@@ -317,6 +317,18 @@ class FreshRSS_Feed extends Minz_Model {public function priority(): int {return $this->priority;}++ public function showUnreadCount(): bool {+ $sucGlobal = FreshRSS_Context::userConf()->show_unread_count;+ $isImportant = $this->priority >= self::PRIORITY_IMPORTANT;+ if ($isImportant && $sucGlobal !== 'none') {+ return true;+ }+ return $this->attributeBoolean('show_unread_count') ??+ $this->category()?->attributeBoolean('show_unread_count') ??+ ($sucGlobal === 'all' || ($sucGlobal === 'important' && $isImportant));+ }+/** @return string HTML-encoded CSS selector */public function pathEntries(): string {return $this->pathEntries;diff --git a/app/Models/UserConfiguration.php b/app/Models/UserConfiguration.phpindex 5e25776cf..f074967d8 100644--- a/app/Models/UserConfiguration.php+++ b/app/Models/UserConfiguration.php@@ -55,6 +55,7 @@ declare(strict_types=1);* @property int $simplify_over_n_feeds* @property bool $show_nav_buttons* @property bool $show_title_unread+ * @property 'all'|'important'|'none' $show_unread_count* @property bool $sidebar_hidden_by_default* @property 'big'|'small'|'none' $mark_read_button* @property 'ASC'|'DESC' $sort_orderdiff --git a/app/i18n/cs/conf.php b/app/i18n/cs/conf.phpindex fe87b0c09..c21cfe760 100644--- a/app/i18n/cs/conf.php+++ b/app/i18n/cs/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Zobrazit navigační tlačítka','show_title_unread' => 'Zobrazit počet nepřečtených článků v názvu',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Motiv',diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.phpindex 96a79240f..6f4eeedb9 100644--- a/app/i18n/de/conf.php+++ b/app/i18n/de/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Navigationsschaltflächen anzeigen','show_title_unread' => 'Anzahl ungelesener Artikel im Titel anzeigen',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Seitenleiste standardmäßig ausblenden','theme' => array('_' => 'Layout',diff --git a/app/i18n/el/conf.php b/app/i18n/el/conf.phpindex 81423626f..98c5bc580 100644--- a/app/i18n/el/conf.php+++ b/app/i18n/el/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Show the navigation buttons', // TODO'show_title_unread' => 'Εμφάνιση αριθμού μη αναγνωσμένων άρθρων στον τίτλο',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Theme', // TODOdiff --git a/app/i18n/en-US/conf.php b/app/i18n/en-US/conf.phpindex 5fe670276..d7f42a218 100644--- a/app/i18n/en-US/conf.php+++ b/app/i18n/en-US/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Show the navigation buttons', // IGNORE'show_title_unread' => 'Show number of unread articles in the title', // IGNORE+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // IGNORE+ 'all' => 'For all categories and feeds', // IGNORE+ 'important' => 'For important feeds only', // IGNORE+ 'important_locked' => 'Important feeds always show their unread count.', // IGNORE+ 'none' => 'Never', // IGNORE+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // IGNORE'theme' => array('_' => 'Theme', // IGNOREdiff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.phpindex 68f1422d2..1fcaabdcf 100644--- a/app/i18n/en/conf.php+++ b/app/i18n/en/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Show the navigation buttons','show_title_unread' => 'Show number of unread articles in the title',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar',+ 'all' => 'For all categories and feeds',+ 'important' => 'For important feeds only',+ 'important_locked' => 'Important feeds always show their unread count.',+ 'none' => 'Never',+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default','theme' => array('_' => 'Theme',diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.phpindex 8d41c3c3f..af0a65af3 100644--- a/app/i18n/es/conf.php+++ b/app/i18n/es/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Mostrar los botones de navegación','show_title_unread' => 'Mostrar el número de artículos no leídos en el título',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Ocultar barra lateral por defecto','theme' => array('_' => 'Tema',diff --git a/app/i18n/fa/conf.php b/app/i18n/fa/conf.phpindex 1fd52a231..dc698de92 100644--- a/app/i18n/fa/conf.php+++ b/app/i18n/fa/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => ' دکمه های ناوبری را نشان دهید','show_title_unread' => 'نمایش تعداد مقالات خوانده نشده در عنوان',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => ' موضوع',diff --git a/app/i18n/fi/conf.php b/app/i18n/fi/conf.phpindex 06d55e046..26929e404 100644--- a/app/i18n/fi/conf.php+++ b/app/i18n/fi/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Näytä siirtymispainikkeet','show_title_unread' => 'Show number of unread articles in the title', // TODO+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Teema',diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.phpindex e47c64256..c936ffc14 100644--- a/app/i18n/fr/conf.php+++ b/app/i18n/fr/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Afficher les boutons de navigation','show_title_unread' => 'Afficher le nombre d’articles non lus dans le titre',+ 'show_unread_count' => array(+ '_' => 'Afficher le nombre d’articles non lus dans la barre latérale',+ 'all' => 'Pour toutes les catégories et tous les flux',+ 'important' => 'Pour les flux importants uniquement',+ 'important_locked' => 'Les flux importants affichent toujours leur nombre d’articles non lus.',+ 'none' => 'Jamais',+ ),'sidebar_hidden_by_default' => 'Masquer la barre latérale par défaut','theme' => array('_' => 'Thème',diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.phpindex 0db5a4df1..2fbc5422b 100644--- a/app/i18n/he/conf.php+++ b/app/i18n/he/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Show the navigation buttons', // TODO'show_title_unread' => 'הצגת מספר המאמרים שלא נקראו בכותרת',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'ערכת נושא',diff --git a/app/i18n/hu/conf.php b/app/i18n/hu/conf.phpindex e892acefd..d62a0dedd 100644--- a/app/i18n/hu/conf.php+++ b/app/i18n/hu/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Navigációs gombok megjelenítése','show_title_unread' => 'A meg nem nyitott cikkek számának megjelenítése a címben',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Téma',diff --git a/app/i18n/id/conf.php b/app/i18n/id/conf.phpindex ecdb91e88..c8ee4de1c 100644--- a/app/i18n/id/conf.php+++ b/app/i18n/id/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Tampilkan tombol navigasi','show_title_unread' => 'Tampilkan jumlah artikel yang belum dibaca di judul',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Tema',diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.phpindex 9b071ed88..d9206a614 100644--- a/app/i18n/it/conf.php+++ b/app/i18n/it/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Mostra i pulsanti di navigazione','show_title_unread' => 'Mostra il numero di articoli non letti nel titolo',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Nascondi la barra laterale di default','theme' => array('_' => 'Tema',diff --git a/app/i18n/ja/conf.php b/app/i18n/ja/conf.phpindex 9e5a9915f..d74fd169a 100644--- a/app/i18n/ja/conf.php+++ b/app/i18n/ja/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'ナビゲーションボタンを表示する','show_title_unread' => 'タイトルに未読の記事数を表示',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'テーマ',diff --git a/app/i18n/ko/conf.php b/app/i18n/ko/conf.phpindex a2dd1b4d7..dd5b5aecb 100644--- a/app/i18n/ko/conf.php+++ b/app/i18n/ko/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => '내비게이션 버튼 보이기','show_title_unread' => '제목에 읽지 않은 기사 수 표시',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => '테마',diff --git a/app/i18n/lv/conf.php b/app/i18n/lv/conf.phpindex 6d665bf74..0cf60eace 100644--- a/app/i18n/lv/conf.php+++ b/app/i18n/lv/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Rādīt navigācijas pogas','show_title_unread' => 'Rādīt nelasīto rakstu skaitu virsrakstā',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Tēma',diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.phpindex 31550cce2..75dfa6510 100644--- a/app/i18n/nl/conf.php+++ b/app/i18n/nl/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Toon navigatieknoppen','show_title_unread' => 'Aantal ongelezen artikelen in de titel weergeven',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Zijbalk standaard verbergen','theme' => array('_' => 'Thema',diff --git a/app/i18n/oc/conf.php b/app/i18n/oc/conf.phpindex 18647e6de..2bb287377 100644--- a/app/i18n/oc/conf.php+++ b/app/i18n/oc/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Mostrar los botons de navigacion','show_title_unread' => 'Mostra lo nombre d’articles non legits dins lo títol',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Tèma',diff --git a/app/i18n/pl/conf.php b/app/i18n/pl/conf.phpindex a898cab21..e3ef7b9c7 100644--- a/app/i18n/pl/conf.php+++ b/app/i18n/pl/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Pokaż przyciski nawigacyjne','show_title_unread' => 'Pokaż liczbę nieprzeczytanych wiadomości w tytule',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Ukryj pasek boczny domyślnie','theme' => array('_' => 'Motyw',diff --git a/app/i18n/pt-BR/conf.php b/app/i18n/pt-BR/conf.phpindex b2c2b1299..5735abbaa 100644--- a/app/i18n/pt-BR/conf.php+++ b/app/i18n/pt-BR/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Mostrar botões de navegação','show_title_unread' => 'Mostrar o número de artigos não lidos no título',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Ocultar barra lateral por padrão','theme' => array('_' => 'Tema',diff --git a/app/i18n/pt-PT/conf.php b/app/i18n/pt-PT/conf.phpindex ce891fdc1..d187ad992 100644--- a/app/i18n/pt-PT/conf.php+++ b/app/i18n/pt-PT/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Mostrar botões de navegação','show_title_unread' => 'Show number of unread articles in the title', // TODO+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Tema',diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.phpindex 3e7fefabe..40010058f 100644--- a/app/i18n/ru/conf.php+++ b/app/i18n/ru/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Показать кнопки навигации','show_title_unread' => 'Показать количество непрочитанных статей в заголовке',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Скрывать боковую панель по умолчанию','theme' => array('_' => 'Тема',diff --git a/app/i18n/sk/conf.php b/app/i18n/sk/conf.phpindex ca9a2b603..b71517eeb 100644--- a/app/i18n/sk/conf.php+++ b/app/i18n/sk/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Zobraziť tlačidlá oznámenia','show_title_unread' => 'Zobraziť počet neprečítaných článkov v názve',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Vzhľad',diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.phpindex 66c660ad3..0779268df 100644--- a/app/i18n/tr/conf.php+++ b/app/i18n/tr/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Gezinme düğmelerini göster','show_title_unread' => 'Başlıkta okunmamış makale sayısını göster',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => 'Tema',diff --git a/app/i18n/uk/conf.php b/app/i18n/uk/conf.phpindex dccf9bb49..c4b17ce2d 100644--- a/app/i18n/uk/conf.php+++ b/app/i18n/uk/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => 'Показати кнопки навігації','show_title_unread' => 'Кількість непрочитаних статей у заголовку',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Типово ховати бічну панель','theme' => array('_' => 'Тема',diff --git a/app/i18n/zh-CN/conf.php b/app/i18n/zh-CN/conf.phpindex 62a9ef0ea..1b937429a 100644--- a/app/i18n/zh-CN/conf.php+++ b/app/i18n/zh-CN/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => '显示导航按钮','show_title_unread' => '在标题中显示未读文章的数量',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => 'Hide sidebar by default', // TODO'theme' => array('_' => '主题',diff --git a/app/i18n/zh-TW/conf.php b/app/i18n/zh-TW/conf.phpindex 833023b17..7db3fc2b3 100644--- a/app/i18n/zh-TW/conf.php+++ b/app/i18n/zh-TW/conf.php@@ -55,6 +55,13 @@ return array(),'show_nav_buttons' => '顯示導覽按鈕','show_title_unread' => '在標題中顯示未讀文章的數量',+ 'show_unread_count' => array(+ '_' => 'Show unread counts in sidebar', // TODO+ 'all' => 'For all categories and feeds', // TODO+ 'important' => 'For important feeds only', // TODO+ 'important_locked' => 'Important feeds always show their unread count.', // TODO+ 'none' => 'Never', // TODO+ ),'sidebar_hidden_by_default' => '預設隱藏側邊欄','theme' => array('_' => '主題',diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtmlindex 0fec8468d..62b908aa3 100644--- a/app/layout/aside_feed.phtml+++ b/app/layout/aside_feed.phtml@@ -19,6 +19,9 @@if (($s = Minz_Request::paramString('order', plaintext: true)) !== '' && ctype_alpha($s)) {$state_filter_manual .= '&order=' . $s;}++ $hideSucGlobal = FreshRSS_Context::userConf()->show_unread_count !== 'all' ? ' data-unread-hide="1"' : '';+ $hideSucImportant = FreshRSS_Context::userConf()->show_unread_count !== 'none' ? '' : ' data-unread-hide="1"';?><nav class="nav aside aside_feed<?= $class ?>" id="aside_feed"><a class="toggle_aside" href="#close"><?= _i('close') ?></a>@@ -36,20 +39,26 @@<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /><ul id="sidebar" class="tree scrollbar-thin"><li class="tree-folder category all<?= FreshRSS_Context::isCurrentGet('a') || FreshRSS_Context::isCurrentGet('A') || FreshRSS_Context::isCurrentGet('Z') ? ' active' : '' ?>">- <a class="tree-folder-title" data-unread="<?= format_number(FreshRSS_Context::$total_unread) ?>" href="<?= _url('index', $actual_view) . $state_filter_manual ?>">- <?= _i('all') ?><span class="title" data-unread="<?= format_number(FreshRSS_Context::$total_unread) ?>"><?= _t('index.menu.main_stream') ?></span>+ <a class="tree-folder-title" data-unread="<?= format_number(FreshRSS_Context::$total_unread) ?>"<?=+ $hideSucGlobal ?> href="<?= _url('index', $actual_view) . $state_filter_manual ?>">+ <?= _i('all') ?><span class="title" data-unread="<?= format_number(FreshRSS_Context::$total_unread) ?>"<?=+ $hideSucGlobal ?>><?= _t('index.menu.main_stream') ?></span></a></li><li class="tree-folder category important<?= FreshRSS_Context::isCurrentGet('i') ? ' active' : '' ?>">- <a class="tree-folder-title" data-unread="<?= format_number(FreshRSS_Context::$total_important_unread) ?>" href="<?= _url('index', $actual_view, 'get', 'i') . $state_filter_manual ?>">- <?= _i('important') ?><span class="title" data-unread="<?= format_number(FreshRSS_Context::$total_important_unread) ?>"><?= _t('index.menu.important') ?></span>+ <a class="tree-folder-title" data-unread="<?= format_number(FreshRSS_Context::$total_important_unread) ?>"<?=+ $hideSucImportant ?> href="<?= _url('index', $actual_view, 'get', 'i') . $state_filter_manual ?>">+ <?= _i('important') ?><span class="title" data-unread="<?= format_number(FreshRSS_Context::$total_important_unread) ?>"<?=+ $hideSucImportant ?>><?= _t('index.menu.important') ?></span></a></li><li class="tree-folder category favorites<?= FreshRSS_Context::isCurrentGet('s') ? ' active' : '' ?>">- <a class="tree-folder-title" data-unread="<?= format_number(FreshRSS_Context::$total_starred['unread']) ?>" href="<?= _url('index', $actual_view, 'get', 's') . $state_filter_manual ?>">- <?= _i('starred') ?><span class="title" data-unread="<?= format_number(FreshRSS_Context::$total_starred['unread']) ?>"><?= _t('index.menu.favorites', format_number(FreshRSS_Context::$total_starred['all'])) ?></span>+ <a class="tree-folder-title" data-unread="<?= format_number(FreshRSS_Context::$total_starred['unread']) ?>"<?=+ $hideSucGlobal ?> href="<?= _url('index', $actual_view, 'get', 's') . $state_filter_manual ?>">+ <?= _i('starred') ?><span class="title" data-unread="<?= format_number(FreshRSS_Context::$total_starred['unread']) ?>"<?=+ $hideSucGlobal ?>><?= _t('index.menu.favorites', format_number(FreshRSS_Context::$total_starred['all'])) ?></span></a></li>@@ -57,15 +66,17 @@$t_active = FreshRSS_Context::isCurrentGet('T');$t_show = ($t_active && in_array(FreshRSS_Context::userConf()->display_categories, ['active', 'remember'], true)) || FreshRSS_Context::userConf()->display_categories === 'all';?>- <li id="tags" class="tree-folder category tags<?= $t_active ? ' active' : '' ?>" data-unread="<?= format_number($this->nbUnreadTags) ?>">+ <li id="tags" class="tree-folder category tags<?= $t_active ? ' active' : '' ?>" data-unread="<?= format_number($this->nbUnreadTags) ?>"<?= $hideSucGlobal ?>><a href="<?= _url('index', $actual_view, 'get', 'T') . $state_filter_manual ?>" class="tree-folder-title">- <button class="dropdown-toggle" title="<?= _t('sub.category.expand') ?>"><?= _i($t_show ? 'up' : 'down') ?></button><span class="title" title="<?= _t('sub.category.open') ?>" data-unread="<?= format_number($this->nbUnreadTags) ?>"><?= _t('index.menu.mylabels') ?></span>+ <button class="dropdown-toggle" title="<?= _t('sub.category.expand') ?>"><?= _i($t_show ? 'up' : 'down') ?></button><span class="title" title="<?=+ _t('sub.category.open') ?>" data-unread="<?= format_number($this->nbUnreadTags) ?>"<?= $hideSucGlobal ?>><?= _t('index.menu.mylabels') ?></span></a><ul class="tree-folder-items<?= $t_show ? ' active' : '' ?>"><?phpforeach ($this->tags as $tag):?>- <li id="t_<?= $tag->id() ?>" class="item feed<?= FreshRSS_Context::isCurrentGet('t_' . $tag->id()) ? ' active' : '' ?>" data-unread="<?= $tag->nbUnread() ?>">+ <li id="t_<?= $tag->id() ?>" class="item feed<?= FreshRSS_Context::isCurrentGet('t_' . $tag->id()) ? ' active' : ''+ ?>" data-unread="<?= $tag->nbUnread() ?>"<?= $hideSucGlobal ?>><?php if (FreshRSS_Auth::hasAccess()) { ?><div class="dropdown no-mobile"><div id="dropdown-t-<?= $tag->id() ?>" class="dropdown-target"></div>@@ -75,7 +86,7 @@<?php } else { ?><div class="no-dropdown-toggle"></div><?php } ?>- <a class="item-title" data-unread="<?= format_number($tag->nbUnread()) ?>" href="<?=+ <a class="item-title" data-unread="<?= format_number($tag->nbUnread()) ?>"<?= $hideSucGlobal ?> href="<?=_url('index', $actual_view, 'get', 't_' . $tag->id()) . $state_filter_manual ?>"><?= _i('label') ?> <?= $tag->name() ?></a></li><?php endforeach; ?>@@ -95,12 +106,15 @@$c_active = FreshRSS_Context::isCurrentGet('c_' . $cat->id());$c_show = ($c_active && in_array(FreshRSS_Context::userConf()->display_categories, ['active', 'remember'], true))|| FreshRSS_Context::userConf()->display_categories === 'all';+ $hideSucCat = $cat->showUnreadCount() ? '' : ' data-unread-hide="1"';?>- <li id="c_<?= $cat->id() ?>" class="tree-folder category<?= $c_active ? ' active' : '' ?>"<?= null === $position ? '' : " data-position='$position'" ?> data-unread="<?= $cat->nbNotRead() ?>">+ <li id="c_<?= $cat->id() ?>" class="tree-folder category<?= $c_active ? ' active' : '' ?>"<?=+ null === $position ? '' : " data-position='$position'" ?> data-unread="<?= $cat->nbNotRead() ?>"<?= $hideSucCat ?>><a href="<?= _url('index', $actual_view, 'get', 'c_' . $cat->id()) . $state_filter_manual ?>" class="tree-folder-title"><button class="dropdown-toggle" title="<?= _t('sub.category.expand') ?>"><?= _i($c_show ? 'up' : 'down') ?></button><?php?><span title="<?= $cat->inError() ? _t('sub.category.error') : _t('sub.category.open') ?>" class="title<?=- $cat->hasFeedsWithError() || $cat->inError() ? ' error' : '' ?>" data-unread="<?= format_number($cat->nbNotRead()) ?>"><?=+ $cat->hasFeedsWithError() || $cat->inError() ? ' error' : ''+ ?>" data-unread="<?= format_number($cat->nbNotRead()) ?>"<?= $hideSucCat ?>><?=$cat->name() ?><?= $cat->kind() === FreshRSS_Category::KIND_DYNAMIC_OPML ? ' ' . _i('opml-dyn') : ''?></span></a>@@ -131,21 +145,23 @@$empty_title = _t('sub.feed.empty');}$mute_class = $feed->mute() ? ' mute' : '';+ $hideSucFeed = $feed->showUnreadCount() ? '' : ' data-unread-hide="1"';?><li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active_class, $mute_class, $error_class, $empty_class ?>"- data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"><?php+ data-unread="<?= $feed->nbNotRead() ?>"<?= $hideSucFeed ?> data-priority="<?= $feed->priority() ?>"><?phpif ($f_active || $nbFeedsTotal < FreshRSS_Context::userConf()->simplify_over_n_feeds):?><div class="dropdown no-mobile">- <div id="dropdown-<?= $feed->id() ?>" class="dropdown-target"></div><a href="#dropdown-<?= $feed->id() ?>" class="dropdown-toggle" title="<?= _t('gen.action.menu.open') ?>" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a><?php /* feed_config_template */ ?>+ <div id="dropdown-<?= $feed->id() ?>" class="dropdown-target"></div><a href="#dropdown-<?= $feed->id() ?>" class="dropdown-toggle" title="<?=+ _t('gen.action.menu.open') ?>" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a><?php /* feed_config_template */ ?></div><?phpendif;$title = _t('sub.feed.open_feed', $feed->name());$title .= $error_title !== '' ? ' ⚠ ' . $error_title : '';$title .= $empty_title !== '' ? ' ' . $empty_title : '';$title .= $feed->mute() ? ' 🔇 ' . _t('sub.feed.mute.state_is_muted') : '';- ?><a class="item-title" title="<?= $title ?>"- data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?=- _url('index', $actual_view, 'get', 'f_' . $feed->id()) . $state_filter_manual ?>">+ ?><a class="item-title" title="<?= $title ?>" data-unread="<?=+ format_number($feed->nbNotRead()) ?>"<?= $hideSucFeed ?> href="<?=+ _url('index', $actual_view, 'get', 'f_' . $feed->id()) . $state_filter_manual ?>"><?phpif ($show_favicon || $f_active) { ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php }?><span class="title"><?= $feed->name() ?></span></a></li>diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtmlindex a0cd3699b..4d75fc6f4 100644--- a/app/views/configure/display.phtml+++ b/app/views/configure/display.phtml@@ -286,6 +286,18 @@</div></div>+ <div class="form-group">+ <label class="group-name" for="show_unread_count"><?= _t('conf.display.show_unread_count') ?></label>+ <div class="group-controls">+ <?php $suc = FreshRSS_Context::userConf()->show_unread_count; ?>+ <select name="show_unread_count" id="show_unread_count">+ <option value="all"<?= $suc === 'all' ? ' selected="selected"' : '' ?>><?= _t('conf.display.show_unread_count.all') ?></option>+ <option value="important"<?= $suc === 'important' ? ' selected="selected"' : '' ?>><?= _t('conf.display.show_unread_count.important') ?></option>+ <option value="none"<?= $suc === 'none' ? ' selected="selected"' : '' ?>><?= _t('conf.display.show_unread_count.none') ?></option>+ </select>+ </div>+ </div>+<div class="form-group"><div class="group-controls"><label class="checkbox" for="sidebar_hidden_by_default">diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtmlindex 671b83640..da7cde63d 100644--- a/app/views/helpers/category/update.phtml+++ b/app/views/helpers/category/update.phtml@@ -79,6 +79,18 @@</div></div>+ <div class="form-group">+ <label class="group-name" for="show_unread_count"><?= _t('conf.display.show_unread_count') ?></label>+ <div class="group-controls">+ <?php $suc = $this->category->attributeBoolean('show_unread_count'); ?>+ <select name="show_unread_count" id="show_unread_count" class="w50">+ <option value=""<?= $suc === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>+ <option value="0"<?= $suc === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>+ <option value="1"<?= $suc === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>+ </select>+ </div>+ </div>+<div class="form-group form-actions"><div class="group-controls"><button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtmlindex 68bd1f550..5339fceb4 100644--- a/app/views/helpers/feed/update.phtml+++ b/app/views/helpers/feed/update.phtml@@ -154,6 +154,24 @@</div></div>+ <?php+ $suc = $this->feed->attributeBoolean('show_unread_count');+ $sucLocked = $this->feed->priority() >= FreshRSS_Feed::PRIORITY_IMPORTANT &&+ FreshRSS_Context::userConf()->show_unread_count !== 'none';+ ?>+ <div class="form-group">+ <label class="group-name" for="show_unread_count"><?= _t('conf.display.show_unread_count') ?></label>+ <div class="group-controls">+ <select name="show_unread_count" id="show_unread_count" class="w50"<?= $sucLocked ? ' disabled="disabled"' : '' ?>>+ <option value=""<?= $suc === null && !$sucLocked ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>+ <option value="0"<?= $suc === false && !$sucLocked ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>+ <option value="1"<?= $suc === true || $sucLocked ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>+ </select>+ <?php if ($sucLocked): ?>+ <small><?= _t('conf.display.show_unread_count.important_locked') ?></small>+ <?php endif; ?>+ </div>+ </div><?php$feedDefaultSort = $this->feed->defaultSort();diff --git a/config-user.default.php b/config-user.default.phpindex f514db511..037ae1112 100644--- a/config-user.default.php+++ b/config-user.default.php@@ -34,6 +34,8 @@ return array ('default_state' => FreshRSS_Entry::STATE_NOT_READ,'show_fav_unread' => false,'show_title_unread' => true,+ # Unread-count visibility in sidebar: 'all' | 'important' | 'none'+ 'show_unread_count' => 'all','auto_load_more' => true,'display_posts' => false,'display_categories' => 'active', //{ active, remember, all, none }diff --git a/p/themes/base-theme/frss.css b/p/themes/base-theme/frss.cssindex e184c6a25..24361cf38 100644--- a/p/themes/base-theme/frss.css+++ b/p/themes/base-theme/frss.css@@ -2319,6 +2319,14 @@ html.slider-active {font-weight: initial;}+/* Faint dot shown in place of the count badge when [data-unread-hide] is present */+.aside .category .tree-folder-title .title[data-unread-hide]:not([data-unread="0"])::after,+.aside .feed .item-title[data-unread-hide]:not([data-unread="0"])::after {+ content: "·";+ opacity: 0.5;+ pointer-events: none;+}+.aside .category .title:not([data-unread="0"])::after {margin: calc(0.125rem + var(--frss-padding-top-bottom)) 0 0 0;}diff --git a/p/themes/base-theme/frss.rtl.css b/p/themes/base-theme/frss.rtl.cssindex 71c581077..9777e6565 100644--- a/p/themes/base-theme/frss.rtl.css+++ b/p/themes/base-theme/frss.rtl.css@@ -2319,6 +2319,14 @@ html.slider-active {font-weight: initial;}+/* Faint dot shown in place of the count badge when [data-unread-hide] is present */+.aside .category .tree-folder-title .title[data-unread-hide]:not([data-unread="0"])::after,+.aside .feed .item-title[data-unread-hide]:not([data-unread="0"])::after {+ content: "·";+ opacity: 0.5;+ pointer-events: none;+}+.aside .category .title:not([data-unread="0"])::after {margin: calc(0.125rem + var(--frss-padding-top-bottom)) 0 0 0;}