mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 07:34:36 +01:00
Merge main
This commit is contained in:
@@ -5,7 +5,6 @@ windows_subsystem = "windows"
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
use std::{sync::Mutex, collections::HashMap};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use std::thread;
|
||||
use sysinfo::{System, SystemExt};
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use duct::cmd;
|
||||
|
||||
use crate::file_helpers;
|
||||
|
||||
#[tauri::command]
|
||||
pub fn run_program(path: String) {
|
||||
// Open the program from the specified path.
|
||||
open::that(&path).unwrap();
|
||||
// Open in new thread to prevent blocking.
|
||||
std::thread::spawn(move || {
|
||||
open::that(&path).unwrap();
|
||||
});
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
@@ -18,7 +18,7 @@ export async function toggleEncryption(path: string) {
|
||||
// Write file
|
||||
await fs.writeFile({
|
||||
path,
|
||||
contents: JSON.stringify(serverConf)
|
||||
contents: JSON.stringify(serverConf, null, 2),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user