Session api token validation

This commit is contained in:
2026-06-29 21:42:47 +10:00
parent 164b590a6c
commit e551e202d5
18 changed files with 273 additions and 154 deletions
@@ -1,9 +1,11 @@
<script setup lang="ts">
import {computed, ref} from "vue";
import {Flight, User} from "@/Types/types";
import {router} from "@inertiajs/vue3";
import {Flight, SharedProps, User} from "@/Types/types";
import {router, usePage} from "@inertiajs/vue3";
import { copyToClipboard } from "@/Composables/useClipboard";
const loggedInUser = usePage<SharedProps>().props.auth.user?.id
defineProps<{
profileUser: User
flight: Flight
@@ -56,6 +58,12 @@ function copyFlightToClipboard(flight: Flight) {
title="View Details"
:href="route('profile.flight', { userFlight: flight.id, user: profileUser.name })"
/>
<v-list-item
v-if="loggedInUser && loggedInUser !== profileUser.id"
prepend-icon="mdi-plus"
title="Log Flight for Myself"
:href="route('flights.copy', { flight: flight.id })"
/>
<v-list-item
prepend-icon="mdi-content-copy"
title="Copy to Clipboard"
@@ -72,6 +80,7 @@ function copyFlightToClipboard(flight: Flight) {
@click="flightToDelete = flight"
/>
</v-list>
</v-menu>
<v-dialog v-if="canEdit" v-model="showDeleteDialog" max-width="400">