mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 08:04:52 +01:00
working theming
This commit is contained in:
@@ -16,8 +16,9 @@
|
||||
"grasscutter_jar": "Set Grasscutter JAR",
|
||||
"java_path": "Set Custom Java Path",
|
||||
"grasscutter_with_game": "Automatically launch Grasscutter with game",
|
||||
"language": "Select Language (requires restart)",
|
||||
"background": "Set Custom Background (link or image file)"
|
||||
"language": "Select Language",
|
||||
"background": "Set Custom Background (link or image file)",
|
||||
"theme": "Set Theme"
|
||||
},
|
||||
"downloads": {
|
||||
"grasscutter_stable_data": "Download Grasscutter Stable Data",
|
||||
|
||||
@@ -50,6 +50,7 @@ fn main() {
|
||||
system_helpers::run_jar,
|
||||
system_helpers::open_in_browser,
|
||||
system_helpers::copy_file,
|
||||
system_helpers::install_location,
|
||||
proxy::set_proxy_addr,
|
||||
proxy::generate_ca_files,
|
||||
unzip::unzip,
|
||||
@@ -145,8 +146,8 @@ async fn req_get(url: String) -> String {
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn get_theme_list() -> Vec<HashMap<String, String>> {
|
||||
let theme_loc = format!("{}/themes", system_helpers::install_location());
|
||||
async fn get_theme_list(dataDir: String) -> Vec<HashMap<String, String>> {
|
||||
let theme_loc = format!("{}/themes", dataDir);
|
||||
|
||||
// Ensure folder exists
|
||||
if !std::path::Path::new(&theme_loc).exists() {
|
||||
|
||||
@@ -77,6 +77,7 @@ pub fn copy_file(path: String, new_path: String) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn install_location() -> String {
|
||||
let mut exe_path = std::env::current_exe().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user