···22import { goto } from "../utils/tools.ts";
33import { Store } from "../utils/store.ts";
44import * as api from "../utils/api.ts";
55+import { openUrl } from "@tauri-apps/plugin-opener";
5667Alpine.data("homePageState", () => ({
78 is_admin: false,
···1819 return "2m ago";
1920 },
20212121- viewLocation(friend_id: string) {
2222- alert(`Opening the location for the friend with id ${friend_id}`);
2222+ async viewLocation(friend_id: string) {
2323+ const pings = await api.getPings(friend_id);
2424+ await openUrl(`geo:0,0?q=${pings[0]}`);
2325 },
24262527 friendOptions(friend_id: string) {
···3032 // temporarly, just use the friend id of the first in the list
3133 const friends = await Store.get("friends");
32343333- await api.sendPings(friends[0].id, "3.14159N 3.14159W");
3535+ await api.sendPings(friends[0].id, "37.78918,-122.40335");
3436 },
35373638 addFriend() {