Files
Paradise/tgui/packages/tgui-panel/settings/model.ts
PoobleandGitHub c73dc100b0 Add ability to blacklist phrases in chat (#30902)
* add ability to blacklist phrases in chat

* support exact

* support exact

* i think this fixes the tgui thing

* prettier linter eeeeeeeeeeee
2025-11-23 02:56:53 +00:00

36 lines
757 B
TypeScript

/**
* @file
*/
import { createUuid } from 'tgui-core/uuid';
export const createHighlightSetting = (obj?: Record<string, any>) => ({
id: createUuid(),
highlightText: '',
highlightColor: '#ffdd44',
highlightWholeMessage: true,
matchWord: false,
matchCase: false,
...obj,
});
export const createDefaultHighlightSetting = (obj?: Record<string, any>) =>
createHighlightSetting({
id: 'default',
...obj,
});
export const createBlacklistSetting = (obj?: Record<string, any>) => ({
id: createUuid(),
blacklistText: '',
censor: false,
matchWord: false,
matchCase: false,
...obj,
});
export const createDefaultBlacklistSetting = (obj?: Record<string, any>) =>
createBlacklistSetting({
id: 'default',
...obj,
});