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 <alexandre@alapetite.fr>
This commit is contained in:
maTh
2025-03-13 23:10:48 +01:00
committed by GitHub
parent a7361a3e7c
commit 7de384bf9c
62 changed files with 1212 additions and 52 deletions

View File

@@ -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');

View File

@@ -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<int,array<string,string>> $sharing

View File

@@ -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

View File

@@ -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',

View File

@@ -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

View File

@@ -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

View File

@@ -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',

View File

@@ -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

View File

@@ -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

View File

@@ -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',

View File

@@ -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',

View File

@@ -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

View File

@@ -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',

View File

@@ -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

View File

@@ -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 dellelenco delle estensioni',

View File

@@ -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' => '拡張機能リストを取得する',

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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',

View File

@@ -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

View File

@@ -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

View File

@@ -55,6 +55,17 @@
</div>
</div>
<div class="form-group">
<label class="group-name" for="mark_read_button"><?= _t('conf.mark_read_button') ?></label>
<div class="group-controls">
<select name="mark_read_button" id="mark_read_button" data-leave-validation="<?= FreshRSS_Context::userConf()->mark_read_button ?>">
<option value="big"<?= FreshRSS_Context::userConf()->mark_read_button === 'big' ? ' selected="selected"' : '' ?>><?= _t('conf.mark_read_button.big') ?></option>
<option value="small"<?= FreshRSS_Context::userConf()->mark_read_button === 'small' ? ' selected="selected"' : '' ?>><?= _t('conf.mark_read_button.small') ?></option>
<option value="none"<?= FreshRSS_Context::userConf()->mark_read_button === 'none' ? ' selected="selected"' : '' ?>><?= _t('conf.mark_read_button.none') ?></option>
</select>
</div>
</div>
<div class="form-group">
<label class="group-name" for="sort_order"><?= _t('conf.reading.sort') ?></label>
<div class="group-controls">

View File

@@ -35,19 +35,32 @@
<?php if (FreshRSS_Context::$continuation_id !== '0') { ?>
<button id="load_more" type="submit" class="btn" formaction="<?= Minz_Url::display($url_next) ?>"><?= _t('gen.stream.load_more') ?></button>
<?php } elseif ($hasAccess) { ?>
<?= _t('gen.stream.nothing_to_load') ?><br />
<button id="bigMarkAsRead"
class="as-link <?= FreshRSS_Context::userConf()->reading_confirm ? 'confirm" disabled="disabled' : '' ?>"
form="stream-footer"
formaction="<?= Minz_Url::display($url_mark_read) ?>"
type="submit">
<span class="bigTick"></span><br />
<span class="markAllRead"><?= _t('gen.stream.mark_all_read') ?></span><br />
<?php if (FreshRSS_Context::userConf()->onread_jump_next) { ?>
<span class="jumpNext"><?= _t('conf.reading.jump_next') ?></span>
<?php } ?>
</button>
<?php } else { ?>
<?= _t('gen.stream.nothing_to_load') ?>
<?php if (FreshRSS_Context::userConf()->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;
}
?>
<br />
<button id="bigMarkAsRead"
class="<?= $css ?> <?= FreshRSS_Context::userConf()->reading_confirm ? 'confirm" disabled="disabled' : '' ?>"
form="stream-footer"
formaction="<?= Minz_Url::display($url_mark_read) ?>"
type="submit">
<span class="bigTick"></span><br />
<span class="markAllRead"><?= _t('gen.stream.mark_all_read') ?></span><br />
<?php if (FreshRSS_Context::userConf()->onread_jump_next) { ?>
<span class="jumpNext"><?= _t('conf.reading.jump_next') ?></span>
<?php } ?>
</button>
<?php
} } else { ?>
<?= _t('gen.stream.nothing_to_load') ?><br />
<?php } ?>
</div>