mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-26 21:02:52 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,19 @@
|
||||
# Copyright (C) 2018 XiaoShan mivm.cn
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI Support for k3screenctrl
|
||||
LUCI_DESCRIPTION:=LuCI Support for k3screenctrl.
|
||||
LUCI_DEPENDS:=+luci-compat +phicomm-k3screenctrl
|
||||
|
||||
PKG_NAME:=luci-app-k3screenctrl
|
||||
PKG_VERSION:=1.1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Hill <lufanzhong@gmail.com>
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
@@ -0,0 +1,13 @@
|
||||
-- Copyright (C) 2018 XiaoShan mivm.cn
|
||||
|
||||
module("luci.controller.k3screenctrl", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/k3screenctrl") then
|
||||
return
|
||||
end
|
||||
local page
|
||||
page = entry({"admin","system","k3screenctrl"}, cbi("k3screenctrl"), _("Screen"), 60)
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-k3screenctrl" }
|
||||
end
|
||||
@@ -0,0 +1,120 @@
|
||||
-- Copyright (C) 2018 XiaoShan mivm.cn
|
||||
|
||||
local m, s ,o
|
||||
|
||||
m = Map("k3screenctrl", translate("Screen"), translate("Customize your device screen"))
|
||||
|
||||
s = m:section(TypedSection, "general", translate("General Setting") )
|
||||
s.anonymous = true
|
||||
|
||||
o = s:option(ListValue, "screen_time", translate("Screen time :"), translate("This time no action, the screen will close."))
|
||||
o:value("10",translate("10 s"))
|
||||
o:value("30",translate("30 s"))
|
||||
o:value("60",translate("60 s"))
|
||||
o:value("300",translate("5 m"))
|
||||
o:value("600",translate("10 m"))
|
||||
o:value("900",translate("15 m"))
|
||||
o:value("1800",translate("30 m"))
|
||||
o:value("3600",translate("60 m"))
|
||||
o.default = 10
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(ListValue, "refresh_time", translate("Refresh interval :"), translate("Screen data refresh interval."))
|
||||
o:value("1",translate("1 s"))
|
||||
o:value("2",translate("2 s"))
|
||||
o:value("5",translate("5 s"))
|
||||
o:value("10",translate("10 s"))
|
||||
o.default = 2
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(ListValue, "update_time", translate("Weather update interval :"))
|
||||
o:value("0",translate("off"))
|
||||
o:value("3600",translate("1h"))
|
||||
o:value("14400",translate("4h"))
|
||||
o:value("43200",translate("12h"))
|
||||
o.default = 0
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(Value, "key", translate("Private Key :"),
|
||||
translate("Input private key, visit: https://docs.seniverse.com/api/start/key.html"))
|
||||
|
||||
o = s:option(Flag, "city_checkip", translate("Check city from ip"), translate("Check city from local ip."))
|
||||
o.default = 0
|
||||
|
||||
o = s:option(Value, "city", translate("City :"),
|
||||
translate("For more information, visit: https://docs.seniverse.com/api/start/common.html#地点-location"))
|
||||
--o.rmempty = false
|
||||
|
||||
o = s:option(Flag, "psk_hide", translate("Hide Wireless password"))
|
||||
o.default = 0
|
||||
|
||||
o = s:option(Flag, "showmore", translate("Display More Info"), translate("The first page shows more information including: CPU temprature, Load, RAM useage, uptime, etc."))
|
||||
o.default = 0
|
||||
|
||||
o = s:option(Button,"test_print",translate("Test"),translate("Execute k3screenctrl -t and return the result"))
|
||||
o.inputtitle = translate("Print info")
|
||||
o.write = function()
|
||||
luci.sys.call("k3screenctrl -t > /tmp/k3screenctrl/test")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin","system","k3screenctrl"))
|
||||
end
|
||||
|
||||
s = m:section(TypedSection, "device_custom", translate("Device customization") ,translate("Customize the fifth page of device information"))
|
||||
s.template = "cbi/tblsection"
|
||||
s.addremove = true
|
||||
s.anonymous = true
|
||||
|
||||
o = s:option(Value,"mac",translate("Device"))
|
||||
o.datatype = "macaddr"
|
||||
o.rmempty = false
|
||||
luci.sys.net.mac_hints(function(t,a)
|
||||
o:value(t,"%s (%s)"%{a,t})
|
||||
end)
|
||||
|
||||
o = s:option(Value,"name",translate("Hostname"))
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(ListValue,"icon",translate("Icon"))
|
||||
o.rmempty = false
|
||||
o:value("0",translate("Auto"))
|
||||
o:value("1",translate("OnePlus"))
|
||||
o:value("2","360")
|
||||
o:value("3",translate("Asus"))
|
||||
o:value("4",translate("Coolpad"))
|
||||
o:value("5",translate("Dell"))
|
||||
o:value("6",translate("Haier"))
|
||||
o:value("7",translate("Hasee"))
|
||||
o:value("8",translate("Honor"))
|
||||
o:value("9",translate("HP"))
|
||||
o:value("10","HTC")
|
||||
o:value("11",translate("Huawei"))
|
||||
o:value("12",translate("Apple"))
|
||||
o:value("13",translate("Lenovo"))
|
||||
o:value("14",translate("LeEco"))
|
||||
o:value("15","LG")
|
||||
o:value("16",translate("Meitu"))
|
||||
o:value("17",translate("Meizu"))
|
||||
o:value("18","OPPO")
|
||||
o:value("19",translate("Phicomm"))
|
||||
o:value("20",translate("Samsung"))
|
||||
o:value("21",translate("Smartisan"))
|
||||
o:value("22",translate("Sony"))
|
||||
o:value("23","TCL")
|
||||
o:value("24","ThinkPad")
|
||||
o:value("25",translate("TongfangPC"))
|
||||
o:value("26","VIVO")
|
||||
o:value("27",translate("Microsoft"))
|
||||
o:value("28",translate("XiaoMi"))
|
||||
o:value("29",translate("ZTE"))
|
||||
|
||||
if nixio.fs.access("/tmp/k3screenctrl/test") then
|
||||
s = m:section(TypedSection, "general", translate("Output results"))
|
||||
s.anonymous = true
|
||||
o = s:option(TextValue,"test_output_results")
|
||||
o.readonly = true
|
||||
o.rows = 30
|
||||
o.cfgvalue = function()
|
||||
return luci.sys.exec("cat /tmp/k3screenctrl/test && rm -f /tmp/k3screenctrl/test")
|
||||
end
|
||||
end
|
||||
|
||||
return m
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
zh_Hans
|
||||
@@ -0,0 +1,185 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
msgid "Screen"
|
||||
msgstr "屏幕"
|
||||
|
||||
msgid "Customize your device screen"
|
||||
msgstr "自定义你的设备屏幕"
|
||||
|
||||
msgid "General Setting"
|
||||
msgstr "基本设置"
|
||||
|
||||
msgid "Screen time :"
|
||||
msgstr "亮屏时间:"
|
||||
|
||||
msgid "This time no action, the screen will close."
|
||||
msgstr "这段时间没有操作,屏幕将关闭。"
|
||||
|
||||
msgid "Refresh interval :"
|
||||
msgstr "刷新间隔:"
|
||||
|
||||
msgid "Screen data refresh interval."
|
||||
msgstr "屏幕数据刷新间隔。"
|
||||
|
||||
msgid "Check city from ip"
|
||||
msgstr "IP定位"
|
||||
|
||||
msgid "Check city from local ip."
|
||||
msgstr "通过IP得到城市信息。"
|
||||
|
||||
msgid "City :"
|
||||
msgstr "城市:"
|
||||
|
||||
msgid "Weather update interval :"
|
||||
msgstr "天气更新时间间隔:"
|
||||
|
||||
msgid "Private Key :"
|
||||
msgstr "私钥:"
|
||||
|
||||
msgid "Hide Wireless password"
|
||||
msgstr "隐藏无线密码"
|
||||
|
||||
msgid "Display More Info"
|
||||
msgstr "显示更多信息"
|
||||
|
||||
msgid "The first page shows more information including: CPU temprature, Load, RAM useage, uptime, etc."
|
||||
msgstr "第一页显示更多信息,包括:CPU温度、负载,内存用量,运行时间等。"
|
||||
|
||||
msgid "Test"
|
||||
msgstr "测试"
|
||||
|
||||
msgid "Print info"
|
||||
msgstr "输出信息"
|
||||
|
||||
msgid "Execute k3screenctrl -t and return the result"
|
||||
msgstr "执行 k3screenctrl -t 并返回结果"
|
||||
|
||||
msgid "Output results"
|
||||
msgstr "输出结果"
|
||||
|
||||
msgid "Device customization"
|
||||
msgstr "设备自定义"
|
||||
|
||||
msgid "Customize the fifth page of device information"
|
||||
msgstr "自定义第五页设备信息"
|
||||
|
||||
msgid "Device"
|
||||
msgstr "设备"
|
||||
|
||||
msgid "Icon"
|
||||
msgstr "图标"
|
||||
|
||||
msgid "1 s"
|
||||
msgstr "1 秒"
|
||||
|
||||
msgid "2 s"
|
||||
msgstr "2 秒"
|
||||
|
||||
msgid "5 s"
|
||||
msgstr "5 秒"
|
||||
|
||||
msgid "10 s"
|
||||
msgstr "10 秒"
|
||||
|
||||
msgid "30 s"
|
||||
msgstr "30 秒"
|
||||
|
||||
msgid "60 s"
|
||||
msgstr "60 秒"
|
||||
|
||||
msgid "5 m"
|
||||
msgstr "5 分"
|
||||
|
||||
msgid "10 m"
|
||||
msgstr "10 分"
|
||||
|
||||
msgid "15 m"
|
||||
msgstr "15 分"
|
||||
|
||||
msgid "30 m"
|
||||
msgstr "30 分"
|
||||
|
||||
msgid "60 m"
|
||||
msgid "60 分"
|
||||
|
||||
msgid "off"
|
||||
msgid "关闭"
|
||||
|
||||
msgid "1 h"
|
||||
msgid "1 小时"
|
||||
|
||||
msgid "4 h"
|
||||
msgid "4 小时"
|
||||
|
||||
msgid "12 h"
|
||||
msgid "12 小时"
|
||||
|
||||
msgid "Auto"
|
||||
msgstr "自动"
|
||||
|
||||
msgid "OnePlus"
|
||||
msgstr "一加"
|
||||
|
||||
msgid "Asus"
|
||||
msgstr "华硕"
|
||||
|
||||
msgid "Coolpad"
|
||||
msgstr "酷派"
|
||||
|
||||
msgid "Dell"
|
||||
msgstr "戴尔"
|
||||
|
||||
msgid "Haier"
|
||||
msgstr "海尔"
|
||||
|
||||
msgid "Hasee"
|
||||
msgstr "神舟"
|
||||
|
||||
msgid "Honor"
|
||||
msgid "荣耀"
|
||||
|
||||
msgid "HP"
|
||||
msgstr "惠普"
|
||||
|
||||
msgid "Huawei"
|
||||
msgstr "华为"
|
||||
|
||||
msgid "Apple"
|
||||
msgstr "苹果"
|
||||
|
||||
msgid "Lenovo"
|
||||
msgid "联想"
|
||||
|
||||
msgid "LeEco"
|
||||
msgstr "乐视"
|
||||
|
||||
msgid "Meitu"
|
||||
msgstr "美图"
|
||||
|
||||
msgid "Meizu"
|
||||
msgstr "魅族"
|
||||
|
||||
msgid "Phicomm"
|
||||
msgstr "斐讯"
|
||||
|
||||
msgid "Samsung"
|
||||
msgstr "三星"
|
||||
|
||||
msgid "Smartisan"
|
||||
msgstr "锤子"
|
||||
|
||||
msgid "Sony"
|
||||
msgstr "索尼"
|
||||
|
||||
msgid "TongfangPC"
|
||||
msgstr "清华同方"
|
||||
|
||||
msgid "Microsoft"
|
||||
msgstr "微软"
|
||||
|
||||
msgid "XiaoMi"
|
||||
msgstr "小米"
|
||||
|
||||
msgid "ZTE"
|
||||
msgstr "中兴"
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
[ ! -f "/usr/share/ucitrack/luci-app-k3screenctrl.json" ] && {
|
||||
cat > /usr/share/ucitrack/luci-app-k3screenctrl.json << EEOF
|
||||
{
|
||||
"config": "k3screenctrl",
|
||||
"init": "k3screenctrl"
|
||||
}
|
||||
EEOF
|
||||
}
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@k3screenctrl[-1]
|
||||
add ucitrack k3screenctrl
|
||||
set ucitrack.@k3screenctrl[-1].init=k3screenctrl
|
||||
commit ucitrack
|
||||
EOF
|
||||
exit 0
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"luci-app-k3screenctrl": {
|
||||
"description": "Grant UCI access for luci-app-k3screenctrl",
|
||||
"read": {
|
||||
"uci": [ "k3screenctrl" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "k3screenctrl" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user