feat(webui): add item by ItemType #2704

Merged
Sainan merged 7 commits from AMelonInsideLemon/SpaceNinjaServer:add-by-ItemType into main 2025-08-30 19:34:23 -07:00
Showing only changes of commit 759b80698a - Show all commits

View File

@ -2018,7 +2018,8 @@ function doAcquireMiscItems() {
function addItemByItemType() {
const ItemType = document.getElementById("typeName-type").value;
if (!ItemType || !/^[A-Za-z/]+$/.test(ItemType) || !ItemType.startsWith("/Lotus/")) {
// Must start with "/Lotus/", contain only AZ letters, no "//", and not end with "/"
if (!ItemType || !/^\/Lotus\/(?:[A-Za-z]+(?:\/[A-Za-z]+)*)$/.test(ItemType)) {
$("#typeName-type").addClass("is-invalid").focus();
return;
}