-
-
-
+
props.ref?.(el)}
+ icon={}
+ title={t('proxiesSettings')}
+ >
+
{t('autoCloseConns')}
@@ -126,10 +117,6 @@ export const ProxiesSettingsModal = () => {
-
-
-
+
)
}
diff --git a/src/components/index.ts b/src/components/index.ts
index b6289df7..fa6f27ee 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -7,6 +7,7 @@ export * from './Header'
export * from './Latency'
export * from './LogoText'
export * from './LogsSettingsModal'
+export * from './Modal'
export * from './ProxiesSettingsModal'
export * from './ProxyCardGroups'
export * from './ProxyNodeCard'
diff --git a/src/constants/index.ts b/src/constants/index.ts
index 6cc86a56..064c1a94 100644
--- a/src/constants/index.ts
+++ b/src/constants/index.ts
@@ -163,11 +163,3 @@ export enum LOG_LEVEL {
export const LOGS_TABLE_MAX_ROWS_LIST = [200, 300, 500, 800, 1000]
export const DEFAULT_LOGS_TABLE_MAX_ROWS = LOGS_TABLE_MAX_ROWS_LIST[0]
-
-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 c91131af..e940c090 100644
--- a/src/i18n/en.ts
+++ b/src/i18n/en.ts
@@ -2,9 +2,13 @@ export default {
add: 'Add',
overview: 'Overview',
proxies: 'Proxies',
+ proxiesSettings: 'Proxies Settings',
rules: 'Rules',
connections: 'Connections',
+ connectionsSettings: 'Connections Settings',
+ connectionsDetails: 'Connections Details',
logs: 'Logs',
+ logsSettings: 'Logs Settings',
config: 'Config',
upload: 'Upload',
download: 'Download',
diff --git a/src/i18n/zh.ts b/src/i18n/zh.ts
index 715fef26..9ac91b0a 100644
--- a/src/i18n/zh.ts
+++ b/src/i18n/zh.ts
@@ -4,9 +4,13 @@ export default {
add: '添加',
overview: '概览',
proxies: '代理',
+ proxiesSettings: '代理设置',
rules: '规则',
connections: '连接',
+ connectionsSettings: '连接设置',
+ connectionsDetails: '连接详情',
logs: '日志',
+ logsSettings: '日志设置',
config: '配置',
upload: '上传',
download: '下载',
diff --git a/src/pages/Connections.tsx b/src/pages/Connections.tsx
index c04fcdc1..0ea11122 100644
--- a/src/pages/Connections.tsx
+++ b/src/pages/Connections.tsx
@@ -43,7 +43,7 @@ import {
ConnectionsSettingsModal,
ConnectionsTableDetailsModal,
} from '~/components'
-import { CONNECTIONS_TABLE_ACCESSOR_KEY, MODAL } from '~/constants'
+import { CONNECTIONS_TABLE_ACCESSOR_KEY } from '~/constants'
import { useI18n } from '~/i18n'
import {
allConnections,
@@ -78,6 +78,9 @@ const fuzzyFilter: FilterFn
= (row, columnId, value, addMeta) => {
}
export default () => {
+ let connectionsSettingsModalRef: HTMLDialogElement | undefined
+ let connectionsDetailsModalRef: HTMLDialogElement | undefined
+
const [t] = useI18n()
const [activeTab, setActiveTab] = createSignal(ActiveTab.activeConnections)
@@ -103,11 +106,7 @@ export default () => {
onClick={() => {
setSelectedConnectionID(row.original.id)
- const modal = document.querySelector(
- `#${MODAL.CONNECTIONS_TABLE_DETAILS}`,
- ) as HTMLDialogElement | null
-
- modal?.showModal()
+ connectionsDetailsModalRef?.showModal()
}}
icon={}
/>
@@ -397,13 +396,7 @@ export default () => {
@@ -531,6 +524,7 @@ export default () => {