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