rework error alerts

This commit is contained in:
2024-06-28 20:35:18 -04:00
parent 504c0b4156
commit acc5c71bfa
13 changed files with 135 additions and 112 deletions

View File

@ -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));

View File

@ -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)
}