feat: Enhance application with logging, configuration management, and system tray support
first working gui windows with configs
This commit is contained in:
19
src-tauri/src/controllers/app_state.rs
Normal file
19
src-tauri/src/controllers/app_state.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use std::sync::Mutex;
|
||||
use tauri::{App, Manager, Runtime};
|
||||
|
||||
pub struct AppState {
|
||||
#[allow(dead_code)]
|
||||
pub ollama_ready: Mutex<bool>,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
ollama_ready: Mutex::new(false),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn init_state<R: Runtime>(app: &mut App<R>) {
|
||||
app.manage(AppState::new());
|
||||
}
|
||||
Reference in New Issue
Block a user