diff --git a/client_v3/src/common/ui/SettingRow/SettingRow.tsx b/client_v3/src/common/ui/SettingRow/SettingRow.tsx
index 8bea59060..165b249d2 100644
--- a/client_v3/src/common/ui/SettingRow/SettingRow.tsx
+++ b/client_v3/src/common/ui/SettingRow/SettingRow.tsx
@@ -26,6 +26,7 @@ type Props = {
divider?: boolean;
align?: 'top' | 'center';
largeTitle?: boolean;
+ inputClassName?: string;
};
export const SettingRow = (props: Props) => {
@@ -142,7 +143,7 @@ export const SettingRow = (props: Props) => {
diff --git a/client_v3/src/components/Dhcp/Dhcp.tsx b/client_v3/src/components/Dhcp/Dhcp.tsx
index 9c8e6c675..4b9285583 100644
--- a/client_v3/src/components/Dhcp/Dhcp.tsx
+++ b/client_v3/src/components/Dhcp/Dhcp.tsx
@@ -18,7 +18,7 @@ import {
setDhcpConfig,
resetDhcp,
} from 'panel/stores/dhcp';
-import { addErrorToast } from 'panel/stores/toasts';
+import { addWarningToast } from 'panel/stores/toasts';
import { DhcpToggle } from './blocks/DhcpToggle';
import { InterfaceSelector } from './blocks/InterfaceSelector';
@@ -78,7 +78,7 @@ export const Dhcp = () => {
check &&
(check.v4?.other_server?.found === 'yes' || check.v6?.other_server?.found === 'yes')
) {
- addErrorToast({ error: intl.getMessage('dhcp_warning') });
+ addWarningToast({ error: intl.getMessage('dhcp_warning') });
}
});
diff --git a/client_v3/src/components/Settings/Settings.module.pcss b/client_v3/src/components/Settings/Settings.module.pcss
index 94189849a..0c5dd977a 100644
--- a/client_v3/src/components/Settings/Settings.module.pcss
+++ b/client_v3/src/components/Settings/Settings.module.pcss
@@ -40,3 +40,7 @@
.sectionTitle {
line-height: 32px;
}
+
+.queryLogSwitch {
+ padding-top: 12px;
+}
diff --git a/client_v3/src/components/Settings/Settings.tsx b/client_v3/src/components/Settings/Settings.tsx
index 150b75708..882b4a4fb 100644
--- a/client_v3/src/components/Settings/Settings.tsx
+++ b/client_v3/src/components/Settings/Settings.tsx
@@ -234,6 +234,7 @@ export const Settings = () => {
enabled: v,
})
}
+ inputClassName={s.queryLogSwitch}
/>
{
setState('notices', (prev) => [...prev, notice]);
};
+export const addWarningToast = (payload: { error: any; options?: any; action?: ToastAction }) => {
+ const { error, options, action } = payload;
+ const message = error instanceof Error ? error.message : String(error);
+ const notice: ToastNotice = {
+ id: nanoid(),
+ message,
+ options,
+ type: 'warning' as const,
+ };
+ if (action) {
+ notice.action = action;
+ }
+ setState('notices', (prev) => [...prev, notice]);
+};
+
export const addNoticeToast = (message: any) => {
setState('notices', (prev) => [
...prev,