mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-24 23:15:13 +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"
|
||||
unblock: "Unblock"
|
||||
markAsNSFW: "Mark all media from user as NSFW"
|
||||
markInstanceAsNSFW: "Mark as NSFW"
|
||||
suspend: "Suspend"
|
||||
unsuspend: "Unsuspend"
|
||||
blockConfirm: "Are you sure that you want to block this account?"
|
||||
|
@ -2573,6 +2574,8 @@ _moderationLogTypes:
|
|||
resetPassword: "Password reset"
|
||||
suspendRemoteInstance: "Remote instance suspended"
|
||||
unsuspendRemoteInstance: "Remote instance unsuspended"
|
||||
setRemoteInstanceNSFW: "Set remote instance as NSFW"
|
||||
unsetRemoteInstanceNSFW: "Set remote instance as NSFW"
|
||||
rejectRemoteInstanceReports: "Rejected reports from remote instance"
|
||||
acceptRemoteInstanceReports: "Accepted reports from 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としてマークする
|
||||
*/
|
||||
"markAsNSFW": string;
|
||||
/**
|
||||
* Mark as NSFW
|
||||
*/
|
||||
"markInstanceAsNSFW": string;
|
||||
/**
|
||||
* 凍結
|
||||
*/
|
||||
|
@ -9980,6 +9984,14 @@ export interface Locale extends ILocale {
|
|||
* リモートサーバーを再開
|
||||
*/
|
||||
"unsuspendRemoteInstance": string;
|
||||
/**
|
||||
* Set remote instance as NSFW
|
||||
*/
|
||||
"setRemoteInstanceNSFW": string;
|
||||
/**
|
||||
* Set remote instance as NSFW
|
||||
*/
|
||||
"unsetRemoteInstanceNSFW": string;
|
||||
/**
|
||||
* Rejected reports from remote instance
|
||||
*/
|
||||
|
|
|
@ -149,6 +149,7 @@ renoteUnmute: "ブーストのミュートを解除"
|
|||
block: "ブロック"
|
||||
unblock: "ブロック解除"
|
||||
markAsNSFW: "ユーザーのすべてのメディアをNSFWとしてマークする"
|
||||
markInstanceAsNSFW: "Mark as NSFW"
|
||||
suspend: "凍結"
|
||||
unsuspend: "解凍"
|
||||
blockConfirm: "ブロックしますか?"
|
||||
|
@ -2641,6 +2642,8 @@ _moderationLogTypes:
|
|||
resetPassword: "パスワードをリセット"
|
||||
suspendRemoteInstance: "リモートサーバーを停止"
|
||||
unsuspendRemoteInstance: "リモートサーバーを再開"
|
||||
setRemoteInstanceNSFW: "Set remote instance as NSFW"
|
||||
unsetRemoteInstanceNSFW: "Set remote instance as NSFW"
|
||||
rejectRemoteInstanceReports: "Rejected reports from remote instance"
|
||||
acceptRemoteInstanceReports: "Accepted reports from remote instance"
|
||||
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) {
|
||||
const message = ps.rejectReports ? 'rejectRemoteInstanceReports' : 'acceptRemoteInstanceReports';
|
||||
this.moderationLogService.log(me, message, {
|
||||
|
|
|
@ -77,6 +77,8 @@ export const moderationLogTypes = [
|
|||
'deleteGlobalAnnouncement',
|
||||
'deleteUserAnnouncement',
|
||||
'resetPassword',
|
||||
'setRemoteInstanceNSFW',
|
||||
'unsetRemoteInstanceNSFW',
|
||||
'suspendRemoteInstance',
|
||||
'unsuspendRemoteInstance',
|
||||
'rejectRemoteInstanceReports',
|
||||
|
@ -229,6 +231,14 @@ export type ModerationLogPayloads = {
|
|||
userUsername: string;
|
||||
userHost: string | null;
|
||||
};
|
||||
setRemoteInstanceNSFW: {
|
||||
id: string;
|
||||
host: string;
|
||||
};
|
||||
unsetRemoteInstanceNSFW: {
|
||||
id: string;
|
||||
host: string;
|
||||
};
|
||||
suspendRemoteInstance: {
|
||||
id: string;
|
||||
host: string;
|
||||
|
|
|
@ -23,6 +23,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
'markSensitiveDriveFile',
|
||||
'resetPassword',
|
||||
'suspendRemoteInstance',
|
||||
'setRemoteInstanceNSFW',
|
||||
'unsetRemoteInstanceNSFW',
|
||||
'rejectRemoteInstanceReports',
|
||||
'acceptRemoteInstanceReports',
|
||||
].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 === 'suspendRemoteInstance'">: {{ 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 === 'acceptRemoteInstanceReports'">: {{ log.info.host }}</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>
|
||||
<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="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="isMediaSilenced" :disabled="!meta || !instance" @update:modelValue="toggleMediaSilenced">{{ i18n.ts.mediaSilenceThisInstance }}</MkSwitch>
|
||||
<MkButton @click="refreshMetadata"><i class="ti ti-refresh"></i> Refresh metadata</MkButton>
|
||||
|
|
Loading…
Reference in a new issue