Preferences menu and toggle for in_transfer hashes
This commit is contained in:
parent
0101846b52
commit
4937d4ad28
|
@ -12,6 +12,8 @@ div.upper_menu {
|
|||
|
||||
visibility: inherit;
|
||||
|
||||
display: flex;
|
||||
|
||||
div.dropdown {
|
||||
margin-right: 2px;
|
||||
|
||||
|
|
|
@ -49,6 +49,15 @@ pub fn MainWindow() -> Html {
|
|||
});
|
||||
}
|
||||
|
||||
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_callback = {
|
||||
let new_plate_dialog_is_open = new_plate_dialog_is_open.clone();
|
||||
|
@ -476,6 +485,15 @@ pub fn MainWindow() -> Html {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button>{"Options"}</button>
|
||||
<div class="dropdown-sub">
|
||||
<button>{"Styles"}</button>
|
||||
<div>
|
||||
<button onclick={toggle_in_transfer_hashes_callback}>{"Toggle in transfer hashes"}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_container">
|
||||
<Tree open_new_plate_callback={open_new_plate_dialog_callback}/>
|
||||
|
|
Loading…
Reference in New Issue