mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-02 09:09:17 +00:00
feat(web): add standalone WASM config generator (#2480)
Add a small Vite workspace that builds and publishes independently of the dashboard. Reuse frontend-lib for the form and expose the existing NetworkConfig conversions through wasm-bindgen. Initialize the Aura theme in the standalone entry, detect the browser language, and provide a persistent selector in the form header. Present Generate Config and Copy Config as the page actions. Keep the shared network secret field fluid so both form columns align. Bundle the generator under dist/config-generator in the dashboard artifact while preserving its standalone build output. Build the optimized WASM module with the project and remove the API-backed generator route from the dashboard.
This commit is contained in:
@@ -15,6 +15,7 @@ import AclManager from './acl/AclManager.vue'
|
||||
import UrlListInput from './UrlListInput.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
actionLabel?: string
|
||||
configInvalid?: boolean
|
||||
hostname?: string
|
||||
}>()
|
||||
@@ -235,7 +236,7 @@ const instanceRecvBpsLimitInput = computed<string>({
|
||||
<div class="flex flex-col gap-2 basis-5/12 grow">
|
||||
<label for="network_secret">{{ t('network_secret') }}</label>
|
||||
<Password id="network_secret" v-model="curNetwork.network_secret"
|
||||
aria-describedby="network_secret-help" toggleMask :feedback="false" />
|
||||
aria-describedby="network_secret-help" toggleMask :feedback="false" fluid />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -539,7 +540,7 @@ const instanceRecvBpsLimitInput = computed<string>({
|
||||
</Panel>
|
||||
|
||||
<div class="flex pt-6 justify-center">
|
||||
<Button :label="t('run_network')" icon="pi pi-arrow-right" icon-pos="right" :disabled="configInvalid"
|
||||
<Button :label="actionLabel || t('run_network')" icon="pi pi-arrow-right" icon-pos="right" :disabled="configInvalid"
|
||||
@click="$emit('runNetwork', curNetwork)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -43,6 +43,12 @@ network_instances: 网络实例
|
||||
instance_id: 实例ID
|
||||
network_infos: 网络信息
|
||||
parse_network_config: 解析网络配置
|
||||
config_generator_placeholder: 生成的 TOML 配置将显示在这里
|
||||
generate_config: 生成配置
|
||||
copy_config: 复制配置
|
||||
config_copied: 已复制
|
||||
config_generation_failed: 生成失败
|
||||
config_copy_failed: 复制失败
|
||||
retain_network_instance: 保留网络实例
|
||||
collect_network_infos: 收集网络信息
|
||||
settings: 设置
|
||||
|
||||
@@ -43,6 +43,12 @@ network_instances: Network Instances
|
||||
instance_id: Instance ID
|
||||
network_infos: Network Infos
|
||||
parse_network_config: Parse Network Config
|
||||
config_generator_placeholder: Generated TOML configuration appears here
|
||||
generate_config: Generate Config
|
||||
copy_config: Copy Config
|
||||
config_copied: Copied
|
||||
config_generation_failed: Generation failed
|
||||
config_copy_failed: Copy failed
|
||||
retain_network_instance: Retain Network Instance
|
||||
collect_network_infos: Collect Network Infos
|
||||
settings: Settings
|
||||
|
||||
Reference in New Issue
Block a user