2019-09-09 09:31:08 +02:00
|
|
|
<template>
|
2022-10-25 19:01:43 +02:00
|
|
|
<div
|
|
|
|
class="bg-mbz-yellow-alt-50 hover:bg-mbz-yellow-alt-100 dark:bg-zinc-700 hover:dark:bg-zinc-600 rounded"
|
|
|
|
v-if="report"
|
|
|
|
>
|
|
|
|
<div class="flex justify-between gap-1 border-b p-2">
|
|
|
|
<div class="flex gap-1">
|
|
|
|
<figure class="" v-if="report.reported.avatar">
|
|
|
|
<img
|
|
|
|
alt=""
|
|
|
|
:src="report.reported.avatar.url"
|
|
|
|
class="rounded-full"
|
|
|
|
width="24"
|
|
|
|
height="24"
|
|
|
|
/>
|
|
|
|
</figure>
|
|
|
|
<AccountCircle v-else :size="24" />
|
|
|
|
<div class="">
|
|
|
|
<p class="" v-if="report.reported.name">{{ report.reported.name }}</p>
|
|
|
|
<p class="text-zinc-700 dark:text-zinc-100 text-sm">
|
|
|
|
@{{ usernameWithDomain(report.reported) }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<p v-if="report.reported.suspended" class="text-red-700 font-bold">
|
|
|
|
{{ t("Suspended") }}
|
|
|
|
</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-10-25 19:01:43 +02:00
|
|
|
<div class="p-2">
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="">
|
|
|
|
<span v-if="report.reporter.type === ActorType.APPLICATION">
|
|
|
|
{{
|
|
|
|
t("Reported by someone on {domain}", {
|
|
|
|
domain: report.reporter.domain,
|
|
|
|
})
|
|
|
|
}}
|
|
|
|
</span>
|
2022-10-25 19:01:43 +02:00
|
|
|
<span
|
|
|
|
v-if="
|
|
|
|
report.reporter.preferredUsername === 'anonymous' &&
|
|
|
|
!report.reporter.domain
|
|
|
|
"
|
|
|
|
>
|
|
|
|
{{ t("Reported by someone anonymously") }}
|
|
|
|
</span>
|
2022-07-12 10:55:28 +02:00
|
|
|
<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>
|