XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

fix(webui): allow digits in itemtype for add items(raw) (#2870)

For items like `/Lotus/Types/Keys/TacAlertKeyAnniversary2023k` Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2870 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>

e1563bf2
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -2
Modified static/webui/script.js +2 -2
@@ -2844,8 +2844,8 @@ function removeCountItems(uniqueName, count) {
2844 2844
2845 2845 function addItemByItemType() {
2846 2846 const ItemType = document.getElementById("typeName-type").value;
2847 // Must start with "/Lotus/", contain only A–Z letters, no "//", and not end with "/"
2848 if (!ItemType || !/^\/Lotus\/(?:[A-Za-z]+(?:\/[A-Za-z]+)*)$/.test(ItemType)) {
2847 // Must start with "/Lotus/", contain only letters A–Z, digits 0–9, no "//", and not end with "/"
2848 if (!ItemType || !/^\/Lotus\/(?:[A-Za-z0-9]+(?:\/[A-Za-z0-9]+)*)$/.test(ItemType)) {
2849 2849 $("#typeName-type").addClass("is-invalid").focus();
2850 2850 return;
2851 2851 }