exit app button
This commit is contained in:
parent
699c62ebad
commit
dde4c7f37d
@ -1,6 +1,12 @@
|
||||
#[tauri::command]
|
||||
fn exit(app_handle: tauri::AppHandle) {
|
||||
app_handle.exit(0);
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![exit])
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_sql::Builder::new().build())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script>
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import Database from "@tauri-apps/plugin-sql";
|
||||
import { onMount } from "svelte";
|
||||
import NavBar from "$lib/components/ui/NavBar.svelte";
|
||||
@ -160,6 +161,8 @@ WHERE id = ${current_item.id}`;
|
||||
current_page = Object.entries(db_scheme)[0][0];
|
||||
current_table = "";
|
||||
current_view = "";
|
||||
} else {
|
||||
invoke("exit");
|
||||
}
|
||||
}}
|
||||
></NavBar>
|
||||
|
Loading…
x
Reference in New Issue
Block a user