Commit Graph

326 Commits

Author SHA1 Message Date
Alexandre Alapetite
51ed59dcc6 jQuery 3.6.0 (#3501)
https://blog.jquery.com/2021/03/02/jquery-3-6-0-released/
2021-03-07 12:54:17 +01:00
Alexandre Alapetite
947e918f05 Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length

* Also check whitespace in CSS files

* Fix line length ext.php

* More syntax, string templates

* Fix exclude-pattern

* Test JS files as well
2021-02-28 12:26:24 +01:00
Alexis Degrugillier
5c18c64afb Change integration configuration page (#3372)
I've refactored the user query code to be able to use it also on the
integration configuration page. Now, items can be re-organized as in
the user query list.
2021-01-16 22:11:30 +01:00
Alexis Degrugillier
c5da4e56a6 Add a query configuration page (#3366)
* Add a query configuration page

Before, there was no way to modify a user query. Thus you need to
create a new one and delete the old one afterward.
Now, every user query can be modified if needed. They have their
own configuration page on which it can be modified or deleted.

* Change drag and drop action on queries

Before, the drag and drop action needed to be validated by submitting
the form to be persisted.
Now, it's done automatically after the query is dropped to its final
location.
2021-01-15 00:14:53 +01:00
Alexis Degrugillier
e3457f7d7b Add drag & drop marker on user query list (#3355)
Before, it was nearly impossible to know exactly where the dragged
item will land when dropping it.
Now, there is a visual marker to show the drop location.

An HR tag is inserted dynamically in the DOM. It's possible to style
it if needed.
2021-01-13 20:34:45 +01:00
Alexis Degrugillier
896f9d3363 Add user query manual sorting (#3346)
* Add user query manual sorting

Before, to change the user query order, you'll have to delete them
and recreate them. It was not really efficient.
Now, you can drag and drop them to ease reordering.

See #2216 and #2015

* Remove cancel action on user query configuration

Before, the cancel action was useless since it was not wired.
Now, there is no cancel action.

See #2015
2021-01-09 01:47:20 +01:00
Clemens Neubauer
ef458992c1 two new hooks (#3342)
* add two new hooks

I develop a new extension and i need 2 new hooks for it

* update EN documentation

* Correct typing errors

* Update app/views/helpers/javascript_vars.phtml

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-01-07 21:45:48 +01:00
Alexis Degrugillier
46c8f6e77b Add clipboard sharing (#3330)
When the discussion #3327 started, I thought that the clipboard share
is a good idea. It never occurred to me because I do not use a
smartphone.
It might need some polishing but it seems pretty usable as-is.

See #3327
2021-01-03 18:20:15 +01:00
Alexandre Alapetite
5ca961b8d5 Fix bugs in anomymous mode (#3305)
* Fix bugs in anomymous mode

Login bug (submit button not working) and refresh bug (JS null
exception, and then 403).

* Take advantage of existing variable
2020-12-31 00:13:29 +01:00
Alexandre Alapetite
48e0464e4b Prevent login before extra.js is loaded (#3275)
Disable submit button until extra.js with its crypto functions is
loaded.
2020-12-22 17:36:50 +01:00
Prashant Tholia
6f23999c7b 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 dcd23b9418.

* 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>
2020-11-02 12:03:16 +01:00
Alexandre Alapetite
a69a7531b6 Remember sidebar position (#3231)
#fix https://github.com/FreshRSS/FreshRSS/issues/3209
Extracted from https://github.com/FreshRSS/FreshRSS/pull/3185
2020-10-19 11:38:27 +02:00
Alexandre Alapetite
191cda42e6 Misc. minor
Whitespace...
2020-10-11 10:59:43 +02:00
Alexis Degrugillier
dc68783fc8 Add controls on media (#3036)
Now, there is a shortcut to play or pause media available from an
entry. If there is more than one media available, only the first
one will be targeted.

See #1952
2020-06-05 23:37:05 +02:00
Alexis Degrugillier
d4554fa087 Change add feed action (#3027)
* Docker Alpine 3.12 (#3025)

https://alpinelinux.org/posts/Alpine-3.12.0-released.html
With PHP 7.3.18 (from 7.3.17) (and Apache 2.4.43 unchanged).
No other significant change spotted

* Ensure feed attributes are used before load

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-06-05 10:09:31 +02:00
Alexandre Alapetite
0d74cb8a42 Fix JS show password in install (#2999)
The button for showing the password was not working in the install.
Updated JavaScript file to ES6 at the same time.
2020-05-25 19:03:42 +02:00
Alexandre Alapetite
3bef867a44 Better hide spinner (#2990)
Fix https://github.com/FreshRSS/FreshRSS/issues/2986#issuecomment-631396735
By CSS, and also by JS
https://framagit.org/nicofrand/xextension-threepanesview/-/issues/10
2020-05-21 12:17:21 +02:00
Alexandre Alapetite
bba9535626 jQuery 3.5.1 (#2982)
Minor version
https://blog.jquery.com/2020/05/04/jquery-3-5-1-released-fixing-a-regression/
2020-05-16 16:44:15 +02:00
Alexandre Alapetite
e9213e89f4 Fix CSS Edge glitch in archiving options (#2906)
With Edge, only setting `.hidden = true` does not make the element and
sub-elements properly visible.
Should not make any difference for other browser.
2020-04-18 11:50:35 +02:00
Alexandre Alapetite
f2e0f051aa Fix JS for statistics repartition select form (#2896)
* Fix JS for statistics repartition select form

Error was: `s.form is null in extra.js:166:7`
At the same time, disable the form and clears the value while waiting
for the next page to load, to better understand what is happening.

* Whitespace
2020-04-12 16:40:06 +02:00
Alexandre Alapetite
14fa3f2781 jQuery 3.5.0 (#2895)
https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
2020-04-12 11:37:50 +02:00
Alexandre Alapetite
0d235cbadd Swap shortcuts for mark all articles as read / mark previous articles as read (#2881)
* Swap shortcuts for mark all articles as read / mark previous articles as read

#fix https://github.com/FreshRSS/FreshRSS/issues/2865
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2843
* <kbd>⇧ Shift</kbd>+<kbd>R</kbd> to mark all articles as read;
* <kbd>Alt ⎇</kbd>+<kbd>r</kbd> to mark previous articles as read.

* i18n
2020-04-08 13:17:20 +02:00
Alexandre Alapetite
a7b72481e7 Shortcut mark previous articles as read (#2843)
* Shortcut mark previous articles as read

Address part of https://github.com/FreshRSS/FreshRSS/issues/2836
The shortcut [shift]+[r] now marks previous articles as read;
The previous action of marking all articles as read is now achieved by
[alt]+[r]
So this is a slight breaking change, but I like the logic of the
upward-facing [shift] arrow to hint at previous articles, while [alt] is
more like "all", at least to my eyes :-)

* Update app/i18n/nl/conf.php

Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>

* [⇧ Shift] / [Alt ⎇]

With standard Unicode signs

* <kbd> + CSS styling

* Missing themes

Tested with all themes

* Travis CSS

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2020-03-23 23:05:01 +01:00
Alexandre Alapetite
8fabed337a Reset scroll (#2842)
Address some of https://github.com/FreshRSS/FreshRSS/issues/2836
This patch resets the scrollbar to the top when a FreshRSS page is
initialised.
Makes sure that when a FreshRSS page is restored in a Web browser
session, we do not hit the problematic situation when the content is
refreshed but the scrollbar moved back to where it was, potentially
erroneously marking as read many as read, of landing on the wrong focus.
2020-03-23 22:29:26 +01:00
Julien-Pierre Avérous
d30ac40772 Enhance content path feature (#2778)
- Add a maintenance section to be able to clear cache and force reload a feed.
- Add an icon next to path field to show a pop-up with the result of the content path.

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
2020-02-13 18:22:35 +01:00
Alexis Degrugillier
1ce94136e0 Update navigation on empty feeds (#2687)
When using feed navigation, the previous behavior was to cycle through all
available feeds regardless of their content. To match the behaviour of the
first feed and last feed navigation shortcuts, the navigation now skips
empty feeds. Now it's consistent through out the application.
When using feed navigation with only empty feeds, the new behavior is to
cycle through all available feeds.

See #2385
2019-12-04 08:29:20 +01:00
Alexis Degrugillier
cc0db9af4f Feature/new archiving (#2335)
* Change archiving config page layout

I've changed some wording and moved actions into a
maintenance section.

* Update purge action

Now we have more control on the purge action. The configuration allows
us to choose what to keep and what to discard in a more precise way.
At the moment, the configuration applies for all feeds.

* Add purge configuration on feed level

Now the extend purge configuration is available on feed level.
It is stored as attributes and will be used in the purge action.

* Update purge action

Now the purge action uses the feed configuration if it exists and
defaults on user configuration if not.

* Add empty option in period list

* Fix configuration warnings

* Add archiving configuration on categories

See #2369

* Add user info back

* Add explanations in UI

* Fixes for SQLite + error + misc.

* Fix invalid feed reference

* Short array syntax

Only for new code, so far

* Fix prefix error

* Query performance, default values

Work in progress

* Fix default values and confirm before leaving

Form cancel and confirm changes before leaving were broken.
And start taking advantage of the short echo syntax `<?= ?>` as we have
moved to PHP 5.4+

* More work

* Tuning SQL

* Fix MariaDB + performance issue

* SQL performance

* Fix SQLite bug

* Fix some attributes JSON encoding bugs

Especially for SQLite export/import

* More uniform, fix bugs

More uniform between global, category, feed settings

* Drop special cases for old articles during refresh

Instead will use lastSeen date with the new archiving logic.
This was generating problems anyway
https://github.com/FreshRSS/FreshRSS/issues/2154

* Draft drop index keep_history

Not needed anymore

* MySQL typo

Now properly tested with MySQL, PostgreSQL, SQLite

* More work for legacy values

Important to avoid overriding user's preference and risking deleting
data erroneously

* Fix PHP 7.3 / 7.4 warnings

@aledeg "Trying to use values of type null, bool, int, float or resource
as an array (such as $null["key"]) will now generate a notice. "
https://php.net/migration74.incompatible

* Reintroduce min articles and take care of legacy parameters

* A few changes forgotten

* Draft of migration + DROP of feed.keep_history

* Fix several errors

And give up using const for SQL to allow multiple database types (and we
cannot redefine a const)

* Add keep_min to categories + factorise archiving logic

* Legacy fix

* Fix bug yield from

* Minor: Use JSON_UNESCAPED_SLASHE for attributes

And make more uniform

* Fix sign and missing variable

* Fine tune the logic
2019-10-23 00:52:15 +02:00
Alexandre Alapetite
21936c1373 Comply with LibreJS (#2576)
https://www.gnu.org/software/librejs/
https://addons.mozilla.org/firefox/addon/librejs/
Did not touch jquery.min.js because it is a third party script, which is regularly updated, and the add-on does not seem to block it enough to break our statitics page, which remains usable.
2019-10-20 22:10:24 +02:00
Alexandre Alapetite
ec5f7ad554 Workaround for Firefox favicon glitch (#2543)
Observed in Firefox 69: the favicon is sometimes refreshed with an old
favicon that does not have the number of unread items on it. Seems to
depend on load speed.
2019-10-01 18:12:48 +02:00
rocka
1f3672fcc1 Optimize dynamic favicon for HiDPI screens (#2539)
This PR leveraging `window.devicePixelRatio` to generate high resolution favicons for HiDPI screens.
2019-09-28 12:10:51 +02:00
Alexandre Alapetite
125a83efc9 IE11 / Edge keyboard compatibility (#2507)
https://github.com/FreshRSS/FreshRSS/pull/2506#issuecomment-523544684
2019-08-22 20:13:40 +02:00
ArthurHoaro
3f8804f54f Prevent window opener vulnerability with space shortcut (#2506)
* Prevent window opener vulnerability with space shortcut

This change fixes a vulnerability introduced by `window.open()` on untrusted sources. It reproduces the effect of `rel="noreferrer"` with JS.

Cross browser solution from: https://stackoverflow.com/a/40593743

## Reproduction

> tested with Firefox 68

  1. Add this RSS feed
  2. Open the 2nd link "À propos de la faille de sécurité liée à target="_blank" **using the space key shortcut**.
  3. Click on the first of three links "http://bookmarks.ecyseo.net"

Current behaviour: the FreshRSS tab changes.
Expected behaviour: no effect on FreshRSS

* Test for popup blockers
2019-08-21 21:14:22 +02:00
Alexandre Alapetite
879312dbc2 jQuery 3.4.1 (#2424)
Only used for statistics graphs
2019-06-22 00:08:52 +02:00
Alexis Degrugillier
d5ea3e96ef Add theme to print page
Before, the printed page didn't have any usable CSS.
Now, it uses the css files available in the application. It means that
custom CSS can be add to target printed page.

See #2149
2019-04-16 18:50:32 +02:00
Alexandre Alapetite
aef3f8d71b Alow mix of auto read options (#2354)
Fix
https://github.com/FreshRSS/FreshRSS/pull/2349#issuecomment-480540126
2019-04-07 00:29:37 +02:00
Alexandre Alapetite
1b7cf6b035 Fix menu warning (#2353)
confirm is only for labels, not for feeds
2019-04-06 17:05:53 +02:00
Alexandre Alapetite
43e3a2d69d Fix autoremove again (#2352)
Fix https://github.com/FreshRSS/FreshRSS/pull/2349
2019-04-06 16:45:21 +02:00
Alexandre Alapetite
0a067dbcd4 Fix hide articles + batch option (#2349)
https://github.com/FreshRSS/FreshRSS/issues/2332
https://github.com/FreshRSS/FreshRSS/issues/2345
Re-introduces the instant-remove article.
Batch mark-as-read only used for fast actions like scroll and keyboard
shortcut for next/previous articles.
2019-04-06 15:51:39 +02:00
Alexandre Alapetite
09a5b4493d Better handling of bad request and fast unload (#2346)
* Better handling of bad request and fast unload

Warnings for bad requests, confirmation before leaving a page with
pending mark-as-read requests (not the others for now)

* Fix callbacks
2019-04-06 09:24:22 +02:00
Alexandre Alapetite
e1bb23ee44 Fix scroll functions in Edge (#2337)
Use more standard / robust document.scrollingElement
2019-04-04 00:02:23 +02:00
Alexandre Alapetite
2efab9893c Fix shortcut problem when showing articles unfolded (#2336)
Fix https://github.com/FreshRSS/FreshRSS/issues/2328
2019-04-03 23:10:33 +02:00
Alexandre Alapetite
452419bf83 Fix auto_remove_article (#2334)
* Fix auto_remove_article

https://github.com/FreshRSS/FreshRSS/issues/2323

* Second attempt

* Third attempt
2019-04-03 23:08:46 +02:00
Alexandre Alapetite
8599dc29a1 Fix control click (#2330)
https://github.com/FreshRSS/FreshRSS/issues/2310
2019-04-02 22:46:56 +02:00
Frans de Jonge
c2a339f2f8 [CI] Lint JS scripts with jshint (#2315) 2019-04-01 23:47:36 +02:00
Alexandre Alapetite
e5c8d52aa1 Fix ASC load more (#2318)
https://github.com/FreshRSS/FreshRSS/issues/2314
2019-04-01 23:43:20 +02:00
Alexandre Alapetite
09362f15ee Minor code simplification
https://github.com/FreshRSS/FreshRSS/pull/2300
2019-03-27 00:08:59 +01:00
Alexandre Alapetite
580123fdb0 Wait for mark-as-read queue before click (#2300) 2019-03-25 08:46:31 +01:00
Alexandre Alapetite
ebd8c31c02 Rework CSRF interaction with sessions (#2290)
* Rework CSRF interaction with sessions

Fix https://github.com/FreshRSS/FreshRSS/issues/2288
Improve security in some edge cases
Maybe relevant for
https://github.com/FreshRSS/FreshRSS/issues/2125#issuecomment-474992671

* Forgotten mime type
2019-03-22 19:05:38 +01:00
Alexandre Alapetite
54a86990e6 Improved auto load more articles
Fixed bug + ealier trigger of load more (half of the window height
instead of 0)
2019-03-09 19:15:46 +01:00
Alexandre Alapetite
b869c2944a JavaScript fixes + new navigation loop behaviour (#2255)
* Fixed user configuration 404
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466561555
* Fixed "SPACE" shortcut bug
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466626412
* Use next feed / previous feed when reaching last / first article
instead of looping
* Jump to next / previous category when reaching last / first feed
instead of looping
2019-02-23 14:39:20 +01:00