luci-app-frpc: show remote port
authorLiangbin Lian <jjm2473@gmail.com>
Tue, 16 Aug 2022 05:57:43 +0000 (13:57 +0800)
committerLiangbin Lian <jjm2473@gmail.com>
Wed, 17 Aug 2022 13:36:33 +0000 (21:36 +0800)
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
applications/luci-app-frpc/htdocs/luci-static/resources/view/frpc.js

index 3eb4b3dbc50caa18ceff11ca52ec06813a90d439..84eb9f86557f527198f5b183b908ef55a32fac86 100644 (file)
@@ -212,6 +212,14 @@ return view.extend({
                s.option(form.Value, 'type', _('Proxy type')).modalonly = false;
                s.option(form.Value, 'local_ip', _('Local IP')).modalonly = false;
                s.option(form.Value, 'local_port', _('Local port')).modalonly = false;
+               o = s.option(form.Value, 'remote_port', _('Remote port'));
+               o.modalonly = false;
+               o.depends('type', 'tcp');
+               o.depends('type', 'udp');
+               o.cfgvalue = function() {
+                       var v = this.super('cfgvalue', arguments);
+                       return v&&v!='0'?v:'#';
+               };
 
                defTabOpts(s, 'general', baseProxyConf, {modalonly: true});