From aa4d1d9e517ed6f33920f0082fc3ade23236097d Mon Sep 17 00:00:00 2001 From: Y4er <45418382@qq.com> Date: Sun, 3 Dec 2023 22:09:09 +0800 Subject: [PATCH] feat: add allow-lan (#478) --- src/i18n/en.ts | 1 + src/i18n/zh.ts | 1 + src/pages/Config.tsx | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/src/i18n/en.ts b/src/i18n/en.ts index e0f3fe79..42893804 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -103,6 +103,7 @@ export default { version: 'Version', expire: 'Expire', noExpire: 'Null', + allowLan: 'Allow Lan', enableTunDevice: 'Enable TUN Device', tunModeStack: 'TUN Mode Stack', tunDeviceName: 'TUN Device Name', diff --git a/src/i18n/zh.ts b/src/i18n/zh.ts index f9446572..6e43546b 100644 --- a/src/i18n/zh.ts +++ b/src/i18n/zh.ts @@ -105,6 +105,7 @@ export default { version: '版本', expire: '到期时间', noExpire: '不限时', + allowLan: '允许局域网访问', enableTunDevice: '开启 TUN 转发', tunModeStack: 'TUN 模式堆栈', tunDeviceName: 'TUN 设备名称', diff --git a/src/pages/Config.tsx b/src/pages/Config.tsx index f81a7b7f..423a0b5c 100644 --- a/src/pages/Config.tsx +++ b/src/pages/Config.tsx @@ -223,6 +223,26 @@ const ConfigForm: Component<{ backendVersion: Accessor }> = ({
+
+ + + + void updateBackendConfigAPI( + 'allow-lan', + e.target.checked, + refetch, + ) + } + /> +
+