Session api token validation
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user