frontend/app/components/events/EventComponent.vue
2026-05-01 15:28:18 +02:00

32 lines
1.1 KiB
Vue

<template>
<ContentRow>
<ContentCell>
<UiIcon v-if="event.type === EventType.UPLOAD">upload</UiIcon>
<UiIcon v-if="event.type === EventType.DELETE">delete</UiIcon>
</ContentCell>
<ContentCell> {{ event.resource.groupId }}</ContentCell>
<ContentCell>{{ event.resource.artifactId }}</ContentCell>
<ContentCell>{{ event.resource.version }}</ContentCell>
<ContentCell>
<p>{{useUserStore().get(event.userId)?.displayName}}</p>
</ContentCell>
<ContentCell>{{ Age.calc(event.timestamp) }}</ContentCell>
</ContentRow>
</template>
<script setup lang="ts">
import ContentRow from "~/components/ui/table/ContentRow.vue";
import ContentCell from "~/components/ui/table/ContentCell.vue";
import {Event, EventType} from "~/components/events/Event";
import {Age} from "~/utils/Age";
import DisplayNameComponent from "~/components/auth/DisplayNameComponent.vue";
import {useUserStore} from "~/components/users/UserStore";
defineProps<{
event: Event
}>()
</script>
<style scoped>
</style>