From b40ecc61596e8fef9c85ef24de66cd9258f0f8a3 Mon Sep 17 00:00:00 2001 From: mattyatea Date: Wed, 6 Mar 2024 11:46:54 +0900 Subject: [PATCH] a --- locales/index.d.ts | 4 - .../api/endpoints/users/report-abuse.ts | 17 + .../frontend/src/components/MkClickerGame.vue | 40 ++- .../frontend/src/pages/admin/roles.editor.vue | 193 ++++------- packages/frontend/src/pages/admin/roles.vue | 311 +++++++++--------- .../frontend/src/widgets/WidgetClicker.vue | 13 +- 6 files changed, 252 insertions(+), 326 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index 775053160e..142787ef04 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -4892,10 +4892,6 @@ export interface Locale extends ILocale { * フォロー中またはフォロワー */ "followingOrFollower": string; - /** - * ファイル付きのみ - */ - "fileAttachedOnly": string; /** * TLに他の人への返信を含める */ diff --git a/packages/backend/src/server/api/endpoints/users/report-abuse.ts b/packages/backend/src/server/api/endpoints/users/report-abuse.ts index 4f3d48770d..b40733e1a7 100644 --- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts +++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts @@ -120,6 +120,23 @@ export default class extends Endpoint { // eslint- }); } const meta = await this.metaService.fetch(); + if (meta.DiscordWebhookUrl) { + const data_disc = { 'username': '絵文字追加通知ちゃん', + 'content': + + '通報' + '\n' + + '通報' + report.comment + '\n' + + '通報したユーザー : ' + '@' + me.username + '\n' + + '通報されたユーザー : ' + report.targetUserId + '\n', + }; + await fetch(meta.DiscordWebhookUrl, { + 'method': 'post', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(data_disc), + }); + } if (meta.email) { this.emailService.sendEmail(meta.email, 'New abuse report', sanitizeHtml(ps.comment), diff --git a/packages/frontend/src/components/MkClickerGame.vue b/packages/frontend/src/components/MkClickerGame.vue index 1f9d871a8d..175fc5da6b 100644 --- a/packages/frontend/src/components/MkClickerGame.vue +++ b/packages/frontend/src/components/MkClickerGame.vue @@ -4,33 +4,38 @@ SPDX-License-Identifier: AGPL-3.0-only --> -