Update packages

This commit is contained in:
Emilia Allison 2024-11-02 16:17:11 -05:00
parent e8511c01b0
commit 526029ee4d
Signed by: emilia
GPG Key ID: 05D5D1107E5100A1
6 changed files with 538 additions and 232 deletions

753
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,8 @@ edition = "2021"
[dependencies]
plate-tool-lib = { path = "../plate-tool-lib" }
yew = { version = "0.20.0", features = ["csr"] }
yewdux = "0.9"
yew = { version = "0.21.0", features = ["csr"] }
yewdux = "0.10"
wasm-bindgen = "0.2"
web-sys = { version = "0.3", features = ["FormData", "HtmlFormElement",
"HtmlDialogElement", "Blob", "Url", "Window",

View File

@ -4,6 +4,7 @@
<meta charset="utf-8" />
<link data-trunk rel="scss" href="assets/scss/index.scss">
<link data-trunk rel="copy-dir" href="assets/fonts">
<link data-trunk rel="rust" data-bin="plate-tool-web" />
<script data-trunk src="assets/js/screenshot_utility.js"></script>
<script data-trunk src="assets/js/html2canvas.js"></script>
<title>Plate Tool</title>

View File

@ -41,7 +41,8 @@ pub fn NewPlateDialog(props: &NewPlateDialogProps) -> Html {
{
let dialog_ref = dialog_ref.clone();
use_effect_with_deps(
use_effect_with(
dialog_ref,
|dialog_ref| {
dialog_ref
.cast::<HtmlDialogElement>()
@ -49,7 +50,6 @@ pub fn NewPlateDialog(props: &NewPlateDialogProps) -> Html {
.show_modal()
.ok();
},
dialog_ref,
);
}

View File

@ -71,8 +71,8 @@ pub struct MainState {
}
impl Store for MainState {
fn new() -> Self {
init_listener(storage::StorageListener::<Self>::new(storage::Area::Local));
fn new(context: &yewdux::Context) -> Self {
init_listener(storage::StorageListener::<Self>::new(storage::Area::Local), context);
storage::load(storage::Area::Local)
.expect("Unable to load state")

View File

@ -205,7 +205,8 @@ fn PlateInfoModal(props: &PlateInfoModalProps) -> Html {
{
let dialog_ref = dialog_ref.clone();
use_effect_with_deps(
use_effect_with(
dialog_ref,
|dialog_ref| {
dialog_ref
.cast::<HtmlDialogElement>()
@ -213,7 +214,6 @@ fn PlateInfoModal(props: &PlateInfoModalProps) -> Html {
.show_modal()
.ok();
},
dialog_ref,
);
}