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