feat: store chat_id to allow multiple chats, use enums in tauri
communication
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use feshared::daemon::DaemonState;
|
||||
use feshared::{chatmessage::TauriCommand, daemon::DaemonState};
|
||||
use leptos::{prelude::*, reactive::spawn_local};
|
||||
use leptos_router::{
|
||||
components::{Route, Router, Routes},
|
||||
@@ -34,7 +34,7 @@ fn Dashboard() -> impl IntoView {
|
||||
let on_click = move |_ev: leptos::ev::MouseEvent| {
|
||||
spawn_local(async move {
|
||||
let empty_args = serde_wasm_bindgen::to_value(&serde_json::json!({})).unwrap();
|
||||
invoke("toggle_popup", empty_args).await;
|
||||
invoke(TauriCommand::TogglePopup.as_str(), empty_args).await;
|
||||
});
|
||||
};
|
||||
view! {
|
||||
@@ -60,7 +60,7 @@ pub fn DaemonStatusIndicator() -> impl IntoView {
|
||||
);
|
||||
let status = LocalResource::new(move || async move {
|
||||
poll_count.get();
|
||||
let s: DaemonState = invoke_typed("daemon_state", JsValue::NULL).await;
|
||||
let s: DaemonState = invoke_typed(TauriCommand::DaemonState, JsValue::NULL).await;
|
||||
s
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user