Compare commits
No commits in common. "62d870521e100580ccd3277e99a64a3a08ad8047" and "984bbda0c176fc6e92115b008872c3af6b9aec23" have entirely different histories.
62d870521e
...
984bbda0c1
|
@ -558,7 +558,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "plate-tool"
|
name = "plate-tool"
|
||||||
version = "0.2.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"csv",
|
"csv",
|
||||||
"getrandom",
|
"getrandom",
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
use yew::prelude::*;
|
|
||||||
use yewdux::prelude::*;
|
|
||||||
|
|
||||||
use crate::components::states::{CurrentTransfer, MainState};
|
|
||||||
|
|
||||||
pub fn toggle_in_transfer_hashes_callback(
|
|
||||||
main_dispatch: &Dispatch<MainState>,
|
|
||||||
) -> Callback<web_sys::MouseEvent> {
|
|
||||||
let main_dispatch = main_dispatch.clone();
|
|
||||||
Callback::from(move |_| {
|
|
||||||
main_dispatch.reduce_mut(|state| {
|
|
||||||
state.preferences.in_transfer_hashes ^= true;
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
pub mod main_window_callbacks;
|
|
|
@ -12,19 +12,17 @@ use web_sys::{
|
||||||
use yew::prelude::*;
|
use yew::prelude::*;
|
||||||
use yewdux::prelude::*;
|
use yewdux::prelude::*;
|
||||||
|
|
||||||
use crate::components::new_plate_dialog::NewPlateDialog;
|
use super::new_plate_dialog::NewPlateDialog;
|
||||||
use crate::components::plates::plate_container::PlateContainer;
|
use super::plates::plate_container::PlateContainer;
|
||||||
use crate::components::states::{CurrentTransfer, MainState};
|
use super::states::{CurrentTransfer, MainState};
|
||||||
use crate::components::transfer_menu::{letters_to_num, RegionDisplay, TransferMenu};
|
use super::transfer_menu::{letters_to_num, RegionDisplay, TransferMenu};
|
||||||
use crate::components::tree::Tree;
|
use super::tree::Tree;
|
||||||
|
|
||||||
use crate::data::csv::state_to_csv;
|
use crate::data::csv::state_to_csv;
|
||||||
use crate::data::plate_instances::PlateInstance;
|
use crate::data::plate_instances::PlateInstance;
|
||||||
use crate::data::transfer::Transfer;
|
use crate::data::transfer::Transfer;
|
||||||
use crate::data::transfer_region::{Region, TransferRegion};
|
use crate::data::transfer_region::{Region, TransferRegion};
|
||||||
|
|
||||||
use crate::components::callbacks::main_window_callbacks;
|
|
||||||
|
|
||||||
#[function_component]
|
#[function_component]
|
||||||
pub fn MainWindow() -> Html {
|
pub fn MainWindow() -> Html {
|
||||||
let (main_state, main_dispatch) = use_store::<MainState>();
|
let (main_state, main_dispatch) = use_store::<MainState>();
|
||||||
|
@ -51,7 +49,14 @@ pub fn MainWindow() -> Html {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let toggle_in_transfer_hashes_callback = main_window_callbacks::test(&main_dispatch);
|
let toggle_in_transfer_hashes_callback = {
|
||||||
|
let main_dispatch = main_dispatch.clone();
|
||||||
|
Callback::from(move |_| {
|
||||||
|
main_dispatch.reduce_mut(|state| {
|
||||||
|
state.preferences.in_transfer_hashes ^= true;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
let new_plate_dialog_is_open = use_state_eq(|| false);
|
let new_plate_dialog_is_open = use_state_eq(|| false);
|
||||||
let new_plate_dialog_callback = {
|
let new_plate_dialog_callback = {
|
||||||
|
|
|
@ -4,4 +4,3 @@ pub mod plates;
|
||||||
pub mod states;
|
pub mod states;
|
||||||
pub mod transfer_menu;
|
pub mod transfer_menu;
|
||||||
pub mod tree;
|
pub mod tree;
|
||||||
mod callbacks;
|
|
||||||
|
|
Loading…
Reference in New Issue