mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 17:58:27 +02:00
Fix tauri dialog API usage
This commit is contained in:
@@ -3,7 +3,7 @@ use std::time::SystemTime;
|
|||||||
|
|
||||||
use log::info;
|
use log::info;
|
||||||
use tauri::{AppHandle, Manager};
|
use tauri::{AppHandle, Manager};
|
||||||
use tauri_plugin_dialog::DialogExt;
|
use tauri_plugin_dialog::{DialogExt, MessageDialogButtons};
|
||||||
use tauri_plugin_updater::UpdaterExt;
|
use tauri_plugin_updater::UpdaterExt;
|
||||||
use tokio::task::block_in_place;
|
use tokio::task::block_in_place;
|
||||||
use yaak_plugin_runtime::manager::PluginManager;
|
use yaak_plugin_runtime::manager::PluginManager;
|
||||||
@@ -92,8 +92,10 @@ impl YaakUpdater {
|
|||||||
"{} is available. Would you like to download and install it now?",
|
"{} is available. Would you like to download and install it now?",
|
||||||
update.version
|
update.version
|
||||||
))
|
))
|
||||||
.ok_button_label("Download")
|
.buttons(MessageDialogButtons::OkCancelCustom(
|
||||||
.cancel_button_label("Later")
|
"Download".to_string(),
|
||||||
|
"Later".to_string(),
|
||||||
|
))
|
||||||
.title("Update Available")
|
.title("Update Available")
|
||||||
.show(|confirmed| {
|
.show(|confirmed| {
|
||||||
if !confirmed {
|
if !confirmed {
|
||||||
@@ -105,8 +107,10 @@ impl YaakUpdater {
|
|||||||
if h.dialog()
|
if h.dialog()
|
||||||
.message("Would you like to restart the app?")
|
.message("Would you like to restart the app?")
|
||||||
.title("Update Installed")
|
.title("Update Installed")
|
||||||
.ok_button_label("Restart")
|
.buttons(MessageDialogButtons::OkCancelCustom(
|
||||||
.cancel_button_label("Later")
|
"Restart".to_string(),
|
||||||
|
"Later".to_string(),
|
||||||
|
))
|
||||||
.blocking_show()
|
.blocking_show()
|
||||||
{
|
{
|
||||||
h.restart();
|
h.restart();
|
||||||
|
|||||||
Reference in New Issue
Block a user