chore: refactored lib.rs to move commands into separate folder
This commit is contained in:
14
src-tauri/src/commands/app.rs
Normal file
14
src-tauri/src/commands/app.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use crate::get_app_handle;
|
||||
|
||||
#[tauri::command]
|
||||
pub fn quit_app() -> Result<(), String> {
|
||||
let app_handle = get_app_handle();
|
||||
app_handle.exit(0);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn restart_app() {
|
||||
let app_handle = get_app_handle();
|
||||
app_handle.restart();
|
||||
}
|
||||
Reference in New Issue
Block a user