feat: add UI toast notification for missing Firefox browser

This commit is contained in:
MasterAcnolo
2026-10-27 20:19:39 +01:00
parent 7c5ccb1527
commit dc898e1235
5 changed files with 89 additions and 1 deletions

View File

@@ -82,4 +82,13 @@ window.showWarning = (message, duration = 4000) =>
* Shortcut: info toast
*/
window.showInfo = (message, duration = 4000) =>
window.showToast(message, "info", duration);
window.showToast(message, "info", duration);
/**
* Listens for toast notifications from the main process and displays them in the UI.
*/
window.electronAPI?.onToast(({message, type = "info", duration = 4000} = {}) => {
if (typeof message === "string") {
window.showToast(message, type, duration);
}
});