28 lines
865 B
Rust
28 lines
865 B
Rust
use tauri::Manager;
|
|
|
|
mod commands;
|
|
|
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
pub fn run() {
|
|
tauri::Builder::default()
|
|
.setup(|app| {
|
|
let version = app
|
|
.config()
|
|
.version
|
|
.clone()
|
|
.unwrap_or_else(|| "".to_string());
|
|
let title = format!("Angel C2 - v{}", version);
|
|
let window = app.get_webview_window("main").unwrap();
|
|
window.set_title(&title).unwrap();
|
|
Ok(())
|
|
})
|
|
.plugin(tauri_plugin_shell::init())
|
|
.invoke_handler(tauri::generate_handler![
|
|
commands::validate_username,
|
|
commands::validate_license,
|
|
commands::get_app_version,
|
|
])
|
|
.run(tauri::generate_context!())
|
|
.expect("error while running tauri application");
|
|
}
|