Added profile page to edit your profile and see stats.

This commit is contained in:
sarah committed 2026-08-30 18:14:06 +02:00
1 parent 39a8f18fa3
commit 11b26d972e
6 files changed
+1105 -6

No files matched your search

+8 -5
View File
@@ -145,18 +145,21 @@ async function WriteRemoteSave(SaveData) {
}
async function ReadRemoteSave() {
async function ReadRemoteSave(
SaveKey = GetSaveKey()
) {
const Response = await fetch(
ApiUrl + "/Load.php",
{
method: "POST",
headers: {
"Content-Type": "application/json"
"Content-Type":
"application/json"
},
body: JSON.stringify({
SaveKey: GetSaveKey()
SaveKey: SaveKey
})
}
);
@@ -168,7 +171,8 @@ async function ReadRemoteSave() {
);
}
const Result = await Response.json();
const Result =
await Response.json();
if (!Result.Success) {
throw new Error(
@@ -184,7 +188,6 @@ async function ReadRemoteSave() {
return Result.SaveData;
}
async function SaveGame(SaveData) {
SaveData.Revision++;
SaveData.LastSavedAt = Date.now();