ConsoleJanitor: Fix outdated settings margin

This commit is contained in:
Nuckyz 2025-08-29 16:23:23 -03:00
parent aca30bcb9a
commit 8807564053
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 7 additions and 10 deletions

View file

@ -36,7 +36,7 @@ export function resolveError(isValidResult: boolean | string) {
interface SettingsSectionProps extends PropsWithChildren { interface SettingsSectionProps extends PropsWithChildren {
name: string; name: string;
description: string; description: string;
error: string | null; error?: string | null;
inlineSetting?: boolean; inlineSetting?: boolean;
} }

View file

@ -6,11 +6,10 @@
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import ErrorBoundary from "@components/ErrorBoundary"; import ErrorBoundary from "@components/ErrorBoundary";
import { Flex } from "@components/Flex"; import { SettingsSection } from "@components/settings/tabs/plugins/components/Common";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { Margins } from "@utils/margins";
import definePlugin, { defineDefault, OptionType, StartAt } from "@utils/types"; import definePlugin, { defineDefault, OptionType, StartAt } from "@utils/types";
import { Checkbox, Forms, Text } from "@webpack/common"; import { Checkbox, Text } from "@webpack/common";
const Noop = () => { }; const Noop = () => { };
const NoopLogger = { const NoopLogger = {
@ -58,15 +57,13 @@ function AllowLevelSetting({ settingKey }: AllowLevelSettingProps) {
const AllowLevelSettings = ErrorBoundary.wrap(() => { const AllowLevelSettings = ErrorBoundary.wrap(() => {
return ( return (
<Forms.FormSection> <SettingsSection name="Filter List" description="Always allow loggers of these types">
<Forms.FormTitle tag="h3">Filter List</Forms.FormTitle> <div style={{ display: "flex", flexDirection: "row" }}>
<Forms.FormText className={Margins.bottom8}>Always allow loggers of these types</Forms.FormText>
<Flex flexDirection="row">
{Object.keys(settings.store.allowLevel).map(key => ( {Object.keys(settings.store.allowLevel).map(key => (
<AllowLevelSetting key={key} settingKey={key as keyof AllowLevels} /> <AllowLevelSetting key={key} settingKey={key as keyof AllowLevels} />
))} ))}
</Flex> </div>
</Forms.FormSection> </SettingsSection>
); );
}); });