feat(hunt): track walking distance via GPS, show live locations on map
Add foreground-only GPS distance tracking for hunts
This commit is contained in:
@@ -5,6 +5,7 @@ import { fullDate } from '~~/server/utils/date';
|
||||
const { confirm } = useModal();
|
||||
const { init } = useToast();
|
||||
const { t, d } = useI18n();
|
||||
const { formatDistance } = useFormatDistance();
|
||||
|
||||
const props = defineProps<{
|
||||
team: Team;
|
||||
@@ -151,7 +152,7 @@ async function deleteTeam() {
|
||||
<VaCollapse
|
||||
:key="team.id"
|
||||
color="info"
|
||||
:header="`${team.name} — ${team.members.length} members — ${team._count.answers} answers — ${team.score} points`"
|
||||
:header="`${team.name} — ${team.members.length} members — ${team._count.answers} answers — ${team.score} points — ${formatDistance(team.distance)}`"
|
||||
>
|
||||
<div class="flex flex-col gap-2">
|
||||
<h2 class="text-xl">
|
||||
@@ -171,6 +172,9 @@ async function deleteTeam() {
|
||||
by {{ team.owner.name }} ({{ team.owner.email }})
|
||||
</p>
|
||||
<p>{{ team._count.answers }} answers</p>
|
||||
<p v-if="team.distance > 0">
|
||||
{{ t('page.common.distance') }}: {{ formatDistance(team.distance) }}
|
||||
</p>
|
||||
<div class="grid grid-cols-1 gap-2 md:grid-cols-3 lg:grid-cols-5">
|
||||
<VaButton
|
||||
v-for="member in team.members"
|
||||
|
||||
Reference in New Issue
Block a user