mirror of
https://github.com/kenzok8/openwrt-packages
synced 2025-01-07 07:06:45 +08:00
update 2022-04-25 22:30:27
This commit is contained in:
parent
a68408fc16
commit
c1d660f5ae
17
luci-app-ddnsto/Makefile
Normal file
17
luci-app-ddnsto/Makefile
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright (C) 2016 Openwrt.org
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI support for ddnsto
|
||||
LUCI_DEPENDS:=+ddnsto
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
22
luci-app-ddnsto/luasrc/controller/ddnsto.lua
Normal file
22
luci-app-ddnsto/luasrc/controller/ddnsto.lua
Normal file
@ -0,0 +1,22 @@
|
||||
module("luci.controller.ddnsto", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/ddnsto") then
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin", "services", "ddnsto"}, cbi("ddnsto"), _("DDNS.to"), 20).dependent = true
|
||||
|
||||
entry({"admin", "services", "ddnsto_status"}, call("ddnsto_status"))
|
||||
end
|
||||
|
||||
function ddnsto_status()
|
||||
local sys = require "luci.sys"
|
||||
|
||||
local status = {
|
||||
running = (sys.call("pidof ddnsto >/dev/null") == 0)
|
||||
}
|
||||
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(status)
|
||||
end
|
23
luci-app-ddnsto/luasrc/model/cbi/ddnsto.lua
Normal file
23
luci-app-ddnsto/luasrc/model/cbi/ddnsto.lua
Normal file
@ -0,0 +1,23 @@
|
||||
--wulishui <wulishui@gmail.com> ,20200911
|
||||
--jjm2473 <jjm2473@gmail.com> ,20210127
|
||||
|
||||
local m, s
|
||||
|
||||
m = Map("ddnsto", translate("DDNS.to"), translate("DDNS.to is a reverse proxy.")
|
||||
.. " <a href=\"https://www.ddnsto.com/\" onclick=\"void(0)\" target=\"_blank\">"
|
||||
.. translate("Official Website")
|
||||
.. "</a>")
|
||||
|
||||
m:section(SimpleSection).template = "ddnsto_status"
|
||||
|
||||
s=m:section(TypedSection, "ddnsto", translate("Global settings"))
|
||||
s.addremove=false
|
||||
s.anonymous=true
|
||||
|
||||
s:option(Flag, "enabled", translate("Enable")).rmempty=false
|
||||
|
||||
s:option(Value, "token", translate("Token")).rmempty=false
|
||||
|
||||
return m
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
<%+ddnsto_status%>
|
27
luci-app-ddnsto/luasrc/view/ddnsto_status.htm
Normal file
27
luci-app-ddnsto/luasrc/view/ddnsto_status.htm
Normal file
@ -0,0 +1,27 @@
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
XHR.poll(5, '<%=url("admin/services/ddnsto_status")%>', null,
|
||||
function(x, st)
|
||||
{
|
||||
var tb = document.getElementById('ddnsto_status');
|
||||
if (st && tb)
|
||||
{
|
||||
if (st.running)
|
||||
{
|
||||
tb.innerHTML = '<br/><em style=\"color:green\"><%:The DDNS.to service is running.%></em>'
|
||||
+ "<br/><br/><input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:Click to open DDNS.to%> \" onclick=\"window.open('https://www.ddnsto.com/app/#/login/')\"/>";
|
||||
}
|
||||
else
|
||||
{
|
||||
tb.innerHTML = '<br/><em style=\"color:red\"><%:The DDNS.to service is not running.%></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]></script>
|
||||
|
||||
<fieldset class="cbi-section">
|
||||
<legend><%:DDNS.to Status%></legend>
|
||||
<p id="ddnsto_status">
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
</fieldset>
|
32
luci-app-ddnsto/po/zh-cn/ddnsto.po
Normal file
32
luci-app-ddnsto/po/zh-cn/ddnsto.po
Normal file
@ -0,0 +1,32 @@
|
||||
msgid "DDNS.to"
|
||||
msgstr "DDNS.to内网穿透"
|
||||
|
||||
msgid "Running state"
|
||||
msgstr "运行状态"
|
||||
|
||||
msgid "Click to open DDNS.to"
|
||||
msgstr "点击打开DDNSTO控制台"
|
||||
|
||||
msgid "DDNS.to is a reverse proxy."
|
||||
msgstr "DDNS.to是一个内网穿透工具。"
|
||||
|
||||
msgid "Official Website"
|
||||
msgstr "官网"
|
||||
|
||||
msgid "Token"
|
||||
msgstr "令牌"
|
||||
|
||||
msgid "The DDNS.to service is running."
|
||||
msgstr "DDNS.to服务已启动"
|
||||
|
||||
msgid "The DDNS.to service is not running."
|
||||
msgstr "DDNS.to服务未启动"
|
||||
|
||||
msgid "DDNS.to Status"
|
||||
msgstr "DDNS.to服务状态"
|
||||
|
||||
msgid "Collecting data..."
|
||||
msgstr "收集数据..."
|
||||
|
||||
msgid "Global settings"
|
||||
msgstr "全局设置"
|
1
luci-app-ddnsto/po/zh_Hans
Symbolic link
1
luci-app-ddnsto/po/zh_Hans
Symbolic link
@ -0,0 +1 @@
|
||||
zh-cn
|
4
luci-app-ddnsto/root/etc/uci-defaults/50_luci-ddnsto
Executable file
4
luci-app-ddnsto/root/etc/uci-defaults/50_luci-ddnsto
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
LUCI_TITLE:=Argon Theme
|
||||
LUCI_DEPENDS:=+curl +jsonfilter
|
||||
PKG_VERSION:=2.2.9.4
|
||||
PKG_RELEASE:=20220421
|
||||
PKG_RELEASE:=20220425
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
local util = require "luci.util"
|
||||
local http = require "luci.http"
|
||||
local disp = require "luci.dispatcher"
|
||||
local ver = require "luci.version"
|
||||
local ver = require "luci.version"
|
||||
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
local util = require "luci.util"
|
||||
local http = require "luci.http"
|
||||
local disp = require "luci.dispatcher"
|
||||
local ver = require "luci.version"
|
||||
local ver = require "luci.version"
|
||||
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user