mirror of
https://github.com/Dichgrem/luci-app-nyn.git
synced 2025-12-16 13:42:00 -05:00
style:add_zh_cn
This commit is contained in:
@@ -1,23 +1,21 @@
|
||||
-- /usr/lib/lua/luci/model/cbi/nyn.lua
|
||||
|
||||
local m, s, o
|
||||
local sys = require "luci.sys"
|
||||
|
||||
m = Map("nyn", translate("NYN 802.1x Authentication Client"),
|
||||
translate("Configure 802.1x authentication for network access using NYN client"))
|
||||
m = Map("nyn", "NYN 802.1x 认证客户端",
|
||||
"配置使用 NYN 客户端进行网络访问的 802.1x 认证")
|
||||
|
||||
-- Authentication Settings
|
||||
s = m:section(TypedSection, "auth", translate("Authentication Settings"))
|
||||
s = m:section(TypedSection, "auth", "认证设置")
|
||||
s.anonymous = true
|
||||
s.addremove = false
|
||||
|
||||
-- Service Status
|
||||
o = s:option(DummyValue, "_status", translate("Current Status"))
|
||||
o = s:option(DummyValue, "_status", "当前状态")
|
||||
o.rawhtml = true
|
||||
o.cfgvalue = function()
|
||||
local sys = require "luci.sys"
|
||||
local running = sys.call("pgrep nyn >/dev/null") == 0
|
||||
|
||||
if running then
|
||||
return "<span style='color:green;font-weight:bold'>✔ 正在运行中</span>"
|
||||
else
|
||||
@@ -26,20 +24,21 @@ o.cfgvalue = function()
|
||||
end
|
||||
|
||||
-- Enable/Disable
|
||||
o = s:option(Flag, "enabled", translate("Enable Service"))
|
||||
o = s:option(Flag, "enabled", "启用服务")
|
||||
o.rmempty = false
|
||||
|
||||
-- Username
|
||||
o = s:option(Value, "user", translate("Username"), translate("802.1x authentication username"))
|
||||
o = s:option(Value, "user", "用户名", "802.1x 认证用户名")
|
||||
o.password = true
|
||||
o.rmempty = false
|
||||
|
||||
-- Password
|
||||
o = s:option(Value, "password", translate("Password"), translate("802.1x authentication password"))
|
||||
o = s:option(Value, "password", "密码", "802.1x 认证密码")
|
||||
o.password = true
|
||||
o.rmempty = false
|
||||
|
||||
-- Network Device
|
||||
o = s:option(ListValue, "device", translate("Network Device"), translate("Network device to use for authentication"))
|
||||
o = s:option(ListValue, "device", "网络接口", "用于认证的网络接口")
|
||||
o.rmempty = false
|
||||
o:value("eth0", "eth0")
|
||||
o:value("eth1", "eth1")
|
||||
|
||||
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 74 KiB |
Reference in New Issue
Block a user