up 支持LEDE和OPENWRT官方版本。

This commit is contained in:
Pdboy Sir 2024-03-15 17:39:11 +08:00 committed by GitHub
parent 6346cf18ef
commit d1ffe61305
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 79 additions and 3 deletions

View File

@ -1,11 +1,12 @@
#
# provides Web UI to shut down (power off) your device.
# routers are listed at https://github.com/sirpdboy/luci-app-poweroffdevice
# Copyright (C) 2022-2023 sirpdboy <herboy2008@gmail.com>
# This is free software, licensed under the GNU General Public License v3.
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-poweroffdevice
NAME:=poweroffdevice
PKG_NAME:=luci-app-$(NAME)
LUCI_TITLE:=LuCI support for poweroffdevice Router
LUCI_DESCRIPTION:=provides Web UI to shut down (power off) your device.

View File

@ -3,7 +3,9 @@ module("luci.controller.poweroffdevice", package.seeall)
function index()
entry({"admin","system","poweroffdevice"},template("poweroffdevice/poweroffdevice"), _("PowerOff"), 92)
local e = entry({"admin","system","poweroffdevice"},template("poweroffdevice/poweroffdevice"), _("PowerOff"), 92)
e.dependent=false
e.acl_depends = { "luci-app-poweroffdevice" }
entry({"admin","system","poweroffdevice","call"},post("action_poweroff"))
end

View File

@ -0,0 +1,31 @@
#
# provides Web UI to shut down (power off) your device.
# routers are listed at https://github.com/sirpdboy/luci-app-poweroffdevice
# This is free software, licensed under the GNU General Public License v3.
msgid "PowerOff"
msgstr "关机"
msgid "Power Off Device"
msgstr "设备关机"
msgid "Perform Power Off"
msgstr "执行关机"
msgid "Turn off the power to the device you are using"
msgstr "关闭您正在使用的设备的电源"
msgid "WARNING: Power off might result in a reboot on a device which not support power off."
msgstr "警告:对于不支持关机的设备,关机可能会导致重新启动."
msgid "Device unreachable"
msgstr "操作设备无效"
msgid "Shutting Down..."
msgstr "正在关机..."
msgid "Device shutdown complete!"
msgstr "设备关机完毕!"

View File

@ -0,0 +1,31 @@
#
# provides Web UI to shut down (power off) your device.
# routers are listed at https://github.com/sirpdboy/luci-app-poweroffdevice
# This is free software, licensed under the GNU General Public License v3.
msgid "PowerOff"
msgstr "关机"
msgid "Power Off Device"
msgstr "设备关机"
msgid "Perform Power Off"
msgstr "执行关机"
msgid "Turn off the power to the device you are using"
msgstr "关闭您正在使用的设备的电源"
msgid "WARNING: Power off might result in a reboot on a device which not support power off."
msgstr "警告:对于不支持关机的设备,关机可能会导致重新启动."
msgid "Device unreachable"
msgstr "操作设备无效"
msgid "Shutting Down..."
msgstr "正在关机..."
msgid "Device shutdown complete!"
msgstr "设备关机完毕!"

View File

@ -0,0 +1,11 @@
{
"luci-app-poweroffdevice": {
"description": "Grant UCI access for luci-app-poweroffdevice",
"read": {
"uci": [ "poweroffdevice" ]
},
"write": {
"uci": [ "poweroffdevice" ]
}
}
}