Commit graph

169 commits

Author SHA1 Message Date
141f9ee32d fix: show human-readable login errors instead of raw HTML
When the server returns an HTML response (wrong URL, redirect to a
login page), the error dialog previously showed the full HTML body.
Now detect HTML responses and show a short actionable message:
- 404 with HTML: 'API endpoint not found. Check your server URL.'
- 401/403 with HTML: 'Wrong username or password.'
- 200 with HTML (no Auth= token): explain the endpoint is not FreshRSS
- Non-HTML bodies are shown as-is (they are already readable)
2026-03-20 12:21:01 +00:00
5dee5cc52b fix: tokio runtime, Enter-to-login, and server URL handling
Three bugs fixed:

- No tokio reactor: glib::spawn_future_local does not provide a
  tokio context, so reqwest/hyper panicked at runtime. Introduce
  src/runtime.rs with a multi-thread tokio Runtime (init() called
  from main before the GTK app starts). runtime::spawn() posts the
  async result back to GTK via a tokio oneshot channel awaited by
  glib::spawn_future_local, which only polls a flag (no I/O).
  runtime::spawn_bg() is used for fire-and-forget background calls.

- Enter key didn't submit login: connect_apply on AdwEntryRow only
  fires when show-apply-button is true. Switch to connect_entry_activated
  which fires on Return in all three login rows.

- Wrong API URL: the app constructed /accounts/ClientLogin directly
  off the server host, yielding a 404. Add normalize_base_url() in
  api.rs that appends /api/greader.php when the URL doesn't already
  contain it, so users can enter just https://rss.example.com.
2026-03-20 12:17:27 +00:00
d157f3f244 gitignore: exclude compiled schema file 2026-03-20 11:57:09 +00:00
813dda3579 app: implement Epics 2–10
Add the full application logic on top of the Epic 1 skeleton:

Epic 2 — Authentication
- LoginDialog (AdwDialog, Blueprint template) with server URL,
  username, and password fields; emits logged-in signal on submit
- credentials.rs: store/load/clear via libsecret (password_store_sync /
  password_search_sync / password_clear_sync, v0_19 feature)
- api.rs: Api::login() parses Auth= token from ClientLogin response;
  fetch_write_token() fetches the write token
- Auto-login on startup from stored credentials; logout with
  AdwAlertDialog confirmation; login errors shown in AdwAlertDialog

Epic 3 — Article fetching
- model.rs: Article struct and ArticleObject GObject wrapper with
  unread property for list store binding
- Api::fetch_unread() deserializes Google Reader JSON, derives unread
  from categories, generates plain-text excerpt
- Sidebar uses a GtkStack with placeholder / loading / empty / error /
  list pages; AdwSpinnerPaintable while fetching; Try Again button

Epic 4 — Sidebar
- article_row.blp: composite template with feed title, date, title,
  and excerpt labels
- ArticleRow GObject subclass; binds ArticleObject, watches unread
  notify to apply .dim-label on the title; relative timestamp format

Epic 5 — Content pane
- content.html updated: setArticle(), checkKey(), feedthemonkey: URI
  navigation scheme; dark mode via prefers-color-scheme
- content.css: proper article layout, dark mode, code blocks
- WebView loaded from GResource; decide-policy intercepts
  feedthemonkey:{next,previous,open} and all external links

Epic 6 — Read state
- Api::mark_read() / mark_unread() via edit-tag endpoint
- Optimistic unread toggle on ArticleObject; background API calls;
  mark_unread_guard prevents re-marking on navigation
- AdwToast shown on mark-unread

Epic 7 — Keyboard shortcuts
- GtkShortcutController on window for all shortcuts from the backlog
- shortcuts.blp: AdwShortcutsWindow documenting all shortcuts
- F1 opens shortcuts dialog; Ctrl+W closes window; Ctrl+Q quits

Epic 8 — Zoom
- zoom_in/zoom_out/zoom_reset wired to Ctrl+±/0; zoom level saved to
  and restored from GSettings zoom-level key

Epic 9 — Window state persistence
- Window width/height/maximized saved on close, restored on open
- (Sidebar width deferred — AdwNavigationSplitView fraction binding)

Epic 10 — Polish
- AdwAboutDialog with app name, version, GPL-3.0, website
- Logout confirmation AdwAlertDialog with destructive button
- Win.toggle-fullscreen action (F11)
- Api dropped on window close to cancel in-flight requests
2026-03-20 11:57:06 +00:00
8db0b16954 scaffold: compile GSettings schema at build time for dev runs
build.rs now runs glib-compile-schemas on data/ so that debug builds
can find the schema without a system-wide install. main.rs sets
GSETTINGS_SCHEMA_DIR from the build-time constant when running in
debug mode.
2026-03-20 11:36:12 +00:00
3339bb5ec8 scaffold: Epic 1 — project scaffold
Add the full Rust + GTK4 + libadwaita project skeleton:
- Cargo.toml with all dependencies (gtk4 0.11, libadwaita 0.9,
  webkit6 0.6, reqwest, serde, tokio, libsecret)
- build.rs that compiles Blueprint .blp files and bundles a GResource
- data/ui/window.blp — AdwApplicationWindow with AdwNavigationSplitView,
  sidebar with refresh button/spinner and primary menu,
  content page with article menu
- data/resources.gresource.xml bundling UI, HTML, and CSS
- data/net.jeena.FeedTheMonkey.gschema.xml with all GSettings keys
- html/content.html and html/content.css (minimal placeholders)
- src/main.rs, src/app.rs — AdwApplication with APP_ID net.jeena.FeedTheMonkey
- src/window.rs — AdwApplicationWindow GObject subclass loading the
  Blueprint template and persisting window size in GSettings
- COPYING (GPL-3.0) restored from master

The app compiles and the binary is ready to open a blank window.
2026-03-20 11:22:19 +00:00
3196988c98 scaffold: start v3 rewrite from scratch
Remove all Qt5/C++/QML source files to begin a full rewrite in
Rust + GTK4 + libadwaita. The BACKLOG.md describes the plan.
2026-03-20 11:16:27 +00:00
efbd570830
fix typo in README.md 2025-10-01 22:21:01 +02:00
3f492b6160 Fix problem with HDPI screens
On high dpi screens the thml was shown way too small, this let's it
scale properly.
2021-05-24 22:10:23 +02:00
4b804873a6 Fix open in browser on enter
This patch fixes the opening of the current item in a browser which
was broken for a long time.
2020-06-13 00:20:46 +02:00
0bb19eae06 Remove duplicate import 2020-06-13 00:08:20 +02:00
f65d9b6231 Make Ctrl+W close the application
Many other applications have a Ctrl+W to close a window, adding this
as a second option to close the application because it only has one
window.
2020-06-12 23:51:38 +02:00
3e0b62b109 Remove opening in speaker: URL scheme
Back in the day on OSX this has been used to pass the current item
to a application called Speaker which would read the content. That
application is not available anymore so we can remove the
functionality from FeedTheMonkey.
2020-06-12 23:42:42 +02:00
ea85197874 Tweak dark mode and font size to appear closer to Adwaita-dark in GNOME
The colors are now closer to the Adwaita-dark mode which I'm using as
my primary theme. The header has been redesigned slightly to appear
more consistent with other default apps too.
2020-06-12 23:37:00 +02:00
cb649951ae Make sidebar dissapear if thiner than 200px
Often I wanted to make the sidebar dissapear because I don't need it.
This patch let's you make it dissapear when it's thinner than 200px
and reappear if it's wider.
2020-06-12 23:34:58 +02:00
3a0b18e51e Replace image URLs
My old jabs.nu domain doesn't exist anymore, I moved the screenshot
and the logo file included in the readme to a different server.

The screenshot has been renewt to the dark mode one.
2020-06-12 23:22:00 +02:00
ab1306a7b8 Update QtWebEngine te 1.8
When running with AppImage and on Ubuntu I'm getting the error that
QtWebEngine 1.7 is not installed, it seems that per default 1.8 is
installed nowadays.
2019-04-27 23:01:07 +02:00
0c5825afb8 Add deploy step
This step deploys the AppImage to GitHub so that I can create
a release which contains the AppImage within it.
2019-03-31 10:25:10 +02:00
11524e9f14 Fix problem with arrow navigation
For some reason the arrow navigation stopped working, this adds
some workarounds to make it workable again.
2018-09-11 23:04:56 +02:00
0a195f8a8f Move JS into HTML and add NOT_LOGGED_IN handling
For some reason the JS never got loaded when it was in it's own
file, therefor I moved it into the HTML where it gets called.

Also when a session id on the server was expired or something, you
weren't able to log out, there is now code which fixes that.
2018-09-11 01:05:23 +02:00
2c263f77db Fix version in desktop file
We had a wrong version in the desktop file.
2018-02-05 22:45:17 +01:00
13c241f3b9 Fix not responding next/previous when focus in webview
For some reason in the latest Qt versions the webview took over the
focus from the keyboard, once clicked on the webview the arrow
keys wouldn't register up and thus you couldn't navigate with them
anymore.

This patch fixes this problem by using window.location.href and
checkinf for those special urls. This is way easier to use than
WebChannels.
2018-01-30 22:55:16 +01:00
f025ad4d2a Add feedback on login errors
There was no feedback on any login errors when a user provided a
wrong url, username, password or a disabled API. This commit
adds feedback to the user in this cases.

Fixes #15
2017-06-08 18:31:02 +02:00
4bb5610f7f Add info about AppImage 2017-03-21 22:13:11 +01:00
a48212cac7 Merge pull request #16 from probonopd/test
Update .travis.yml
2017-03-18 05:31:29 +01:00
probonopd
dd958bbaa5 Update .travis.yml 2017-03-17 20:43:59 +01:00
0dc523fe42 Merge pull request #14 from probonopd/patch-1
Continuous builds on Travis CI
2017-03-13 18:10:37 +01:00
probonopd
a920123a52 Update .travis.yml 2017-03-12 17:40:37 +01:00
probonopd
78a85f8e3f -qmldir=./qml/ 2017-03-12 17:33:42 +01:00
probonopd
fcfcda84ae Update .travis.yml 2017-03-12 17:25:47 +01:00
probonopd
4f3a1a8261 -qmldir=/opt/qt58/qml/ 2017-03-12 17:13:37 +01:00
probonopd
75f94b46e7 Update .travis.yml 2017-03-12 17:00:14 +01:00
probonopd
3bc56e2e8f Update .travis.yml 2017-03-12 16:53:20 +01:00
probonopd
cc5398907f Create .travis.yml 2017-03-12 16:46:51 +01:00
cfec5fd9ed Break too long words to prevent horizontal scrolling 2016-10-29 10:51:14 +02:00
c7153e070e Make the MenuBar show- and hidebar
Untill now the MenuBar was not visible untill you pressed the
alt-key, which made it visible. Sadly after that it was not
possible to hide it again. This patch fixes that.
2016-10-29 08:09:20 +02:00
5d053551d8 Revert "Downoad all images in the background and keep them in memory"
This reverts commit 6e450b72f1.
2016-10-24 07:51:15 +02:00
eb40e97357 Add local scrollbars to <pre> 2016-10-24 07:35:24 +02:00
6e450b72f1 Downoad all images in the background and keep them in memory
As one of the first steps to offline capability we download all
images and put them into the JSON stirng and into the content
as data-uris for <img>-tags. This way you can go offline and keep
enjoying pictures in your feeds, at least untill you restart
FeedTheMonkey for now.
2016-10-05 16:49:40 +02:00
cf94bfe488 Invert nightmode scrollbar colors
The qtwebengine scrollbar is very bright in nightmode, let's change it
so it is a bit softer on the eyes.
2016-08-06 05:38:25 +02:00
b87e224781 Use qtquickcompiler
It might not do a lot in this project but it's easy to add and
in theory it makes the app start a tiny bit faster, although
my tests didn't show any visible improvements, I guess it's
because there are not enough QML files to parse at startup.
2016-07-27 06:12:22 +02:00
5b5d122a1c Merge pull request #11 from clawoflight/master
Increased contrast in the night mode.
2016-07-23 12:32:28 +02:00
Bennett Piater
e3ba0540a5 Increased contrast in the night mode. 2016-07-22 23:14:03 +02:00
be009e51ac Update README to newest state 2016-07-22 23:02:02 +02:00
517a5c88d5 Add F11 and 1 keys to readme 2016-07-22 22:42:13 +02:00
818ef06189 Relicense FeedTheMonkey from BSD to GPLv3 2016-07-22 21:30:37 +02:00
b19e3dd06c Fix problem with HTML in title, feed title and excerpt 2016-07-22 21:03:00 +02:00
11cde07393 Make item height static in the sidebar
This fixes #4 but introduces a new bug where the HTML in the strings
in the sidebar is not converted to text anymore.
2016-07-22 09:29:28 +02:00
99308a98c9 Fix javascript errors 2016-07-21 08:13:01 +02:00
Jeena
020fc6efe6 Add fullscreen mode by pressing F11 2016-07-20 21:27:27 +02:00