2024-09-09 03:12:35 -04:00
|
|
|
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
|
|
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
2024-09-19 00:18:24 -04:00
|
|
|
use webbrowser;
|
2024-09-09 03:12:35 -04:00
|
|
|
|
|
|
|
#[tauri::command]
|
2024-09-19 00:18:24 -04:00
|
|
|
fn open_browser(address: &str) {
|
|
|
|
webbrowser::open(address).expect("Failed to open defualt browser.");
|
2024-09-09 03:12:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
tauri::Builder::default()
|
2024-11-13 16:25:57 -05:00
|
|
|
.plugin(tauri_plugin_shell::init())
|
2024-09-19 00:18:24 -04:00
|
|
|
.invoke_handler(tauri::generate_handler![open_browser])
|
2024-09-09 03:12:35 -04:00
|
|
|
.run(tauri::generate_context!())
|
|
|
|
.expect("error while running tauri application");
|
|
|
|
}
|