switch to invokes instead of emits

This commit is contained in:
Joseph Montanaro committed 2022-12-13 16:50:44 -08:00
1 parent 48269855e5
commit 9055fa41aa
11 files changed
+91 -40

No files matched your search

+10 -2
View File
@@ -4,9 +4,17 @@ use tauri::State;
use crate::state::{AppState, Session};
#[derive(Copy, Clone, Serialize, Deserialize)]
#[derive(Clone, Serialize, Deserialize)]
pub struct Client {
pub pid: u32,
pub exe: String,
}
#[derive(Clone, Serialize, Deserialize)]
pub struct Request {
pub id: u64,
pub clients: Vec<Client>,
}
@@ -41,7 +49,7 @@ pub async fn unlock(passphrase: String, app_state: State<'_, AppState>) -> Resul
#[tauri::command]
pub fn session_status(app_state: State<'_, AppState>) -> String {
pub fn get_session_status(app_state: State<'_, AppState>) -> String {
let session = app_state.session.read().unwrap();
match *session {
Session::Locked(_) => "locked".into(),