mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
- Replace plain textarea with CodeMirror editor (YAML syntax highlighting, line numbers, auto-indent) for Clash subscription template - Fix confAlerts crash when subClashURI/subURI/subJsonURI is null/undefined (prevented save button from enabling) - Add yaml.js CodeMirror mode asset - Include docs and .gitignore cleanup
33 lines
1.9 KiB
HTML
33 lines
1.9 KiB
HTML
{{define "settings/panel/subscription/clash"}}
|
|
<a-collapse default-active-key="['1','2']">
|
|
<a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
|
|
<a-setting-list-item paddings="small">
|
|
<template #title>{{ i18n "pages.settings.subPath"}}</template>
|
|
<template #description>{{ i18n "pages.settings.subPathDesc"}}</template>
|
|
<template #control>
|
|
<a-input type="text" v-model="allSetting.subClashPath"
|
|
@input="allSetting.subClashPath = ((typeof $event === 'string' ? $event : ($event && $event.target ? $event.target.value : '')) || '').replace(/[:*]/g, '')"
|
|
@blur="allSetting.subClashPath = (p => { p = p || '/'; if (!p.startsWith('/')) p='/' + p; if (!p.endsWith('/')) p += '/'; return p.replace(/\/+/g,'/'); })(allSetting.subClashPath)"
|
|
placeholder="/clash/"></a-input>
|
|
</template>
|
|
</a-setting-list-item>
|
|
<a-setting-list-item paddings="small">
|
|
<template #title>{{ i18n "pages.settings.subURI"}}</template>
|
|
<template #description>{{ i18n "pages.settings.subURIDesc"}}</template>
|
|
<template #control>
|
|
<a-input type="text" placeholder="(http|https)://domain[:port]/path/"
|
|
v-model="allSetting.subClashURI"></a-input>
|
|
</template>
|
|
</a-setting-list-item>
|
|
</a-collapse-panel>
|
|
<a-collapse-panel key="2" header="Clash YAML Template">
|
|
<a-setting-list-item paddings="small">
|
|
<template #title>Template</template>
|
|
<template #description>Complete Clash YAML template with proxies: [] placeholder. The panel will replace proxies: [] with generated proxy entries.</template>
|
|
<template #control>
|
|
<textarea id="clashTemplate" style="display:none"></textarea>
|
|
</template>
|
|
</a-setting-list-item>
|
|
</a-collapse-panel>
|
|
</a-collapse>
|
|
{{end}}
|