mirror of
https://github.com/kenzok8/openwrt-packages
synced 2025-01-08 11:17:27 +08:00
update 2022-05-05 15:41:33
This commit is contained in:
parent
1a702599cc
commit
0ae9bd91c2
@ -1,4 +1,11 @@
|
||||
module("luci.controller.aliddns",package.seeall)
|
||||
module("luci.controller.aliddns", package.seeall)
|
||||
|
||||
function index()
|
||||
entry({"admin","services","aliddns"},cbi("aliddns"),_("AliDDNS"),58).acl_depends = { "luci-app-aliddns" }
|
||||
if not nixio.fs.access("/etc/config/aliddns") then
|
||||
return
|
||||
end
|
||||
|
||||
local page = entry({"admin", "services", "aliddns"}, cbi("aliddns"), _("AliDDNS"), 58)
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-aliddns" }
|
||||
end
|
||||
|
@ -1,56 +1,57 @@
|
||||
local a=require"luci.sys"
|
||||
local e=luci.model.uci.cursor()
|
||||
local e=require"nixio.fs"
|
||||
local a = require"luci.sys"
|
||||
local e = luci.model.uci.cursor()
|
||||
local e = require"nixio.fs"
|
||||
require("luci.sys")
|
||||
local t,e,o
|
||||
local t, e ,o
|
||||
|
||||
t=Map("aliddns",translate("AliDDNS"))
|
||||
t = Map("aliddns", translate("AliDDNS"))
|
||||
|
||||
e=t:section(TypedSection,"base",translate("Base"))
|
||||
e.anonymous=true
|
||||
e = t:section(TypedSection, "base", translate("Base"))
|
||||
e.anonymous = true
|
||||
|
||||
enable=e:option(Flag,"enable",translate("enable"))
|
||||
enable.rmempty=false
|
||||
enable = e:option(Flag, "enable", translate("enable"))
|
||||
enable.rmempty = false
|
||||
|
||||
enable=e:option(Flag,"clean",translate("Clean Before Update"))
|
||||
enable.rmempty=false
|
||||
enable = e:option(Flag, "clean", translate("Clean Before Update"))
|
||||
enable.rmempty = false
|
||||
|
||||
token=e:option(Value,"app_key",translate("Access Key ID"))
|
||||
email=e:option(Value,"app_secret",translate("Access Key Secret"))
|
||||
token = e:option(Value, "app_key", translate("Access Key ID"))
|
||||
email = e:option(Value, "app_secret", translate("Access Key Secret"))
|
||||
|
||||
iface=e:option(ListValue,"interface",translate("WAN-IP Source"),translate("Select the WAN-IP Source for AliDDNS, like wan/internet"))
|
||||
iface:value("",translate("Select WAN-IP Source"))
|
||||
iface = e:option(ListValue, "interface", translate("WAN-IP Source"), translate("Select the WAN-IP Source for AliDDNS, like wan/internet"))
|
||||
iface:value("", translate("Select WAN-IP Source"))
|
||||
iface:value("internet")
|
||||
iface:value("wan")
|
||||
|
||||
iface.rmempty=false
|
||||
main=e:option(Value,"main_domain",translate("Main Domain"),translate("For example: test.github.com -> github.com"))
|
||||
main.rmempty=false
|
||||
sub=e:option(Value,"sub_domain",translate("Sub Domain"),translate("For example: test.github.com -> test"))
|
||||
sub.rmempty=false
|
||||
time=e:option(Value,"time",translate("Inspection Time"),translate("Unit: Minute, Range: 1-59"))
|
||||
time.rmempty=false
|
||||
iface.rmempty = false
|
||||
main = e:option(Value, "main_domain", translate("Main Domain"), translate("For example: test.github.com -> github.com"))
|
||||
main.rmempty = false
|
||||
sub = e:option(Value, "sub_domain", translate("Sub Domain"), translate("For example: test.github.com -> test"))
|
||||
sub.rmempty = false
|
||||
time = e:option(Value, "time", translate("Inspection Time"), translate("Unit: Minute, Range: 1-59"))
|
||||
time.rmempty = false
|
||||
|
||||
e=t:section(TypedSection,"base",translate("Update Log"))
|
||||
e.anonymous=true
|
||||
local a="/var/log/aliddns.log"
|
||||
tvlog=e:option(TextValue,"sylogtext")
|
||||
tvlog.rows=16
|
||||
tvlog.readonly="readonly"
|
||||
tvlog.wrap="off"
|
||||
e = t:section(TypedSection, "base", translate("Update Log"))
|
||||
e.anonymous = true
|
||||
local a = "/var/log/aliddns.log"
|
||||
tvlog = e:option(TextValue,"sylogtext")
|
||||
tvlog.rows = 16
|
||||
tvlog.readonly = "readonly"
|
||||
tvlog.wrap = "off"
|
||||
|
||||
function tvlog.cfgvalue(e,e)
|
||||
sylogtext=""
|
||||
sylogtext = ""
|
||||
if a and nixio.fs.access(a) then
|
||||
sylogtext=luci.sys.exec("tail -n 100 %s"%a)
|
||||
sylogtext = luci.sys.exec("tail -n 100 %s"%a)
|
||||
end
|
||||
return sylogtext
|
||||
end
|
||||
|
||||
tvlog.write=function(e,e,e)
|
||||
tvlog.write = function(e,e,e)
|
||||
end
|
||||
local e=luci.http.formvalue("cbi.apply")
|
||||
local e = luci.http.formvalue("cbi.apply")
|
||||
if e then
|
||||
io.popen("/etc/init.d/aliddns restart")
|
||||
end
|
||||
|
||||
return t
|
||||
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-argon-config
|
||||
PKG_VERSION:=0.9
|
||||
PKG_RELEASE:=20220423
|
||||
PKG_RELEASE:=20220424
|
||||
|
||||
PKG_MAINTAINER:=jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
|
@ -121,7 +121,7 @@ function br.handle(self, state, data)
|
||||
return true
|
||||
end
|
||||
|
||||
ful = SimpleForm('upload', translate('Upload (Free: ') .. wa.byte_format(free_byte) .. ')', translate("You can upload files such as jpg,png,gif,mp4 files, To change the login page background."))
|
||||
ful = SimpleForm('upload', translate('Upload (Free: ') .. wa.byte_format(free_byte) .. ')', translate("You can upload files such as jpg,png,gif,mp4,webm files, To change the login page background."))
|
||||
ful.reset = false
|
||||
ful.submit = false
|
||||
|
||||
@ -214,10 +214,4 @@ btnrm.write = function(self, section)
|
||||
return v
|
||||
end
|
||||
|
||||
function IsIpkFile(name)
|
||||
name = name or ''
|
||||
local ext = string.lower(string.sub(name, -4, -1))
|
||||
return ext == '.ipk'
|
||||
end
|
||||
|
||||
return br, ful, form
|
||||
|
@ -1,5 +1,5 @@
|
||||
<%+cbi/valueheader%>
|
||||
<label class="cbi-value" style="display:inline-block; width: 130px" for="ulfile"><%:Choose local file:%></label>
|
||||
<input class="cbi-input-file" style="width: 400px" type="file" id="ulfile" name="ulfile" accept="image/png, image/jpeg, image/gif, video/mp4"/>
|
||||
<input class="cbi-input-file" style="width: 400px" type="file" id="ulfile" name="ulfile" accept="image/png, image/jpeg, image/gif, video/mp4, video/webm"/>
|
||||
<input type="submit" class="btn cbi-button cbi-input-apply" name="upload" value="<%:Upload%>" />
|
||||
<%+cbi/valuefooter%>
|
||||
|
@ -145,10 +145,10 @@ msgstr "Puede elegir el modo de color del tema aquí"
|
||||
|
||||
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:124
|
||||
msgid ""
|
||||
"You can upload files such as jpg,png,gif,mp4 files, To change the login page "
|
||||
"You can upload files such as jpg,png,gif,mp4,webm files, To change the login page "
|
||||
"background."
|
||||
msgstr ""
|
||||
"Puede cargar archivos como jpg, png, gif, mp4, para cambiar el fondo de la "
|
||||
"Puede cargar archivos como jpg, png, gif, mp4, webm, para cambiar el fondo de la "
|
||||
"página de inicio de sesión."
|
||||
|
||||
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:105
|
||||
|
@ -126,7 +126,7 @@ msgstr ""
|
||||
|
||||
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:124
|
||||
msgid ""
|
||||
"You can upload files such as jpg,png,gif,mp4 files, To change the login page "
|
||||
"You can upload files such as jpg,png,gif,mp4,webm files, To change the login page "
|
||||
"background."
|
||||
msgstr ""
|
||||
|
||||
|
@ -74,8 +74,8 @@ msgstr "[暗色模式] 毛玻璃模糊半径"
|
||||
msgid "Larger value will more blurred ; ( Suggest: clear: 1 or blur preset: 10 )"
|
||||
msgstr "值越大越模糊; ( 建议: 清透 1 或 模糊预设 10 )"
|
||||
|
||||
msgid "You can upload files such as jpg,png,gif,mp4 files, To change the login page background."
|
||||
msgstr "你可以上传jpg、png、gif或mp4文件,以创建自己喜欢的登录界面"
|
||||
msgid "You can upload files such as jpg,png,gif,mp4,webm files, To change the login page background."
|
||||
msgstr "你可以上传jpg、png、gif或mp4、webm文件,以创建自己喜欢的登录界面"
|
||||
|
||||
msgid "Save Changes"
|
||||
msgstr "保存更改"
|
||||
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-argonne-config
|
||||
PKG_VERSION:=1.2
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_MAINTAINER:=jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
|
@ -121,7 +121,7 @@ function br.handle(self, state, data)
|
||||
return true
|
||||
end
|
||||
|
||||
ful = SimpleForm('upload', translate('Upload (Free: ') .. wa.byte_format(free_byte) .. ')', translate("You can upload files such as jpg,png,gif,mp4 files, To change the login page background."))
|
||||
ful = SimpleForm('upload', translate('Upload (Free: ') .. wa.byte_format(free_byte) .. ')', translate("You can upload files such as jpg,png,gif,mp4,webm files, To change the login page background."))
|
||||
ful.reset = false
|
||||
ful.submit = false
|
||||
|
||||
@ -214,10 +214,4 @@ btnrm.write = function(self, section)
|
||||
return v
|
||||
end
|
||||
|
||||
function IsIpkFile(name)
|
||||
name = name or ''
|
||||
local ext = string.lower(string.sub(name, -4, -1))
|
||||
return ext == '.ipk'
|
||||
end
|
||||
|
||||
return br, ful, form
|
||||
|
@ -1,5 +1,5 @@
|
||||
<%+cbi/valueheader%>
|
||||
<label class="cbi-value" style="display:inline-block; width: 130px" for="ulfile"><%:Choose local file:%></label>
|
||||
<input class="cbi-input-file" style="width: 400px" type="file" id="ulfile" name="ulfile" accept="image/png, image/jpeg, image/gif, video/mp4"/>
|
||||
<input class="cbi-input-file" style="width: 400px" type="file" id="ulfile" name="ulfile" accept="image/png, image/jpeg, image/gif, video/mp4, video/webm"/>
|
||||
<input type="submit" class="btn cbi-button cbi-input-apply" name="upload" value="<%:Upload%>" />
|
||||
<%+cbi/valuefooter%>
|
||||
|
@ -145,10 +145,10 @@ msgstr "Puede elegir el modo de color del tema aquí"
|
||||
|
||||
#: applications/luci-app-argonne-config/luasrc/model/cbi/argonne-config.lua:124
|
||||
msgid ""
|
||||
"You can upload files such as jpg,png,gif,mp4 files, To change the login page "
|
||||
"You can upload files such as jpg,png,gif,mp4,webm files, To change the login page "
|
||||
"background."
|
||||
msgstr ""
|
||||
"Puede cargar archivos como jpg, png, gif, mp4, para cambiar el fondo de la "
|
||||
"Puede cargar archivos como jpg, png, gif, mp4, webm, para cambiar el fondo de la "
|
||||
"página de inicio de sesión."
|
||||
|
||||
#: applications/luci-app-argonne-config/luasrc/model/cbi/argonne-config.lua:105
|
||||
|
@ -126,7 +126,7 @@ msgstr ""
|
||||
|
||||
#: applications/luci-app-argonne-config/luasrc/model/cbi/argonne-config.lua:124
|
||||
msgid ""
|
||||
"You can upload files such as jpg,png,gif,mp4 files, To change the login page "
|
||||
"You can upload files such as jpg,png,gif,mp4,webm files, To change the login page "
|
||||
"background."
|
||||
msgstr ""
|
||||
|
||||
|
@ -74,8 +74,8 @@ msgstr "[暗色模式] 毛玻璃模糊半径"
|
||||
msgid "Larger value will more blurred ; ( Suggest: clear: 1 or blur preset: 10 )"
|
||||
msgstr "值越大越模糊; ( 建议: 清透 1 或 模糊预设 10 )"
|
||||
|
||||
msgid "You can upload files such as jpg,png,gif,mp4 files, To change the login page background."
|
||||
msgstr "你可以上传jpg、png、gif或mp4文件,以创建自己喜欢的登录界面"
|
||||
msgid "You can upload files such as jpg,png,gif,mp4,webm files, To change the login page background."
|
||||
msgstr "你可以上传jpg、png、gif或mp4、webm文件,以创建自己喜欢的登录界面"
|
||||
|
||||
msgid "Save Changes"
|
||||
msgstr "保存更改"
|
||||
|
@ -1,56 +0,0 @@
|
||||
# LuCI Theme ifit
|
||||
# Copyright 2020 Richard Yu <xiaoqingfengatgm@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License v2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
THEME_NAME:=ifit
|
||||
THEME_TITLE:=ifit
|
||||
|
||||
PKG_NAME:=luci-theme-$(THEME_NAME)
|
||||
PKG_VERSION:=1.5.20210222
|
||||
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/luci-theme-$(THEME_NAME)
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
SUBMENU:=4. Themes
|
||||
DEPENDS:=+libc
|
||||
TITLE:=Infit by kenzo
|
||||
URL:=https://github.com/kenzok8/luci-theme-ifit
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/luci-theme-$(THEME_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/10_luci-theme-$(THEME_NAME) $(1)/etc/uci-defaults/luci-theme-$(THEME_NAME)
|
||||
$(INSTALL_DIR) $(1)/www/luci-static/$(THEME_NAME)
|
||||
$(CP) -a ./files/htdocs/* $(1)/www/luci-static/$(THEME_NAME)/ 2>/dev/null || true
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)
|
||||
$(CP) -a ./files/templates/* $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)/ 2>/dev/null || true
|
||||
endef
|
||||
|
||||
define Package/luci-theme-$(THEME_NAME)/postinst
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
if [ -f /etc/uci-defaults/luci-theme-$(THEME_NAME) ]; then
|
||||
( . /etc/uci-defaults/luci-theme-$(THEME_NAME) ) && \
|
||||
rm -f /etc/uci-defaults/luci-theme-$(THEME_NAME)
|
||||
fi
|
||||
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,luci-theme-$(THEME_NAME)))
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
uci batch <<-EOF
|
||||
set luci.themes.ifit=/luci-static/ifit
|
||||
set luci.main.mediaurlbase=/luci-static/ifit
|
||||
commit luci
|
||||
EOF
|
||||
exit 0
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="expand_less" d="M512 596.667l256-256-60-60-196 196-196-196-60 60z" />
|
||||
<glyph unicode="" glyph-name="expand_more" d="M708 572.667l60-60-256-256-256 256 60 60 196-196z" />
|
||||
<glyph unicode="" glyph-name="menu" d="M128 682.667h768v-86h-768v86zM128 384.667v84h768v-84h-768zM128 170.667v86h768v-86h-768z" />
|
||||
<glyph unicode="" glyph-name="favorite" d="M512 28.667l-62 56q-106 96-154 142t-107 114-81 123-22 113q0 98 67 166t167 68q116 0 192-90 76 90 192 90 100 0 167-68t67-166q0-78-52-162t-113-146-199-186z" />
|
||||
<glyph unicode="" glyph-name="spinner9" d="M512 960c-278.748 0-505.458-222.762-511.848-499.974 5.92 241.864 189.832 435.974 415.848 435.974 229.75 0 416-200.576 416-448 0-53.020 42.98-96 96-96s96 42.98 96 96c0 282.77-229.23 512-512 512zM512-64c278.748 0 505.458 222.762 511.848 499.974-5.92-241.864-189.832-435.974-415.848-435.974-229.75 0-416 200.576-416 448 0 53.020-42.98 96-96 96s-96-42.98-96-96c0-282.77 229.23-512 512-512z" />
|
||||
<glyph unicode="" glyph-name="question-circle" horiz-adv-x="878" d="M512 164.571v109.714q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-109.714q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM658.286 548.571q0 50.286-31.714 93.143t-79.143 66.286-97.143 23.429q-138.857 0-212-121.714-8.571-13.714 4.571-24l75.429-57.143q4-3.429 10.857-3.429 9.143 0 14.286 6.857 30.286 38.857 49.143 52.571 19.429 13.714 49.143 13.714 27.429 0 48.857-14.857t21.429-33.714q0-21.714-11.429-34.857t-38.857-25.714q-36-16-66-49.429t-30-71.714v-20.571q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143q0 10.857 12.286 28.286t31.143 28.286q18.286 10.286 28 16.286t26.286 20 25.429 27.429 16 34.571 7.143 46.286zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
|
||||
</font></defs></svg>
|
Before Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 70 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 523 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 MiB |
File diff suppressed because one or more lines are too long
@ -1,238 +0,0 @@
|
||||
/**
|
||||
* InfinityFreedom is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
*
|
||||
* luci-theme-infinityfreedom
|
||||
* Copyright 2020 Richard Yu <xiaoqingfengatgm@gmail.com>
|
||||
*
|
||||
* Have a bug? Please create an issue here on GitHub!
|
||||
* https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom/issues
|
||||
*
|
||||
* luci-theme-material:
|
||||
* Copyright 2015 Lutty Yang
|
||||
*
|
||||
* luci-theme-bootstrap:
|
||||
* Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
* Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
|
||||
* Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
* MUI:
|
||||
* https://github.com/muicss/mui
|
||||
*
|
||||
* Licensed to the public under the Apache License 2.0
|
||||
*/
|
||||
(function ($) {
|
||||
$(".main > .loading").fadeOut();
|
||||
|
||||
/**
|
||||
* trim text, Remove spaces, wrap
|
||||
* @param text
|
||||
* @returns {string}
|
||||
*/
|
||||
function trimText(text) {
|
||||
return text.replace(/[ \t\n\r]+/g, " ");
|
||||
}
|
||||
|
||||
|
||||
var lastNode = undefined;
|
||||
var mainNodeName = undefined;
|
||||
|
||||
var nodeUrl = "";
|
||||
(function(node){
|
||||
if (node[0] == "admin"){
|
||||
luciLocation = [node[1], node[2]];
|
||||
}else{
|
||||
luciLocation = node;
|
||||
}
|
||||
|
||||
for(var i in luciLocation){
|
||||
nodeUrl += luciLocation[i];
|
||||
if (i != luciLocation.length - 1){
|
||||
nodeUrl += "/";
|
||||
}
|
||||
}
|
||||
})(luciLocation);
|
||||
|
||||
/**
|
||||
* get the current node by Burl (primary)
|
||||
* @returns {boolean} success?
|
||||
*/
|
||||
function getCurrentNodeByUrl() {
|
||||
var ret = false;
|
||||
if (!$('body').hasClass('logged-in')) {
|
||||
luciLocation = ["Main", "Login"];
|
||||
return true;
|
||||
}
|
||||
|
||||
$(".main > .main-left > .nav > .slide > .menu").each(function () {
|
||||
var ulNode = $(this);
|
||||
ulNode.next().find("a").each(function () {
|
||||
var that = $(this);
|
||||
var href = that.attr("href");
|
||||
|
||||
if (href.indexOf(nodeUrl) != -1) {
|
||||
ulNode.click();
|
||||
ulNode.next(".slide-menu").stop(true, true);
|
||||
lastNode = that.parent();
|
||||
lastNode.addClass("active");
|
||||
ret = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* menu click
|
||||
*/
|
||||
$(".main > .main-left > .nav > .slide > .menu").click(function () {
|
||||
var ul = $(this).next(".slide-menu");
|
||||
var menu = $(this);
|
||||
if (!ul.is(":visible")) {
|
||||
menu.addClass("active");
|
||||
ul.addClass("active");
|
||||
ul.stop(true).slideDown("fast");
|
||||
} else {
|
||||
ul.stop(true).slideUp("fast", function () {
|
||||
menu.removeClass("active");
|
||||
ul.removeClass("active");
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* hook menu click and add the hash
|
||||
*/
|
||||
$(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function () {
|
||||
if (lastNode != undefined) lastNode.removeClass("active");
|
||||
$(this).parent().addClass("active");
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
return true;
|
||||
});
|
||||
|
||||
/**
|
||||
* fix menu click
|
||||
*/
|
||||
$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function () {
|
||||
if (lastNode != undefined) lastNode.removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
window.location = $($(this).find("a")[0]).attr("href");
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* get current node and open it
|
||||
*/
|
||||
if (getCurrentNodeByUrl()) {
|
||||
mainNodeName = "node-" + luciLocation[0] + "-" + luciLocation[1];
|
||||
mainNodeName = mainNodeName.replace(/[ \t\n\r\/]+/g, "_").toLowerCase();
|
||||
$("body").addClass(mainNodeName);
|
||||
}
|
||||
$(".cbi-button-up").val("");
|
||||
$(".cbi-button-down").val("");
|
||||
|
||||
|
||||
/**
|
||||
* hook other "A Label" and add hash to it.
|
||||
*/
|
||||
$("#maincontent > .container").find("a").each(function () {
|
||||
var that = $(this);
|
||||
var onclick = that.attr("onclick");
|
||||
if (onclick == undefined || onclick == "") {
|
||||
that.click(function () {
|
||||
var href = that.attr("href");
|
||||
if (href.indexOf("#") == -1) {
|
||||
$(".main > .loading").fadeIn("fast");
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Sidebar expand
|
||||
*/
|
||||
var showSide = false;
|
||||
$(".showSide").click(function () {
|
||||
if (showSide) {
|
||||
$(".darkMask").stop(true).fadeOut("fast");
|
||||
$(".main-left").stop(true).animate({
|
||||
width: "0"
|
||||
}, "fast");
|
||||
$(".main-right").css("overflow-y", "auto");
|
||||
showSide = false;
|
||||
} else {
|
||||
$(".darkMask").stop(true).fadeIn("fast");
|
||||
$(".main-left").stop(true).animate({
|
||||
width: "15rem"
|
||||
}, "fast");
|
||||
$(".main-right").css("overflow-y", "hidden");
|
||||
showSide = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".darkMask").click(function () {
|
||||
if (showSide) {
|
||||
showSide = false;
|
||||
$(".darkMask").stop(true).fadeOut("fast");
|
||||
$(".main-left").stop(true).animate({
|
||||
width: "0"
|
||||
}, "fast");
|
||||
$(".main-right").css("overflow-y", "auto");
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
if ($(window).width() > 921) {
|
||||
$(".main-left").css("width", "");
|
||||
$(".darkMask").stop(true);
|
||||
$(".darkMask").css("display", "none");
|
||||
showSide = false;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* fix legend position
|
||||
*/
|
||||
$("legend").each(function () {
|
||||
var that = $(this);
|
||||
that.after("<span class='panel-title'>" + that.text() + "</span>");
|
||||
});
|
||||
|
||||
/*fix vlan prot*/
|
||||
/*$(".cbi-section-table-titles, .cbi-section-table-descr, .cbi-section-descr").each(function () {
|
||||
var that = $(this);
|
||||
if (that.text().trim() == ""){
|
||||
that.css("display", "none");
|
||||
}
|
||||
});*/
|
||||
|
||||
|
||||
$(".main-right").focus();
|
||||
$(".main-right").blur();
|
||||
$("input").attr("size", "0");
|
||||
|
||||
if (mainNodeName != undefined) {
|
||||
console.log(mainNodeName);
|
||||
switch (mainNodeName) {
|
||||
case "node-status-system_log":
|
||||
case "node-status-kernel_log":
|
||||
$("#syslog").focus(function () {
|
||||
$("#syslog").blur();
|
||||
$(".main-right").focus();
|
||||
$(".main-right").blur();
|
||||
});
|
||||
break;
|
||||
case "node-status-firewall":
|
||||
var button = $(".node-status-firewall > .main fieldset li > a");
|
||||
button.addClass("cbi-button cbi-button-reset a-to-btn");
|
||||
break;
|
||||
case "node-system-reboot":
|
||||
var button = $(".node-system-reboot > .main > .main-right p > a");
|
||||
button.addClass("cbi-button cbi-input-reset a-to-btn");
|
||||
break;
|
||||
}
|
||||
}
|
||||
})(jQuery);
|
Binary file not shown.
Before Width: | Height: | Size: 217 KiB |
@ -1,51 +0,0 @@
|
||||
<%#
|
||||
|
||||
ifit is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
|
||||
luci-theme-ifit
|
||||
Copyright 2020 Richard Yu <xiaoqingfengatgm@gmail.com>
|
||||
|
||||
|
||||
luci-theme-material:
|
||||
Copyright 2015 Lutty Yang
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
MUI:
|
||||
https://github.com/muicss/mui
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<%
|
||||
local ver = require "luci.version"
|
||||
local disp = require "luci.dispatcher"
|
||||
local request = disp.context.path
|
||||
local category = request[1]
|
||||
local tree = disp.node()
|
||||
local categories = disp.node_childs(tree)
|
||||
%>
|
||||
</div>
|
||||
<footer class="mobile-hide">
|
||||
<a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> /
|
||||
<%= ver.distversion %>
|
||||
<% if #categories > 1 then %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu">
|
||||
<% for i, r in ipairs(categories) do %>
|
||||
<li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// thanks for Jo-Philipp Wich <jow@openwrt.org>
|
||||
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
|
||||
</script>
|
||||
<script src="<%=media%>/js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,275 +0,0 @@
|
||||
<%#
|
||||
|
||||
ifit is a clean HTML5 theme for LuCI. It is based on luci-theme-material.
|
||||
|
||||
luci-theme-ifit
|
||||
Copyright 2020 Richard Yu <xiaoqingfengatgm@gmail.com>
|
||||
|
||||
luci-theme-material:
|
||||
Copyright 2015 Lutty Yang
|
||||
|
||||
luci-theme-bootstrap:
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
|
||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
||||
MUI:
|
||||
https://github.com/muicss/mui
|
||||
|
||||
Licensed to the public under the Apache License 2.0
|
||||
-%>
|
||||
|
||||
<%
|
||||
local ver = require "luci.version"
|
||||
local sys = require "luci.sys"
|
||||
local util = require "luci.util"
|
||||
local http = require "luci.http"
|
||||
local disp = require "luci.dispatcher"
|
||||
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
local boardinfo={}
|
||||
boardinfo.hostname=sys.hostname()
|
||||
|
||||
local request = disp.context.path
|
||||
local request2 = disp.context.request
|
||||
|
||||
local category = request[1]
|
||||
local cattree = category and disp.node(category)
|
||||
|
||||
local leaf = request2[#request2]
|
||||
|
||||
local tree = disp.node()
|
||||
local node = disp.context.dispatched
|
||||
|
||||
local categories = disp.node_childs(tree)
|
||||
|
||||
local c = tree
|
||||
local i, r
|
||||
|
||||
-- tag all nodes leading to this page
|
||||
for i, r in ipairs(request) do
|
||||
if c.nodes and c.nodes[r] then
|
||||
c = c.nodes[r]
|
||||
c._menu_selected = true
|
||||
end
|
||||
end
|
||||
|
||||
-- send as HTML5
|
||||
http.prepare_content("text/html")
|
||||
|
||||
local function nodeurl(prefix, name, query)
|
||||
local u = url(prefix, name)
|
||||
if query then
|
||||
u = u .. http.build_querystring(query)
|
||||
end
|
||||
return pcdata(u)
|
||||
end
|
||||
|
||||
local function render_tabmenu(prefix, node, level)
|
||||
if not level then
|
||||
level = 1
|
||||
end
|
||||
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
if level > 2 then
|
||||
write('<ul class="tabs">')
|
||||
end
|
||||
|
||||
local selected_node
|
||||
local selected_name
|
||||
local i, v
|
||||
|
||||
for i, v in ipairs(childs) do
|
||||
local nnode = node.nodes[v]
|
||||
if nnode._menu_selected then
|
||||
selected_node = nnode
|
||||
selected_name = v
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{
|
||||
v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'active' or '',
|
||||
nodeurl(prefix, v, nnode.query),
|
||||
striptags(translate(nnode.title))
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if level > 2 then
|
||||
write('</ul>')
|
||||
end
|
||||
|
||||
if selected_node then
|
||||
render_tabmenu(prefix .. "/" .. selected_name, selected_node, level + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function render_submenu(prefix, node)
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
write('<ul class="slide-menu">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = node.nodes[r]
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
|
||||
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
|
||||
title,
|
||||
nodeurl(prefix, r, nnode.query),
|
||||
title
|
||||
})
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_topmenu()
|
||||
local childs = disp.node_childs(cattree)
|
||||
if #childs > 0 then
|
||||
write('<ul class="nav">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = cattree.nodes[r]
|
||||
local grandchildren = disp.node_childs(nnode)
|
||||
|
||||
if #grandchildren > 0 then
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
|
||||
write('<li class="slide"><a class="menu" data-title="%s" href="#">%s</a>' %{
|
||||
pcdata(striptags(nnode.title)),
|
||||
title
|
||||
})
|
||||
|
||||
render_submenu(category .. "/" .. r, nnode)
|
||||
write('</li>')
|
||||
else
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
|
||||
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
|
||||
pcdata(striptags(nnode.title)),
|
||||
nodeurl(category, r, nnode.query),
|
||||
title
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
write('</ul>')
|
||||
end
|
||||
end
|
||||
|
||||
local function render_changes()
|
||||
-- calculate the number of unsaved changes
|
||||
if tree.nodes[category] and tree.nodes[category].ucidata then
|
||||
local ucichanges = 0
|
||||
|
||||
for i, j in pairs(require("luci.model.uci").cursor():changes()) do
|
||||
for k, l in pairs(j) do
|
||||
for m, n in pairs(l) do
|
||||
ucichanges = ucichanges + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ucichanges > 0 then
|
||||
write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
|
||||
url(category, 'uci/changes'),
|
||||
http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
|
||||
translate('Unsaved Changes'),
|
||||
ucichanges
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
-%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%=luci.i18n.context.lang%>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
|
||||
<meta name="format-detection" content="telephone=no, email=no"/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="x5-fullscreen" content="true">
|
||||
<meta name="full-screen" content="yes">
|
||||
<meta name="x5-page-mode" content="app">
|
||||
<meta name="browsermode" content="application">
|
||||
<meta name="theme-color" content="#0099CC">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="msapplication-TileColor" content="#0099CC">
|
||||
|
||||
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||
<meta name="msapplication-TileImage" content="<%=media%>/logo.png"/>
|
||||
<link rel="icon" href="<%=media%>/logo.png" sizes="144x144">
|
||||
<link rel="apple-touch-icon-precomposed" href="<%=media%>/logo.png" sizes="144x144">
|
||||
|
||||
<link rel="stylesheet" href="<%=media%>/css/style.css">
|
||||
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
|
||||
<% if node and node.css then %>
|
||||
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
|
||||
<% end -%>
|
||||
<% if css then %>
|
||||
<style title="text/css"><%= css %></style>
|
||||
<% end -%>
|
||||
<script src="<%=resource%>/xhr.js"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js"></script>
|
||||
</head>
|
||||
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
|
||||
<header>
|
||||
<div class="container">
|
||||
<span class="showSide"></span>
|
||||
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
|
||||
<div class="pull-right">
|
||||
<% render_changes() %>
|
||||
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
|
||||
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%></span> <%:on%></span>
|
||||
<span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%></span> <%:off%></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<script>
|
||||
var brandurl = '/luci-static/ifit/images/brand.png';
|
||||
$.ajax({
|
||||
url : brandurl,
|
||||
type : 'HEAD',
|
||||
error : function() {
|
||||
var brand = $("body > header > div > a.brand");
|
||||
brand.addClass('brandMark');
|
||||
},
|
||||
success : function() {
|
||||
var brandContainer = $("header > .container > .brand");
|
||||
brandContainer.addClass("brandWithBackground");
|
||||
var brand = $("body > header > div > a.brand");
|
||||
brand.html('');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="main">
|
||||
<div style="" class="loading"><span><div class="loading-img"></div>Loading...</span></div>
|
||||
<div class="main-left">
|
||||
<% render_topmenu() %>
|
||||
</div>
|
||||
<div class="main-right">
|
||||
<div class="darkMask"></div>
|
||||
<div id="maincontent">
|
||||
<div class="container">
|
||||
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
|
||||
<div class="alert-message warning">
|
||||
<h4><%:No password set!%></h4>
|
||||
<p><%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%></p>
|
||||
<div class="right"><a class="btn" href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
|
||||
</div>
|
||||
<%- end -%>
|
||||
|
||||
<noscript>
|
||||
<div class="alert-message warning">
|
||||
<h4><%:JavaScript required!%></h4>
|
||||
<p><%:You must enable JavaScript in your browser or LuCI will not work properly.%></p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<% if category then render_tabmenu(category, cattree) end %>
|
Loading…
Reference in New Issue
Block a user