feat(webui): add "add missing mods" #804
@ -1093,6 +1093,10 @@ function doAddAllMods() {
|
||||
}
|
||||
|
||||
modsAll = Array.from(modsAll);
|
||||
if (
|
||||
modsAll.length != 0 &&
|
||||
window.confirm("Are you sure you want to add " + modsAll.length + " mods to your account?")
|
||||
) {
|
||||
// Batch to avoid PayloadTooLargeError
|
||||
const batches = [];
|
||||
for (let i = 0; i < modsAll.length; i += 1000) {
|
||||
@ -1112,6 +1116,7 @@ function doAddAllMods() {
|
||||
updateInventory();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user
🛠️ Refactor suggestion
Add error handling for network failures and batch operations.
The current implementation lacks explicit error handling for network requests and batch operations.
Add error handling and progress feedback:
📝 Committable suggestion
🧰 Tools
🪛 eslint
[error] 1087-1087: '$' is not defined.
(no-undef)
[error] 1106-1106: '$' is not defined.
(no-undef)