summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Donald <newtwen@gmail.com>2023-12-04 22:00:35 +0100
committerPaul Donald <newtwen@gmail.com>2023-12-04 23:57:03 +0100
commitcf8f08ec981dba2816915510716b92924b82801d (patch)
tree215dd88bf282326db0ba41c2a7c3df376ecfc6c5
parent581339cce15d7732b2e9542a86bdefcc3c094596 (diff)
luci-proto-wireguard: Remove confirmation dialogue to generate keys (#6697)
Quality of life improvements. Reduce click amounts. LuCI batches all changes for user-review anyway. Tested on 23.05.0 Signed-off-by: Paul Donald <newtwen@gmail.com> (cherry picked from commit a5786b5f2f68596b2ea8441fc8ad8ad7cf2ce2a9)
-rw-r--r--protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js
index 71b822adbf..96228cf4d7 100644
--- a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js
+++ b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js
@@ -97,9 +97,6 @@ var cbiKeyPairGenerate = form.DummyValue.extend({
pub = this.section.getUIElement(section_id, 'public_key'),
map = this.map;
- if ((prv.getValue() || pub.getValue()) && !confirm(_('Do you want to replace the current keys?')))
- return;
-
return generateKey().then(function(keypair) {
prv.setValue(keypair.priv);
pub.setValue(keypair.pub);
@@ -612,9 +609,6 @@ return network.registerProtocol('wireguard', {
var psk = this.section.getUIElement(section_id, 'preshared_key'),
map = this.map;
- if (psk.getValue() && !confirm(_('Do you want to replace the current PSK?')))
- return;
-
return generatePsk().then(function(key) {
psk.setValue(key);
map.save(null, true);