github and discord links

This commit is contained in:
SpikeHD
2022-05-14 02:42:05 -07:00
parent ac7ee2d02d
commit f43cc3efc3
7 changed files with 93 additions and 0 deletions

View File

@@ -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.