Skip to content

Commit

Permalink
luci-proto-wireguard: Remove confirmation dialogue to generate keys (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
systemcrash authored Dec 4, 2023
1 parent c2f6799 commit a5786b5
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -610,9 +607,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);
Expand Down

0 comments on commit a5786b5

Please sign in to comment.