Skip to content

Commit 8807564

Browse files
committed
ConsoleJanitor: Fix outdated settings margin
1 parent aca30bc commit 8807564

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

src/components/settings/tabs/plugins/components/Common.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function resolveError(isValidResult: boolean | string) {
3636
interface SettingsSectionProps extends PropsWithChildren {
3737
name: string;
3838
description: string;
39-
error: string | null;
39+
error?: string | null;
4040
inlineSetting?: boolean;
4141
}
4242

src/plugins/consoleJanitor/index.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66

77
import { definePluginSettings } from "@api/Settings";
88
import ErrorBoundary from "@components/ErrorBoundary";
9-
import { Flex } from "@components/Flex";
9+
import { SettingsSection } from "@components/settings/tabs/plugins/components/Common";
1010
import { Devs } from "@utils/constants";
11-
import { Margins } from "@utils/margins";
1211
import definePlugin, { defineDefault, OptionType, StartAt } from "@utils/types";
13-
import { Checkbox, Forms, Text } from "@webpack/common";
12+
import { Checkbox, Text } from "@webpack/common";
1413

1514
const Noop = () => { };
1615
const NoopLogger = {
@@ -58,15 +57,13 @@ function AllowLevelSetting({ settingKey }: AllowLevelSettingProps) {
5857

5958
const AllowLevelSettings = ErrorBoundary.wrap(() => {
6059
return (
61-
<Forms.FormSection>
62-
<Forms.FormTitle tag="h3">Filter List</Forms.FormTitle>
63-
<Forms.FormText className={Margins.bottom8}>Always allow loggers of these types</Forms.FormText>
64-
<Flex flexDirection="row">
60+
<SettingsSection name="Filter List" description="Always allow loggers of these types">
61+
<div style={{ display: "flex", flexDirection: "row" }}>
6562
{Object.keys(settings.store.allowLevel).map(key => (
6663
<AllowLevelSetting key={key} settingKey={key as keyof AllowLevels} />
6764
))}
68-
</Flex>
69-
</Forms.FormSection>
65+
</div>
66+
</SettingsSection>
7067
);
7168
});
7269

0 commit comments

Comments
 (0)