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:
Diffstat (limited to 'web/html/xui/form')
-rw-r--r--web/html/xui/form/outbound.html22
-rw-r--r--web/html/xui/form/protocol/wireguard.html22
2 files changed, 40 insertions, 4 deletions
diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html
index 8bea1fe5..3f11907d 100644
--- a/web/html/xui/form/outbound.html
+++ b/web/html/xui/form/outbound.html
@@ -134,10 +134,28 @@
<a-form-item label='{{ i18n "pages.xray.wireguard.endpoint" }}'>
<a-input v-model.trim="peer.endpoint"></a-input>
</a-form-item>
- <a-form-item label='{{ i18n "pages.xray.wireguard.publicKey" }}'>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "reset" }}</span>
+ </template>
+ {{ i18n "pages.xray.wireguard.publicKey" }}
+ <a-icon @click="peer.publicKey = publicKey=Wireguard.generateKeypair().publicKey"type="sync"> </a-icon>
+ </a-tooltip>
+ </template>
<a-input v-model.trim="peer.publicKey"></a-input>
</a-form-item>
- <a-form-item label='{{ i18n "pages.xray.wireguard.psk" }}'>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "reset" }}</span>
+ </template>
+ {{ i18n "pages.xray.wireguard.psk" }}
+ <a-icon @click="peer.psk = publicKey=Wireguard.generateKeypair().publicKey"type="sync"> </a-icon>
+ </a-tooltip>
+ </template>
<a-input v-model.trim="peer.psk"></a-input>
</a-form-item>
<a-form-item>
diff --git a/web/html/xui/form/protocol/wireguard.html b/web/html/xui/form/protocol/wireguard.html
index 553f5d42..ea2c3427 100644
--- a/web/html/xui/form/protocol/wireguard.html
+++ b/web/html/xui/form/protocol/wireguard.html
@@ -32,10 +32,28 @@
<a-icon v-if="inbound.settings.peers.length>1" type="delete" @click="() => inbound.settings.delPeer(index)"
style="color: rgb(255, 77, 79);cursor: pointer;"/>
</a-divider>
- <a-form-item label='{{ i18n "pages.xray.wireguard.publicKey" }}'>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "reset" }}</span>
+ </template>
+ {{ i18n "pages.xray.wireguard.publicKey" }}
+ <a-icon @click="peer.publicKey = publicKey=Wireguard.generateKeypair().publicKey"type="sync"> </a-icon>
+ </a-tooltip>
+ </template>
<a-input v-model.trim="peer.publicKey"></a-input>
</a-form-item>
- <a-form-item label='{{ i18n "pages.xray.wireguard.psk" }}'>
+ <a-form-item>
+ <template slot="label">
+ <a-tooltip>
+ <template slot="title">
+ <span>{{ i18n "reset" }}</span>
+ </template>
+ {{ i18n "pages.xray.wireguard.psk" }}
+ <a-icon @click="peer.psk = publicKey=Wireguard.generateKeypair().publicKey"type="sync"> </a-icon>
+ </a-tooltip>
+ </template>
<a-input v-model.trim="peer.psk"></a-input>
</a-form-item>
<a-form-item>