rework error alerts
This commit is contained in:
@ -58,6 +58,7 @@ pub fn run() -> tauri::Result<()> {
|
||||
ipc::save_config,
|
||||
ipc::launch_terminal,
|
||||
ipc::get_setup_errors,
|
||||
ipc::exit,
|
||||
])
|
||||
.setup(|app| {
|
||||
let res = rt::block_on(setup(app));
|
||||
|
@ -1,6 +1,6 @@
|
||||
use serde::{Serialize, Deserialize};
|
||||
use sqlx::types::Uuid;
|
||||
use tauri::State;
|
||||
use tauri::{AppHandle, State};
|
||||
|
||||
use crate::config::AppConfig;
|
||||
use crate::credentials::{
|
||||
@ -160,3 +160,9 @@ pub async fn launch_terminal(base: bool) -> Result<(), LaunchTerminalError> {
|
||||
pub async fn get_setup_errors(app_state: State<'_, AppState>) -> Result<Vec<String>, ()> {
|
||||
Ok(app_state.setup_errors.clone())
|
||||
}
|
||||
|
||||
|
||||
#[tauri::command]
|
||||
pub fn exit(app_handle: AppHandle) {
|
||||
app_handle.exit(0)
|
||||
}
|
||||
|
Reference in New Issue
Block a user