返回提交历史
Modified
static/webui/script.js
+20
-14
XFEstudio/XFESpaceNinjaServer
fix(webui): update guildView after performing an action in it (#3854)
This is still very annoying because it puts the guildView back in the loading state, causing the scroll height to be reset, but that's a separate, already-tracked issue. Closes #3851 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3854 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
059f0ad2
代码差异
1 个文件
+20
-14
@@ -2187,13 +2187,19 @@ dictPromise.then(() => {
2187
2187
});
2188
2188
});
2189
2189
2190
function updateGuild() {
2191
if (single.getCurrentPath() == "/webui/guildView") {
2192
single.loadRoute(single.getCurrentPath());
2193
}
2194
}
2195
2190
2196
function changeGuildRank(guildId, targetId, rankChange) {
2191
2197
revalidateAuthz().then(() => {
2192
2198
const req = $.get(
2193
2199
`/api/changeGuildRank.php?${window.authz}&guildId=${guildId}&targetId=${targetId}&rankChange=${rankChange}`
2194
2200
);
2195
2201
req.done(() => {
2196
updateInventory();
2202
updateGuild();
2197
2203
});
2198
2204
});
2199
2205
}
@@ -2208,7 +2214,7 @@ function kickFromGuild(accountId) {
2208
2214
})
2209
2215
});
2210
2216
req.done(() => {
2211
updateInventory();
2217
updateGuild();
2212
2218
});
2213
2219
});
2214
2220
}
@@ -2217,7 +2223,7 @@ function kickFromAlliance(guildId) {
2217
2223
revalidateAuthz().then(() => {
2218
2224
const req = $.get("/api/removeFromAlliance.php?" + window.authz + "&guildId=" + guildId);
2219
2225
req.done(() => {
2220
updateInventory();
2226
updateGuild();
2221
2227
});
2222
2228
});
2223
2229
}
@@ -2521,7 +2527,7 @@ function addVaultItem(vaultType) {
2521
2527
});
2522
2528
req.done(() => {
2523
2529
document.getElementById(`acquire-type-${vaultType}`).value = "";
2524
updateInventory();
2530
updateGuild();
2525
2531
});
2526
2532
});
2527
2533
}
@@ -2543,7 +2549,7 @@ function removeVaultItem(vaultType, ItemType, ItemCount) {
2543
2549
})
2544
2550
});
2545
2551
req.done(() => {
2546
updateInventory();
2552
updateGuild();
2547
2553
});
2548
2554
});
2549
2555
}
@@ -2566,7 +2572,7 @@ function addGuildTechProject() {
2566
2572
});
2567
2573
req.done(() => {
2568
2574
document.getElementById("acquire-type-TechProjects").value = "";
2569
updateInventory();
2575
updateGuild();
2570
2576
});
2571
2577
});
2572
2578
}
@@ -2583,7 +2589,7 @@ function removeGuildTechProject(uniqueName) {
2583
2589
])
2584
2590
});
2585
2591
req.done(() => {
2586
updateInventory();
2592
updateGuild();
2587
2593
});
2588
2594
});
2589
2595
}
@@ -2600,7 +2606,7 @@ function completeGuildTechProject(uniqueName) {
2600
2606
])
2601
2607
});
2602
2608
req.done(() => {
2603
updateInventory();
2609
updateGuild();
2604
2610
});
2605
2611
});
2606
2612
}
@@ -2617,7 +2623,7 @@ function fundGuildTechProject(uniqueName) {
2617
2623
])
2618
2624
});
2619
2625
req.done(() => {
2620
updateInventory();
2626
updateGuild();
2621
2627
});
2622
2628
});
2623
2629
}
@@ -2634,7 +2640,7 @@ function dispatchAddVaultItemsBatch(requests, vaultType) {
2634
2640
})
2635
2641
});
2636
2642
req.done(() => {
2637
updateInventory();
2643
updateGuild();
2638
2644
resolve();
2639
2645
});
2640
2646
});
@@ -2669,7 +2675,7 @@ function dispatchAddTechProjectsBatch(requests) {
2669
2675
data: JSON.stringify(requests)
2670
2676
});
2671
2677
req.done(() => {
2672
updateInventory();
2678
updateGuild();
2673
2679
resolve();
2674
2680
});
2675
2681
});
@@ -2721,7 +2727,7 @@ function dispatchRemoveTechProjectsBatch(requests) {
2721
2727
data: JSON.stringify(requests)
2722
2728
});
2723
2729
req.done(() => {
2724
updateInventory();
2730
updateGuild();
2725
2731
resolve();
2726
2732
});
2727
2733
});
@@ -2754,7 +2760,7 @@ function dispatchFundTechProjectsBatch(requests) {
2754
2760
data: JSON.stringify(requests)
2755
2761
});
2756
2762
req.done(() => {
2757
updateInventory();
2763
updateGuild();
2758
2764
resolve();
2759
2765
});
2760
2766
});
@@ -2791,7 +2797,7 @@ function dispatchCompleteTechProjectsBatch(requests) {
2791
2797
data: JSON.stringify(requests)
2792
2798
});
2793
2799
req.done(() => {
2794
updateInventory();
2800
updateGuild();
2795
2801
resolve();
2796
2802
});
2797
2803
});