feat: add allow-lan (#478)

This commit is contained in:
Y4er 2023-12-03 22:09:09 +08:00 committed by GitHub
parent 1e736e7ed7
commit aa4d1d9e51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 0 deletions

View File

@ -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',

View File

@ -105,6 +105,7 @@ export default {
version: '版本',
expire: '到期时间',
noExpire: '不限时',
allowLan: '允许局域网访问',
enableTunDevice: '开启 TUN 转发',
tunModeStack: 'TUN 模式堆栈',
tunDeviceName: 'TUN 设备名称',

View File

@ -223,6 +223,26 @@ const ConfigForm: Component<{ backendVersion: Accessor<string> }> = ({
</form>
<div class="grid grid-cols-2 gap-2 sm:grid-cols-4">
<div class="form-control">
<label for="enable-allow-lan" class="label gap-2">
<span class="label-text">{t('allowLan')}</span>
</label>
<input
id="enable-allow-lan"
type="checkbox"
class="toggle"
checked={configsData()?.['allow-lan']}
onChange={(e) =>
void updateBackendConfigAPI(
'allow-lan',
e.target.checked,
refetch,
)
}
/>
</div>
<div class="form-control">
<label for="enable-tun-device" class="label gap-2">
<span class="label-text">{t('enableTunDevice')}</span>