Initial Commit

This commit is contained in:
2026-09-23 09:16:09 -04:00
commit 0cd2a516bb
49 changed files with 10134 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#[tauri::command]
pub async fn launch_url(url: String) -> Result<(), String> {
open::that(&url).map_err(|e| format!("Failed to open URL: {}", e))
}
#[tauri::command]
pub async fn check_privileges() -> Result<bool, String> {
#[cfg(target_os = "linux")]
{
// Check if effective user ID is 0 (root)
Ok(unsafe { libc::geteuid() } == 0)
}
#[cfg(target_os = "windows")]
{
// On Windows, check if running as administrator
Ok(is_elevated::is_elevated())
}
}