luci-proto-wireguard: disable peers from the tab
authorPaul Donald <newtwen+github@gmail.com>
Fri, 25 Oct 2024 20:33:33 +0000 (22:33 +0200)
committerPaul Donald <newtwen+github@gmail.com>
Fri, 25 Oct 2024 20:33:33 +0000 (22:33 +0200)
It's clumsy to enable/disable peers from the modal, save some clicks

Signed-off-by: Bryan Roessler <bryanroessler@gmail.com>
(cherry picked from commit 071fc1bc92980454b6701d9394711b9d758f332a)

protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js

index 05e0e275c7fc8dec1771d82042ec8186d80b6947..aeccff4150a977d897b2f77b25f978cf324f3dac 100644 (file)
@@ -496,9 +496,10 @@ return network.registerProtocol('wireguard', {
                        return E('em', _('No peers defined yet.'));
                };
 
-               o = ss.option(form.Flag, 'disabled', _('Peer disabled'), _('Enable / Disable peer. Restart wireguard interface to apply changes.'));
-               o.modalonly = true;
+               o = ss.option(form.Flag, 'disabled', _('Disabled'), _('Enable / Disable peer. Restart wireguard interface to apply changes.'));
+               o.editable = true;
                o.optional = true;
+               o.width = '5%';
 
                o = ss.option(form.Value, 'description', _('Description'), _('Optional. Description of peer.'));
                o.placeholder = 'My Peer';