2019-09-09 09:31:08 +02:00
|
|
|
<template>
|
2022-08-26 16:08:58 +02:00
|
|
|
<div class="dark:bg-zinc-700 p-2 rounded" v-if="report">
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="flex gap-1">
|
|
|
|
<figure class="" v-if="report.reported.avatar">
|
|
|
|
<img
|
|
|
|
alt=""
|
|
|
|
:src="report.reported.avatar.url"
|
|
|
|
class="rounded-full"
|
|
|
|
width="48"
|
|
|
|
height="48"
|
|
|
|
/>
|
|
|
|
</figure>
|
|
|
|
<AccountCircle v-else :size="48" />
|
|
|
|
<div class="">
|
|
|
|
<p class="" v-if="report.reported.name">{{ report.reported.name }}</p>
|
|
|
|
<p class="">@{{ usernameWithDomain(report.reported) }}</p>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
2022-07-12 10:55:28 +02:00
|
|
|
</div>
|
2019-09-09 09:31:08 +02:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="reported_by">
|
|
|
|
<div class="">
|
|
|
|
<span v-if="report.reporter.type === ActorType.APPLICATION">
|
|
|
|
{{
|
|
|
|
t("Reported by someone on {domain}", {
|
|
|
|
domain: report.reporter.domain,
|
|
|
|
})
|
|
|
|
}}
|
|
|
|
</span>
|
|
|
|
<span v-else>
|
|
|
|
{{
|
|
|
|
t("Reported by {reporter}", {
|
|
|
|
reporter: usernameWithDomain(report.reporter),
|
|
|
|
})
|
|
|
|
}}
|
|
|
|
</span>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="" v-if="report.content" v-html="report.content" />
|
2019-09-09 09:31:08 +02:00
|
|
|
</div>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
2019-09-09 09:31:08 +02:00
|
|
|
</template>
|
2022-07-12 10:55:28 +02:00
|
|
|
<script lang="ts" setup>
|
2020-02-18 08:57:00 +01:00
|
|
|
import { IReport } from "@/types/report.model";
|
2020-11-27 19:27:44 +01:00
|
|
|
import { ActorType } from "@/types/enums";
|
2022-07-12 10:55:28 +02:00
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
|
import AccountCircle from "vue-material-design-icons/AccountCircle.vue";
|
|
|
|
import { usernameWithDomain } from "@/types/actor";
|
2019-09-09 09:31:08 +02:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
defineProps<{
|
|
|
|
report: IReport;
|
|
|
|
}>();
|
2019-12-03 11:29:51 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
const { t } = useI18n({ useScope: "global" });
|
2019-09-09 09:31:08 +02:00
|
|
|
</script>
|
|
|
|
<style lang="scss">
|
2020-02-18 08:57:00 +01:00
|
|
|
.content img.image {
|
|
|
|
display: inline;
|
|
|
|
height: 1.5em;
|
|
|
|
vertical-align: text-bottom;
|
|
|
|
}
|
|
|
|
</style>
|