Tauri 1.2 发布,桌面应用开发框架
Tauri 1.2 发布了,Tauri 是一个框架,用于为所有主要桌面平台构建小巧、快速的二进制文件。开发人员可以集成任何可编译为 HTML、JS 和 CSS 的前端框架,以构建他们的用户界面。应用程序的后端是一个基于 Rust 的二进制文件,带有一个前端可以与之交互的 API。
Tauri 应用程序的用户界面目前在 macOS 和 Windows 上利用 tao 作为窗口处理库,在 Linux 上通过 Tauri 团队孵化和维护的 WRY 利用 WebKit、Windows 上的 WebView2 和 Linux 上的 WebKitGTK 创建一个统一的系统 webview(和其他好东西,如菜单和任务栏)接口。
该版本改进包括:
- Add
accept_first_mouseoption for macOS windows. - Add new app-specific
BaseDirectoryenum variantsAppConfig,AppData,AppLocalData,AppCacheandAppLogalong with equivalent functions inpathmodule and deprecated ambiguous variantsLogandAppalong with their equivalent functions inpathmodule. - Set the correct mimetype when streaming files through
asset:protocol- 39443b43 fix(core): set correct mimetype for asset protocol streams, closes #5203 (#5210) on 2022-09-30
- 2d9c2b47 Revert "fix(core): set correct mimetype for asset protocol streams, closes #5203 (#5210)" on 2022-09-30
- 9b1a6a1c fix(core): set correct mimetype for asset protocol streams, #5203 (#5536) on 2022-11-04
- Disable automatic window tabbing on macOS when the
tabbing_identifieroption is not defined, the window is transparent or does not have decorations. - The custom protocol now validates the request URI. This has implications when using the
assetprotocol without theconvertFileSrchelper, the URL must now use theasset://localhost/$filePathformat. - Escape glob special characters in files/directories when dropping files or using the open/save dialogs.
- Properly emit events with object payload.
- Fixes access to the
WebviewWindow.getByLabelfunction in atauri://window-createdevent listener. - Fixes resource reading being always rejected by the scope.
- Fixes
__TAURI_PATTERN__object freeze. - Readd the option to create an unfocused window via the
focusedmethod. Thefocusfunction has been deprecated. - Add
hidden_titleoption for macOS windows. - Custom protocol headers are now implemented on Linux when running on webkit2gtk 2.36 or above.
- Add
App::show(),AppHandle::show(),App::hide()andAppHandle::hide()for hiding/showing the entire application on macOS. - Fix a deadlock when modifying the menu in the
on_menu_eventclosure. - Resolve base system directory in shell scope.
- Added
tabbing_identifierto the window builder on macOS. - Add
title_bar_styleoption for macOS windows. - Added methods to set the system tray title on macOS.
- Added the
user_agentoption when creating a window.
同时发布的还有 Tauri 1.1.2.