mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 15:15:12 +00:00
fix modlog and translations for "Mark as NSFW"
This commit is contained in:
parent
61124699da
commit
7dd296017b
7 changed files with 41 additions and 1 deletions
|
@ -149,6 +149,7 @@ renoteUnmute: "Unmute Boosts"
|
||||||
block: "Block"
|
block: "Block"
|
||||||
unblock: "Unblock"
|
unblock: "Unblock"
|
||||||
markAsNSFW: "Mark all media from user as NSFW"
|
markAsNSFW: "Mark all media from user as NSFW"
|
||||||
|
markInstanceAsNSFW: "Mark as NSFW"
|
||||||
suspend: "Suspend"
|
suspend: "Suspend"
|
||||||
unsuspend: "Unsuspend"
|
unsuspend: "Unsuspend"
|
||||||
blockConfirm: "Are you sure that you want to block this account?"
|
blockConfirm: "Are you sure that you want to block this account?"
|
||||||
|
@ -2573,6 +2574,8 @@ _moderationLogTypes:
|
||||||
resetPassword: "Password reset"
|
resetPassword: "Password reset"
|
||||||
suspendRemoteInstance: "Remote instance suspended"
|
suspendRemoteInstance: "Remote instance suspended"
|
||||||
unsuspendRemoteInstance: "Remote instance unsuspended"
|
unsuspendRemoteInstance: "Remote instance unsuspended"
|
||||||
|
setRemoteInstanceNSFW: "Set remote instance as NSFW"
|
||||||
|
unsetRemoteInstanceNSFW: "Set remote instance as NSFW"
|
||||||
rejectRemoteInstanceReports: "Rejected reports from remote instance"
|
rejectRemoteInstanceReports: "Rejected reports from remote instance"
|
||||||
acceptRemoteInstanceReports: "Accepted reports from remote instance"
|
acceptRemoteInstanceReports: "Accepted reports from remote instance"
|
||||||
updateRemoteInstanceNote: "Moderation note updated for remote instance."
|
updateRemoteInstanceNote: "Moderation note updated for remote instance."
|
||||||
|
|
12
locales/index.d.ts
vendored
12
locales/index.d.ts
vendored
|
@ -612,6 +612,10 @@ export interface Locale extends ILocale {
|
||||||
* ユーザーのすべてのメディアをNSFWとしてマークする
|
* ユーザーのすべてのメディアをNSFWとしてマークする
|
||||||
*/
|
*/
|
||||||
"markAsNSFW": string;
|
"markAsNSFW": string;
|
||||||
|
/**
|
||||||
|
* Mark as NSFW
|
||||||
|
*/
|
||||||
|
"markInstanceAsNSFW": string;
|
||||||
/**
|
/**
|
||||||
* 凍結
|
* 凍結
|
||||||
*/
|
*/
|
||||||
|
@ -9980,6 +9984,14 @@ export interface Locale extends ILocale {
|
||||||
* リモートサーバーを再開
|
* リモートサーバーを再開
|
||||||
*/
|
*/
|
||||||
"unsuspendRemoteInstance": string;
|
"unsuspendRemoteInstance": string;
|
||||||
|
/**
|
||||||
|
* Set remote instance as NSFW
|
||||||
|
*/
|
||||||
|
"setRemoteInstanceNSFW": string;
|
||||||
|
/**
|
||||||
|
* Set remote instance as NSFW
|
||||||
|
*/
|
||||||
|
"unsetRemoteInstanceNSFW": string;
|
||||||
/**
|
/**
|
||||||
* Rejected reports from remote instance
|
* Rejected reports from remote instance
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -149,6 +149,7 @@ renoteUnmute: "ブーストのミュートを解除"
|
||||||
block: "ブロック"
|
block: "ブロック"
|
||||||
unblock: "ブロック解除"
|
unblock: "ブロック解除"
|
||||||
markAsNSFW: "ユーザーのすべてのメディアをNSFWとしてマークする"
|
markAsNSFW: "ユーザーのすべてのメディアをNSFWとしてマークする"
|
||||||
|
markInstanceAsNSFW: "Mark as NSFW"
|
||||||
suspend: "凍結"
|
suspend: "凍結"
|
||||||
unsuspend: "解凍"
|
unsuspend: "解凍"
|
||||||
blockConfirm: "ブロックしますか?"
|
blockConfirm: "ブロックしますか?"
|
||||||
|
@ -2641,6 +2642,8 @@ _moderationLogTypes:
|
||||||
resetPassword: "パスワードをリセット"
|
resetPassword: "パスワードをリセット"
|
||||||
suspendRemoteInstance: "リモートサーバーを停止"
|
suspendRemoteInstance: "リモートサーバーを停止"
|
||||||
unsuspendRemoteInstance: "リモートサーバーを再開"
|
unsuspendRemoteInstance: "リモートサーバーを再開"
|
||||||
|
setRemoteInstanceNSFW: "Set remote instance as NSFW"
|
||||||
|
unsetRemoteInstanceNSFW: "Set remote instance as NSFW"
|
||||||
rejectRemoteInstanceReports: "Rejected reports from remote instance"
|
rejectRemoteInstanceReports: "Rejected reports from remote instance"
|
||||||
acceptRemoteInstanceReports: "Accepted reports from remote instance"
|
acceptRemoteInstanceReports: "Accepted reports from remote instance"
|
||||||
updateRemoteInstanceNote: "リモートサーバーのモデレーションノート更新"
|
updateRemoteInstanceNote: "リモートサーバーのモデレーションノート更新"
|
||||||
|
|
|
@ -76,6 +76,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ps.isNSFW != null && instance.isNSFW !== ps.isNSFW) {
|
||||||
|
const message = ps.rejectReports ? 'setRemoteInstanceNSFW' : 'unsetRemoteInstanceNSFW';
|
||||||
|
this.moderationLogService.log(me, message, {
|
||||||
|
id: instance.id,
|
||||||
|
host: instance.host,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (ps.rejectReports != null && instance.rejectReports !== ps.rejectReports) {
|
if (ps.rejectReports != null && instance.rejectReports !== ps.rejectReports) {
|
||||||
const message = ps.rejectReports ? 'rejectRemoteInstanceReports' : 'acceptRemoteInstanceReports';
|
const message = ps.rejectReports ? 'rejectRemoteInstanceReports' : 'acceptRemoteInstanceReports';
|
||||||
this.moderationLogService.log(me, message, {
|
this.moderationLogService.log(me, message, {
|
||||||
|
|
|
@ -77,6 +77,8 @@ export const moderationLogTypes = [
|
||||||
'deleteGlobalAnnouncement',
|
'deleteGlobalAnnouncement',
|
||||||
'deleteUserAnnouncement',
|
'deleteUserAnnouncement',
|
||||||
'resetPassword',
|
'resetPassword',
|
||||||
|
'setRemoteInstanceNSFW',
|
||||||
|
'unsetRemoteInstanceNSFW',
|
||||||
'suspendRemoteInstance',
|
'suspendRemoteInstance',
|
||||||
'unsuspendRemoteInstance',
|
'unsuspendRemoteInstance',
|
||||||
'rejectRemoteInstanceReports',
|
'rejectRemoteInstanceReports',
|
||||||
|
@ -229,6 +231,14 @@ export type ModerationLogPayloads = {
|
||||||
userUsername: string;
|
userUsername: string;
|
||||||
userHost: string | null;
|
userHost: string | null;
|
||||||
};
|
};
|
||||||
|
setRemoteInstanceNSFW: {
|
||||||
|
id: string;
|
||||||
|
host: string;
|
||||||
|
};
|
||||||
|
unsetRemoteInstanceNSFW: {
|
||||||
|
id: string;
|
||||||
|
host: string;
|
||||||
|
};
|
||||||
suspendRemoteInstance: {
|
suspendRemoteInstance: {
|
||||||
id: string;
|
id: string;
|
||||||
host: string;
|
host: string;
|
||||||
|
|
|
@ -23,6 +23,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
'markSensitiveDriveFile',
|
'markSensitiveDriveFile',
|
||||||
'resetPassword',
|
'resetPassword',
|
||||||
'suspendRemoteInstance',
|
'suspendRemoteInstance',
|
||||||
|
'setRemoteInstanceNSFW',
|
||||||
|
'unsetRemoteInstanceNSFW',
|
||||||
'rejectRemoteInstanceReports',
|
'rejectRemoteInstanceReports',
|
||||||
'acceptRemoteInstanceReports',
|
'acceptRemoteInstanceReports',
|
||||||
].includes(log.type),
|
].includes(log.type),
|
||||||
|
@ -63,6 +65,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<span v-else-if="log.type === 'unmarkSensitiveDriveFile'">: @{{ log.info.fileUserUsername }}{{ log.info.fileUserHost ? '@' + log.info.fileUserHost : '' }}</span>
|
<span v-else-if="log.type === 'unmarkSensitiveDriveFile'">: @{{ log.info.fileUserUsername }}{{ log.info.fileUserHost ? '@' + log.info.fileUserHost : '' }}</span>
|
||||||
<span v-else-if="log.type === 'suspendRemoteInstance'">: {{ log.info.host }}</span>
|
<span v-else-if="log.type === 'suspendRemoteInstance'">: {{ log.info.host }}</span>
|
||||||
<span v-else-if="log.type === 'unsuspendRemoteInstance'">: {{ log.info.host }}</span>
|
<span v-else-if="log.type === 'unsuspendRemoteInstance'">: {{ log.info.host }}</span>
|
||||||
|
<span v-else-if="log.type === 'setRemoteInstanceNSFW'">: {{ log.info.host }}</span>
|
||||||
|
<span v-else-if="log.type === 'unsetRemoteInstanceNSFW'">: {{ log.info.host }}</span>
|
||||||
<span v-else-if="log.type === 'rejectRemoteInstanceReports'">: {{ log.info.host }}</span>
|
<span v-else-if="log.type === 'rejectRemoteInstanceReports'">: {{ log.info.host }}</span>
|
||||||
<span v-else-if="log.type === 'acceptRemoteInstanceReports'">: {{ log.info.host }}</span>
|
<span v-else-if="log.type === 'acceptRemoteInstanceReports'">: {{ log.info.host }}</span>
|
||||||
<span v-else-if="log.type === 'createGlobalAnnouncement'">: {{ log.info.announcement.title }}</span>
|
<span v-else-if="log.type === 'createGlobalAnnouncement'">: {{ log.info.announcement.title }}</span>
|
||||||
|
|
|
@ -47,7 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkButton v-if="suspensionState !== 'none'" :disabled="!instance" @click="resumeDelivery">{{ i18n.ts._delivery.resume }}</MkButton>
|
<MkButton v-if="suspensionState !== 'none'" :disabled="!instance" @click="resumeDelivery">{{ i18n.ts._delivery.resume }}</MkButton>
|
||||||
<MkSwitch v-model="isBlocked" :disabled="!meta || !instance" @update:modelValue="toggleBlock">{{ i18n.ts.blockThisInstance }}</MkSwitch>
|
<MkSwitch v-model="isBlocked" :disabled="!meta || !instance" @update:modelValue="toggleBlock">{{ i18n.ts.blockThisInstance }}</MkSwitch>
|
||||||
<MkSwitch v-model="isSilenced" :disabled="!meta || !instance" @update:modelValue="toggleSilenced">{{ i18n.ts.silenceThisInstance }}</MkSwitch>
|
<MkSwitch v-model="isSilenced" :disabled="!meta || !instance" @update:modelValue="toggleSilenced">{{ i18n.ts.silenceThisInstance }}</MkSwitch>
|
||||||
<MkSwitch v-model="isNSFW" :disabled="!instance" @update:modelValue="toggleNSFW">Mark as NSFW</MkSwitch>
|
<MkSwitch v-model="isNSFW" :disabled="!instance" @update:modelValue="toggleNSFW">{{ i18n.ts.markInstanceAsNSFW }}</MkSwitch>
|
||||||
<MkSwitch v-model="rejectReports" :disabled="!instance" @update:modelValue="toggleRejectReports">{{ i18n.ts.rejectReports }}</MkSwitch>
|
<MkSwitch v-model="rejectReports" :disabled="!instance" @update:modelValue="toggleRejectReports">{{ i18n.ts.rejectReports }}</MkSwitch>
|
||||||
<MkSwitch v-model="isMediaSilenced" :disabled="!meta || !instance" @update:modelValue="toggleMediaSilenced">{{ i18n.ts.mediaSilenceThisInstance }}</MkSwitch>
|
<MkSwitch v-model="isMediaSilenced" :disabled="!meta || !instance" @update:modelValue="toggleMediaSilenced">{{ i18n.ts.mediaSilenceThisInstance }}</MkSwitch>
|
||||||
<MkButton @click="refreshMetadata"><i class="ti ti-refresh"></i> Refresh metadata</MkButton>
|
<MkButton @click="refreshMetadata"><i class="ti ti-refresh"></i> Refresh metadata</MkButton>
|
||||||
|
|
Loading…
Reference in a new issue