mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-14 06:25:35 +08:00
feat(config): update page layout
This commit is contained in:
parent
2be357e73c
commit
95200a56b8
@ -91,4 +91,7 @@ export default {
|
|||||||
flushFakeIPData: 'Flush Fake-IP Data',
|
flushFakeIPData: 'Flush Fake-IP Data',
|
||||||
tagClientSourceIPWithName: 'Tag Client Source IP With Name',
|
tagClientSourceIPWithName: 'Tag Client Source IP With Name',
|
||||||
tag: 'Tag',
|
tag: 'Tag',
|
||||||
|
coreConfig: 'Core Config',
|
||||||
|
xdConfig: 'XD Config',
|
||||||
|
version: 'Version',
|
||||||
}
|
}
|
||||||
|
@ -91,4 +91,7 @@ export default {
|
|||||||
flushFakeIPData: '清空 Fake-IP 数据',
|
flushFakeIPData: '清空 Fake-IP 数据',
|
||||||
tagClientSourceIPWithName: '为客户端源 IP 地址添加名称标记',
|
tagClientSourceIPWithName: '为客户端源 IP 地址添加名称标记',
|
||||||
tag: '标记',
|
tag: '标记',
|
||||||
|
coreConfig: '核心配置',
|
||||||
|
xdConfig: 'XD 配置',
|
||||||
|
version: '版本',
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,19 @@ const ConfigForXd = () => {
|
|||||||
const [t, { locale }] = useI18n()
|
const [t, { locale }] = useI18n()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="grid grid-cols-2 gap-4">
|
<div class="grid grid-cols-2 place-items-center gap-4">
|
||||||
|
<div class="col-span-2">
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
const curLocale = locale()
|
||||||
|
|
||||||
|
locale(curLocale === LANG.EN ? LANG.ZH : LANG.EN)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('switchLanguage')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-4">
|
||||||
<div>
|
<div>
|
||||||
<ConfigTitle>{t('autoSwitchTheme')}</ConfigTitle>
|
<ConfigTitle>{t('autoSwitchTheme')}</ConfigTitle>
|
||||||
@ -313,18 +325,6 @@ const ConfigForXd = () => {
|
|||||||
onChange={(e) => setUseTwemoji(e.target.checked)}
|
onChange={(e) => setUseTwemoji(e.target.checked)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
const curLocale = locale()
|
|
||||||
|
|
||||||
locale(curLocale === LANG.EN ? LANG.ZH : LANG.EN)
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t('switchLanguage')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ const Versions = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="flex gap-4">
|
<div class="flex items-center justify-center gap-4">
|
||||||
<kbd class="kbd">{import.meta.env.version}</kbd>
|
<kbd class="kbd">{import.meta.env.version}</kbd>
|
||||||
<kbd class="kbd">{backendVersion()}</kbd>
|
<kbd class="kbd">{backendVersion()}</kbd>
|
||||||
</div>
|
</div>
|
||||||
@ -347,12 +347,24 @@ const Versions = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
const [t] = useI18n()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="mx-auto flex max-w-screen-md flex-col gap-4">
|
<div class="mx-auto flex max-w-screen-md flex-col gap-4">
|
||||||
|
<ConfigTitle withDivider>{t('dnsQuery')}</ConfigTitle>
|
||||||
|
|
||||||
<DNSQueryForm />
|
<DNSQueryForm />
|
||||||
|
|
||||||
|
<ConfigTitle withDivider>{t('coreConfig')}</ConfigTitle>
|
||||||
|
|
||||||
<ConfigForm />
|
<ConfigForm />
|
||||||
|
|
||||||
|
<ConfigTitle withDivider>{t('xdConfig')}</ConfigTitle>
|
||||||
|
|
||||||
<ConfigForXd />
|
<ConfigForXd />
|
||||||
|
|
||||||
|
<ConfigTitle withDivider>{t('version')}</ConfigTitle>
|
||||||
|
|
||||||
<Versions />
|
<Versions />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user