feat: update to tauri beta, add permissions (#862)

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
This commit is contained in:
Tillmann
2024-02-04 03:14:41 +09:00
committed by GitHub
parent 506ce4835b
commit d198c01486
387 changed files with 21883 additions and 943 deletions
File diff suppressed because one or more lines are too long
+3 -1
View File
@@ -24,8 +24,10 @@ pub async fn restore_state<R: Runtime>(
) -> std::result::Result<(), String> {
let flags = StateFlags::from_bits(flags)
.ok_or_else(|| format!("Invalid state flags bits: {}", flags))?;
app.get_window(&label)
app.get_webview_window(&label)
.ok_or_else(|| format!("Couldn't find window with label: {}", label))?
.as_ref()
.window()
.restore_state(flags)
.map_err(|e| e.to_string())?;
Ok(())
+3 -3
View File
@@ -101,8 +101,8 @@ impl<R: Runtime> AppHandleExt for tauri::AppHandle<R> {
let cache = self.state::<WindowStateCache>();
let mut state = cache.0.lock().unwrap();
for (label, s) in state.iter_mut() {
if let Some(window) = self.get_window(label) {
window.update_state(s, flags)?;
if let Some(window) = self.get_webview_window(label) {
window.as_ref().window().update_state(s, flags)?;
}
}
@@ -329,7 +329,7 @@ impl Builder {
app.manage(WindowStateCache(cache));
Ok(())
})
.on_webview_ready(move |window| {
.on_window_ready(move |window| {
if self.denylist.contains(window.label()) {
return;
}