feat: AIによるNSFW検出を無視できるポリシーを追加 (MisskeyIO#500)
* feat: AIによるNSFW検出を無視できるポリシーを追加 * refactor: skipNsfwCheckの条件を同じようにまとめた
This commit is contained in:
parent
c0dbdd78c1
commit
d624547874
10 changed files with 52 additions and 11 deletions
|
|
@ -94,6 +94,7 @@ export const ROLE_POLICIES = [
|
|||
'canHideAds',
|
||||
'driveCapacityMb',
|
||||
'alwaysMarkNsfw',
|
||||
'skipNsfwDetection',
|
||||
'pinLimit',
|
||||
'antennaLimit',
|
||||
'antennaNotesLimit',
|
||||
|
|
|
|||
|
|
@ -518,6 +518,26 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="matchQuery([i18n.ts._role._options.skipNsfwDetection, 'skipNsfwDetection'])">
|
||||
<template #label>{{ i18n.ts._role._options.skipNsfwDetection }}</template>
|
||||
<template #suffix>
|
||||
<span v-if="role.policies.skipNsfwDetection.useDefault" :class="$style.useDefaultLabel">{{ i18n.ts._role.useBaseValue }}</span>
|
||||
<span v-else>{{ role.policies.skipNsfwDetection.value ? i18n.ts.yes : i18n.ts.no }}</span>
|
||||
<span :class="$style.priorityIndicator"><i :class="getPriorityIcon(role.policies.skipNsfwDetection)"></i></span>
|
||||
</template>
|
||||
<div class="_gaps">
|
||||
<MkSwitch v-model="role.policies.skipNsfwDetection.useDefault" :readonly="readonly">
|
||||
<template #label>{{ i18n.ts._role.useBaseValue }}</template>
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="role.policies.skipNsfwDetection.value" :disabled="role.policies.skipNsfwDetection.useDefault" :readonly="readonly">
|
||||
<template #label>{{ i18n.ts.enable }}</template>
|
||||
</MkSwitch>
|
||||
<MkRange v-model="role.policies.skipNsfwDetection.priority" :min="0" :max="2" :step="1" easing :textConverter="(v) => v === 0 ? i18n.ts._role._priority.low : v === 1 ? i18n.ts._role._priority.middle : v === 2 ? i18n.ts._role._priority.high : ''">
|
||||
<template #label>{{ i18n.ts._role.priority }}</template>
|
||||
</MkRange>
|
||||
</div>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="matchQuery([i18n.ts._role._options.pinMax, 'pinLimit'])">
|
||||
<template #label>{{ i18n.ts._role._options.pinMax }}</template>
|
||||
<template #suffix>
|
||||
|
|
|
|||
|
|
@ -190,6 +190,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkSwitch>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="matchQuery([i18n.ts._role._options.skipNsfwDetection, 'skipNsfwDetection'])">
|
||||
<template #label>{{ i18n.ts._role._options.skipNsfwDetection }}</template>
|
||||
<template #suffix>{{ policies.skipNsfwDetection ? i18n.ts.yes : i18n.ts.no }}</template>
|
||||
<MkSwitch v-model="policies.skipNsfwDetection">
|
||||
<template #label>{{ i18n.ts.enable }}</template>
|
||||
</MkSwitch>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="matchQuery([i18n.ts._role._options.pinMax, 'pinLimit'])">
|
||||
<template #label>{{ i18n.ts._role._options.pinMax }}</template>
|
||||
<template #suffix>{{ policies.pinLimit }}</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue