Updated Map View

This commit is contained in:
2026-06-20 22:21:17 +10:00
parent 6fad966b7e
commit 05ca994253
52 changed files with 2038 additions and 803 deletions
+14 -5
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, computed } from "vue"
import {ref, computed, watch} from "vue"
import ProfileLayout from "@/Components/FlightsGoneBy/ProfileLayout.vue"
import ProfileViewSwitcher from "@/Components/FlightsGoneBy/ProfileViewSwitcher.vue"
import AchievementCard from "@/Components/FlightsGoneBy/AchievementCard.vue"
@@ -8,23 +8,31 @@ import {Head, usePage} from "@inertiajs/vue3";
import MainLayout from "@/Layouts/MainLayout.vue";
import Panel from "@/Components/FlightsGoneBy/Panels/Panel.vue";
import PanelHeader from "@/Components/FlightsGoneBy/Panels/PanelHeader.vue";
import {useUpdateSetting} from "@/Composables/useUpdateSetting";
const {updateSetting} = useUpdateSetting()
defineOptions({ layout: MainLayout })
const props = defineProps<{
user: User
canEdit: boolean
isFollowing: boolean
followStatus: string
achievements: Record<string, Achievement[]>
userAchievements: Record<number, UserAchievement>
unlockedCount: number
totalAchievements: number
unlockedByCategory: Record<string, number>
canView: boolean
}>()
const page = usePage<SharedProps>().props
const hideImpossible = ref(false)
const hideImpossible = ref(page.auth?.user?.resolved_settings?.hide_impossible_achievements ?? false)
watch(hideImpossible, (value) => {
updateSetting('hide_impossible_achievements', value).catch(() => {})
})
const filteredAchievements = computed(() => {
if (!hideImpossible.value) return props.achievements
@@ -56,12 +64,13 @@ const filteredUnlockedCount = computed(() =>
</script>
<template>
<Head :title="`${user.name}'s Achievements`" />
<ProfileLayout
:user="user"
:achievementCount="unlockedCount"
:is-following="isFollowing"
:followStatus="followStatus"
:loading="false"
:canView="canView"
:title="`${user.name}'s Achievements`"
>
<ProfileViewSwitcher active-view="achievements" :user="user" />