mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-08 16:22:46 +01:00
feat: add reactions (#1074)
This commit is contained in:
35
ui/src/views/ReactionView.vue
Normal file
35
ui/src/views/ReactionView.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<script setup lang="ts">
|
||||
import ThreeColumn from '@/components/layout/ThreeColumn.vue'
|
||||
import ReactionDisplay from '@/components/reaction/ReactionDisplay.vue'
|
||||
import ReactionList from '@/components/reaction/ReactionList.vue'
|
||||
|
||||
import { computed, onMounted } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
import { pb } from '@/lib/pocketbase'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const id = computed(() => route.params.id as string)
|
||||
|
||||
onMounted(() => {
|
||||
if (!pb.authStore.model) {
|
||||
router.push({ name: 'login' })
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ThreeColumn>
|
||||
<template #list>
|
||||
<ReactionList />
|
||||
</template>
|
||||
<template #single>
|
||||
<div v-if="!id" class="flex h-full w-full items-center justify-center text-lg text-gray-500">
|
||||
No reaction selected
|
||||
</div>
|
||||
<ReactionDisplay v-else :key="id" :id="id" />
|
||||
</template>
|
||||
</ThreeColumn>
|
||||
</template>
|
||||
Reference in New Issue
Block a user