Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

docs: describe the in-window download messages

Tw9379e050e4dedd
diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md
index a2c329ff..da7588ca 100644
--- a/docs/advanced-usage.md
+++ b/docs/advanced-usage.md
@@ -46,6 +46,8 @@ document.addEventListener("keydown", (e) => {
### Download Error Notifications
+Downloads also report in the window itself: a short message at the bottom right says when a download starts, when it is saved to the download folder, when it fails, and when the download folder cannot be used, then fades after about three seconds. The language follows the system, Chinese or English. Downloads that end on a non-2xx response are reported as failed, not saved.
+
When a download fails, Pake shows a notification in Chinese or English based on the browser language. It covers regular HTTP(S), Data URI (base64 encoded files), Blob URL (dynamically generated files) and context menu downloads, uses native OS notifications once permission is granted, and falls back to console logging otherwise. To enable notifications, request permission in your injected JavaScript:
```javascript
diff --git a/docs/advanced-usage_CN.md b/docs/advanced-usage_CN.md
index 2293b812..fad00b77 100644
--- a/docs/advanced-usage_CN.md
+++ b/docs/advanced-usage_CN.md
@@ -46,6 +46,8 @@ document.addEventListener("keydown", (e) => {
### 下载失败通知
+下载状态也会直接显示在窗口里,右下角会弹出一条短提示,告诉你开始下载、已保存到下载目录、下载失败或者下载目录无法使用,大约三秒后淡出,语言跟着系统走,中文或英文。服务器返回非 2xx 状态的下载会提示失败,不会当成成功保存。
+
下载失败时 Pake 会弹出通知,语言自动匹配系统与浏览器(中文或英文),覆盖常规 HTTP(S)、Data URI(base64 编码文件)、Blob URL(动态生成的文件)和右键菜单发起的下载,授予通知权限后使用原生系统通知,没有权限时降级到控制台日志。要启用通知,在注入的 JavaScript 中请求权限:
```javascript