Browse Source

reset button for kcp & quic

MHSanaei 1 year ago
parent
commit
abfcbf4226
2 changed files with 22 additions and 4 deletions
  1. 11 2
      web/html/xui/form/stream/stream_kcp.html
  2. 11 2
      web/html/xui/form/stream/stream_quic.html

+ 11 - 2
web/html/xui/form/stream/stream_kcp.html

@@ -10,8 +10,17 @@
             <a-select-option value="wireguard">WireGuard</a-select-option>
         </a-select>
     </a-form-item>
-    <a-form-item label='{{ i18n "password" }}'>
-        <a-input v-model="inbound.stream.kcp.seed"></a-input>
+    <a-form-item>
+        <template slot="label">
+            <a-tooltip>
+                <template slot="title">
+                    <span>{{ i18n "reset" }}</span>
+                </template>
+                {{ i18n "password" }}
+                <a-icon @click="inbound.stream.kcp.seed = RandomUtil.randomSeq(10)"type="sync"> </a-icon>
+            </a-tooltip>
+        </template>
+        <a-input v-model.trim="inbound.stream.kcp.seed"></a-input>
     </a-form-item>
     <a-form-item label='MTU'>
         <a-input-number v-model.number="inbound.stream.kcp.mtu"></a-input-number>

+ 11 - 2
web/html/xui/form/stream/stream_quic.html

@@ -7,9 +7,18 @@
             <a-select-option value="chacha20-poly1305">CHACHA20-POLY1305</a-select-option>
         </a-select>
     </a-form-item>
-    <a-form-item label='{{ i18n "password" }}'>
+    <a-form-item>
+        <template slot="label">
+            <a-tooltip>
+                <template slot="title">
+                    <span>{{ i18n "reset" }}</span>
+                </template>
+                {{ i18n "password" }}
+                <a-icon @click="inbound.stream.quic.key = RandomUtil.randomSeq(10)"type="sync"> </a-icon>
+            </a-tooltip>
+        </template>
         <a-input v-model.trim="inbound.stream.quic.key"></a-input>
-    </a-form-item> 
+    </a-form-item>
     <a-form-item label='{{ i18n "camouflage" }}'>
         <a-select v-model="inbound.stream.quic.type" :dropdown-class-name="themeSwitcher.currentTheme">
             <a-select-option value="none">None</a-select-option>