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

SpaceNinjaServer

A simple server for a small space ninja game

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

XFEstudio/SpaceNinjaServer

fix(webui): changing language doesn't update bulk card action titles (#3790)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3790 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>

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

代码差异

1 个文件 +12 -0
Modified static/webui/script.js +12 -0
@@ -390,6 +390,9 @@ function updateLocElements() {
390 390 document.querySelectorAll("[data-loc-placeholder]").forEach(elm => {
391 391 elm.placeholder = loc(elm.getAttribute("data-loc-placeholder"));
392 392 });
393 document.querySelectorAll("[data-loc-title]").forEach(elm => {
394 elm.title = loc(elm.getAttribute("data-loc-title"));
395 });
393 396 document.querySelectorAll("[data-loc-inc]").forEach(elm => {
394 397 const incWith = elm
395 398 .getAttribute("data-loc-inc")
@@ -2640,6 +2643,7 @@ dictPromise.then(() => {
2640 2643 debounce(addMissingEquipment, [cardType]);
2641 2644 }
2642 2645 };
2646 a.setAttribute("data-loc-title", "inventory_bulkAdd");
2643 2647 a.title = loc("inventory_bulkAdd");
2644 2648 a.innerHTML = icons.plus;
2645 2649 butDiv.appendChild(a);
@@ -2655,6 +2659,7 @@ dictPromise.then(() => {
2655 2659 debounce(maxRankAllEquipment, [cardType]);
2656 2660 }
2657 2661 };
2662 a.setAttribute("data-loc-title", "inventory_bulkRankUp");
2658 2663 a.title = loc("inventory_bulkRankUp");
2659 2664 a.innerHTML = icons.arrowUp;
2660 2665 butDiv.appendChild(a);
@@ -2667,6 +2672,7 @@ dictPromise.then(() => {
2667 2672 event.preventDefault();
2668 2673 doBulkQuestUpdate("completeAll");
2669 2674 };
2675 a.setAttribute("data-loc-title", "inventory_bulkComplete");
2670 2676 a.title = loc("inventory_bulkComplete");
2671 2677 a.innerHTML = icons.check;
2672 2678 butDiv.appendChild(a);
@@ -2678,6 +2684,7 @@ dictPromise.then(() => {
2678 2684 event.preventDefault();
2679 2685 doBulkQuestUpdate("resetAll");
2680 2686 };
2687 a.setAttribute("data-loc-title", "inventory_bulkReset");
2681 2688 a.title = loc("inventory_bulkReset");
2682 2689 a.innerHTML = icons.arrowRotateRight;
2683 2690 butDiv.appendChild(a);
@@ -2690,6 +2697,7 @@ dictPromise.then(() => {
2690 2697 event.preventDefault();
2691 2698 removeItems(cardType);
2692 2699 };
2700 a.setAttribute("data-loc-title", "inventory_bulkRemove");
2693 2701 a.title = loc("inventory_bulkRemove");
2694 2702 a.innerHTML = icons.trash;
2695 2703 butDiv.appendChild(a);
@@ -2730,6 +2738,7 @@ dictPromise.then(() => {
2730 2738 debounce(addMissingTechProjects);
2731 2739 }
2732 2740 };
2741 a.setAttribute("data-loc-title", "inventory_bulkAdd");
2733 2742 a.title = loc("inventory_bulkAdd");
2734 2743 a.innerHTML = icons.plus;
2735 2744 a.id = `${cardType}-bulkAdd`;
@@ -2742,6 +2751,7 @@ dictPromise.then(() => {
2742 2751 event.preventDefault();
2743 2752 debounce(fundAllTechProjects);
2744 2753 };
2754 a.setAttribute("data-loc-title", "guildView_bulkFund");
2745 2755 a.title = loc("guildView_bulkFund");
2746 2756 a.innerHTML = icons.arrowUp;
2747 2757 a.id = `${cardType}-bulkFund`;
@@ -2754,6 +2764,7 @@ dictPromise.then(() => {
2754 2764 event.preventDefault();
2755 2765 debounce(completeAllTechProjects);
2756 2766 };
2767 a.setAttribute("data-loc-title", "guildView_bulkComplete");
2757 2768 a.title = loc("guildView_bulkComplete");
2758 2769 a.innerHTML = icons.forward;
2759 2770 a.id = `${cardType}-bulkComplete`;
@@ -2770,6 +2781,7 @@ dictPromise.then(() => {
2770 2781 debounce(bulkRemoveTechProjects);
2771 2782 }
2772 2783 };
2784 a.setAttribute("data-loc-title", "inventory_bulkRemove");
2773 2785 a.title = loc("inventory_bulkRemove");
2774 2786 a.innerHTML = icons.trash;
2775 2787 a.id = `${cardType}-bulkRemove`;