feat(ui): keyboard nav (Enter advances step) + yaml-health warning on launch
This commit is contained in:
parent
0b1604e018
commit
521b124f05
2 changed files with 25 additions and 0 deletions
|
|
@ -729,6 +729,17 @@
|
|||
document.addEventListener("keydown", (ev) => {
|
||||
if (ev.key === "Escape") {
|
||||
if (state.step > 1) setStep(state.step - 1);
|
||||
return;
|
||||
}
|
||||
if (ev.key === "Enter" && !ev.shiftKey && !ev.ctrlKey && !ev.altKey) {
|
||||
const tag = (ev.target && ev.target.tagName) || "";
|
||||
if (tag === "TEXTAREA") return;
|
||||
if (tag === "BUTTON") return;
|
||||
if (state.step < 4) {
|
||||
if (state.step === 2 && state.actionType) renderActionForm();
|
||||
setStep(state.step + 1);
|
||||
ev.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue