Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Oct 5, 2024
1 parent 57bcd0e commit a1e1e92
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/backend/src/models/AbuseUserReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ export class MiAbuseUserReport {
public moderationNote: string;

/**
* positive 是認 ... 通報内容が正当であり、肯定的に対応された
* negative 否認 ... 通報内容が正当でなく、否定的に対応された
* accept 是認 ... 通報内容が正当であり、肯定的に対応された
* reject 否認 ... 通報内容が正当でなく、否定的に対応された
* null ... その他
*/
@Column('varchar', {
length: 128, nullable: true,
})
public resolvedAs: 'positive' | 'negative' | null;
public resolvedAs: 'accept' | 'reject' | null;

//#region Denormalized fields
@Index()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const paramDef = {
type: 'object',
properties: {
reportId: { type: 'string', format: 'misskey:id' },
resolvedAs: { type: 'string', enum: ['positive', 'negative', null], nullable: true },
resolvedAs: { type: 'string', enum: ['accept', 'reject', null], nullable: true },
},
required: ['reportId'],
} as const;
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/src/components/MkAbuseReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<MkFolder>
<template #icon>
<i v-if="report.resolved && report.resolvedAs === 'positive'" class="ti ti-check" style="color: var(--success)"></i>
<i v-else-if="report.resolved && report.resolvedAs === 'negative'" class="ti ti-x" style="color: var(--error)"></i>
<i v-if="report.resolved && report.resolvedAs === 'accept'" class="ti ti-check" style="color: var(--success)"></i>
<i v-else-if="report.resolved && report.resolvedAs === 'reject'" class="ti ti-x" style="color: var(--error)"></i>
<i v-else-if="report.resolved" class="ti ti-slash"></i>
<i v-else class="ti ti-exclamation-circle" style="color: var(--warn)"></i>
</template>
Expand All @@ -17,8 +17,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #footer>
<div class="_buttons">
<template v-if="!report.resolved">
<MkButton @click="resolve('positive')"><i class="ti ti-check" style="color: var(--success)"></i> {{ i18n.ts._abuseUserReport.resolve }} ({{ i18n.ts._abuseUserReport.accept }})</MkButton>
<MkButton @click="resolve('negative')"><i class="ti ti-x" style="color: var(--error)"></i> {{ i18n.ts._abuseUserReport.resolve }} ({{ i18n.ts._abuseUserReport.reject }})</MkButton>
<MkButton @click="resolve('accept')"><i class="ti ti-check" style="color: var(--success)"></i> {{ i18n.ts._abuseUserReport.resolve }} ({{ i18n.ts._abuseUserReport.accept }})</MkButton>
<MkButton @click="resolve('reject')"><i class="ti ti-x" style="color: var(--error)"></i> {{ i18n.ts._abuseUserReport.resolve }} ({{ i18n.ts._abuseUserReport.reject }})</MkButton>
<MkButton @click="resolve(null)"><i class="ti ti-slash"></i> {{ i18n.ts._abuseUserReport.resolve }} ({{ i18n.ts.other }})</MkButton>
</template>
<template v-if="report.targetUser.host == null">
Expand Down
2 changes: 1 addition & 1 deletion packages/misskey-js/src/autogen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8712,7 +8712,7 @@ export type operations = {
/** Format: misskey:id */
reportId: string;
/** @enum {string|null} */
resolvedAs?: 'positive' | 'negative' | null;
resolvedAs?: 'accept' | 'reject' | null;
};
};
};
Expand Down

0 comments on commit a1e1e92

Please sign in to comment.