1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00
Commit graph

823 commits

Author SHA1 Message Date
jvoisin
68984da332 perf(static): minimize the SVG
Since tdewolff/minify supports SVG minimization, let's make use of it. As we
need to keep the license in the SVG because we're nice netizens, we can at
least use SPDX identifiers instead of using it verbatim.

This does save a couple of kB.
2025-08-09 15:38:43 -07:00
jvoisin
485baf9654 refactor(misc): fix a handful of TODO 2025-08-09 15:22:02 -07:00
Julien Voisin
06cbf1b3b3
fix(icon): update incorrect log messages 2025-08-09 15:20:33 -07:00
Frédéric Guillot
b20a8c97b0 fix(ui): invert toast notification icons 2025-08-09 14:23:20 -07:00
Frédéric Guillot
e0ca92fca4 fix(storage): revert DISTINCT in FetchJobs query 2025-08-08 16:53:52 -07:00
Frédéric Guillot
598d4d4f51 feat(storage): improve BatchBuilder logging 2025-08-08 16:34:36 -07:00
Frédéric Guillot
a2229198ae feat(api): log request URI in authentication handlers 2025-08-08 14:27:23 -07:00
Frédéric Guillot
34499b887b feat: add POLLING_LIMIT_PER_HOST to limit concurrent requests per host
Each batch of feeds sent to the worker pool is now guaranteed to contain unique feed URLs.

When `POLLING_LIMIT_PER_HOST` is set, an additional limit is applied to the number of concurrent requests per hostname, helping to prevent overloading a single server.

Note: Additional requests may still be made during feed refresh. For example, to fetch feed icons or when the web scraper is enabled for a particular feed.
2025-08-08 12:33:46 -07:00
Tim Douglas
a4f672b589 fix: URL detection incorrectly capturing newlines in media descriptions 2025-08-08 10:42:09 -07:00
Julien Voisin
98da7b3f22
feat(template): provide a link for the Apache 2.0 license in the about page
- Provide a link for the Apache 2.0 license
- Factorise the checks for IsAdmin
- Fix some indentation issues
2025-08-08 10:31:21 -07:00
jvoisin
b4c82a4c53 perf(static): minimize images 2025-08-08 10:16:32 -07:00
Frédéric Guillot
4d7c601f6d feat(ui): add PWA app shortcuts
References:

- https://web.dev/articles/app-shortcuts
- https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/shortcuts
2025-08-07 20:47:08 -07:00
Frédéric Guillot
f7e672452b feat(js): force page reload to prevent stale data from bfcache
The unread page may show outdated entries when navigating back from an article, due to Chrome's back/forward cache (bfcache) restoring the page from memory.

Reference: https://web.dev/articles/bfcache
2025-08-07 19:35:16 -07:00
Frédéric Guillot
6532435db9 fix(css): align icon labels vertically in entry actions 2025-08-07 17:50:17 -07:00
jvoisin
14cd5e9c0d refactor(template): reduce the amount of code in common templates
There is no need to have templates used only used in a single file be part of
every single other ones. This should reduce a bit the resident memory
consumption of miniflux.
2025-08-07 17:36:41 -07:00
Julien Voisin
566670cc06
refactor: unexport symbols 2025-08-07 17:27:04 -07:00
Frédéric Guillot
80f48c88c7 refactor: replace interface{} with any 2025-08-05 20:26:07 -07:00
Frédéric Guillot
045f2f1747 chore(view): remove unused webauthn_js_checksum key 2025-08-05 20:20:33 -07:00
Julien Voisin
2565ff930c
refactor(template): make use of template.ParseFS 2025-08-05 20:07:49 -07:00
Julien Voisin
b3fce752d2
refactor: replace Sprintf with string concatenation
There is no need to have go parse the whole format string then introspect the
arguments when we an simply use string concatenation.
2025-08-05 19:47:26 -07:00
Julien Voisin
798bc4cd2d
refactor(static): use a simple struct instead of two slices to store assets data and checksums
- Use a simple struct instead of two slices to store the data and the checksums
  of resources
- Remove a superfluous call to Sprintf
- Factorise presence check and data retrieval in some maps
- Size the maps when possible
2025-08-05 19:35:27 -07:00
Julien Voisin
b1cbaae71c
refactor(storage): simplify feed.go by using min(), inline errors, and use idiomatic conditions
- Use `min` instead of doing the comparison by hand.
- Inline error handling where it makes sense
- Invert a condition to make it more idiomatic
2025-08-05 19:25:50 -07:00
Julien Voisin
924293ee5c
perf(storage): avoid heavy-weight SQL when marking feed as read
There is no need to perform a heavy-weight SQL query gathering all the
information available on a feed when we're only interested in its last check
timestamp.
2025-08-05 18:01:58 -07:00
Julien Voisin
826977bc8c
perf(api): speed up markFeedAsRead by avoiding a JOIN operation 2025-08-05 17:55:15 -07:00
Julien Voisin
ed0e4a667d
refactor(template): reindent and merge tags in feed_list.html
- Fix some indentation
- Factorize/merge some <span>
- Remove superfluous spaces
- Reindent some nested tags
2025-08-05 17:50:09 -07:00
jvoisin
5affd78f4f refactor(reader): move the fetcher outside of a loop
There is no need to rebuilt the fetcher for every item, creating it once is
enough.
2025-08-05 17:39:23 -07:00
Frédéric Guillot
d3ad460c9d Revert "feat(cookie): use SameSiteStrictMode when not using OAuth2/OIDC"
This reverts commit 135ce1d546.

People using Miniflux as PWA on Android are constantly being logged out.
2025-08-05 17:32:20 -07:00
Frédéric Guillot
0f3c04a98a test(rewrite): fix flaky test case by sorting query string keys 2025-08-05 17:31:43 -07:00
gudvinr
e8e3a600b4
refactor(googlereader): remove intermediate variable 2025-08-03 13:21:40 -07:00
Julien Voisin
a6ce5c92dc
perf(storage): minor optimization for FetchJobs
- Replace a call to fmt.Sprintf with a concatenation
- Explicit declaration of return values in FetchJobs
- Initialize the size of FetchJobs return value to b.limit: when b.limit is
  used, which is most of the time, this avoid resizing the slice, and when it
  isn't, the size of the map is set to 0, which is equivalent to the previous
  situation anyway.
- Move a call to `request.UserID(r)` to a lower scope.
2025-08-03 13:19:14 -07:00
gudvinr
76ef8f3579
refactor(googlereader): replace Sprintf("%d") with FormatInt
see https://medium.com/swlh/bad-go-frivolous-sprintf-2ad28fedf1a0
2025-08-03 13:15:49 -07:00
Julien Voisin
a43d150a27
refactor(parser): centralize seek logic and provide a hint for the compiler to eliminate a useless bound check
- Move the seeking inside of DetectFeedFormat instead of having it everywhere
  in ParseFeed
- Provide a hint for the compiler to eliminate a useless bound check in
  DetectJSONFormat, otherwise it'll check that buffer[i] is valid on every
  iteration of the loop. This shouldn't make a big difference, but oh well.
2025-08-03 12:53:10 -07:00
Frédéric Guillot
3bb965913d refactor(js): create utility functions to manage buttons state 2025-08-02 21:37:16 -07:00
Frédéric Guillot
b505a63f3b refactor(js): rewrite toast notification implementation 2025-08-02 21:37:16 -07:00
Frédéric Guillot
e9d9256ae2 refactor(js): rename functions to include action suffix 2025-08-02 18:44:12 -07:00
Frédéric Guillot
391792a424 refactor(js): combine handleBookmark and toggleBookmark functions 2025-08-02 18:44:12 -07:00
Frédéric Guillot
d2cfca589b refactor(js): combine handleSaveEntry() and saveEntry() functions 2025-08-02 18:44:12 -07:00
Frédéric Guillot
f2e34cf07f refactor(js): split openOriginalLink() into smaller functions 2025-08-02 18:44:12 -07:00
Frédéric Guillot
5c3be3e74f refactor(js): combine handleShare() and triggerWebShare() functions 2025-08-02 18:44:12 -07:00
jvoisin
546fbcff8f perf(storage): pair all SELECT true with LIMIT 1
Apparently, postgresql isn't smart enough to realize that once a true value
value is found as part of a `SELECT true`, there is no need to scan the rest of
the table, so we have to make this explicit. We could also have used the
`SELECT EXISTS(…)` construct, but it's more verbose and I don't like it.
2025-08-02 16:13:55 -07:00
Frédéric Guillot
2e28bf78bd refactor(js): improve item navigation logic in goToListItem function 2025-08-02 16:12:53 -07:00
Frédéric Guillot
52c1386450 refactor(js): enable touch handlers only on touch devices and fix various issues in WebAuthnHandler 2025-08-02 15:39:01 -07:00
Frédéric Guillot
4910f1f0f4 refactor(js): remove RequestBuilder 2025-08-02 15:14:35 -07:00
Frédéric Guillot
bbe3c2ea71 refactor(js): simplify some functions using modern JavaScript 2025-08-02 14:06:18 -07:00
Frédéric Guillot
b116da85a9 refactor(js): remove bootstrap.js 2025-08-02 13:41:40 -07:00
Frédéric Guillot
07246e2b59 refactor(js): improve menu handlers 2025-08-02 13:09:57 -07:00
Frédéric Guillot
62410659d5 refactor(js): code cleanup and add jshint comments 2025-08-02 12:38:29 -07:00
Frédéric Guillot
3e1a7e411c feat(js): register the service worker as JavaScript module 2025-08-02 11:26:43 -07:00
Frédéric Guillot
bfbc1c88c3 feat(js): load app.js using JavaScript module
- The JS bundle has its own isolated scope
- There is no need to use IIFEs anymore (Immediately Invoked Function Expressions)
- Modules are executed after the HTML document is fully parsed, similar to `defer` attribute
- There is no need to use `DOMContentLoaded` anymore
- Module scripts inherently run in strict mode (no need to define `use strict` anymore)
2025-08-02 11:07:27 -07:00
Frédéric Guillot
50197c2be3 refactor(js): reorder functions and add comments 2025-08-01 21:56:25 -07:00