From c1d660f5ae483c45bdadda426168d832481b3cfd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 22:30:27 +0800 Subject: [PATCH] update 2022-04-25 22:30:27 --- luci-app-ddnsto/Makefile | 17 ++++++++++ luci-app-ddnsto/luasrc/controller/ddnsto.lua | 22 +++++++++++++ luci-app-ddnsto/luasrc/model/cbi/ddnsto.lua | 23 +++++++++++++ .../luasrc/view/admin_status/index/ddnsto.htm | 1 + luci-app-ddnsto/luasrc/view/ddnsto_status.htm | 27 ++++++++++++++++ luci-app-ddnsto/po/zh-cn/ddnsto.po | 32 +++++++++++++++++++ luci-app-ddnsto/po/zh_Hans | 1 + .../root/etc/uci-defaults/50_luci-ddnsto | 4 +++ luci-theme-argon/Makefile | 2 +- .../luasrc/view/themes/argon/header.htm | 2 +- .../luasrc/view/themes/argon/header_login.htm | 2 +- 11 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 luci-app-ddnsto/Makefile create mode 100644 luci-app-ddnsto/luasrc/controller/ddnsto.lua create mode 100644 luci-app-ddnsto/luasrc/model/cbi/ddnsto.lua create mode 100644 luci-app-ddnsto/luasrc/view/admin_status/index/ddnsto.htm create mode 100644 luci-app-ddnsto/luasrc/view/ddnsto_status.htm create mode 100644 luci-app-ddnsto/po/zh-cn/ddnsto.po create mode 120000 luci-app-ddnsto/po/zh_Hans create mode 100755 luci-app-ddnsto/root/etc/uci-defaults/50_luci-ddnsto diff --git a/luci-app-ddnsto/Makefile b/luci-app-ddnsto/Makefile new file mode 100644 index 00000000..69c1549f --- /dev/null +++ b/luci-app-ddnsto/Makefile @@ -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 + diff --git a/luci-app-ddnsto/luasrc/controller/ddnsto.lua b/luci-app-ddnsto/luasrc/controller/ddnsto.lua new file mode 100644 index 00000000..ccae6ca8 --- /dev/null +++ b/luci-app-ddnsto/luasrc/controller/ddnsto.lua @@ -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 diff --git a/luci-app-ddnsto/luasrc/model/cbi/ddnsto.lua b/luci-app-ddnsto/luasrc/model/cbi/ddnsto.lua new file mode 100644 index 00000000..60b427c4 --- /dev/null +++ b/luci-app-ddnsto/luasrc/model/cbi/ddnsto.lua @@ -0,0 +1,23 @@ +--wulishui ,20200911 +--jjm2473 ,20210127 + +local m, s + +m = Map("ddnsto", translate("DDNS.to"), translate("DDNS.to is a reverse proxy.") + .. " " + .. translate("Official Website") + .. "") + +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 + + diff --git a/luci-app-ddnsto/luasrc/view/admin_status/index/ddnsto.htm b/luci-app-ddnsto/luasrc/view/admin_status/index/ddnsto.htm new file mode 100644 index 00000000..718be04a --- /dev/null +++ b/luci-app-ddnsto/luasrc/view/admin_status/index/ddnsto.htm @@ -0,0 +1 @@ +<%+ddnsto_status%> diff --git a/luci-app-ddnsto/luasrc/view/ddnsto_status.htm b/luci-app-ddnsto/luasrc/view/ddnsto_status.htm new file mode 100644 index 00000000..7269735c --- /dev/null +++ b/luci-app-ddnsto/luasrc/view/ddnsto_status.htm @@ -0,0 +1,27 @@ + + +
+ <%:DDNS.to Status%> +

+ <%:Collecting data...%> +

+
diff --git a/luci-app-ddnsto/po/zh-cn/ddnsto.po b/luci-app-ddnsto/po/zh-cn/ddnsto.po new file mode 100644 index 00000000..7fba4930 --- /dev/null +++ b/luci-app-ddnsto/po/zh-cn/ddnsto.po @@ -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 "全局设置" diff --git a/luci-app-ddnsto/po/zh_Hans b/luci-app-ddnsto/po/zh_Hans new file mode 120000 index 00000000..41451e4a --- /dev/null +++ b/luci-app-ddnsto/po/zh_Hans @@ -0,0 +1 @@ +zh-cn \ No newline at end of file diff --git a/luci-app-ddnsto/root/etc/uci-defaults/50_luci-ddnsto b/luci-app-ddnsto/root/etc/uci-defaults/50_luci-ddnsto new file mode 100755 index 00000000..d7bfee27 --- /dev/null +++ b/luci-app-ddnsto/root/etc/uci-defaults/50_luci-ddnsto @@ -0,0 +1,4 @@ +#!/bin/sh + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/luci-theme-argon/Makefile b/luci-theme-argon/Makefile index 3513b2de..44702ea8 100644 --- a/luci-theme-argon/Makefile +++ b/luci-theme-argon/Makefile @@ -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 diff --git a/luci-theme-argon/luasrc/view/themes/argon/header.htm b/luci-theme-argon/luasrc/view/themes/argon/header.htm index 4eb0bffb..17717ff6 100644 --- a/luci-theme-argon/luasrc/view/themes/argon/header.htm +++ b/luci-theme-argon/luasrc/view/themes/argon/header.htm @@ -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") diff --git a/luci-theme-argon/luasrc/view/themes/argon/header_login.htm b/luci-theme-argon/luasrc/view/themes/argon/header_login.htm index 376f6987..568e0cec 100644 --- a/luci-theme-argon/luasrc/view/themes/argon/header_login.htm +++ b/luci-theme-argon/luasrc/view/themes/argon/header_login.htm @@ -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")