-
-
Notifications
You must be signed in to change notification settings - Fork 982
feat: show system notification once download is complete, canceled or failed #8235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
How does it look? |
It uses the system notifications (OS notifications), on Linux it looks like this: I also made this PR to add translation: zen-browser/l10n-packs#153 |
Oh, sorry! The images didnt load. |
@mauro-balades I added the images after your comment, do let me know if you want any changes done! 🙏 |
Hi @mauro-balades, I hope you're doing well! Just wanted to kindly check in on this PR. Let me know if there's anything I can clarify or improve. I’d be happy to make any adjustments if needed. Thanks for your time 🙏 |
onDownloadChanged: download => { | ||
if (download.succeeded) { | ||
this.#handleDownloadComplete(download); | ||
} else if (download.canceled) { | ||
this.#handleDownloadCanceled(download); | ||
} else if (download.error) { | ||
this.#handleDownloadFailed(download); | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe more cool:
if (download.succeeded) {
this.#handleDownloadComplete(download);
}
if (download.canceled) {
this.#handleDownloadCanceled(download);
}
if (download.error) {
this.#handleDownloadFailed(download);
}
Added desktop notifications for download events.
The browser now shows a system notification when a download:
completes successfully
is canceled
fails due to error
Each notification:
Uses a localized title and message (document.l10n.formatValue)
Falls back to plain strings if localization fails
Includes the downloaded file's path
Uses the standard download.svg icon
Can be toggled via the zen.downloads.download-notifications preference
This enhancement improves user feedback and aligns with modern UX expectations for background downloads.
Translations (l10n): zen-browser/l10n-packs#153