diff --git a/game.v2025-07-31.bundle.js b/game.v2025-07-31.bundle.js index 0b334b7..57a6ddb 100644 --- a/game.v2025-07-31.bundle.js +++ b/game.v2025-07-31.bundle.js @@ -5629,7 +5629,7 @@ () => { E.exportSavegamePrivateBin(); }, - )}"> ${e.T("settings-share-save-button", "Export save without file")}\n
\n --\x3e\n \n
\n
Server Saves
\n
\n \n
\n \n
\n
\n \n Upload a complete export to the server under a custom name.\n
\n \n
\n \n
\n
\n \n Load a previously saved game from the server. This will overwrite your current progress.\n
\n \n `; + )}"> ${e.T("settings-share-save-button", "Export save without file")}\n
\n --\x3e\n \n
\n
Server Saves
\n
\n \n
\n \n
\n
\n \n Upload a complete export to the server under a custom name.\n
\n \n
\n \n \n
\n
\n \n Load a previously saved game from the server. This will overwrite your current progress.\n
\n \n `; } static mapManagementFormView() { const e = s.getInstance(); @@ -5941,6 +5941,26 @@ n.showToast("Load failed", "Could not load the save from the server.", "danger"); } } + static async deleteNamedSave() { + const save_name = $("#server-saves-select").val(); + if (!save_name) return; + const password = $("#named-load-password").val(); + try { + const headers = {}; + if (password) headers["X-Password-Hash"] = await n.sha256_hex(password); + const res = await fetch(`https://pu-saves.burrson.de/saves/${encodeURIComponent(save_name)}`, { method: "DELETE", mode: "cors", headers }); + if (res.status === 401) { + const msg = await res.text(); + n.showToast("Access denied", msg.includes("required") ? "This save is password protected." : "Wrong password.", "danger"); + return; + } + if (!res.ok) throw "Not found"; + n.showToast("Deleted", `Save "${save_name}" deleted from server.`, "success"); + E.populateServerSaves(); + } catch (e) { + n.showToast("Delete failed", "Could not delete the save from the server.", "danger"); + } + } static async importSaveGameClipboard() { const e = s.getInstance(), t = {