fix(dtmm): Fix disabled state of deployment buttons
This commit is contained in:
parent
91020c02e1
commit
a1a7e9a26e
1 changed files with 6 additions and 2 deletions
|
@ -58,7 +58,9 @@ fn build_top_bar() -> impl Widget<State> {
|
||||||
.on_click(|ctx, _state: &mut State, _env| {
|
.on_click(|ctx, _state: &mut State, _env| {
|
||||||
ctx.submit_command(ACTION_START_DEPLOY);
|
ctx.submit_command(ACTION_START_DEPLOY);
|
||||||
})
|
})
|
||||||
.disabled_if(|data, _| !data.is_deployment_in_progress),
|
.disabled_if(|data, _| {
|
||||||
|
data.is_deployment_in_progress || data.is_reset_in_progress
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
.with_default_spacer()
|
.with_default_spacer()
|
||||||
.with_child(
|
.with_child(
|
||||||
|
@ -66,7 +68,9 @@ fn build_top_bar() -> impl Widget<State> {
|
||||||
.on_click(|ctx, _state: &mut State, _env| {
|
.on_click(|ctx, _state: &mut State, _env| {
|
||||||
ctx.submit_command(ACTION_START_RESET_DEPLOYMENT);
|
ctx.submit_command(ACTION_START_RESET_DEPLOYMENT);
|
||||||
})
|
})
|
||||||
.disabled_if(|data, _| !data.is_reset_in_progress),
|
.disabled_if(|data, _| {
|
||||||
|
data.is_deployment_in_progress || data.is_reset_in_progress
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.padding(theme::TOP_BAR_INSETS)
|
.padding(theme::TOP_BAR_INSETS)
|
||||||
|
|
Loading…
Add table
Reference in a new issue