feat: simplify notifications/logs

This commit is contained in:
Evan Carroll 2026-01-21 14:26:31 -06:00
parent 8c2e5d4f61
commit 39b5ac3f1d
7 changed files with 300 additions and 334 deletions

View file

@ -56,8 +56,6 @@ pub fn NotificationToast(
on_reply: Callback<String>,
/// Callback when user wants to see context (press 'c').
on_context: Callback<String>,
/// Callback when user wants to see history (press 'h').
on_history: Callback<()>,
/// Callback when notification is dismissed.
on_dismiss: Callback<Uuid>,
) -> impl IntoView {
@ -139,7 +137,6 @@ pub fn NotificationToast(
let on_reply = on_reply.clone();
let on_context = on_context.clone();
let on_history = on_history.clone();
let on_dismiss = on_dismiss.clone();
let closure = wasm_bindgen::closure::Closure::<dyn Fn(web_sys::KeyboardEvent)>::new(
@ -156,11 +153,6 @@ pub fn NotificationToast(
on_context.run(display_name.clone());
on_dismiss.run(notif_id);
}
"h" | "H" => {
ev.prevent_default();
on_history.run(());
on_dismiss.run(notif_id);
}
"Escape" => {
ev.prevent_default();
on_dismiss.run(notif_id);
@ -217,10 +209,6 @@ pub fn NotificationToast(
<kbd class="px-1.5 py-0.5 bg-gray-700 rounded text-gray-400">"c"</kbd>
" context"
</span>
<span>
<kbd class="px-1.5 py-0.5 bg-gray-700 rounded text-gray-400">"h"</kbd>
" history"
</span>
</div>
</div>
</div>