diff --git a/Makefile b/Makefile index 1f57ba4..9914d97 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-kcptun -PKG_VERSION:=1.4.1 +PKG_VERSION:=1.4.2 PKG_RELEASE:=1 PKG_LICENSE:=Apache-2.0 diff --git a/luasrc/model/cbi/kcptun/settings.lua b/luasrc/model/cbi/kcptun/settings.lua index 38e9038..5afac2b 100644 --- a/luasrc/model/cbi/kcptun/settings.lua +++ b/luasrc/model/cbi/kcptun/settings.lua @@ -98,7 +98,7 @@ o.placeholder = translate("Check Kcptun") o.btnclick = "check_update('kcptun', this);" o = s:option(Button, "_check_luci", translate("Check Luci"), - translate("You need to reload current page after update luci. Note that translation will not be updated.")) + translate("You may need to reload current page after update luci. Note that translation will not be updated.")) o.template = "kcptun/button" o.inputstyle = "apply" o.placeholder = translate("Check Luci") diff --git a/luasrc/model/kcptun.lua b/luasrc/model/kcptun.lua index 7e3d422..b16037e 100644 --- a/luasrc/model/kcptun.lua +++ b/luasrc/model/kcptun.lua @@ -317,7 +317,7 @@ function download_kcptun(url) sys.call("/bin/rm -f /tmp/kcptun_download.*") - local tmp_file = util.trim(util.exec("mktemp -u kcptun_download.XXXXXX")) + local tmp_file = util.trim(util.exec("mktemp -u -t kcptun_download.XXXXXX")) local result = exec(wget, { "-O", tmp_file, url, _unpack(wget_args) }, nil, wget_time_out) == 0 @@ -441,9 +441,9 @@ function update_luci(url) } end - sys.call("/bin/rm -f /tmp/luci_kcptun.*") + sys.call("/bin/rm -f /tmp/luci_kcptun.*.ipk") - local tmp_file = util.trim(util.exec("mktemp -u luci_kcptun.XXXXXX")) + local tmp_file = util.trim(util.exec("mktemp -u -t luci_kcptun.XXXXXX")) .. ".ipk" local result = exec("/usr/bin/wget", { "-O", tmp_file, url, _unpack(wget_args) }, nil, wget_time_out) == 0 @@ -456,7 +456,7 @@ function update_luci(url) } end - result = exec("opkg", { + result = exec("/bin/opkg", { "install", "--force-reinstall", "--force-overwrite", tmp_file }) == 0 if not result then diff --git a/luasrc/view/kcptun/status.htm b/luasrc/view/kcptun/status.htm index d0585f8..97c055e 100644 --- a/luasrc/view/kcptun/status.htm +++ b/luasrc/view/kcptun/status.htm @@ -55,7 +55,7 @@ } } - function on_request_success(btn) { + function on_update_success(btn) { add_remove_page_notice(false); var success = '<%:Update Success.%>'; @@ -189,7 +189,7 @@ }, function (x, res) { if (x && x.status == 200) { if (json.code == 0) { - on_request_success(btn); + on_update_success(btn); } else { on_request_error(btn, json); } @@ -213,7 +213,7 @@ }); } - function do_luci_update(type, btn) { + function do_luci_update(btn) { btn.disabled = true; btn.value = '<%:Processing...%>'; @@ -223,13 +223,13 @@ (new XHR()).get(luci_update_url, { token: token_str, - url: luci_info ? luci_info.url.download : '' + url: luci_info ? luci_info.url.luci : '' }, function(x, json) { btn.disabled = false; btn.value = btn.placeholder; if (x && x.status == 200) { if (json.code == 0) { - on_request_success(btn); + on_update_success(btn); } else { on_request_error(btn, json); } diff --git a/po/templates/kcptun.pot b/po/templates/kcptun.pot index 7acb201..ba76b45 100644 --- a/po/templates/kcptun.pot +++ b/po/templates/kcptun.pot @@ -272,7 +272,7 @@ msgid "Update in progress. Are you sure to close window?" msgstr "" msgid "" -"You need to reload current page after update luci. Note that translation " +"You may need to reload current page after update luci. Note that translation " "will not be updated." msgstr "" diff --git a/po/zh-cn/kcptun.po b/po/zh-cn/kcptun.po index 179f936..45f1822 100644 --- a/po/zh-cn/kcptun.po +++ b/po/zh-cn/kcptun.po @@ -274,9 +274,9 @@ msgid "Update in progress. Are you sure to close window?" msgstr "正在更新,确定关闭窗口?" msgid "" -"You need to reload current page after update luci. Note that translation " +"You may need to reload current page after update luci. Note that translation " "will not be updated." -msgstr "更新 luci 之后你需要手动刷新当前页面。注意:翻译不会被更新" +msgstr "更新 luci 之后你可能需要手动刷新当前页面。注意:翻译不会被更新" msgid "acknodelay" msgstr ""