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>
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);
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);