diff --git a/src/components/LogsSettingsModal.tsx b/src/components/LogsSettingsModal.tsx
new file mode 100644
index 0000000..16a85ca
--- /dev/null
+++ b/src/components/LogsSettingsModal.tsx
@@ -0,0 +1,81 @@
+import { useI18n } from '@solid-primitives/i18n'
+import { For } from 'solid-js'
+import { ConfigTitle } from '~/components'
+import {
+ LOG_LEVEL,
+ LOGS_TABLE_MAX_ROWS_LIST,
+ MODAL,
+ TAILWINDCSS_SIZE,
+} from '~/constants'
+import {
+ logMaxRows,
+ logsTableSize,
+ setLogLevel,
+ setLogMaxRows,
+ setLogsTableSize,
+} from '~/signals'
+
+export const LogsSettingsModal = () => {
+ const [t] = useI18n()
+
+ return (
+
+ )
+}
diff --git a/src/components/ProxiesSettingsModal.tsx b/src/components/ProxiesSettingsModal.tsx
new file mode 100644
index 0000000..1757c7a
--- /dev/null
+++ b/src/components/ProxiesSettingsModal.tsx
@@ -0,0 +1,107 @@
+import { useI18n } from '@solid-primitives/i18n'
+import { For } from 'solid-js'
+import { ConfigTitle } from '~/components'
+import { MODAL, PROXIES_ORDERING_TYPE, PROXIES_PREVIEW_TYPE } from '~/constants'
+import {
+ autoCloseConns,
+ latencyTestTimeoutDuration,
+ proxiesOrderingType,
+ proxiesPreviewType,
+ setAutoCloseConns,
+ setLatencyTestTimeoutDuration,
+ setProxiesOrderingType,
+ setProxiesPreviewType,
+ setUrlForLatencyTest,
+ urlForLatencyTest,
+} from '~/signals'
+
+export const ProxiesSettingsModal = () => {
+ const [t] = useI18n()
+
+ return (
+
+ )
+}
diff --git a/src/components/index.ts b/src/components/index.ts
index f92b8d8..93295be 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -1,11 +1,14 @@
export * from './Button'
export * from './Collapse'
+export * from './ConfigTitle'
+export * from './ConnectionsSettingsModal'
export * from './ConnectionsTableDetailsModal'
-export * from './ConnectionsTableOrderingModal'
export * from './ForTwoColumns'
export * from './Header'
export * from './Latency'
export * from './LogoText'
+export * from './LogsSettingsModal'
+export * from './ProxiesSettingsModal'
export * from './ProxyCardGroups'
export * from './ProxyNodeCard'
export * from './ProxyNodePreview'
diff --git a/src/constants/index.ts b/src/constants/index.ts
index b9d2cca..63f4e9b 100644
--- a/src/constants/index.ts
+++ b/src/constants/index.ts
@@ -163,3 +163,11 @@ export enum LOG_LEVEL {
}
export const LOGS_TABLE_MAX_ROWS_LIST = [200, 300, 500, 800, 1000]
+
+export enum MODAL {
+ PROXIES_SETTINGS = 'proxies-settings',
+ RULES_SETTINGS = 'rules-settings',
+ CONNECTIONS_SETTINGS = 'connections-settings',
+ CONNECTIONS_TABLE_DETAILS = 'connections-table-details',
+ LOGS_SETTINGS = 'logs-settings',
+}
diff --git a/src/i18n/en.ts b/src/i18n/en.ts
index 251f711..bd5625c 100644
--- a/src/i18n/en.ts
+++ b/src/i18n/en.ts
@@ -59,7 +59,6 @@ export default {
orderName_desc: 'By name alphabetically (Z-A)',
ms: 'ms',
updated: 'Updated',
- renderProxiesInSamePage: 'Render proxies and proxy provider in same page',
tableSize: 'Table size',
logLevel: 'Log Level',
info: 'info',
@@ -67,7 +66,7 @@ export default {
debug: 'debug',
warning: 'warning',
error: 'error',
- logMaxRows: 'Log Maxinum Reserved Rows',
+ logMaxRows: 'Log Maximum Reserved Rows',
xs: 'Extra small size',
sm: 'Small size',
md: 'Normal size',
@@ -86,4 +85,5 @@ export default {
direct: 'Direct',
active: 'Active',
closed: 'Closed',
+ sort: 'Sort',
}
diff --git a/src/i18n/zh.ts b/src/i18n/zh.ts
index fd57d3f..07cda12 100644
--- a/src/i18n/zh.ts
+++ b/src/i18n/zh.ts
@@ -59,7 +59,6 @@ export default {
orderName_desc: '按名称字母排序 (Z-A)',
ms: '毫秒',
updated: '更新于',
- renderProxiesInSamePage: '将代理和代理提供者显示在同一页',
tableSize: '表格大小',
logLevel: '日志等级',
info: '信息',
@@ -86,4 +85,5 @@ export default {
direct: '直连',
active: '活动',
closed: '已关闭',
+ sort: '排序',
}
diff --git a/src/pages/Config.tsx b/src/pages/Config.tsx
index 308b8f9..2b93db8 100644
--- a/src/pages/Config.tsx
+++ b/src/pages/Config.tsx
@@ -2,14 +2,7 @@ import { createForm } from '@felte/solid'
import { validator } from '@felte/validator-zod'
import { useI18n } from '@solid-primitives/i18n'
import { useNavigate } from '@solidjs/router'
-import {
- For,
- ParentComponent,
- Show,
- children,
- createSignal,
- onMount,
-} from 'solid-js'
+import { For, Show, createSignal, onMount } from 'solid-js'
import { z } from 'zod'
import {
fetchBackendConfigAPI,
@@ -22,47 +15,21 @@ import {
upgradeBackendAPI,
upgradingBackend,
} from '~/apis'
-import { Button } from '~/components'
+import { Button, ConfigTitle } from '~/components'
+import { LANG, MODE_OPTIONS, ROUTES, themes } from '~/constants'
import {
- LANG,
- LOGS_TABLE_MAX_ROWS_LIST,
- LOG_LEVEL,
- MODE_OPTIONS,
- PROXIES_ORDERING_TYPE,
- PROXIES_PREVIEW_TYPE,
- ROUTES,
- TAILWINDCSS_SIZE,
- themes,
-} from '~/constants'
-import {
- autoCloseConns,
autoSwitchTheme,
backendConfig,
favDayTheme,
favNightTheme,
- latencyTestTimeoutDuration,
- logLevel,
- logMaxRows,
- proxiesOrderingType,
- proxiesPreviewType,
renderInTwoColumns,
- setAutoCloseConns,
setAutoSwitchTheme,
setBackendConfig,
setFavDayTheme,
setFavNightTheme,
- setLatencyTestTimeoutDuration,
- setLogLevel,
- setLogMaxRows,
- setProxiesOrderingType,
- setProxiesPreviewType,
setRenderInTwoColumns,
setSelectedEndpoint,
- setTableSize,
setTwemoji,
- setUrlForLatencyTest,
- tableSize,
- urlForLatencyTest,
useRequest,
useTwemoji,
} from '~/signals'
@@ -73,12 +40,6 @@ const dnsQueryFormSchema = z.object({
type: z.string(),
})
-const ConfigTitle: ParentComponent = (props) => (
-
- {children(() => props.children)()}
-
-)
-
const DNSQueryForm = () => {
const [t] = useI18n()
const request = useRequest()
@@ -147,7 +108,7 @@ const ConfigForm = () => {
const portsList = [
{
- label: 'Http Port',
+ label: 'HTTP Port',
key: 'port',
},
{
@@ -159,7 +120,7 @@ const ConfigForm = () => {
key: 'redir-port',
},
{
- label: 'Tproxy Port',
+ label: 'TProxy Port',
key: 'tproxy-port',
},
{
@@ -226,42 +187,6 @@ const ConfigForm = () => {
{t('restartCore')}
-
-