diff --git a/lib/frontend/settings.ts b/lib/frontend/settings.ts index 80b79c4..ddf3efa 100644 --- a/lib/frontend/settings.ts +++ b/lib/frontend/settings.ts @@ -229,11 +229,13 @@ function importData() { function useNewURL() { let newURL = (document.getElementById("newServerURL") as HTMLInputElement).value.trim(); - CacheStore.set("glimeshURL", newURL); let useHTTPS = (document.getElementById("useHttps") as HTMLInputElement).checked; - CacheStore.set("useGlimeshHTTPS", useHTTPS); let newClientID = (document.getElementById("newClientID") as HTMLInputElement).value.trim(); - CacheStore.set("glimeshClientID", newClientID); + CacheStore.setMultiple([ + {glimeshURL: newURL}, + {useHTTPS: useHTTPS}, + {glimeshClientID: newClientID} + ]); showToast("Server updated. Good luck with your new platform!"); } diff --git a/lib/modules/migrations.ts b/lib/modules/migrations.ts index 0b782bb..780d933 100644 --- a/lib/modules/migrations.ts +++ b/lib/modules/migrations.ts @@ -78,12 +78,11 @@ function checkForHoldOnAMinCommaCriesCommaTheFinalUpdate() { if (!knowsAboutTheEnd) { // But now the end has come.. - // Set the new URL - CacheStore.set("glimeshURL", "glimesh.tv"); - CacheStore.set("useGlimeshHTTPS", true); - // There is also a new client ID, but every use has the default value - // Don't run this function again - CacheStore.set("setFinalURL", true); + CacheStore.setMultiple([ + {glimeshURL: "glimesh.tv"}, + {useGlimeshHTTPS: true}, + {setFinalURL: true} + ]); // Sets all the values for custom servers. Defaults to glimesh.tv // My glimboi dev is now done... }