feat: add reactions (#1074)

This commit is contained in:
Jonas Plum
2024-07-20 06:39:02 +02:00
committed by GitHub
parent 82ad50d228
commit e2c8f1d223
78 changed files with 3270 additions and 257 deletions

View 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>