2023-07-27 08:31:52 +03:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2022-01-20 20:06:38 +02:00
|
|
|
<template>
|
2023-01-05 14:04:56 +02:00
|
|
|
<div class="bcekxzvu _margin _panel">
|
2022-06-21 08:12:39 +03:00
|
|
|
<div class="target">
|
2023-08-13 15:02:25 +03:00
|
|
|
<MkA v-user-preview="report.targetUserId" class="info" :to="`/admin/user/${report.targetUserId}`">
|
2023-01-16 07:18:11 +02:00
|
|
|
<MkAvatar class="avatar" :user="report.targetUser" indicator/>
|
2022-06-21 08:12:39 +03:00
|
|
|
<div class="names">
|
2023-02-08 13:07:19 +02:00
|
|
|
<MkUserName class="name" :user="report.targetUser"/>
|
2022-06-21 08:12:39 +03:00
|
|
|
<MkAcct class="acct" :user="report.targetUser" style="display: block;"/>
|
|
|
|
</div>
|
2022-01-20 20:06:38 +02:00
|
|
|
</MkA>
|
2023-01-05 14:04:56 +02:00
|
|
|
<MkKeyValue>
|
2022-07-20 16:24:26 +03:00
|
|
|
<template #key>{{ i18n.ts.registeredDate }}</template>
|
2023-01-01 10:11:33 +02:00
|
|
|
<template #value>{{ dateString(report.targetUser.createdAt) }} (<MkTime :time="report.targetUser.createdAt"/>)</template>
|
2022-06-21 08:12:39 +03:00
|
|
|
</MkKeyValue>
|
2022-01-20 20:06:38 +02:00
|
|
|
</div>
|
2022-06-21 08:12:39 +03:00
|
|
|
<div class="detail">
|
2022-01-20 20:06:38 +02:00
|
|
|
<div>
|
|
|
|
<Mfm :text="report.comment"/>
|
|
|
|
</div>
|
|
|
|
<hr/>
|
2022-07-20 16:24:26 +03:00
|
|
|
<div>{{ i18n.ts.reporter }}: <MkAcct :user="report.reporter"/></div>
|
2022-01-20 20:06:38 +02:00
|
|
|
<div v-if="report.assignee">
|
2022-07-20 16:24:26 +03:00
|
|
|
{{ i18n.ts.moderator }}:
|
2022-01-20 20:06:38 +02:00
|
|
|
<MkAcct :user="report.assignee"/>
|
|
|
|
</div>
|
|
|
|
<div><MkTime :time="report.createdAt"/></div>
|
2022-06-21 08:12:39 +03:00
|
|
|
<div class="action">
|
|
|
|
<MkSwitch v-model="forward" :disabled="report.targetUser.host == null || report.resolved">
|
2022-07-20 16:24:26 +03:00
|
|
|
{{ i18n.ts.forwardReport }}
|
|
|
|
<template #caption>{{ i18n.ts.forwardReportIsAnonymous }}</template>
|
2022-06-21 08:12:39 +03:00
|
|
|
</MkSwitch>
|
2022-07-20 16:24:26 +03:00
|
|
|
<MkButton v-if="!report.resolved" primary @click="resolve">{{ i18n.ts.abuseMarkAsResolved }}</MkButton>
|
2022-06-21 08:12:39 +03:00
|
|
|
</div>
|
2022-01-20 20:06:38 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-06-21 08:12:39 +03:00
|
|
|
<script lang="ts" setup>
|
2022-09-06 12:21:49 +03:00
|
|
|
import MkButton from '@/components/MkButton.vue';
|
2023-01-07 07:59:54 +02:00
|
|
|
import MkSwitch from '@/components/MkSwitch.vue';
|
2022-08-30 18:24:33 +03:00
|
|
|
import MkKeyValue from '@/components/MkKeyValue.vue';
|
2023-09-19 10:37:43 +03:00
|
|
|
import * as os from '@/os.js';
|
|
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
import { dateString } from '@/filters/date.js';
|
2022-01-20 20:06:38 +02:00
|
|
|
|
2022-06-21 08:12:39 +03:00
|
|
|
const props = defineProps<{
|
|
|
|
report: any;
|
|
|
|
}>();
|
2022-05-01 16:51:07 +03:00
|
|
|
|
2022-06-21 08:12:39 +03:00
|
|
|
const emit = defineEmits<{
|
|
|
|
(ev: 'resolved', reportId: string): void;
|
|
|
|
}>();
|
2022-01-20 20:06:38 +02:00
|
|
|
|
2022-06-21 08:12:39 +03:00
|
|
|
let forward = $ref(props.report.forwarded);
|
2022-01-20 20:06:38 +02:00
|
|
|
|
2022-06-21 08:12:39 +03:00
|
|
|
function resolve() {
|
|
|
|
os.apiWithDialog('admin/resolve-abuse-user-report', {
|
|
|
|
forward: forward,
|
|
|
|
reportId: props.report.id,
|
|
|
|
}).then(() => {
|
|
|
|
emit('resolved', props.report.id);
|
|
|
|
});
|
|
|
|
}
|
2022-01-20 20:06:38 +02:00
|
|
|
</script>
|
|
|
|
|
2022-12-27 11:29:39 +02:00
|
|
|
<style lang="scss" scoped>
|
2022-01-20 20:06:38 +02:00
|
|
|
.bcekxzvu {
|
2022-06-21 08:12:39 +03:00
|
|
|
display: flex;
|
|
|
|
|
2022-01-20 20:06:38 +02:00
|
|
|
> .target {
|
2022-06-21 08:12:39 +03:00
|
|
|
width: 35%;
|
2022-01-20 20:06:38 +02:00
|
|
|
box-sizing: border-box;
|
|
|
|
text-align: left;
|
2022-06-21 08:12:39 +03:00
|
|
|
padding: 24px;
|
|
|
|
border-right: solid 1px var(--divider);
|
2022-01-20 20:06:38 +02:00
|
|
|
|
|
|
|
> .info {
|
2022-06-21 08:12:39 +03:00
|
|
|
display: flex;
|
|
|
|
box-sizing: border-box;
|
|
|
|
align-items: center;
|
|
|
|
padding: 14px;
|
2023-10-31 20:44:34 +02:00
|
|
|
border-radius: var(--radius-sm);
|
2022-06-21 11:55:38 +03:00
|
|
|
--c: rgb(255 196 0 / 15%);
|
|
|
|
background-image: linear-gradient(45deg, var(--c) 16.67%, transparent 16.67%, transparent 50%, var(--c) 50%, var(--c) 66.67%, transparent 66.67%, transparent 100%);
|
2022-06-21 08:12:39 +03:00
|
|
|
background-size: 16px 16px;
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
width: 42px;
|
|
|
|
height: 42px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .names {
|
|
|
|
margin-left: 0.3em;
|
|
|
|
padding: 0 8px;
|
|
|
|
flex: 1;
|
2022-01-20 20:06:38 +02:00
|
|
|
|
2022-06-21 08:12:39 +03:00
|
|
|
> .name {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2022-01-20 20:06:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-21 08:12:39 +03:00
|
|
|
|
|
|
|
> .detail {
|
|
|
|
flex: 1;
|
|
|
|
padding: 24px;
|
|
|
|
}
|
2022-01-20 20:06:38 +02:00
|
|
|
}
|
|
|
|
</style>
|