Skip to content

Commit

Permalink
Add button for saving changes during guided training session
Browse files Browse the repository at this point in the history
  • Loading branch information
treiher committed Sep 6, 2024
1 parent 597d7bd commit 09be733
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Dark mode
- Descriptions of measuring points on body fat page
- Archiving of routines
- Button for saving changes during guided training session

### Changed

Expand Down
29 changes: 13 additions & 16 deletions frontend/src/page/training_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2316,22 +2316,19 @@ fn view_training_session_form(model: &Model, data_model: &data::Model) -> Vec<No
],
]
],
IF![
model.guide.is_none() =>
button![
C!["button"],
C!["is-fab"],
C!["is-medium"],
C!["is-link"],
C![IF![not(valid) => "is-danger"]],
C![IF![model.loading => "is-loading"]],
attrs![
At::Disabled => save_disabled.as_at_value(),
],
ev(Ev::Click, |_| Msg::SaveTrainingSession),
span![C!["icon"], i![C!["fas fa-save"]]]
]
],
button![
C!["button"],
C!["is-fab"],
C!["is-medium"],
C!["is-link"],
C![IF![not(valid) => "is-danger"]],
C![IF![model.loading => "is-loading"]],
attrs![
At::Disabled => save_disabled.as_at_value(),
],
ev(Ev::Click, |_| Msg::SaveTrainingSession),
span![C!["icon"], i![C!["fas fa-save"]]]
]
]
}

Expand Down

0 comments on commit 09be733

Please sign in to comment.