diff options
| author | 2020-11-02 16:33:16 +0530 | |
|---|---|---|
| committer | 2020-11-02 12:03:16 +0100 | |
| commit | 6f23999c7b3de1a69fea4dea056aed2548c4a32d (patch) | |
| tree | 48b8fc12bb20159dad9fbb6f94b68f604e150b69 /app/views | |
| parent | c2e3bc7caba668e34dffe7555e3406a4435c3c36 (diff) | |
Remember open categories (#3185)
* feature(normal) - Remember opened categories in the left menu
Session storage based implementation to remember opened categories in left menu
Issue Ref: #2248
* lib_phpQuery updates
* Updates covering feedback points and functionality fixes
* Feedback updates
* Revert "lib_phpQuery updates"
This reverts commit dcd23b9418405a2d14ee03c1fcadf90c04b267e1.
* First review
Change variable name to "remember" instead of "open".
Start using localStorage instead of sessionStorage.
Simplify code.
* Simplify remember categories init function
Replace 'session' with 'local' in function names and comment
Set open categories CSS as same as when category is opened in 'active' unfold mode
* Remove URLSearchParams check in remember categories init function
* Delete open categories on login and logout
* JSHint check fix
* Second review
* Make new mode the default for new users
* Always open active category
* Reduce / simplify code
* i18n French
* Revert default value
Wait a bit more for this decision / change
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/reading.phtml | 1 | ||||
| -rw-r--r-- | app/views/helpers/javascript_vars.phtml | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml index 3cd0a718e..f828556b2 100644 --- a/app/views/configure/reading.phtml +++ b/app/views/configure/reading.phtml @@ -52,6 +52,7 @@ <div class="group-controls"> <select name="display_categories" id="display_categories" data-leave-validation="<?= FreshRSS_Context::$user_conf->display_categories ?>"> <option value="active"<?= FreshRSS_Context::$user_conf->display_categories === 'active' ? ' selected="selected"' : '' ?>><?= _t('conf.reading.show.active_category') ?></option> + <option value="remember"<?= FreshRSS_Context::$user_conf->display_categories === 'remember' ? ' selected="selected"' : '' ?>><?= _t('conf.reading.show.remember_categories') ?></option> <option value="all"<?= FreshRSS_Context::$user_conf->display_categories === 'all' ? ' selected="selected"' : '' ?>><?= _t('conf.reading.show.all_categories') ?></option> <option value="none"<?= FreshRSS_Context::$user_conf->display_categories === 'none' ? ' selected="selected"' : '' ?>><?= _t('conf.reading.show.no_category') ?></option> </select> diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 24fa140a5..11373b76f 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -7,6 +7,7 @@ echo htmlspecialchars(json_encode(array( 'auto_remove_article' => !!FreshRSS_Context::isAutoRemoveAvailable(), 'hide_posts' => !(FreshRSS_Context::$user_conf->display_posts || Minz_Request::actionName() === 'reader'), 'display_order' => Minz_Request::param('order', FreshRSS_Context::$user_conf->sort_order), + 'display_categories' => FreshRSS_Context::$user_conf->display_categories, 'auto_mark_article' => !!$mark['article'], 'auto_mark_site' => !!$mark['site'], 'auto_mark_scroll' => !!$mark['scroll'], |
