feat(flutter): add action buttons to desktop download notifications

Terminal task notifications now carry actionable buttons and respond to
clicks instead of being inert:

- Done notifications offer Open File and Open Folder for single-file
  tasks, and Open Folder only for folder tasks (e.g. multi-file
  torrents), following the same rule as the task details page. Error
  notifications offer Open Folder only, since the output is rarely
  usable.
- Clicking the notification body brings the app window back to the
  front (show + focus), covering the close-to-tray case.
- The click target is snapshotted into the notification (Windows: action
  arguments; macOS/Linux: notification payload) so buttons keep working
  after the task record is deleted, and a missing file is logged instead
  of surfacing an OS error dialog.
- macOS resolves buttons through three pre-registered notification
  categories (done single-file / done folder / error); Windows uses the
  actions API of the pinned notification plugin fork; Linux uses
  freedesktop notification actions.
- New openFolder label localized in all 22 ARB catalogs.

Cold-start activation is intentionally out of scope: when the process is
not running, OS activation opens the main window without dispatching the
button action.
This commit is contained in:
Levi committed 2026-09-17 09:49:20 +08:00
1 parent 21702d5d46
commit 6f4635e2eb
24 files changed
+377 -10

No files matched your search

+1
View File
@@ -239,6 +239,7 @@
"back": "Enrere",
"open": "Obre",
"openFile": "Obre el fitxer",
"openFolder": "Obre la carpeta",
"share": "Comparteix",
"copy": "Copia",
"copied": "Copiat",