Browse Source

luci: add report bugs button

Nick Peng 2 years ago
parent
commit
cdf12f3cb4

+ 3 - 0
package/luci-compat/files/luci/i18n/smartdns.zh-cn.po

@@ -377,6 +377,9 @@ msgstr ""
 "配置特定域名返回特定的IP地址,域名查询将不到上游服务器请求,直接返回配置的IP"
 "地址,可用于广告屏蔽。"
 
+msgid "Report bugs"
+msgstr "报告BUG"
+
 msgid "TCP Server"
 msgstr "TCP服务器"
 

+ 8 - 0
package/luci-compat/files/luci/model/cbi/smartdns/smartdns.lua

@@ -554,6 +554,14 @@ o.write = function()
 	luci.http.redirect("https://pymumu.github.io/smartdns")
 end
 
+o = s:option(Button, "report")
+o.title = translate("Report bugs")
+o.inputtitle = translate("Report bugs")
+o.inputstyle = "apply"
+o.write = function()
+	luci.http.redirect("https://github.com/pymumu/smartdns/issues")
+end
+
 o = s:option(Button, "Donate")
 o.title = translate("Donate to smartdns")
 o.inputtitle = translate("Donate")

+ 3 - 0
package/luci/files/luci/i18n/smartdns.zh-cn.po

@@ -385,6 +385,9 @@ msgstr ""
 "配置特定域名返回特定的IP地址,域名查询将不到上游服务器请求,直接返回配置的IP"
 "地址,可用于广告屏蔽。"
 
+msgid "Report bugs"
+msgstr "报告BUG"
+
 msgid "TCP Server"
 msgstr "TCP服务器"
 

+ 8 - 0
package/luci/files/root/www/luci-static/resources/view/smartdns/smartdns.js

@@ -734,6 +734,14 @@ return view.extend({
 			window.open("https://pymumu.github.io/smartdns", '_blank');
 		};
 
+		o = s.option(form.Button, "report");
+		o.title = _("Report bugs");
+		o.inputtitle = _("Report bugs");
+		o.inputstyle = "apply";
+		o.onclick = function () {
+			window.open("https://github.com/pymumu/smartdns/issues", '_blank');
+		};
+
 		o = s.option(form.Button, "Donate");
 		o.title = _("Donate to smartdns");
 		o.inputtitle = _("Donate");