mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
add SkWordMuteTest to moderation control panel
This commit is contained in:
parent
32e2a07d66
commit
f6796a99ec
3 changed files with 19 additions and 6 deletions
6
locales/index.d.ts
vendored
6
locales/index.d.ts
vendored
|
@ -12970,11 +12970,11 @@ export interface Locale extends ILocale {
|
||||||
"text": string;
|
"text": string;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Test word mutes
|
* Test patterns
|
||||||
*/
|
*/
|
||||||
"wordMuteTestLabel": string;
|
"wordMuteTestLabel": string;
|
||||||
/**
|
/**
|
||||||
* Enter some text here to test your word mute patterns. The matched words, if any, will be displayed below.
|
* Enter some text here to test your word patterns. The matched words, if any, will be displayed below.
|
||||||
*/
|
*/
|
||||||
"wordMuteTestDescription": string;
|
"wordMuteTestDescription": string;
|
||||||
/**
|
/**
|
||||||
|
@ -12990,7 +12990,7 @@ export interface Locale extends ILocale {
|
||||||
*/
|
*/
|
||||||
"wordMuteTestNoResults": string;
|
"wordMuteTestNoResults": string;
|
||||||
/**
|
/**
|
||||||
* Text does not match any word mutes.
|
* Text does not match any patterns.
|
||||||
*/
|
*/
|
||||||
"wordMuteTestNoMatch": string;
|
"wordMuteTestNoMatch": string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkTextarea v-model="trustedLinkUrlPatterns">
|
<MkTextarea v-model="trustedLinkUrlPatterns">
|
||||||
<template #caption>{{ i18n.ts.trustedLinkUrlPatternsDescription }}</template>
|
<template #caption>{{ i18n.ts.trustedLinkUrlPatternsDescription }}</template>
|
||||||
</MkTextarea>
|
</MkTextarea>
|
||||||
|
|
||||||
|
<SkWordMuteTest :mutedWords="trustedLinkUrlPatterns"></SkWordMuteTest>
|
||||||
|
|
||||||
<MkButton primary @click="save_trustedLinkUrlPatterns">{{ i18n.ts.save }}</MkButton>
|
<MkButton primary @click="save_trustedLinkUrlPatterns">{{ i18n.ts.save }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
|
@ -71,6 +74,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkTextarea v-model="sensitiveWords">
|
<MkTextarea v-model="sensitiveWords">
|
||||||
<template #caption>{{ i18n.ts.sensitiveWordsDescription }}<br>{{ i18n.ts.sensitiveWordsDescription2 }}</template>
|
<template #caption>{{ i18n.ts.sensitiveWordsDescription }}<br>{{ i18n.ts.sensitiveWordsDescription2 }}</template>
|
||||||
</MkTextarea>
|
</MkTextarea>
|
||||||
|
|
||||||
|
<SkWordMuteTest :mutedWords="sensitiveWords"></SkWordMuteTest>
|
||||||
|
|
||||||
<MkButton primary @click="save_sensitiveWords">{{ i18n.ts.save }}</MkButton>
|
<MkButton primary @click="save_sensitiveWords">{{ i18n.ts.save }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
|
@ -83,6 +89,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkTextarea v-model="prohibitedWords">
|
<MkTextarea v-model="prohibitedWords">
|
||||||
<template #caption>{{ i18n.ts.prohibitedWordsDescription }}<br>{{ i18n.ts.prohibitedWordsDescription2 }}</template>
|
<template #caption>{{ i18n.ts.prohibitedWordsDescription }}<br>{{ i18n.ts.prohibitedWordsDescription2 }}</template>
|
||||||
</MkTextarea>
|
</MkTextarea>
|
||||||
|
|
||||||
|
<SkWordMuteTest :mutedWords="prohibitedWords"></SkWordMuteTest>
|
||||||
|
|
||||||
<MkButton primary @click="save_prohibitedWords">{{ i18n.ts.save }}</MkButton>
|
<MkButton primary @click="save_prohibitedWords">{{ i18n.ts.save }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
|
@ -95,6 +104,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkTextarea v-model="prohibitedWordsForNameOfUser">
|
<MkTextarea v-model="prohibitedWordsForNameOfUser">
|
||||||
<template #caption>{{ i18n.ts.prohibitedWordsForNameOfUserDescription }}<br>{{ i18n.ts.prohibitedWordsDescription2 }}</template>
|
<template #caption>{{ i18n.ts.prohibitedWordsForNameOfUserDescription }}<br>{{ i18n.ts.prohibitedWordsDescription2 }}</template>
|
||||||
</MkTextarea>
|
</MkTextarea>
|
||||||
|
|
||||||
|
<SkWordMuteTest :mutedWords="prohibitedWordsForNameOfUser"></SkWordMuteTest>
|
||||||
|
|
||||||
<MkButton primary @click="save_prohibitedWordsForNameOfUser">{{ i18n.ts.save }}</MkButton>
|
<MkButton primary @click="save_prohibitedWordsForNameOfUser">{{ i18n.ts.save }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
|
@ -166,6 +178,7 @@ import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import FormLink from '@/components/form/link.vue';
|
import FormLink from '@/components/form/link.vue';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
|
import SkWordMuteTest from '@/components/SkWordMuteTest.vue';
|
||||||
|
|
||||||
const enableRegistration = ref<boolean>(false);
|
const enableRegistration = ref<boolean>(false);
|
||||||
const emailRequiredForSignup = ref<boolean>(false);
|
const emailRequiredForSignup = ref<boolean>(false);
|
||||||
|
|
|
@ -544,9 +544,9 @@ _confirmPollEdit:
|
||||||
title: Are you sure you want to edit this poll
|
title: Are you sure you want to edit this poll
|
||||||
text: Editing this poll will cause it to lose all previous votes
|
text: Editing this poll will cause it to lose all previous votes
|
||||||
|
|
||||||
wordMuteTestLabel: "Test word mutes"
|
wordMuteTestLabel: "Test patterns"
|
||||||
wordMuteTestDescription: "Enter some text here to test your word mute patterns. The matched words, if any, will be displayed below."
|
wordMuteTestDescription: "Enter some text here to test your word patterns. The matched words, if any, will be displayed below."
|
||||||
wordMuteTestTest: "Test"
|
wordMuteTestTest: "Test"
|
||||||
wordMuteTestMatch: "Matched words: {words}"
|
wordMuteTestMatch: "Matched words: {words}"
|
||||||
wordMuteTestNoResults: "No results yet, enter some text and click \"Test\" to check it."
|
wordMuteTestNoResults: "No results yet, enter some text and click \"Test\" to check it."
|
||||||
wordMuteTestNoMatch: "Text does not match any word mutes."
|
wordMuteTestNoMatch: "Text does not match any patterns."
|
||||||
|
|
Loading…
Add table
Reference in a new issue