Added Notifications
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import {Achievement, Region, User, UserAchievement} from "@/Types/types";
|
||||
import {Achievement, Airline, Continent, Region, User, UserAchievement} from "@/Types/types";
|
||||
import ProfileLayout from "@/Components/FlightsGoneBy/ProfileLayout.vue";
|
||||
import Panel from "@/Components/FlightsGoneBy/Panels/Panel.vue";
|
||||
import {computed, defineAsyncComponent} from 'vue';
|
||||
@@ -11,6 +11,7 @@ import MainLayout from "@/Layouts/MainLayout.vue";
|
||||
import {useFlights} from "@/Composables/useFlights";
|
||||
import InlineBadge from "@/Components/FlightsGoneBy/InlineBadge.vue";
|
||||
import GlassTooltip from "@/Components/FlightsGoneBy/GlassTooltip.vue";
|
||||
import ButtonLink from "@/Components/FlightsGoneBy/ButtonLink.vue";
|
||||
|
||||
defineOptions({ layout: MainLayout })
|
||||
|
||||
@@ -18,13 +19,18 @@ const props = defineProps<{
|
||||
achievement: Achievement
|
||||
userAchievement: UserAchievement
|
||||
user: User
|
||||
loggedInUser: User | null
|
||||
isFollowing: boolean
|
||||
flight_api_url: string
|
||||
regions: Region[]
|
||||
alliance: string | null
|
||||
airlines: Airline[]
|
||||
continents: Continent[]
|
||||
aircraft_families: Record<string, string[]>
|
||||
}>()
|
||||
|
||||
|
||||
const { flights, flightsLoading } = useFlights(props.flight_api_url)
|
||||
const { flights, flightsLoading } = useFlights(props.flight_api_url, true)
|
||||
|
||||
const AchievementDetail = defineAsyncComponent(
|
||||
() => import(`./Achievements/${props.achievement.internal_name}.vue`)
|
||||
@@ -63,14 +69,14 @@ const difficultyVariant = computed(() => {
|
||||
<ProfileLayout :user="user" :isFollowing="isFollowing" :loading="flightsLoading">
|
||||
<Head :title="`${achievement.name}`" />
|
||||
<div class="innerLayout">
|
||||
<v-btn
|
||||
prepend-icon="mdi-arrow-left"
|
||||
variant="flat"
|
||||
>
|
||||
<Link :href="route('profile.achievements', { user: user.name })">
|
||||
Back to {{ user.name }}'s Achievements
|
||||
</Link>
|
||||
</v-btn>
|
||||
<ButtonLink variant="flat" icon="mdi-arrow-left" :label="`Back to ${user.name}'s Achievements`" :href="route('profile.achievements', { user: user.name })" />
|
||||
|
||||
|
||||
<VAlert type="info" v-if="loggedInUser?.id !== user.id && loggedInUser">
|
||||
You are viewing {{user.name}}'s progress in this achievement. If you would like to see your progress,
|
||||
<Link :href="route('profile.achievement', {user: loggedInUser.name, achievement: achievement.internal_name})">please click here</Link>.
|
||||
</VAlert>
|
||||
|
||||
|
||||
<Panel>
|
||||
<div class="achievement-hero">
|
||||
@@ -110,7 +116,18 @@ const difficultyVariant = computed(() => {
|
||||
</div>
|
||||
</Panel>
|
||||
|
||||
<component :is="AchievementDetail" :regions="regions" :flights="flights" :achievement="achievement" :user="user" :isFollowing="isFollowing" />
|
||||
<component
|
||||
:is="AchievementDetail"
|
||||
:regions="regions"
|
||||
:flights="flights"
|
||||
:achievement="achievement"
|
||||
:user="user"
|
||||
:isFollowing="isFollowing"
|
||||
:airlines="airlines"
|
||||
:alliance="alliance"
|
||||
:continents="continents"
|
||||
:families="aircraft_families"
|
||||
/>
|
||||
</div>
|
||||
</ProfileLayout>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user