dst reset button functionality
This commit is contained in:
parent
e956e986fb
commit
8f1ec42e48
@ -184,7 +184,12 @@ pub fn Sidebar () -> impl IntoView {
|
||||
</For>
|
||||
</div>
|
||||
<div class="reset">
|
||||
<button title="Сбросить кости">"⟳"</button>
|
||||
<button
|
||||
title="Сбросить кости"
|
||||
on:click=move |_| dt.update(|d| d.reset())
|
||||
>
|
||||
"⟳"
|
||||
</button>
|
||||
</div>
|
||||
<div class="succeeded dt-list">
|
||||
<For
|
||||
|
||||
@ -179,6 +179,13 @@ pub struct DeathSaveThrows {
|
||||
pub succeeded: u8,
|
||||
}
|
||||
|
||||
impl DeathSaveThrows {
|
||||
pub fn reset (&mut self) {
|
||||
self.failed = 0;
|
||||
self.succeeded = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Store)]
|
||||
pub struct ContactBook (pub HashMap<String, Contact>);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user