forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/coolsnowwolf/lede: luci-app-vlmcsd: tidy up luci (coolsnowwolf#8150)
- Loading branch information
Showing
7 changed files
with
54 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
package/lean/luci-app-vlmcsd/luasrc/model/cbi/vlmcsd/basic.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
m = Map("vlmcsd") | ||
m.title = translate("KMS Server") | ||
m.description = translate("A KMS Server Emulator to active your Windows or Office") | ||
|
||
m:section(SimpleSection).template = "vlmcsd/vlmcsd_status" | ||
|
||
s = m:section(TypedSection, "vlmcsd") | ||
s.addremove = false | ||
s.anonymous = true | ||
|
||
enable = s:option(Flag, "enabled", translate("Enable")) | ||
enable.rmempty = false | ||
|
||
autoactivate = s:option(Flag, "autoactivate", translate("Auto activate")) | ||
autoactivate.rmempty = false | ||
|
||
return m |
22 changes: 22 additions & 0 deletions
22
package/lean/luci-app-vlmcsd/luasrc/model/cbi/vlmcsd/config.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
m = Map("vlmcsd") | ||
|
||
s = m:section(TypedSection, "vlmcsd") | ||
s.addremove = false | ||
s.anonymous = true | ||
|
||
config = s:option(Value, "config", translate("Config File")) | ||
config.description = translate("This file is /etc/vlmcsd/vlmcsd.ini.") | ||
config.template = "cbi/tvalue" | ||
config.rows = 30 | ||
config.wrap = "off" | ||
|
||
function config.cfgvalue(self, section) | ||
return nixio.fs.readfile("/etc/vlmcsd/vlmcsd.ini") | ||
end | ||
|
||
function config.write(self, section, value) | ||
value = value:gsub("\r\n?", "\n") | ||
nixio.fs.writefile("/etc/vlmcsd/vlmcsd.ini", value) | ||
end | ||
|
||
return m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters