mirror of
https://gitlab.com/erkanisik/yali-rs.git
synced 2026-09-28 16:03:44 +00:00
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:
+1
-5
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user