mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-02 13:34:49 +00:00
[MIRROR] allow to clear chat highlight settings (#11483)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3dc465899f
commit
cce52199f3
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
|
||||
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
|
||||
"assist": {
|
||||
"actions": {
|
||||
"source": {
|
||||
|
||||
18
bun.lock
18
bun.lock
@@ -9,23 +9,23 @@
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@biomejs/biome": ["@biomejs/biome@2.1.2", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.1.2", "@biomejs/cli-darwin-x64": "2.1.2", "@biomejs/cli-linux-arm64": "2.1.2", "@biomejs/cli-linux-arm64-musl": "2.1.2", "@biomejs/cli-linux-x64": "2.1.2", "@biomejs/cli-linux-x64-musl": "2.1.2", "@biomejs/cli-win32-arm64": "2.1.2", "@biomejs/cli-win32-x64": "2.1.2" }, "bin": { "biome": "bin/biome" } }, "sha512-yq8ZZuKuBVDgAS76LWCfFKHSYIAgqkxVB3mGVVpOe2vSkUTs7xG46zXZeNPRNVjiJuw0SZ3+J2rXiYx0RUpfGg=="],
|
||||
"@biomejs/biome": ["@biomejs/biome@2.2.0", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.2.0", "@biomejs/cli-darwin-x64": "2.2.0", "@biomejs/cli-linux-arm64": "2.2.0", "@biomejs/cli-linux-arm64-musl": "2.2.0", "@biomejs/cli-linux-x64": "2.2.0", "@biomejs/cli-linux-x64-musl": "2.2.0", "@biomejs/cli-win32-arm64": "2.2.0", "@biomejs/cli-win32-x64": "2.2.0" }, "bin": { "biome": "bin/biome" } }, "sha512-3On3RSYLsX+n9KnoSgfoYlckYBoU6VRM22cw1gB4Y0OuUVSYd/O/2saOJMrA4HFfA1Ff0eacOvMN1yAAvHtzIw=="],
|
||||
|
||||
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.1.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-leFAks64PEIjc7MY/cLjE8u5OcfBKkcDB0szxsWUB4aDfemBep1WVKt0qrEyqZBOW8LPHzrFMyDl3FhuuA0E7g=="],
|
||||
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.2.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-zKbwUUh+9uFmWfS8IFxmVD6XwqFcENjZvEyfOxHs1epjdH3wyyMQG80FGDsmauPwS2r5kXdEM0v/+dTIA9FXAg=="],
|
||||
|
||||
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.1.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-Nmmv7wRX5Nj7lGmz0FjnWdflJg4zii8Ivruas6PBKzw5SJX/q+Zh2RfnO+bBnuKLXpj8kiI2x2X12otpH6a32A=="],
|
||||
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.2.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-+OmT4dsX2eTfhD5crUOPw3RPhaR+SKVspvGVmSdZ9y9O/AgL8pla6T4hOn1q+VAFBHuHhsdxDRJgFCSC7RaMOw=="],
|
||||
|
||||
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.1.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-NWNy2Diocav61HZiv2enTQykbPP/KrA/baS7JsLSojC7Xxh2nl9IczuvE5UID7+ksRy2e7yH7klm/WkA72G1dw=="],
|
||||
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.2.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-6eoRdF2yW5FnW9Lpeivh7Mayhq0KDdaDMYOJnH9aT02KuSIX5V1HmWJCQQPwIQbhDh68Zrcpl8inRlTEan0SXw=="],
|
||||
|
||||
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.1.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-qgHvafhjH7Oca114FdOScmIKf1DlXT1LqbOrrbR30kQDLFPEOpBG0uzx6MhmsrmhGiCFCr2obDamu+czk+X0HQ=="],
|
||||
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.2.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-egKpOa+4FL9YO+SMUMLUvf543cprjevNc3CAgDNFLcjknuNMcZ0GLJYa3EGTCR2xIkIUJDVneBV3O9OcIlCEZQ=="],
|
||||
|
||||
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.1.2", "", { "os": "linux", "cpu": "x64" }, "sha512-Km/UYeVowygTjpX6sGBzlizjakLoMQkxWbruVZSNE6osuSI63i4uCeIL+6q2AJlD3dxoiBJX70dn1enjQnQqwA=="],
|
||||
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.2.0", "", { "os": "linux", "cpu": "x64" }, "sha512-5UmQx/OZAfJfi25zAnAGHUMuOd+LOsliIt119x2soA2gLggQYrVPA+2kMUxR6Mw5M1deUF/AWWP2qpxgH7Nyfw=="],
|
||||
|
||||
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.1.2", "", { "os": "linux", "cpu": "x64" }, "sha512-xlB3mU14ZUa3wzLtXfmk2IMOGL+S0aHFhSix/nssWS/2XlD27q+S6f0dlQ8WOCbYoXcuz8BCM7rCn2lxdTrlQA=="],
|
||||
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.2.0", "", { "os": "linux", "cpu": "x64" }, "sha512-I5J85yWwUWpgJyC1CcytNSGusu2p9HjDnOPAFG4Y515hwRD0jpR9sT9/T1cKHtuCvEQ/sBvx+6zhz9l9wEJGAg=="],
|
||||
|
||||
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.1.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-G8KWZli5ASOXA3yUQgx+M4pZRv3ND16h77UsdunUL17uYpcL/UC7RkWTdkfvMQvogVsAuz5JUcBDjgZHXxlKoA=="],
|
||||
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.2.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-n9a1/f2CwIDmNMNkFs+JI0ZjFnMO0jdOyGNtihgUNFnlmd84yIYY2KMTBmMV58ZlVHjgmY5Y6E1hVTnSRieggA=="],
|
||||
|
||||
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.1.2", "", { "os": "win32", "cpu": "x64" }, "sha512-9zajnk59PMpjBkty3bK2IrjUsUHvqe9HWwyAWQBjGLE7MIBjbX2vwv1XPEhmO2RRuGoTkVx3WCanHrjAytICLA=="],
|
||||
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.2.0", "", { "os": "win32", "cpu": "x64" }, "sha512-Nawu5nHjP/zPKTIryh2AavzTc/KEg4um/MxWdXW0A6P/RZOyIpa7+QSjeXwAwX/utJGaCoXRPWtF3m5U/bB3Ww=="],
|
||||
|
||||
"prettier": ["prettier@3.6.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ=="],
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.1.2",
|
||||
"@biomejs/biome": "^2.2.0",
|
||||
"prettier": "^3.6.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
|
||||
[class^='tg-'],
|
||||
[class*=' tg-'] {
|
||||
/* biome-ignore lint/complexity/noImportantStyles: Needed */
|
||||
font-family: 'tgfont' !important;
|
||||
font-size: undefined;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* biome-ignore-start lint/suspicious/noUselessEscapeInString: Unicode */
|
||||
:root {
|
||||
--tg-air-tank-slash: '\ea01';
|
||||
--tg-air-tank: '\ea02';
|
||||
@@ -26,6 +27,7 @@
|
||||
--tg-sound-plus: '\ea0b';
|
||||
--tg-syndicate-logo: '\ea0c';
|
||||
}
|
||||
/* biome-ignore-end lint/suspicious/noUselessEscapeInString: Unicode */
|
||||
.tg-air-tank-slash::before {
|
||||
content: var(--tg-air-tank-slash);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,9 @@ export class RspackCompiler {
|
||||
stats
|
||||
?.toString(this.config.stats)
|
||||
.split('\n')
|
||||
.forEach((line) => logger.log(line));
|
||||
.forEach((line) => {
|
||||
logger.log(line);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,9 @@ export class AudioPlayer {
|
||||
logger.log('playback failed');
|
||||
});
|
||||
|
||||
this.onPlaySubscribers.forEach((subscriber) => subscriber());
|
||||
this.onPlaySubscribers.forEach((subscriber) => {
|
||||
subscriber();
|
||||
});
|
||||
}
|
||||
|
||||
stop() {
|
||||
@@ -101,7 +103,9 @@ export class AudioPlayer {
|
||||
this.element.pause();
|
||||
this.destroy();
|
||||
|
||||
this.onStopSubscribers.forEach((subscriber) => subscriber());
|
||||
this.onStopSubscribers.forEach((subscriber) => {
|
||||
subscriber();
|
||||
});
|
||||
}
|
||||
|
||||
setVolume(volume: number): void {
|
||||
|
||||
@@ -336,7 +336,7 @@ class ChatRenderer {
|
||||
let highlightRegex;
|
||||
// Nothing to match, reset highlighting
|
||||
if (lines.length === 0) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
// Reset lastIndex so it does not mess up the next word
|
||||
allowedRegex.lastIndex = 0;
|
||||
@@ -433,6 +433,7 @@ class ChatRenderer {
|
||||
highlightBlacklist,
|
||||
blacklistregex,
|
||||
});
|
||||
return undefined;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -704,6 +705,7 @@ class ChatRenderer {
|
||||
node.className += ' ChatMessage--highlighted';
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
}
|
||||
// Linkify text
|
||||
|
||||
@@ -80,21 +80,39 @@ const TextHighlightSetting = (props) => {
|
||||
return (
|
||||
<Stack.Item {...rest}>
|
||||
<Stack mb={1} color="label" align="baseline">
|
||||
<Stack.Item grow>
|
||||
<Button
|
||||
color="transparent"
|
||||
icon="times"
|
||||
onClick={() =>
|
||||
dispatch(
|
||||
removeHighlightSetting({
|
||||
id: id,
|
||||
}),
|
||||
)
|
||||
}
|
||||
>
|
||||
Delete
|
||||
</Button>
|
||||
</Stack.Item>
|
||||
<Button.Confirm
|
||||
icon="times"
|
||||
color="transparent"
|
||||
onClick={() =>
|
||||
dispatch(
|
||||
updateHighlightSetting({
|
||||
id: id,
|
||||
highlightText: '',
|
||||
blacklistText: '',
|
||||
}),
|
||||
)
|
||||
}
|
||||
>
|
||||
Reset
|
||||
</Button.Confirm>
|
||||
{id !== 'default' && (
|
||||
<Stack.Item>
|
||||
<Button.Confirm
|
||||
color="transparent"
|
||||
icon="times"
|
||||
onClick={() =>
|
||||
dispatch(
|
||||
removeHighlightSetting({
|
||||
id: id,
|
||||
}),
|
||||
)
|
||||
}
|
||||
>
|
||||
Delete
|
||||
</Button.Confirm>
|
||||
</Stack.Item>
|
||||
)}
|
||||
<Stack.Item grow />
|
||||
<Stack.Item>
|
||||
<Button.Checkbox
|
||||
checked={highlightBlacklist}
|
||||
|
||||
@@ -266,9 +266,7 @@ export function settingsReducer(
|
||||
// Transfer this data from the default highlight setting
|
||||
// so they carry over to other servers
|
||||
if (id === defaultHighlightSetting.id) {
|
||||
if (settings.highlightText) {
|
||||
nextState.highlightText = settings.highlightText;
|
||||
}
|
||||
nextState.highlightText = settings.highlightText;
|
||||
if (settings.highlightColor) {
|
||||
nextState.highlightColor = settings.highlightColor;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ blink {
|
||||
}
|
||||
|
||||
.FatalError--visible {
|
||||
/* biome-ignore lint/complexity/noImportantStyles: Needed */
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ const BiogeneratorItems = (props: {
|
||||
})
|
||||
.sort(sortTypes[props.sortOrder]);
|
||||
if (items_in_cat.length === 0) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
if (props.descending) {
|
||||
items_in_cat = items_in_cat.reverse();
|
||||
|
||||
@@ -39,6 +39,7 @@ export const BodyScannerMainAbnormalities = (props: { occupant: occupant }) => {
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
return undefined;
|
||||
})}
|
||||
</Section>
|
||||
);
|
||||
|
||||
@@ -119,7 +119,7 @@ const CasinoPrizeDispenserItems = (props: {
|
||||
})
|
||||
.sort(sortTypes[props.sortOrder]);
|
||||
if (items_in_cat.length === 0) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
if (props.descending) {
|
||||
items_in_cat = items_in_cat.reverse();
|
||||
|
||||
@@ -111,9 +111,9 @@ export class Changelog extends Component<ChangelogProps, ChangelogState> {
|
||||
} = useBackend<Data>();
|
||||
|
||||
if (dates) {
|
||||
dates.forEach((date) =>
|
||||
this.dateChoices.push(dateformat(date, 'mmmm yyyy', true)),
|
||||
);
|
||||
dates.forEach((date) => {
|
||||
this.dateChoices.push(dateformat(date, 'mmmm yyyy', true));
|
||||
});
|
||||
this.setSelectedDate(this.dateChoices[0]);
|
||||
this.getData(dates[0]);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export const CharacterDirectoryList = (props: {
|
||||
<Table.Row bold>
|
||||
<Table.Cell collapsing>Photo</Table.Cell>
|
||||
<SortButton
|
||||
id="name"
|
||||
ourId="name"
|
||||
sortId={sortId}
|
||||
sortOrder={sortOrder}
|
||||
onSortId={setSortId}
|
||||
@@ -39,7 +39,7 @@ export const CharacterDirectoryList = (props: {
|
||||
Name
|
||||
</SortButton>
|
||||
<SortButton
|
||||
id="species"
|
||||
ourId="species"
|
||||
sortId={sortId}
|
||||
sortOrder={sortOrder}
|
||||
onSortId={setSortId}
|
||||
@@ -48,7 +48,7 @@ export const CharacterDirectoryList = (props: {
|
||||
Species
|
||||
</SortButton>
|
||||
<SortButton
|
||||
id="tag"
|
||||
ourId="tag"
|
||||
sortId={sortId}
|
||||
sortOrder={sortOrder}
|
||||
onSortId={setSortId}
|
||||
@@ -57,7 +57,7 @@ export const CharacterDirectoryList = (props: {
|
||||
Vore Tag
|
||||
</SortButton>
|
||||
<SortButton
|
||||
id="gendertag"
|
||||
ourId="gendertag"
|
||||
sortId={sortId}
|
||||
sortOrder={sortOrder}
|
||||
onSortId={setSortId}
|
||||
@@ -66,7 +66,7 @@ export const CharacterDirectoryList = (props: {
|
||||
Gender
|
||||
</SortButton>
|
||||
<SortButton
|
||||
id="sexualitytag"
|
||||
ourId="sexualitytag"
|
||||
sortId={sortId}
|
||||
sortOrder={sortOrder}
|
||||
onSortId={setSortId}
|
||||
@@ -75,7 +75,7 @@ export const CharacterDirectoryList = (props: {
|
||||
Sexuality
|
||||
</SortButton>
|
||||
<SortButton
|
||||
id="erptag"
|
||||
ourId="erptag"
|
||||
sortId={sortId}
|
||||
sortOrder={sortOrder}
|
||||
onSortId={setSortId}
|
||||
@@ -84,7 +84,7 @@ export const CharacterDirectoryList = (props: {
|
||||
ERP Tag
|
||||
</SortButton>
|
||||
<SortButton
|
||||
id="eventtag"
|
||||
ourId="eventtag"
|
||||
sortId={sortId}
|
||||
sortOrder={sortOrder}
|
||||
onSortId={setSortId}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { Button, Icon, Table } from 'tgui-core/components';
|
||||
|
||||
export const SortButton = (props: {
|
||||
id: string;
|
||||
ourId: string;
|
||||
sortId: string;
|
||||
sortOrder: boolean;
|
||||
onSortOrder: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
onSortId: React.Dispatch<React.SetStateAction<string>>;
|
||||
children: React.JSX.Element | string;
|
||||
}) => {
|
||||
const { id, sortId, sortOrder, onSortOrder, onSortId, children } = props;
|
||||
const { ourId, sortId, sortOrder, onSortOrder, onSortId, children } = props;
|
||||
|
||||
// Hey, same keys mean same data~
|
||||
|
||||
@@ -16,18 +16,18 @@ export const SortButton = (props: {
|
||||
<Table.Cell collapsing>
|
||||
<Button
|
||||
width="100%"
|
||||
color={sortId !== id && 'transparent'}
|
||||
color={sortId !== ourId && 'transparent'}
|
||||
onClick={() => {
|
||||
if (sortId === id) {
|
||||
if (sortId === ourId) {
|
||||
onSortOrder(!props.sortOrder);
|
||||
} else {
|
||||
onSortId(id);
|
||||
onSortId(ourId);
|
||||
onSortOrder(true);
|
||||
}
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
{sortId === id && (
|
||||
{sortId === ourId && (
|
||||
<Icon name={sortOrder ? 'sort-up' : 'sort-down'} ml="0.25rem;" />
|
||||
)}
|
||||
</Button>
|
||||
|
||||
@@ -229,6 +229,7 @@ const EStopSvg = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
{...props}
|
||||
>
|
||||
<defs>
|
||||
{/** biome-ignore lint/correctness/useUniqueElementIds: Required for SVG */}
|
||||
<marker
|
||||
id="b"
|
||||
markerHeight={2}
|
||||
@@ -254,6 +255,7 @@ const EStopSvg = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
transform="scale(.5)"
|
||||
/>
|
||||
</marker>
|
||||
{/** biome-ignore lint/correctness/useUniqueElementIds: Required for SVG */}
|
||||
<marker
|
||||
id="c"
|
||||
markerHeight={2}
|
||||
@@ -279,6 +281,7 @@ const EStopSvg = (props: React.SVGProps<SVGSVGElement>) => {
|
||||
transform="scale(.5)"
|
||||
/>
|
||||
</marker>
|
||||
{/** biome-ignore lint/correctness/useUniqueElementIds: Required for SVG */}
|
||||
<marker
|
||||
id="a"
|
||||
markerHeight={2}
|
||||
|
||||
@@ -81,7 +81,7 @@ const MiningVendorItems = (props: {
|
||||
})
|
||||
.sort(sortTypes[props.sortOrder]);
|
||||
if (items_in_cat.length === 0) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
if (props.descending) {
|
||||
items_in_cat = items_in_cat.reverse();
|
||||
|
||||
@@ -47,6 +47,7 @@ export const setGradientSpace = (
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
if (!found) {
|
||||
gradient.push({ space: space });
|
||||
|
||||
@@ -59,7 +59,6 @@ const ConstructorPage = (props: {
|
||||
designs: ConstructorDesign[];
|
||||
linked_data: LinkedConstructor;
|
||||
}) => {
|
||||
const { act, data } = useBackend<Data>();
|
||||
const { type, designs, linked_data } = props;
|
||||
const our_name = constructorEnumToName[type];
|
||||
|
||||
@@ -328,7 +327,7 @@ const MatStorageTab = (props: {
|
||||
<LabeledList>
|
||||
{Object.entries(linked_data.materials).map(([mat, amount]) => {
|
||||
if (amount === 0 && !NEVER_HIDE_MATERIALS.includes(mat)) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
return (
|
||||
<LabeledList.Item
|
||||
|
||||
@@ -40,6 +40,7 @@ export const VoreContentsPanel = (props: {
|
||||
if (entry.value === value) {
|
||||
return entry.displayText;
|
||||
}
|
||||
return undefined;
|
||||
})
|
||||
.filter((value) => value !== undefined);
|
||||
if (Array.isArray(bellyName) && bellyName.length) {
|
||||
|
||||
@@ -115,9 +115,9 @@ export class Changelog extends Component<
|
||||
} = useBackend<Data>();
|
||||
|
||||
if (dates) {
|
||||
dates.forEach((date) =>
|
||||
this.dateChoices.push(dateformat(date, 'mmmm yyyy', true)),
|
||||
);
|
||||
dates.forEach((date) => {
|
||||
this.dateChoices.push(dateformat(date, 'mmmm yyyy', true));
|
||||
});
|
||||
this.setSelectedDate(this.dateChoices[0]);
|
||||
this.getData(dates[0]);
|
||||
}
|
||||
|
||||
@@ -50,9 +50,8 @@ const SelectedArticle = (props) => {
|
||||
}
|
||||
>
|
||||
{!!cover && <Image src={resolveAsset(cover)} />}
|
||||
{/* News articles are written in premade .html files and cannot be edited by players, so it should be
|
||||
* safe enough to use dangerouslySetInnerHTML here.
|
||||
*/}
|
||||
{/** biome-ignore lint/security/noDangerouslySetInnerHtml: News articles are written in premade .html files and cannot be edited by players, so it should be
|
||||
* safe enough to use dangerouslySetInnerHTML here. */}
|
||||
<div dangerouslySetInnerHTML={{ __html: content }} />
|
||||
</Section>
|
||||
);
|
||||
|
||||
@@ -57,7 +57,7 @@ export const Connections = (props: {
|
||||
const from = val.from;
|
||||
const to = val.to;
|
||||
if (!to || !from) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
val.color = val.color || 'blue';
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('captureExternalLinks', () => {
|
||||
parentElement: document.body,
|
||||
};
|
||||
const byond = { sendMessage: mock() };
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
global.Byond = byond;
|
||||
|
||||
const evt = { target: externalLink, preventDefault: mock() };
|
||||
@@ -58,7 +58,7 @@ describe('captureExternalLinks', () => {
|
||||
parentElement: document.body,
|
||||
};
|
||||
const byond = { sendMessage: mock() };
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
global.Byond = byond;
|
||||
|
||||
const evt = { target: byondLink, preventDefault: mock() };
|
||||
@@ -75,7 +75,7 @@ describe('captureExternalLinks', () => {
|
||||
parentElement: document.body,
|
||||
};
|
||||
const byond = { sendMessage: mock() };
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
global.Byond = byond;
|
||||
|
||||
const evt = { target: wwwLink, preventDefault: mock() };
|
||||
|
||||
Reference in New Issue
Block a user