Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-09-19 15:39:21 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-09-19 15:39:21 +0300
commit7465768ff79cb5d9ef597ff387dbba1971e2cac4 (patch)
tree4a7b9db8ad07d7d7effc605b225fe30b64591283
parent5b00a52c652f2e037016c65c3228780e29b5bdfe (diff)
fix: subpath panic
-rw-r--r--web/html/settings/panel/subscription/general.html10
-rw-r--r--web/html/settings/panel/subscription/json.html8
2 files changed, 15 insertions, 3 deletions
diff --git a/web/html/settings/panel/subscription/general.html b/web/html/settings/panel/subscription/general.html
index e3481df7..afa956fb 100644
--- a/web/html/settings/panel/subscription/general.html
+++ b/web/html/settings/panel/subscription/general.html
@@ -48,7 +48,13 @@
<template #title>{{ i18n "pages.settings.subPath"}}</template>
<template #description>{{ i18n "pages.settings.subPathDesc"}}</template>
<template #control>
- <a-input type="text" v-model="allSetting.subPath"></a-input>
+ <a-input
+ type="text"
+ v-model="allSetting.subPath"
+ @input="allSetting.subPath = ((typeof $event === 'string' ? $event : ($event && $event.target ? $event.target.value : '')) || '').replace(/[:*]/g, '')"
+ @blur="allSetting.subPath = (p => { p = p || '/'; if (!p.startsWith('/')) p='/' + p; if (!p.endsWith('/')) p += '/'; return p.replace(/\/+/g,'/'); })(allSetting.subPath)"
+ placeholder="/sub/"
+ ></a-input>
</template>
</a-setting-list-item>
<a-setting-list-item paddings="small">
@@ -102,4 +108,4 @@
</a-setting-list-item>
</a-collapse-panel>
</a-collapse>
-{{end}} \ No newline at end of file
+{{end}}
diff --git a/web/html/settings/panel/subscription/json.html b/web/html/settings/panel/subscription/json.html
index c8575e38..ff924352 100644
--- a/web/html/settings/panel/subscription/json.html
+++ b/web/html/settings/panel/subscription/json.html
@@ -5,7 +5,13 @@
<template #title>{{ i18n "pages.settings.subPath"}}</template>
<template #description>{{ i18n "pages.settings.subPathDesc"}}</template>
<template #control>
- <a-input type="text" v-model="allSetting.subJsonPath"></a-input>
+ <a-input
+ type="text"
+ v-model="allSetting.subJsonPath"
+ @input="allSetting.subJsonPath = ((typeof $event === 'string' ? $event : ($event && $event.target ? $event.target.value : '')) || '').replace(/[:*]/g, '')"
+ @blur="allSetting.subJsonPath = (p => { p = p || '/'; if (!p.startsWith('/')) p='/' + p; if (!p.endsWith('/')) p += '/'; return p.replace(/\/+/g,'/'); })(allSetting.subJsonPath)"
+ placeholder="/json/"
+ ></a-input>
</template>
</a-setting-list-item>
<a-setting-list-item paddings="small">