Tauri improvements
Summerized changes:
The following changes:
- `path_trav` had to be removed
- path traversal is prevented by not allowing certain characters in the filename
- `path_trav` uses `fs::canonicalize` internally, which always fails if a file does not exist => not suited for our needs
- tauri notification replaced with `mac-notification-sys`
- this has the advantage of further modification to allow the user to reply on messages directly in the notification
- file download supports progress
- a callback can be registered when starting the download (see below)
- set badge count is supported by `setBadgeCount(count: number)`
- app needs to be packaged for this to work
- `this.__isApp = !this.__isBrowser` was replaced with `this.__isApp = window.__TAURI__ !== undefined`
- the old version was not working
```js
await UtilitiesRuntime.requestFileDownload(
event.file.url,
event.file.name,
(current, total) => console.log(`${Math.round(current/total*100)}% done`)
);
```
- https://github.com/prose-im/prose-app-web/pull/66/commits/a57ed39ce41615466963a2719cfc1f1ec647c0d0 adds support for deep linking. If the application is compiled and placed in the `/Applications` folder, Prose registers as a opener for `xmpp://` URLs
合并状态:已合并 合并于 2024-03-19 关闭于 2024-03-19 1 条评论