···33import { goto } from "../utils/tools.ts";
4455Alpine.data("settingsPageState", () => ({
66+ location_on: Store.get("is_sharing"),
77+68 async debugLogout() {
79 await Store.reset();
810 goto("signup");
911 },
1212+1013 goto(newLocation: string) {
1114 goto(newLocation);
1515+ },
1616+1717+ async toggleLocation() {
1818+ // once i finish this here, i'll move it over to api maybe? i'll have to check with azom
1919+2020+ await Store.set("is_sharing", !(await Store.get("is_sharing")));
2121+ this.location_on = Store.get("is_sharing");
1222 },
1323}));
1424
+2
app/src/utils/api.ts
···3333 await Store.set("priv_key", bufToBase64(privKeyRaw));
3434 await Store.set("friends", []);
35353636+ await Store.set("is_sharing", true); // i'm adding this so it works in settings, i think it's more user friendly to have the location to be on by default, but... less privacy friendly? wait no.. nvm. it won't share location with the server since they don't have any added friends yet :)
3737+3638 return json;
3739}
3840