From 7de384bf9c192292cbc726085eedfadddfa7ca7d Mon Sep 17 00:00:00 2001 From: maTh <1645099+math-GH@users.noreply.github.com> Date: Thu, 13 Mar 2025 23:10:48 +0100 Subject: Mark as read button: config for the size (#7314) * settings * i18n: mark_read_button * big, small, none * fix * Fixes * make fix-all --------- Co-authored-by: Alexandre Alapetite --- app/Controllers/configureController.php | 2 ++ app/Models/UserConfiguration.php | 1 + app/i18n/cs/conf.php | 6 +++++ app/i18n/de/conf.php | 6 +++++ app/i18n/el/conf.php | 6 +++++ app/i18n/en-us/conf.php | 6 +++++ app/i18n/en/conf.php | 6 +++++ app/i18n/es/conf.php | 6 +++++ app/i18n/fa/conf.php | 6 +++++ app/i18n/fi/conf.php | 6 +++++ app/i18n/fr/conf.php | 6 +++++ app/i18n/he/conf.php | 6 +++++ app/i18n/hu/conf.php | 6 +++++ app/i18n/id/conf.php | 6 +++++ app/i18n/it/conf.php | 6 +++++ app/i18n/ja/conf.php | 6 +++++ app/i18n/ko/conf.php | 6 +++++ app/i18n/lv/conf.php | 6 +++++ app/i18n/nl/conf.php | 6 +++++ app/i18n/oc/conf.php | 6 +++++ app/i18n/pl/conf.php | 6 +++++ app/i18n/pt-br/conf.php | 6 +++++ app/i18n/pt-pt/conf.php | 6 +++++ app/i18n/ru/conf.php | 6 +++++ app/i18n/sk/conf.php | 6 +++++ app/i18n/tr/conf.php | 6 +++++ app/i18n/zh-cn/conf.php | 6 +++++ app/i18n/zh-tw/conf.php | 6 +++++ app/views/configure/reading.phtml | 11 ++++++++++ app/views/helpers/stream-footer.phtml | 39 ++++++++++++++++++++++----------- 30 files changed, 196 insertions(+), 13 deletions(-) (limited to 'app') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index c525de18d..d1912fbc9 100644 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -131,6 +131,8 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController { FreshRSS_Context::userConf()->lazyload = Minz_Request::paramBoolean('lazyload'); FreshRSS_Context::userConf()->sides_close_article = Minz_Request::paramBoolean('sides_close_article'); FreshRSS_Context::userConf()->sticky_post = Minz_Request::paramBoolean('sticky_post'); + $markReadButton = Minz_Request::paramStringNull('mark_read_button', plaintext: true); + FreshRSS_Context::userConf()->mark_read_button = in_array($markReadButton, ['big', 'small', 'none'], true) ? $markReadButton : 'big'; FreshRSS_Context::userConf()->reading_confirm = Minz_Request::paramBoolean('reading_confirm'); FreshRSS_Context::userConf()->auto_remove_article = Minz_Request::paramBoolean('auto_remove_article'); FreshRSS_Context::userConf()->mark_updated_article_unread = Minz_Request::paramBoolean('mark_updated_article_unread'); diff --git a/app/Models/UserConfiguration.php b/app/Models/UserConfiguration.php index b3e4daafe..23016c9f2 100644 --- a/app/Models/UserConfiguration.php +++ b/app/Models/UserConfiguration.php @@ -50,6 +50,7 @@ declare(strict_types=1); * @property bool $icons_as_emojis * @property int $simplify_over_n_feeds * @property bool $show_nav_buttons + * @property 'big'|'small'|'none' $mark_read_button * @property 'ASC'|'DESC' $sort_order * @property 'id'|'date'|'link'|'title'|'rand' $sort * @property array> $sharing diff --git a/app/i18n/cs/conf.php b/app/i18n/cs/conf.php index babe1621b..a87501d1f 100644 --- a/app/i18n/cs/conf.php +++ b/app/i18n/cs/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Předchozí', ), ), + 'mark_read_button' => array( + '_' => '„označit vše jako přečtené“ button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php index 23d538b57..239a9b99b 100644 --- a/app/i18n/de/conf.php +++ b/app/i18n/de/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Vorherige', ), ), + 'mark_read_button' => array( + '_' => '„Alle als gelesen markieren“ Button', + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privatsphäre', 'retrieve_extension_list' => 'Erweiterungsliste abrufen', diff --git a/app/i18n/el/conf.php b/app/i18n/el/conf.php index add5090e6..8d12dafa1 100644 --- a/app/i18n/el/conf.php +++ b/app/i18n/el/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Previous', // TODO ), ), + 'mark_read_button' => array( + '_' => '“Mark all as read” button', // TODO + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/en-us/conf.php b/app/i18n/en-us/conf.php index 0b2ed39fd..c389bfbd5 100644 --- a/app/i18n/en-us/conf.php +++ b/app/i18n/en-us/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Previous', // IGNORE ), ), + 'mark_read_button' => array( + '_' => '“Mark all as read” button', // IGNORE + 'big' => 'Big', // IGNORE + 'none' => 'None', // IGNORE + 'small' => 'Small', // IGNORE + ), 'privacy' => array( '_' => 'Privacy', // IGNORE 'retrieve_extension_list' => 'Retrieve extension list', // IGNORE diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index 01c05b675..ba75be224 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Previous', ), ), + 'mark_read_button' => array( + '_' => '“Mark all as read” button', + 'big' => 'Big', + 'none' => 'None', + 'small' => 'Small', + ), 'privacy' => array( '_' => 'Privacy', 'retrieve_extension_list' => 'Retrieve extension list', diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.php index 1feecaec6..bba65aecc 100644 --- a/app/i18n/es/conf.php +++ b/app/i18n/es/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Anterior', ), ), + 'mark_read_button' => array( + '_' => '“marcar todos como leídos” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/fa/conf.php b/app/i18n/fa/conf.php index e91aa7058..ccc4fe148 100644 --- a/app/i18n/fa/conf.php +++ b/app/i18n/fa/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => ' قبلی', ), ), + 'mark_read_button' => array( + '_' => '"علامت گذاری همه به عنوان خوانده شده" button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/fi/conf.php b/app/i18n/fi/conf.php index 751b05ff7..178317f75 100644 --- a/app/i18n/fi/conf.php +++ b/app/i18n/fi/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Edellinen', ), ), + 'mark_read_button' => array( + '_' => '“merkitse kaikki luetuiksi” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Tietosuoja', 'retrieve_extension_list' => 'Nouda laajennusluettelo', diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php index 65cfd63aa..0f2b4c7c2 100644 --- a/app/i18n/fr/conf.php +++ b/app/i18n/fr/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Précédent', ), ), + 'mark_read_button' => array( + '_' => 'Bouton « Marquer tout comme lu »', + 'big' => 'Gros', + 'none' => 'Aucun', + 'small' => 'Petit', + ), 'privacy' => array( '_' => 'Vie privée', 'retrieve_extension_list' => 'Récupération de la liste des extensions', diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php index 966bea79d..9147f4655 100644 --- a/app/i18n/he/conf.php +++ b/app/i18n/he/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'הקודם', ), ), + 'mark_read_button' => array( + '_' => '“סימון הכל כנקרא” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/hu/conf.php b/app/i18n/hu/conf.php index 87a0355ea..a7a313768 100755 --- a/app/i18n/hu/conf.php +++ b/app/i18n/hu/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Előző', ), ), + 'mark_read_button' => array( + '_' => '“Mark all as read” button', // TODO + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Adatvédelem', 'retrieve_extension_list' => 'Kiterjesztés lista beszerzése', diff --git a/app/i18n/id/conf.php b/app/i18n/id/conf.php index 466e974c8..d0bfafd18 100644 --- a/app/i18n/id/conf.php +++ b/app/i18n/id/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Sebelumnya', ), ), + 'mark_read_button' => array( + '_' => '“tandai semua sebagai telah dibaca” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.php index 5453f84b4..437ef7fcb 100644 --- a/app/i18n/it/conf.php +++ b/app/i18n/it/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Precedente', ), ), + 'mark_read_button' => array( + '_' => '“segna tutto come letto” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // IGNORE 'retrieve_extension_list' => 'Recupero dell’elenco delle estensioni', diff --git a/app/i18n/ja/conf.php b/app/i18n/ja/conf.php index 378c2625f..b7dd99c10 100644 --- a/app/i18n/ja/conf.php +++ b/app/i18n/ja/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => '前へ', ), ), + 'mark_read_button' => array( + '_' => '“すべてに既読を付ける” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'プライバシー', 'retrieve_extension_list' => '拡張機能リストを取得する', diff --git a/app/i18n/ko/conf.php b/app/i18n/ko/conf.php index 889c554d6..6f921e063 100644 --- a/app/i18n/ko/conf.php +++ b/app/i18n/ko/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => '이전', ), ), + 'mark_read_button' => array( + '_' => '“모두 읽음으로 표시” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/lv/conf.php b/app/i18n/lv/conf.php index 19a78139f..9916edb2b 100644 --- a/app/i18n/lv/conf.php +++ b/app/i18n/lv/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Iepriekšējais', ), ), + 'mark_read_button' => array( + '_' => '"atzīmēt visus kā izlasītus" button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php index 1ca39660f..59a06e07b 100644 --- a/app/i18n/nl/conf.php +++ b/app/i18n/nl/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Vorige', ), ), + 'mark_read_button' => array( + '_' => '„markeer alles als gelezen” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/oc/conf.php b/app/i18n/oc/conf.php index 615e04d34..687910ac8 100644 --- a/app/i18n/oc/conf.php +++ b/app/i18n/oc/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Precedent', ), ), + 'mark_read_button' => array( + '_' => '« o marcar tot coma legit » button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/pl/conf.php b/app/i18n/pl/conf.php index 1c6ffbda0..9d4e95a87 100644 --- a/app/i18n/pl/conf.php +++ b/app/i18n/pl/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Poprzednie', ), ), + 'mark_read_button' => array( + '_' => '“Mark all as read” button', // TODO + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php index 779228b1f..9b7302268 100644 --- a/app/i18n/pt-br/conf.php +++ b/app/i18n/pt-br/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Anterior', ), ), + 'mark_read_button' => array( + '_' => '“marcar todos como lido” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/pt-pt/conf.php b/app/i18n/pt-pt/conf.php index 4f1bbbcc8..78a5875bb 100644 --- a/app/i18n/pt-pt/conf.php +++ b/app/i18n/pt-pt/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Anterior', ), ), + 'mark_read_button' => array( + '_' => '“Mark all as read” button', // TODO + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.php index 7a535908f..786e9b68f 100644 --- a/app/i18n/ru/conf.php +++ b/app/i18n/ru/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Предыдущая', ), ), + 'mark_read_button' => array( + '_' => '«отметить всё прочитанным» button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/sk/conf.php b/app/i18n/sk/conf.php index d49c01652..aafc7e7fe 100644 --- a/app/i18n/sk/conf.php +++ b/app/i18n/sk/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Predošlý', ), ), + 'mark_read_button' => array( + '_' => '“Označiť všetko ako prečítané” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.php index bd98f7330..d10ebdc42 100644 --- a/app/i18n/tr/conf.php +++ b/app/i18n/tr/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => 'Önceki', ), ), + 'mark_read_button' => array( + '_' => '“Hepsini okundu say” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Gizlilik', 'retrieve_extension_list' => 'Uzantı listesini al', diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php index b6af7fe54..456c62149 100644 --- a/app/i18n/zh-cn/conf.php +++ b/app/i18n/zh-cn/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => '上一页', ), ), + 'mark_read_button' => array( + '_' => '“全部标记为已读” button', // DIRTY + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/i18n/zh-tw/conf.php b/app/i18n/zh-tw/conf.php index 763937aa3..bae3f8825 100644 --- a/app/i18n/zh-tw/conf.php +++ b/app/i18n/zh-tw/conf.php @@ -99,6 +99,12 @@ return array( 'previous' => '上一頁', ), ), + 'mark_read_button' => array( + '_' => '“Mark all as read” button', // TODO + 'big' => 'Big', // TODO + 'none' => 'None', // TODO + 'small' => 'Small', // TODO + ), 'privacy' => array( '_' => 'Privacy', // TODO 'retrieve_extension_list' => 'Retrieve extension list', // TODO diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml index ed468f717..dc67874b0 100644 --- a/app/views/configure/reading.phtml +++ b/app/views/configure/reading.phtml @@ -55,6 +55,17 @@ +
+ +
+ +
+
+
diff --git a/app/views/helpers/stream-footer.phtml b/app/views/helpers/stream-footer.phtml index 3394eed76..9984a2429 100644 --- a/app/views/helpers/stream-footer.phtml +++ b/app/views/helpers/stream-footer.phtml @@ -35,19 +35,32 @@ -
- - + + mark_read_button !== 'none') { + $css = ''; + switch (FreshRSS_Context::userConf()->mark_read_button) { + case 'big': + $css = 'as-link big'; + break; + case 'small': + $css = 'btn small'; + break; + } + ?> +
+ +
-- cgit v1.2.3