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": "رجوع",
"open": "فتح",
"openFile": "فتح الملف",
"openFolder": "فتح المجلد",
"share": "مشاركة",
"copy": "نسخ",
"copied": "مُزَوَّل",
+1
View File
@@ -253,6 +253,7 @@
"back": "Geri",
"open": "Aç",
"openFile": "Faylı Aç",
"openFolder": "Qovluğu Aç",
"share": "Paylaş",
"copy": "Kopyala",
"copied": "Kopyalandı",
+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",
+1
View File
@@ -239,6 +239,7 @@
"back": "Zurück",
"open": "Offen",
"openFile": "Datei öffnen",
"openFolder": "Ordner öffnen",
"share": "Teilen",
"copy": "Kopie",
"copied": "Kopiert",
+1
View File
@@ -261,6 +261,7 @@
"back": "Back",
"open": "Open",
"openFile": "Open File",
"openFolder": "Open Folder",
"share": "Share",
"copy": "Copy",
"copied": "Copied",
+1
View File
@@ -239,6 +239,7 @@
"back": "Volver",
"open": "Abrir",
"openFile": "Abrir archivo",
"openFolder": "Abrir carpeta",
"share": "Compartir",
"copy": "Copiar",
"copied": "Copiado",
+1
View File
@@ -239,6 +239,7 @@
"back": "بازگشت",
"open": "باز کردن",
"openFile": "باز کردن فایل",
"openFolder": "باز کردن پوشه",
"share": "اشتراک‌گذاری",
"copy": "کپی",
"copied": "اخراج",
+1
View File
@@ -239,6 +239,7 @@
"back": "Retour",
"open": "Ouvrir",
"openFile": "Ouvrir le fichier",
"openFolder": "Ouvrir le dossier",
"share": "Partager",
"copy": "Copier",
"copied": "Copied",
+1
View File
@@ -239,6 +239,7 @@
"back": "Vissza",
"open": "Nyitva",
"openFile": "Fájl megnyitása",
"openFolder": "Mappa megnyitása",
"share": "Megosztás",
"copy": "másolat",
"copied": "Másolva",
+1
View File
@@ -239,6 +239,7 @@
"back": "Kembali",
"open": "Buka",
"openFile": "Buka Berkas",
"openFolder": "Buka Folder",
"share": "Bagikan",
"copy": "Salin",
"copied": "Disalin",
+1
View File
@@ -239,6 +239,7 @@
"back": "Indietro",
"open": "Apri",
"openFile": "Apri file",
"openFolder": "Apri cartella",
"share": "Condividi",
"copy": "Copia",
"copied": "- Si'",
+1
View File
@@ -239,6 +239,7 @@
"back": "戻る",
"open": "営業部",
"openFile": "ファイルを開く",
"openFolder": "フォルダを開く",
"share": "共有",
"copy": "コピー",
"copied": "コピー",
+1
View File
@@ -239,6 +239,7 @@
"back": "뒤로",
"open": "열기",
"openFile": "파일 열기",
"openFolder": "폴더 열기",
"share": "공유",
"copy": "복사",
"copied": "뚱 베어",
+1
View File
@@ -239,6 +239,7 @@
"back": "Wstecz",
"open": "Otwórz",
"openFile": "Otwórz plik",
"openFolder": "Otwórz folder",
"share": "Udostępnij",
"copy": "Kopiuj",
"copied": "Kopiowane",
+1
View File
@@ -239,6 +239,7 @@
"back": "Voltar",
"open": "Abrir",
"openFile": "Abrir ficheiro",
"openFolder": "Abrir pasta",
"share": "Partilhar",
"copy": "Copiar",
"copied": "Copiado",
+1
View File
@@ -239,6 +239,7 @@
"back": "Назад",
"open": "Открыть",
"openFile": "Открыть файл",
"openFolder": "Открыть папку",
"share": "Поделиться",
"copy": "Копия",
"copied": "Копирован",
+1
View File
@@ -239,6 +239,7 @@
"back": "பின்செல்",
"open": "திற",
"openFile": "கோப்பைத் திற",
"openFolder": "கோப்புறையைத் திற",
"share": "பகிர்",
"copy": "நகலெடு",
"copied": "நகலெடுக்கப்பட்டது",
+1
View File
@@ -239,6 +239,7 @@
"back": "Geri",
"open": "Aç",
"openFile": "Dosyayı Aç",
"openFolder": "Klasörü Aç",
"share": "Paylaş",
"copy": "Kopyala",
"copied": "Kopyalandı",
+1
View File
@@ -239,6 +239,7 @@
"back": "Назад",
"open": "Відкрито",
"openFile": "Відкрити файл",
"openFolder": "Відкрити папку",
"share": "Поділитися",
"copy": "Список",
"copied": "Панчохи",
+1
View File
@@ -239,6 +239,7 @@
"back": "Quay lại",
"open": "Mở",
"openFile": "Mở tệp",
"openFolder": "Mở thư mục",
"share": "Chia sẻ",
"copy": "Chép",
"copied": "Co dãn",
+1
View File
@@ -239,6 +239,7 @@
"back": "返回",
"open": "打开",
"openFile": "打开文件",
"openFolder": "打开文件夹",
"share": "分享",
"copy": "复制",
"copied": "已复制",
+1
View File
@@ -239,6 +239,7 @@
"back": "返回",
"open": "開啟",
"openFile": "開啟檔案",
"openFolder": "開啟資料夾",
"share": "分享",
"copy": "複製",
"copied": "已複製",