Bladeren bron

chore: giving keys for each `a-collapse-panel`

danilshishkevich 1 week geleden
bovenliggende
commit
19f7938617

+ 6 - 6
web/html/xui/settings/panel/general.html

@@ -1,6 +1,6 @@
 {{define "settings/panel/general"}}
-<a-collapse>
-    <a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
+<a-collapse default-active-key="1">
+    <a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
         <a-setting-list-item paddings="small">
             <template #title>
                 {{ i18n "pages.settings.remarkModel"}}
@@ -76,7 +76,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.notifications" }}'>
+    <a-collapse-panel key="2" header='{{ i18n "pages.settings.notifications" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.expireTimeDiff" }}</template>
             <template #description>{{ i18n "pages.settings.expireTimeDiffDesc" }}</template>
@@ -92,7 +92,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.certs" }}'>
+    <a-collapse-panel key="3" header='{{ i18n "pages.settings.certs" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.publicKeyPath"}}</template>
             <template #description>{{ i18n "pages.settings.publicKeyPathDesc"}}</template>
@@ -108,7 +108,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.externalTraffic" }}'>
+    <a-collapse-panel key="4" header='{{ i18n "pages.settings.externalTraffic" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.externalTrafficInformEnable"}}</template>
             <template #description>{{ i18n "pages.settings.externalTrafficInformEnableDesc"}}</template>
@@ -125,7 +125,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.dateAndTime" }}'>
+    <a-collapse-panel key="5" header='{{ i18n "pages.settings.dateAndTime" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.timeZone"}}</template>
             <template #description>{{ i18n "pages.settings.timeZoneDesc"}}</template>

+ 3 - 3
web/html/xui/settings/panel/security.html

@@ -1,6 +1,6 @@
 {{define "settings/panel/security"}}
-<a-collapse>
-    <a-collapse-panel header='{{ i18n "pages.settings.security.admin"}}'>
+<a-collapse default-active-key="1">
+    <a-collapse-panel key="1" header='{{ i18n "pages.settings.security.admin"}}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.oldUsername"}}</template>
             <template #control>
@@ -31,7 +31,7 @@
             </a-space>
         </a-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.security.secret"}}'>
+    <a-collapse-panel key="2" header='{{ i18n "pages.settings.security.secret"}}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.security.loginSecurity" }}</template>
             <template #description>{{ i18n "pages.settings.security.loginSecurityDesc" }}</template>

+ 5 - 5
web/html/xui/settings/panel/subscription/general.html

@@ -1,6 +1,6 @@
 {{define "settings/panel/subscription/general"}}
-<a-collapse>
-    <a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
+<a-collapse default-active-key="1">
+    <a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.subEnable"}}</template>
             <template #description>{{ i18n "pages.settings.subEnableDesc"}}</template>
@@ -53,7 +53,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.information" }}'>
+    <a-collapse-panel key="2" header='{{ i18n "pages.settings.information" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.subEncrypt"}}</template>
             <template #description>{{ i18n "pages.settings.subEncryptDesc"}}</template>
@@ -69,7 +69,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.certs" }}'>
+    <a-collapse-panel key="3" header='{{ i18n "pages.settings.certs" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.subCertPath"}}</template>
             <template #description>{{ i18n "pages.settings.subCertPathDesc"}}</template>
@@ -85,7 +85,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.intervals"}}'>
+    <a-collapse-panel key="4" header='{{ i18n "pages.settings.intervals"}}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.subUpdates"}}</template>
             <template #description>{{ i18n "pages.settings.subUpdatesDesc"}}</template>

+ 6 - 6
web/html/xui/settings/panel/subscription/json.html

@@ -1,6 +1,6 @@
 {{define "settings/panel/subscription/json"}}
-<a-collapse>
-    <a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
+<a-collapse default-active-key="1">
+    <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>
@@ -17,7 +17,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.fragment"}}'>
+    <a-collapse-panel key="2" header='{{ i18n "pages.settings.fragment"}}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.fragment"}}</template>
             <template #description>{{ i18n "pages.settings.fragmentDesc"}}</template>
@@ -51,7 +51,7 @@
             </a-collapse>
         </a-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header="Noises">
+    <a-collapse-panel key="3" header="Noises">
         <a-setting-list-item paddings="small">
             <template #title>Noises</template>
             <template #description>{{ i18n "pages.settings.noisesDesc"}}</template>
@@ -99,7 +99,7 @@
             <a-button v-if="noises" type="primary" @click="addNoise" style="margin-top: 10px">Add Noise</a-button>
         </a-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.mux"}}'>
+    <a-collapse-panel key="4" header='{{ i18n "pages.settings.mux"}}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.mux"}}</template>
             <template #description>{{ i18n "pages.settings.muxDesc"}}</template>
@@ -139,7 +139,7 @@
             </a-collapse>
         </a-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.direct" }}'>
+    <a-collapse-panel key="5" header='{{ i18n "pages.settings.direct" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.direct"}}</template>
             <template #description>{{ i18n "pages.settings.directDesc"}}</template>

+ 4 - 4
web/html/xui/settings/panel/telegram.html

@@ -1,6 +1,6 @@
 {{define "settings/panel/telegram"}}
-<a-collapse>
-    <a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
+<a-collapse default-active-key="1">
+    <a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.telegramBotEnable" }}</template>
             <template #description>{{ i18n "pages.settings.telegramBotEnableDesc" }}</template>
@@ -35,7 +35,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.notifications" }}'>
+    <a-collapse-panel key="2" header='{{ i18n "pages.settings.notifications" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.telegramNotifyTime"}}</template>
             <template #description>{{ i18n "pages.settings.telegramNotifyTimeDesc"}}</template>
@@ -65,7 +65,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.proxyAndServer" }}'>
+    <a-collapse-panel key="3" header='{{ i18n "pages.settings.proxyAndServer" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.settings.telegramProxy"}}</template>
             <template #description>{{ i18n "pages.settings.telegramProxyDesc"}}</template>

+ 7 - 7
web/html/xui/settings/xray/basics.html

@@ -1,6 +1,6 @@
 {{define "settings/xray/basics"}}
-<a-collapse>
-    <a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
+<a-collapse default-active-key="1">
+    <a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
         <a-row :xs="24" :sm="24" :lg="12">
             <a-alert type="warning" style="text-align: center;">
                 <template slot="message">
@@ -34,7 +34,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.xray.statistics" }}'>
+    <a-collapse-panel key="2" header='{{ i18n "pages.xray.statistics" }}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.xray.statsInboundUplink" }}</template>
             <template #description>{{ i18n "pages.xray.statsInboundUplinkDesc" }}</template>
@@ -64,7 +64,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.xray.logConfigs" }}'>
+    <a-collapse-panel key="3" header='{{ i18n "pages.xray.logConfigs" }}'>
         <a-row :xs="24" :sm="24" :lg="12">
             <a-alert type="warning" style="text-align: center;">
                 <template slot="message">
@@ -135,7 +135,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.xray.blockConfigs"}}'>
+    <a-collapse-panel key="4" header='{{ i18n "pages.xray.blockConfigs"}}'>
         <a-row :xs="24" :sm="24" :lg="12">
             <a-alert type="warning" style="text-align: center;">
                 <template slot="message">
@@ -159,7 +159,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.xray.basicRouting"}}'>
+    <a-collapse-panel key="5" header='{{ i18n "pages.xray.basicRouting"}}'>
         <a-row :xs="24" :sm="24" :lg="12">
             <a-alert type="warning" style="text-align: center;">
                 <template slot="message">
@@ -264,7 +264,7 @@
             </template>
         </a-setting-list-item>
     </a-collapse-panel>
-    <a-collapse-panel header='{{ i18n "pages.settings.resetDefaultConfig"}}'>
+    <a-collapse-panel key="6" header='{{ i18n "pages.settings.resetDefaultConfig"}}'>
         <a-space direction="horizontal" style="padding: 0 20px">
             <a-button type="danger" @click="resetXrayConfigToDefault">
                 <span>{{ i18n "pages.settings.resetDefaultConfig" }}</span>

+ 4 - 4
web/html/xui/settings/xray/dns.html

@@ -1,6 +1,6 @@
 {{define "settings/xray/dns"}}
-<a-collapse>
-    <a-collapse-panel header='{{ i18n "pages.xray.generalConfigs"}}'>
+<a-collapse default-active-key="1">
+    <a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
         <a-setting-list-item paddings="small">
             <template #title>{{ i18n "pages.xray.dns.enable" }}</template>
             <template #description>{{ i18n "pages.xray.dns.enableDesc" }}</template>
@@ -59,7 +59,7 @@
         </template>
     </a-collapse-panel>
     <template v-if="enableDNS">
-        <a-collapse-panel header='DNS'>
+        <a-collapse-panel key="2" header='DNS'>
             <template v-if="dnsServers.length > 0">
                 <a-space direction="vertical" size="middle">
                     <a-button type="primary" icon="plus" @click="addDNSServer()">
@@ -107,7 +107,7 @@
                 </a-empty>
             </template>
         </a-collapse-panel>
-        <a-collapse-panel header='Fake DNS'>
+        <a-collapse-panel key="3" header='Fake DNS'>
             <template v-if="fakeDns && fakeDns.length > 0">
                 <a-space direction="vertical" size="middle">
                     <a-button type="primary" icon="plus" @click="addFakedns()">{{ i18n "pages.xray.fakedns.add"