mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 23:24:35 +01:00
github and discord links
This commit is contained in:
@@ -19,6 +19,7 @@ fn main() {
|
||||
disconnect,
|
||||
run_program,
|
||||
run_jar,
|
||||
open_in_browser,
|
||||
req_get,
|
||||
get_bg_file,
|
||||
downloader::download_file,
|
||||
@@ -65,6 +66,15 @@ fn run_jar(path: String, execute_in: String) {
|
||||
};
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn open_in_browser(url: String) {
|
||||
// Open the URL in the default browser.
|
||||
match open::that(url) {
|
||||
Ok(_) => (),
|
||||
Err(e) => println!("Failed to open URL: {}", e),
|
||||
};
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn req_get(url: String) -> String {
|
||||
// Send a GET request to the specified URL.
|
||||
|
||||
Reference in New Issue
Block a user