fix: next button disabled when user form is incomplete

- gradient_button now accepts enabled parameter; uses Sense::hover() and muted colors when disabled
- Added primary_button_enabled, secondary_button_enabled, danger_button_enabled variants
- main.rs: next button uses primary_button_enabled(..., is_valid) so it's grayed out and non-clickable when form incomplete
This commit is contained in:
Erkan IŞIK
2026-06-24 07:44:28 +03:00
parent 5e66e151bd
commit 35ddd0e933
2 changed files with 43 additions and 32 deletions
+1 -5
View File
@@ -455,11 +455,7 @@ impl eframe::App for YaliApp {
// if !is_exec && !is_finish && ui::theme::danger_button(ui, &t!("cancel")).clicked() {
// self.show_cancel_dialog = true;
// };
let next_clicked = if is_valid {
ui::theme::primary_button(ui, &next_label).clicked()
} else {
ui::theme::secondary_button(ui, &next_label).clicked()
};
let next_clicked = ui::theme::primary_button_enabled(ui, &next_label, is_valid).clicked();
if next_clicked {
self.state.current_step += 1;
}