diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-01-24 00:54:17 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-01-24 00:54:17 +0300 |
| commit | ff547a258d4866440920a293a1e0eca75b2e43f3 (patch) | |
| tree | e1e21d910d3c1308d71a09553025f007b5cbccd4 /web/html/xui/form | |
| parent | 251ceeedbad52fc05c84c431a3d982d558a59d7d (diff) | |
gen button - publicKey & psk
Diffstat (limited to 'web/html/xui/form')
| -rw-r--r-- | web/html/xui/form/outbound.html | 22 | ||||
| -rw-r--r-- | web/html/xui/form/protocol/wireguard.html | 22 |
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> |
