Tags can now be added and removed

This commit is contained in:
Greg Burri 2025-01-04 22:43:20 +01:00
parent f8333651fd
commit 9b0fcec5e2
5 changed files with 142 additions and 36 deletions

View file

@ -1,16 +1,16 @@
use futures::{future::FutureExt, pin_mut, select};
use web_sys::{Element, HtmlDialogElement};
use crate::utils::{by_id, SelectExt};
use crate::utils::{by_id, SelectorExt};
use crate::on_click;
pub async fn show(message: &str) -> bool {
let dialog: HtmlDialogElement = by_id("modal-dialog");
let input_ok: Element = dialog.select(".ok");
let input_cancel: Element = dialog.select(".cancel");
let input_ok: Element = dialog.selector(".ok");
let input_cancel: Element = dialog.selector(".cancel");
dialog.select::<Element>(".content").set_inner_html(message);
dialog.selector::<Element>(".content").set_inner_html(message);
dialog.show_modal().unwrap();