Manually check for updates in 'Control Center'

This commit is contained in:
tk103331
2023-01-04 13:19:01 +08:00
parent a7cd73b314
commit 883f36b26d
4 changed files with 9 additions and 9 deletions

View File

@@ -43,6 +43,11 @@ pub fn reset_chat_conf() -> ChatConfJson {
ChatConfJson::reset_chat_conf()
}
#[command]
pub fn run_check_update(app: AppHandle) -> () {
utils::run_check_update(app).unwrap();
}
#[command]
pub fn form_confirm(_app: AppHandle, data: serde_json::Value) {
ChatConfJson::amend(&serde_json::json!(data), None).unwrap();

View File

@@ -1,7 +1,6 @@
use std::borrow::Borrow;
use crate::{app::window, conf::ChatConfJson, utils};
use log::info;
use tauri::{utils::config::WindowUrl, window::WindowBuilder, App, GlobalShortcutManager, Manager, AppHandle, Wry};
use tauri::{utils::config::WindowUrl, window::WindowBuilder, App, GlobalShortcutManager, Manager};
use wry::application::accelerator::Accelerator;
pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>> {

View File

@@ -57,6 +57,7 @@ async fn main() {
cmd::open_link,
cmd::get_chat_conf,
cmd::reset_chat_conf,
cmd::run_check_update,
cmd::form_cancel,
cmd::form_confirm,
cmd::form_msg,