Commit Graph

328 Commits

Author SHA1 Message Date
Marien Fressinaud
84f9311fd5 fix: Fix "validate email"-related issues (#2512)
* fix: Make sure $disable_aside is initialized

There was a warning for an uninitialized variable, hidden in production
but visible in development mode.

* fix: Allow to delete account when email isn't validated
2019-08-29 18:08:43 +02:00
Marien Fressinaud
75632e70f0 Provide email address verification feature (#2481)
* Add an email field to the profile page

I reuse the `mail_login` from the configuration. I'm not sure if it's
useful today (I would say it was used when Persona login was available).

A good improvement would be to rename `mail_login` into `email` so it
would be more intuitive to use.

* Add boolean to the conf to force email validation

This commit only adds a configuration item.

* Add email during registration if email must be validated

* Set email token to validate when email changes

* Block access to FreshRSS if email is not validated

* Send email when address is changed

* Allow to resend the validation email

* Allow the user to change its email while blocked

* Document the email validation feature

* fixup! Allow the user to change its email while blocked

* tec: Autoload PHPMailer lib

* Validate email address format

* Add feedback on validation email resend action

* Allow to logout when user is blocked

* fix: Change default email "from"

* Reorganize i18n keys

* Complete all the locales with default english

* Hide sidebar (profile page) if email is not validated

* Check email requirements on registration

* Allow admin to specify email when creating users

* Don't check email format if value is empty

* Remove trailing comma in userController

Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>

* Set PHPMailer validator to html5 before sending email

* fixup! Remove trailing comma in userController
2019-08-29 12:02:05 +02:00
Marien Fressinaud
7fd88adeb0 Add hooks to ExtensionManager (#2482)
Hooks allow to:

- add items in menus
- perform new actions at the end of FreshRSS initialization
2019-08-14 22:19:24 +02:00
Alexandre Alapetite
ad19b6bf2e Fix wrong mark-as-read maxId argument (#2431)
Fix https://github.com/FreshRSS/FreshRSS/issues/2429
2019-06-29 20:47:38 +02:00
Alexandre Alapetite
2374374ba9 Less jQuery (#2234)
* Less jQuery

Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2199

* Even less jQuery + global view unread title fix

* Even less jQuery

* Yet even less jQuery

* Even less jQuery

* Reduce some events

* Even less jQuery

* jQuery gone from main view

+Fixed English i18n

* Fix feed folded view

* Remove Firefox 64 workaround

Remove workaround for Gecko bug 1514498 in Firefox 64, fixed in Firefox
65

* Split to extra.js

Avoid loading unneeded JavaScript code for the main view.
+ several adjustements

* Improve CSS transition fold category

* Rewrite shortcuts

Remove library. Much faster, shorter, one listener instead of many.
Control of the shortcut context.
Fix https://github.com/FreshRSS/FreshRSS/issues/2215

* Remove debug

* Minor syntax

* Filter out unwanted shortcut modifiers

* Menu overflow fix

* Typo

* Fix unfolding in mobile view

* Remove jQuery from category.js

* Remove jQuery from Global view
2019-02-13 15:06:28 +01:00
Alexandre Alapetite
48c901bc5c Accessibility: logo alt (#2219)
https://github.com/FreshRSS/FreshRSS/issues/2209
2019-01-17 21:32:44 +01:00
Patrick Crandol
983aa587ee Add aside_feed to reader view (#2180)
* Add Nav menu to reader mode

At this point, it appears to be non-functional in reader mode.

* Add aside_feed toggle to reader view

* make init_column_categories work in reader view

* Make sidebar links redirect to proper view

* CSS to support toggleable sidebar in reader view

* remove unneeded !important
2018-12-15 10:56:38 +01:00
Patrick Crandol
478d3e6611 Decouple scrolling of feeds and articles (#2117)
* Remove Sticky Kit

Remove sticky-kit, as functionality is unsuitable for separate scrolling.

* Remove sticky-kit load in main.js

Further removing the sticky-kit kruft

* Finish removal of references to Sticky-kit

* CSS Changes to template for Independent Scrolling

* Addition of JS and supporting CSS and html

* More CSS fixes to establish expected behavior

Should be able to scroll navbar without it being in sticky mode now.

* Fix typo in main.js

sortcut.js -> shortcut.js

* Fix unexpected tree scrolling behavior

* Change name of generic JS function

* Improve sticky-aside

* CSS changes in themes to accommodate  independent Scroll

In themes where .aside's width is not the standard 300px, .tree's width must be specified to be equal to .aside

* Remove Sticky-Kit from README files

* Updates to Sticky-Aside

* Update Template to fix screwup

* Make Recalculating height actually work

* Let sidebar fill height if nav buttons aren't visible

* Make accommodating for nav buttons actually work

* update Swage theme for Independent Scroll feature

* Integrate sticky_aside into main.js

* Add Simple Scrollbar

* Patch scrollbar color for themes with dark colored asides

* Increase Visibility of scrollbar on Dark Themes

* Improve async loading, events, and performance

* CSS typo

* Fix double scrollbar on mobile

* Fix regression causing sticky to not be removed

* No $ for non-jQuery variables

* Fix strange condition + option for nice scrollbar

* Initial attempt to use css sticky

* Add stickyfill

* make the correct element sticky

* re-add incorrectly removed sidebar code

* Continue fixing mistaken deletions

* decrease frequency of recalc

* use minified version of simple-scrollbar.

* Load stickyfill instead of injecting

* put recalc back where it belongs

* re-remove script injector

* remove padding

bottom padding was causing the last item in the feed to be hidden under the nav buttons

* Manual merge of css_scrollbar

Add auto-detection of -webkit-scrollbar-thumb, otherwise fall back to
simple-scrollbar.js

* Fix Regression

Sticky recalc is still needed when using css scrollbars

* Replace method of closing dropdowns

Changed from an overlay href to a javascript solution, for better compatibility

* Remove Treepadding

Treepadding was causing dropdown menus at the bottom of the tree to be obscured.

* Undo unnecessary move of dropdown-target

* Move Dropdown Handler to a sensibleish place

* Fix light Scrollbar color not picking up on Firefox

* Minor syntax

* Minor Clarification of CSS/ patch BlueLagoon

* Change logic for native WebKit scrollbar detection

Fix
https://github.com/FreshRSS/FreshRSS/pull/2117#issuecomment-444251419
Tested with Firefox 63, Firefox 65, Chrome 71, IE11, Edge 42

* Fixes for other views

E.g. reader view

* Cleaner way of generating hash for dropdowns

* Make dropdown-toggle an actual toggle

* Prepare for CSS Scrollbars Module Level 1

* Fix regression causing my labels dropdown not to appear

* remove unneeded dropdown-close css rule

* Re-apply some lost changes

3c509989e8

* Add standard scrollbar compatibility

E.g. Firefox 64+

* Make All dropdowns click-to-close

* Remove BlueLagoon template

* Try to fix Firefox

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r239539984

* Add CSS rules necessary for consistent function of scrollbar in Firefox

* Use inheritance to determine width

* Use overlay scrollbar where possible

* Test Reduced Listener

* Fix Firefox 62

And show subtle scrollbar even when not hovering

* Add margin at bottom

To allow opening the menus
https://github.com/FreshRSS/FreshRSS/pull/2117#issuecomment-444571218

* Minor - tab correction

* Spaces -> tabs

* Remove unneeded inheritance

* Fix indenting

* Revert bad merge

* Messy WIP to make dropdowns work

* Style Cleanup

* Break it down

* Lets try a move-it move-it

* Update p/scripts/main.js

Co-Authored-By: pattems <patrick@crandol.com>

* Update p/themes/BlueLagoon/BlueLagoon.css

Co-Authored-By: pattems <patrick@crandol.com>

*  separate ALL THE THINGS

* erroneous commas

* and to or

* removing double condition that doesn't do what I want

* More breaking down

* fix var

* Fix variable name again

* Remove magic number

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240052598

* Suuuuper inelegant solution for dropdowns

* lets try that again

* Inelegant Fix For Dropdowns

Now with 100% more working dropdowns

* Make sidebar dropdowns work correctly?

* Fix reversion

* Make JS scrollbar always visible

* Remove unneeded CSS

Added early in this pull request, didn't get pulled out when it was obsolete

* Fix CSS removal I missed

* CSS comment update/consistency for dark themes

* Clean Up Duplicate code

* Make dropdowns properly hide

Downside: Can no longer click on header/nav buttons to close

* Strip unneeded if statement

* jshint -W018

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240392851

* Half-reversion to old dropdown

* make overlay href scale to sidebar width

* remove init of nonexistent method

* remove trailing tabs

* move #close href where it belongs in index.phtml

* Revert all changes to index.phtml

* remove whitespace

accidentally added in last commit

* Move var's in init_column categories

* Finish putting old style dropdowns back

* Make CSS changes to use support statements

* Cleanup Whitespace

* re-add missing class

* spaces -> tabs in main.js

* tabs -> spaces css

* Minor whitespace

* Cleanup per @Alkarex

* Second attempt to add bottom margin

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240820901

* Fix error in IE11

* Simple-scrollbar color match for dark themes
2018-12-12 12:04:31 +01:00
Alexandre Alapetite
55d7115926 Add username in configuration menu and exports (#2133)
* Add username in configuration menu

https://github.com/FreshRSS/FreshRSS/pull/2099#issuecomment-435944803

* Add username to exported files
2018-11-18 11:32:13 +01:00
Patrick Crandol
b790b160c4 Add ID's to buttons in configure-feed
Add ID's to be able to individually target buttons inside the configure feeds (Subscriptions Management & Import/Export) buttons.
2018-10-28 20:28:30 -04:00
Alexandre Alapetite
5b030dcc6f Ensure fast flush of HTTP headers and HTML head (#2045)
* Ensure fast flush of HTTP headers and HTML head

The fast flush optimisation done in
https://github.com/FreshRSS/FreshRSS/pull/1133 does not seem to work
anymore (need to check if it is related to a PHP version).
Work-around when PHP flush() is not working
Can be tested by adding a `sleep(5);` after:

ee902ee7c4/app/layout/layout.phtml (L27)
Follow-up of the performance checks of
https://github.com/FreshRSS/FreshRSS/pull/2040

* output_buffering in .user.ini for PHP CGI / FPM

* Reuse .user.ini for Docker PHP config

* Longer flush

Flush a bit later, to be compatible with the default value of 4096 for
PHP output_buffering, and thus avoid the need of tuning the value.
2018-10-14 14:37:50 +02:00
Alexandre Alapetite
1cc891be35 Remove some preload / prefetch (#2040)
* Remove next prefetch

This approach was only efficient in the specific case when no change was
made (no mark-as-read, favourites, tags), and useless in the other
situations.
Removed to reduce server load.

* Remove next prefetch from JavaScript too

* Remove some preload / prefetch

While useful for the first request, those preload / prefetch hints are
slightly negative for the following requets, especially server-side,
e.g. generating one log entry in Apache, and a bit more network traffic.

* Revert mistake

* Remove comment

https://github.com/FreshRSS/FreshRSS/pull/2040#discussion_r223214915
2018-10-14 00:35:43 +02:00
Alexandre Alapetite
8ee8a573f1 Custom labels (#2027)
* First draft of custom tags

https://github.com/FreshRSS/FreshRSS/issues/928
https://github.com/FreshRSS/FreshRSS/issues/1367

* SMALLINT to BIGINT for id_entry

And uppercase SQL types

* Fix layout for unreads

* Start UI menu

* Change menu order

* Clean database helpers

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r217971535

* Travis rules do not understand PostgreSQL constants

Grrr

* Tag controller + UI

* Add column attributes to tags

* Use only favicon for now, for label

* Fix styling for different themes

* Constant for maximum InnoDB index length in Unicode

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r219052200
(I would have personnally prefered keeping the readability of a real
value instead of a constant, in this case of many SQL fields)

* Use FreshRSS_Factory::createCategoryDao

* Add view of all articles containing any tag

* Fix search in tags

* Mark as read tags

* Partial auto-update unread tags

* More auto update tag unreads

* Add tag deletion

* Do not purge tagged articles

* Minor comment

* Fix SQLite and UI bug

* Google Reader API support for user tags

Add SQL check that tag names must be distinct from category names

* whitespace

* Add missing API for EasyRSS

* Compatibility SQLite

Problematic parentheses

* Add SQL DISTINCT for cases with multiple tags

* Fix for PostgreSQL

PostgreSQL needs some additional type hint to avoid "could not determine
data type of parameter $1"

http://www.postgresql-archive.org/Could-not-determine-data-type-of-parameter-1-tp2171092p2171094.html
2018-09-29 20:47:17 +02:00
Alexandre Alapetite
d3f5bd840d Add mark-as-unread (#1995)
* Add mark-as-unread

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

* Change sentence

https://github.com/FreshRSS/FreshRSS/pull/1995#discussion_r214515954

* Enable mark-as-unread only when unread articles are shown

In order to prevent erroneous marking-as-unread.
We might find a better logic later.

* Disable instead of hide mark-as-unread option

To make it easier to discover
2018-09-03 20:48:04 +02:00
Alexandre Alapetite
a66b995be7 Explicit quotes decoding (#1947)
* Explicit quotes decoding

* Explicit htmlspecialchars_decode and htmlspecialchars
2018-06-22 16:07:48 +02:00
Alexandre Alapetite
c4903bc8db Fix double encoding for mark as read a search (#1945)
* Fix double encoding for mark as read a search

Fix https://github.com/FreshRSS/FreshRSS/issues/1944

* Fix more search encoding issues
2018-06-20 20:49:48 +02:00
Kevin Papst
6b9be92263 [UI] fix active check in subscription menu (#1858) 2018-04-06 20:26:08 +02:00
Alexis Degrugillier
951eb708e6 Fix shortcuts for view switching
I've introduced shortcuts to switch between view in #1755. They have been broken by #1714.
Then I've made an ugly fix in #1758.

This change revert all changes to have something better.

See #1757
2018-01-26 08:17:32 +01:00
Kevin Papst
047fa17aeb fixed css classes for reading mode buttons #1714 2018-01-24 19:37:24 +01:00
Alexandre Alapetite
a756878219 Merge pull request #1714 from kevinpapst/hook-readingmodes
Added extension hook for reading modes
2018-01-01 20:49:18 +01:00
Alexandre Alapetite
97d4250bd3 Minor syntax 2018-01-01 20:48:33 +01:00
Alexis Degrugillier
8c2113f9e6 Add mute strategy configuration (#1750) 2018-01-01 20:34:06 +01:00
Kevin Papst
1b7cc49d22 refactored ReadingModes to Model 2017-12-10 15:04:01 +01:00
Kevin Papst
84c78098d2 added new extension hook
using hook for reading modes in navigation
2017-12-10 11:31:19 +01:00
Alexis Degrugillier
ac60e35f6a Improve translation tools
I was not happy with the previous version. I refactored everything to make it reusable.
It allows me do do more verifications and to build a tool to handle the files themselves.
2017-10-10 06:46:25 +02:00
Alexis Degrugillier
a52dc33353 Add a subscription tools page
See #1354

It's missing translations. Only English and French are available.
Contributions wanted.
2017-06-04 09:58:11 +02:00
Alexandre Alapetite
0ce43be9de Multi-user token
https://github.com/FreshRSS/FreshRSS/issues/1390
https://github.com/FreshRSS/FreshRSS/issues/366
2017-04-09 00:25:04 +02:00
Dennis Schwerdel
59d6f3593c Add config option to disable and hide self-update 2017-02-23 21:22:56 +01:00
Alexandre Alapetite
00f446d155 Disable "mark all as read" before confirmation script is loaded
https://github.com/FreshRSS/FreshRSS/issues/1342
2016-10-29 13:11:37 +02:00
Alexandre Alapetite
2a5aa34ad2 Better control of number of entries per page or RSS feed
https://github.com/FreshRSS/FreshRSS/issues/1249
* Since X hours: `https://freshrss.example/i/?a=rss&hours=3`
* Explicit number: `https://freshrss.example/i/?a=rss&nb=10`
* Limited by `min_posts_per_rss` and `max_posts_per_rss` in user config
2016-09-11 15:06:33 +02:00
Alexandre Alapetite
8a776f1461 Prevent a target _blank attacks with window.opener
https://mathiasbynens.github.io/rel-noopener/
noopener is implied by noreferrer
https://html.spec.whatwg.org/multipage/semantics.html#link-type-noreferrer
The API for window.open() does not seem stable yet
https://bugzilla.mozilla.org/show_bug.cgi?id=1267339
2016-09-07 14:35:51 +02:00
Alexandre Alapetite
32c734ef62 SQL mark search as read
https://github.com/FreshRSS/FreshRSS/issues/608
2016-08-18 00:00:08 +02:00
Alexandre Alapetite
a0230ad70b Minor HTML fixes
Fix aria bug. Move some content before the flush. XHTML syntax.
2016-08-15 21:57:37 +02:00
Alexandre Alapetite
e6fd34bdda CSRF token, update HTTP Referrer policy to same-origin
https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer
https://github.com/FreshRSS/FreshRSS/issues/570
https://github.com/FreshRSS/FreshRSS/issues/955
https://github.com/FreshRSS/FreshRSS/issues/1198
https://github.com/FreshRSS/FreshRSS/issues/565
https://github.com/FreshRSS/FreshRSS/issues/554
2016-08-13 17:49:31 +02:00
Alexandre Alapetite
a6071a0d98 PHP 5.3 compatibility for callback
https://github.com/FreshRSS/FreshRSS/issues/1208
2016-08-12 22:56:02 +02:00
Alexandre Alapetite
dccc2a8435 meta referrer origin
https://github.com/FreshRSS/FreshRSS/issues/955
Tested in Firefox 48, Chrome 53, Edge 25
2016-08-07 13:52:57 +02:00
Alexandre Alapetite
93f7f84987 Restaure compatibility with Internet Explorer 11 / Edge
https://github.com/FreshRSS/FreshRSS/issues/772
2016-07-31 18:25:02 +02:00
Alexandre Alapetite
b042d3a772 HTTP2 optimization
Fast flush HTTP headers, push promise CSS.
Requires PHP 5.3+ due to anonymous function.
Do not load syles, scripts, and notifications for Ajax requests.
https://github.com/FreshRSS/FreshRSS/issues/1089
2016-04-23 19:10:32 +02:00
Alexandre Alapetite
cb913a3a76 CSP for statistics and forms
https://github.com/FreshRSS/FreshRSS/issues/1075
2016-02-21 19:15:23 +01:00
Alexandre Alapetite
b486414988 CSP for bookmarklet (subscription)
https://github.com/FreshRSS/FreshRSS/issues/1075
2016-02-21 18:06:32 +01:00
Alexandre Alapetite
e3dc7d46e1 CSP: Use inline JSON instead of one-time cookie
Simpler, lighter
https://github.com/FreshRSS/FreshRSS/issues/1075
2016-02-21 14:23:24 +01:00
Alexandre Alapetite
e4a459a6ed CSP no inline javascript draft
https://github.com/FreshRSS/FreshRSS/issues/1075
2016-02-16 23:53:39 +01:00
Alexandre Alapetite
362dbad0b8 Several position problems, in particular in the global view
Multiple small bugs in global and reader views.
Related to these old issues:
https://github.com/FreshRSS/FreshRSS/issues/634
https://github.com/FreshRSS/FreshRSS/issues/275
2016-01-24 13:18:48 +01:00
Alexandre Alapetite
0a1b628265 ENT_COMPAT
https://github.com/FreshRSS/FreshRSS/pull
https://github.com/FreshRSS/FreshRSS/issues/938
2015-10-27 22:11:19 +01:00
Alexandre Alapetite
02a3cb4652 Config allow robots
https://github.com/FreshRSS/FreshRSS/issues/938
2015-10-25 00:01:13 +02:00
Alexis Degrugillier
84824f8599 Add a visual alert on categories
When a category has one or more feeds with errors, a visual warning is displayed before the name of the category.
2015-09-12 18:58:08 -04:00
Alexis Degrugillier
269c6b88c4 Add a system configuration page
It allows to modify system configuration from the interface. At the moment, only limits are modifiable. The user limit was removed from the user page and added here along with categories and feeds limits.
2015-08-22 09:33:58 -04:00
Alexandre Alapetite
963dd6d260 ! encoding problem 2
964a768bc3 (commitcomment-9385695)
2015-01-22 08:31:54 +01:00
Alexandre Alapetite
dfaf1c451f Revert "! encoding problem"
This reverts commit 964a768bc3.
2015-01-22 08:29:58 +01:00
Alexandre Alapetite
964a768bc3 ! encoding problem
211569ef85 (commitcomment-9384719)
2015-01-21 22:37:17 +01:00