funkwhale/front/src/views/admin/moderation/RequestDetail.vue

49 wiersze
985 B
Vue
Czysty Zwykły widok Historia

2022-08-30 17:56:04 +00:00
<script setup lang="ts">
import { ref } from 'vue'
import axios from 'axios'
import UserRequestCard from '~/components/manage/moderation/UserRequestCard.vue'
import useErrorHandler from '~/composables/useErrorHandler'
interface Props {
id: number
}
const props = defineProps<Props>()
const isLoading = ref(false)
const object = ref()
const fetchData = async () => {
isLoading.value = true
try {
const response = await axios.get(`manage/moderation/requests/${props.id}/`)
object.value = response.data
} catch (error) {
useErrorHandler(error as Error)
}
isLoading.value = false
}
fetchData()
</script>
2020-03-18 10:57:33 +00:00
<template>
<main>
2021-12-06 10:35:20 +00:00
<div
v-if="isLoading"
class="ui vertical segment"
>
<div :class="['ui', 'centered', 'active', 'inline', 'loader']" />
2020-03-18 10:57:33 +00:00
</div>
<template v-if="object">
<div class="ui vertical stripe segment">
2022-07-25 20:52:15 +00:00
<user-request-card :init-obj="object" />
2020-03-18 10:57:33 +00:00
</div>
</template>
</main>
</template>