mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2026-02-05 01:42:24 +01:00
working theming
This commit is contained in:
@@ -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