Self-hosted, federated location sharing app and server that prioritizes user privacy and security
end-to-end-encryption
location-sharing
privacy
self-hosted
federated
1import Alpine from "alpinejs";
2import { Store } from "../utils/store.ts";
3import { goto } from "../utils/tools.ts";
4
5Alpine.data("settingsPageState", () => ({
6 location_on: Store.get("is_sharing"),
7
8 async debugLogout() {
9 await Store.reset();
10 goto("signup");
11 },
12
13 goto(newLocation: string) {
14 goto(newLocation);
15 },
16
17 async toggleLocation() {
18 // once i finish this here, i'll move it over to api maybe? i'll have to check with azom
19
20 await Store.set("is_sharing", !(await Store.get("is_sharing")));
21 this.location_on = Store.get("is_sharing");
22 },
23}));
24
25Alpine.start();