From 39cc1c11ec596176e842cc98e6a54337e3c04d7e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 26 Feb 2024 09:01:03 +0100 Subject: New feature: shareable user query (#6052) * New feature: shareable user query Share the output of a user query by RSS / HTML / OPML with other people through unique URLs. Replaces the global admin token, which was the only option (but unsafe) to share RSS outputs with other people. Also add a new HTML output for people without an RSS reader. fix https://github.com/FreshRSS/FreshRSS/issues/3066#issuecomment-648977890 fix https://github.com/FreshRSS/FreshRSS/issues/3178#issuecomment-769435504 * Remove unused method * Fix token saving * Implement HTML view * Update i18n for master token * Revert i18n get_favorite * Fix missing i18n for user queries from before this PR * Remove irrelevant tests * Add link to RSS version * Fix getGet * Fix getState * Fix getSearch * Alternative getSearch * Default getOrder * Explicit default state * Fix test * Add OPML sharing * Remove many redundant SQL queries from original implementation of user queries * Fix article tags * Use default user settings * Prepare public search * Fixes * Allow user search on article tags * Implement user search * Revert filter bug * Revert wrong SQL left outer join change * Implement checkboxes * Safe check of OPML * Fix label * Remove RSS button to favour new sharing method That sharing button was using a global admin token * First version of HTTP 304 * Disallow some recusrivity fix https://github.com/FreshRSS/FreshRSS/issues/6086 * Draft of nav * Minor httpConditional * Add support for offset for pagination * Fix offset pagination * Fix explicit order ASC * Add documentation * Help links i18n * Note about deprecated master token * Typo * Doc about format --- app/layout/header.phtml | 48 +++++++++++++++++++++++------------------------ app/layout/layout.phtml | 16 +++++++++------- app/layout/nav_menu.phtml | 43 +++++++++--------------------------------- app/layout/simple.phtml | 42 +++++++++++++++++++++++++++++++---------- 4 files changed, 73 insertions(+), 76 deletions(-) (limited to 'app/layout') diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 18e67fd2d..9ab0da4c4 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -1,9 +1,10 @@
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index ba6dc4a96..2183f9804 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -2,15 +2,17 @@ declare(strict_types=1); /** @var FreshRSS_View $this */ FreshRSS::preLayout(); + $class = ''; + if (_t('gen.dir') === 'rtl') { + echo ' dir="rtl"'; + $class = 'rtl '; + } + if (FreshRSS_Context::userConf()->darkMode !== 'no') { + $class .= 'darkMode_' . FreshRSS_Context::userConf()->darkMode; + } ?> - class="darkMode === 'no') ? '' : 'darkMode_' . FreshRSS_Context::userConf()->darkMode ?>"> + diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 3d0027f17..f8b687f74 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -41,26 +41,15 @@
  • - - - + + + + + + + + - - - - - - - - - - - - - - - -
  • @@ -210,20 +199,6 @@ - - token) { - $url_output['params']['user'] = Minz_User::name(); - $url_output['params']['token'] = FreshRSS_Context::userConf()->token; - } - if (FreshRSS_Context::userConf()->since_hours_posts_per_rss) { - $url_output['params']['hours'] = FreshRSS_Context::userConf()->since_hours_posts_per_rss; - } - ?> - - - diff --git a/app/layout/simple.phtml b/app/layout/simple.phtml index 065b69fb9..e460e283b 100644 --- a/app/layout/simple.phtml +++ b/app/layout/simple.phtml @@ -2,17 +2,27 @@ declare(strict_types=1); /** @var FreshRSS_View $this */ FreshRSS::preLayout(); + $class = ''; + if (_t('gen.dir') === 'rtl') { + echo ' dir="rtl"'; + $class = 'rtl '; + } + if (FreshRSS_Context::userConf()->darkMode !== 'no') { + $class .= 'darkMode_' . FreshRSS_Context::userConf()->darkMode; + } ?> - + - + + + @@ -20,9 +30,15 @@ + +allow_referrer) { ?> - + + rss_url != ''): ?> + + + @@ -30,7 +46,7 @@
    render(); ?> -- cgit v1.2.3