Highlight bad input regions
If an invalid region is inputted, make it red.
This commit is contained in:
parent
c3270d3c59
commit
00f39e636a
|
@ -33,6 +33,9 @@ div.transfer_menu {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: 2px solid orange;
|
border: 2px solid orange;
|
||||||
}
|
}
|
||||||
|
div.transfer_menu input:invalid {
|
||||||
|
background-color: #faa;
|
||||||
|
}
|
||||||
|
|
||||||
div.plate_container {
|
div.plate_container {
|
||||||
border: 2px dashed purple;
|
border: 2px dashed purple;
|
||||||
|
|
|
@ -29,7 +29,9 @@ pub fn TransferMenu() -> Html {
|
||||||
interleave_x: state.interleave_x,
|
interleave_x: state.interleave_x,
|
||||||
interleave_y: state.interleave_y
|
interleave_y: state.interleave_y
|
||||||
});
|
});
|
||||||
log::debug!("{:?}", dispatch.get());
|
input.set_custom_validity("");
|
||||||
|
} else {
|
||||||
|
input.set_custom_validity("Invalid region.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -50,7 +52,9 @@ pub fn TransferMenu() -> Html {
|
||||||
interleave_x: state.interleave_x,
|
interleave_x: state.interleave_x,
|
||||||
interleave_y: state.interleave_y
|
interleave_y: state.interleave_y
|
||||||
});
|
});
|
||||||
log::debug!("{:?}", dispatch.get());
|
input.set_custom_validity("");
|
||||||
|
} else {
|
||||||
|
input.set_custom_validity("Invalid region.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue