Skip to content
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

Tauri improvements #69

Merged
merged 13 commits into from
Mar 19, 2024
Merged

Tauri improvements #69

merged 13 commits into from
Mar 19, 2024

Conversation

dscso
Copy link
Contributor

@dscso dscso commented Mar 19, 2024

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
await UtilitiesRuntime.requestFileDownload(
  event.file.url,
  event.file.name,
  (current, total) => console.log(`${Math.round(current/total*100)}% done`)
);
  • a57ed39 adds support for deep linking. If the application is compiled and placed in the /Applications folder, Prose registers as a opener for xmpp:// URLs

# Conflicts:
#	src/assemblies/inbox/InboxMessaging.vue
@valeriansaliou
Copy link
Member

Merged desktop branch into this one, copying comment from #68 (comment) here:

  1. ✅ When application is closed by hiding, it still thinks it has focus (so it marks any unread as read) — same if minimized
  2. ☑️ Make Download folder bounce when download is done
  3. ☑️ Menu bar for macOS (Settings + Profile buttons, Check for Updates et al)
  4. ☑️ About Prose.app window for macOS (fill it with Prose website and details)

progress

  1. ✅ See if window is in focus (both web and Tauri)
UtilitiesRuntime.registerWindowFocusCallback((focus) => console.log("focus: " + focus))

@valeriansaliou valeriansaliou changed the title fix revert of pull 66 that broke everything Tauri improvements Mar 19, 2024
Copy link
Member

@valeriansaliou valeriansaliou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK after code improvements.

@valeriansaliou valeriansaliou merged commit e6d494b into master Mar 19, 2024
2 checks passed
@valeriansaliou valeriansaliou deleted the tauri branch March 19, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants