• R/O
  • HTTP
  • SSH
  • HTTPS

v2raya-openwrt: 提交

opkg feed of v2rayA for OpenWrt users


Commit MetaInfo

修订版d21c3e5f15256c2a5c6304f76865c94e1e919e11 (tree)
时间2022-09-16 20:23:46
作者Tianling Shen <cnsztl@gmai...>
CommiterTianling Shen

Log Message

luci-app-v2raya: fix bind arguments

Signed-off-by: Tianling Shen <cnsztl@gmail.com>

更改概述

差异

--- a/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js
+++ b/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js
@@ -44,7 +44,7 @@ function renderStatus(isRunning, port) {
4444 return renderHTML;
4545 }
4646
47-function uploadCertificate(option, type, filename, ev) {
47+function uploadCertificate(type, filename, ev) {
4848 L.resolveDefault(fs.exec('/bin/mkdir', [ '-p', '/etc/v2raya/' ]));
4949
5050 return ui.uploadFile('/etc/v2raya/' + filename, ev.target)
@@ -57,11 +57,11 @@ function uploadCertificate(option, type, filename, ev) {
5757 }
5858
5959 ui.addNotification(null, E('p', _('Your %s was successfully uploaded. Size: %sB.').format(type, res.size)));
60- }, option, ev.target))
60+ }, this, ev.target))
6161 .catch(function(e) { ui.addNotification(null, E('p', e.message)) })
6262 .finally(L.bind(function(btn, input) {
6363 btn.firstChild.data = _('Upload...');
64- }, option, ev.target));
64+ }, this, ev.target));
6565 }
6666
6767 return view.extend({
@@ -163,13 +163,13 @@ return view.extend({
163163 o = s.option(form.Button, '_upload_cert', _('Upload certificate'));
164164 o.inputstyle = 'action';
165165 o.inputtitle = _('Upload...');
166- o.onclick = L.bind(uploadCertificate, this, o, _('certificate'), 'grpc_certificate.crt');
166+ o.onclick = L.bind(uploadCertificate, this, _('certificate'), 'grpc_certificate.crt');
167167 o.depends('vless_grpc_inbound_cert_key', '/etc/v2raya/grpc_certificate.crt,/etc/v2raya/grpc_private.key');
168168
169169 o = s.option(form.Button, '_upload_key', _('Upload privateKey'));
170170 o.inputstyle = 'action';
171171 o.inputtitle = _('Upload...');
172- o.onclick = L.bind(uploadCertificate, this, o, _('private key'), 'grpc_private.key');
172+ o.onclick = L.bind(uploadCertificate, this, _('private key'), 'grpc_private.key');
173173 o.depends('vless_grpc_inbound_cert_key', '/etc/v2raya/grpc_certificate.crt,/etc/v2raya/grpc_private.key');
174174
175175 return m.render();
Show on old repository browser