update 2024-12-24 00:24:41

This commit is contained in:
kenzok8 2024-12-24 00:24:41 +08:00
parent c7c92fe767
commit 52ab88b3f7
37 changed files with 73 additions and 5297 deletions

View File

@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.6.0">
<title>Current Version: v1.6.0</title>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.6.1">
<title>Current Version: v1.6.1</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
@ -15,7 +15,7 @@
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
<text aria-hidden="true" x="495" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="700" style="letter-spacing: -5;">Current Version</text>
<text x="495" y="140" transform="scale(.1)" fill="#fff" textLength="700" style="letter-spacing: -5;">Current Version</text>
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.0</text>
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.0</text>
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.1</text>
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.1</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -523,11 +523,13 @@ function create_backup()
"/usr/share/passwall/rules/proxy_host",
"/usr/share/passwall/rules/proxy_ip"
}
local tar_file = "/tmp/passwall-backup.tar.gz"
local date = os.date("%Y%m%d")
local tar_file = "/tmp/passwall-" .. date .. "-backup.tar.gz"
fs.remove(tar_file)
local cmd = "tar -czf " .. tar_file .. " " .. table.concat(backup_files, " ")
api.sys.call(cmd)
http.header("Content-Disposition", "attachment; filename=passwall-backup.tar.gz")
http.header("Content-Disposition", "attachment; filename=passwall-" .. date .. "-backup.tar.gz")
http.header("X-Backup-Filename", "passwall-" .. date .. "-backup.tar.gz")
http.prepare_content("application/octet-stream")
http.write(fs.readfile(tar_file))
fs.remove(tar_file)

View File

@ -95,11 +95,10 @@ local api = require "luci.passwall.api"
if (!response.ok) {
throw new Error("备份失败!");
}
return response.blob();
const filename = response.headers.get("X-Backup-Filename") || "passwall-backup.tar.gz";
return response.blob().then(blob => ({ blob, filename }));
})
.then(blob => {
const date = new Date().toISOString().slice(0, 10).replace(/-/g, '');
const filename = `passwall-${date}-backup.tar.gz`;
.then(({ blob, filename }) => {
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;

View File

@ -1712,29 +1712,32 @@ acl_app() {
[ "$enabled" = "1" ] || continue
for s in $sources; do
local s2
is_iprange=$(lua_api "iprange(\"${s}\")")
if [ "${is_iprange}" = "true" ]; then
s2="iprange:${s}"
elif [ -n "$(echo ${s} | grep '^ipset:')" ]; then
s2="ipset:${s}"
else
_ip_or_mac=$(lua_api "ip_or_mac(\"${s}\")")
if [ "${_ip_or_mac}" = "ip" ]; then
s2="ip:${s}"
elif [ "${_ip_or_mac}" = "mac" ]; then
s2="mac:${s}"
if [ -n "${sources}" ]; then
for s in $sources; do
local s2
is_iprange=$(lua_api "iprange(\"${s}\")")
if [ "${is_iprange}" = "true" ]; then
s2="iprange:${s}"
elif [ -n "$(echo ${s} | grep '^ipset:')" ]; then
s2="ipset:${s}"
else
_ip_or_mac=$(lua_api "ip_or_mac(\"${s}\")")
if [ "${_ip_or_mac}" = "ip" ]; then
s2="ip:${s}"
elif [ "${_ip_or_mac}" = "mac" ]; then
s2="mac:${s}"
fi
fi
fi
[ -n "${s2}" ] && source_list="${source_list}\n${s2}"
unset s2
done
[ -n "${s2}" ] && source_list="${source_list}\n${s2}"
unset s2
done
else
source_list="any"
fi
local acl_path=${TMP_ACL_PATH}/$sid
mkdir -p ${acl_path}
[ ! -z "${source_list}" ] && echo -e "${source_list}" | sed '/^$/d' > ${acl_path}/source_list
[ -n "${source_list}" ] && echo -e "${source_list}" | sed '/^$/d' > ${acl_path}/source_list
use_global_config=${use_global_config:-0}
[ "${use_global_config}" = "1" ] && {

View File

@ -259,6 +259,8 @@ load_acl() {
[ -z "${device}" ] && device="${interface}"
_ipt_source="-i ${device} "
msg="源接口【${device}】,"
else
msg="源接口【所有】,"
fi
if [ -n "$(echo ${i} | grep '^iprange:')" ]; then
_iprange=$(echo ${i} | sed 's#iprange:##g')
@ -287,6 +289,8 @@ load_acl() {
_ipt_source=$(factor ${_mac} "${_ipt_source}-m mac --mac-source")
msg="${msg}MAC【${_mac}】,"
unset _mac
elif [ -n "$(echo ${i} | grep '^any')" ]; then
msg="${msg}所有设备,"
else
continue
fi

View File

@ -319,6 +319,8 @@ load_acl() {
[ -z "${device}" ] && device="${interface}"
_ipt_source="iifname ${device} "
msg="源接口【${device}】,"
else
msg="源接口【所有】,"
fi
if [ -n "$(echo ${i} | grep '^iprange:')" ]; then
_iprange=$(echo ${i} | sed 's#iprange:##g')
@ -340,6 +342,8 @@ load_acl() {
_ipt_source=$(factor ${_mac} "${_ipt_source}ether saddr")
msg="${msg}MAC【${_mac}】,"
unset _mac
elif [ -n "$(echo ${i} | grep '^any')" ]; then
msg="${msg}所有设备,"
else
continue
fi

View File

@ -1121,27 +1121,32 @@ acl_app() {
[ "$enabled" = "1" ] || continue
for s in $sources; do
local s2
is_iprange=$(lua_api "iprange(\"${s}\")")
if [ "${is_iprange}" = "true" ]; then
s2="iprange:${s}"
elif [ -n "$(echo ${s} | grep '^ipset:')" ]; then
s2="ipset:${s}"
else
_ip_or_mac=$(lua_api "ip_or_mac(\"${s}\")")
if [ "${_ip_or_mac}" = "ip" ]; then
s2="ip:${s}"
elif [ "${_ip_or_mac}" = "mac" ]; then
s2="mac:${s}"
if [ -n "${sources}" ]; then
for s in $sources; do
local s2
is_iprange=$(lua_api "iprange(\"${s}\")")
if [ "${is_iprange}" = "true" ]; then
s2="iprange:${s}"
elif [ -n "$(echo ${s} | grep '^ipset:')" ]; then
s2="ipset:${s}"
else
_ip_or_mac=$(lua_api "ip_or_mac(\"${s}\")")
if [ "${_ip_or_mac}" = "ip" ]; then
s2="ip:${s}"
elif [ "${_ip_or_mac}" = "mac" ]; then
s2="mac:${s}"
fi
fi
fi
[ -n "${s2}" ] && source_list="${source_list}\n${s2}"
unset s2
done
[ -n "${s2}" ] && source_list="${source_list}\n${s2}"
unset s2
done
else
source_list="any"
fi
mkdir -p $TMP_ACL_PATH/$sid
[ ! -z "${source_list}" ] && echo -e "${source_list}" | sed '/^$/d' > $TMP_ACL_PATH/$sid/source_list
local acl_path=${TMP_ACL_PATH}/$sid
mkdir -p ${acl_path}
[ -n "${source_list}" ] && echo -e "${source_list}" | sed '/^$/d' > ${acl_path}/source_list
node=${node:-default}
tcp_no_redir_ports=${tcp_no_redir_ports:-default}

View File

@ -329,6 +329,8 @@ load_acl() {
[ -z "${device}" ] && device="${interface}"
_ipt_source="-i ${device} "
msg="源接口【${device}】,"
else
msg="源接口【所有】,"
fi
if [ -n "$(echo ${i} | grep '^iprange:')" ]; then
_iprange=$(echo ${i} | sed 's#iprange:##g')
@ -357,6 +359,8 @@ load_acl() {
_ipt_source=$(factor ${_mac} "${_ipt_source}-m mac --mac-source")
msg="${msg}MAC【${_mac}】,"
unset _mac
elif [ -n "$(echo ${i} | grep '^any')" ]; then
msg="${msg}所有设备,"
else
continue
fi

View File

@ -384,6 +384,8 @@ load_acl() {
[ -z "${device}" ] && device="${interface}"
_ipt_source="iifname ${device} "
msg="源接口【${device}】,"
else
msg="源接口【所有】,"
fi
if [ -n "$(echo ${i} | grep '^iprange:')" ]; then
_iprange=$(echo ${i} | sed 's#iprange:##g')
@ -405,6 +407,8 @@ load_acl() {
_ipt_source=$(factor ${_mac} "${_ipt_source}ether saddr")
msg="${msg}MAC【${_mac}】,"
unset _mac
elif [ -n "$(echo ${i} | grep '^any')" ]; then
msg="${msg}所有设备,"
else
continue
fi

View File

@ -1,187 +0,0 @@
'use strict';
'require baseclass';
'require ui';
return baseclass.extend({
__init__: function() {
ui.menu.load().then(L.bind(this.render, this));
},
render: function(tree) {
var node = tree,
url = '';
this.renderModeMenu(node);
if (L.env.dispatchpath.length >= 3) {
for (var i = 0; i < 3 && node; i++) {
node = node.children[L.env.dispatchpath[i]];
url = url + (url ? '/' : '') + L.env.dispatchpath[i];
}
if (node)
this.renderTabMenu(node, url);
}
document.querySelector('.showSide')
.addEventListener('click', ui.createHandlerFn(this, 'handleSidebarToggle'));
document.querySelector('.darkMask')
.addEventListener('click', ui.createHandlerFn(this, 'handleSidebarToggle'));
document.querySelector(".main > .loading").style.opacity = '0';
document.querySelector(".main > .loading").style.visibility = 'hidden';
if (window.innerWidth <= 992)
document.querySelector('.main-left').style.width = '0';
document.querySelector('.main-right').style.overflow = 'auto';
window.addEventListener('resize', this.handleSidebarToggle, true);
},
handleMenuExpand: function(ev) {
var a = ev.target,
ul1 = a.parentNode,
ul2 = a.nextElementSibling;
document.querySelectorAll("li.slide.active").forEach(function (li) {
if (li !== a.parentNode || li == ul1) {
li.classList.remove("active");
li.childNodes[0].classList.remove("active");
}
if (li == ul1) return;
});
if (!ul2) return;
if (
ul2.parentNode.offsetLeft + ul2.offsetWidth <=
ul1.offsetLeft + ul1.offsetWidth
)
ul2.classList.add("align-left");
ul1.classList.add("active");
a.classList.add("active");
a.blur();
ev.preventDefault();
ev.stopPropagation();
},
renderMainMenu: function(tree, url, level) {
var l = (level || 0) + 1,
ul = E('ul', { 'class': level ? 'slide-menu' : 'nav' }),
children = ui.menu.getChildren(tree);
if (children.length == 0 || l > 2)
return E([]);
for (var i = 0; i < children.length; i++) {
var isActive = ((L.env.dispatchpath[l] == children[i].name) && (L.env.dispatchpath[l - 1] == tree.name)),
submenu = this.renderMainMenu(children[i], url + '/' + children[i].name, l),
hasChildren = submenu.children.length,
slideClass = hasChildren ? 'slide' : null,
menuClass = hasChildren ? 'menu' : null;
if (isActive) {
ul.classList.add('active');
slideClass += " active";
menuClass += " active";
}
ul.appendChild(E('li', { 'class': slideClass }, [
E('a', {
'href': L.url(url, children[i].name),
'click': (l == 1) ? ui.createHandlerFn(this, 'handleMenuExpand') : null,
'class': menuClass,
'data-title': hasChildren ? children[i].title.replace(" ", "_") : children[i].title.replace(" ", "_"),
}, [_(children[i].title)]),
submenu
]));
}
if (l == 1) {
var container = document.querySelector('#mainmenu');
container.appendChild(ul);
container.style.display = '';
}
return ul;
},
renderModeMenu: function(tree) {
var ul = document.querySelector('#modemenu'),
children = ui.menu.getChildren(tree);
for (var i = 0; i < children.length; i++) {
var isActive = (L.env.requestpath.length ? children[i].name == L.env.requestpath[0] : i == 0);
ul.appendChild(E('li', {}, [
E('a', {
'href': L.url(children[i].name),
'class': isActive ? 'active' : null
}, [ _(children[i].title) ])
]));
if (isActive)
this.renderMainMenu(children[i], children[i].name);
if (i > 0 && i < children.length)
ul.appendChild(E('li', {'class': 'divider'}, [E('span')]))
}
if (children.length > 1)
ul.parentElement.style.display = '';
},
renderTabMenu: function(tree, url, level) {
var container = document.querySelector('#tabmenu'),
l = (level || 0) + 1,
ul = E('ul', { 'class': 'tabs' }),
children = ui.menu.getChildren(tree),
activeNode = null;
if (children.length == 0)
return E([]);
for (var i = 0; i < children.length; i++) {
var isActive = (L.env.dispatchpath[l + 2] == children[i].name),
activeClass = isActive ? ' active' : '',
className = 'tabmenu-item-%s %s'.format(children[i].name, activeClass);
ul.appendChild(E('li', { 'class': className }, [
E('a', { 'href': L.url(url, children[i].name) }, [ _(children[i].title) ] )
]));
if (isActive)
activeNode = children[i];
}
container.appendChild(ul);
container.style.display = '';
if (activeNode)
container.appendChild(this.renderTabMenu(activeNode, url + '/' + activeNode.name, l));
return ul;
},
handleSidebarToggle: function(ev) {
var width = window.innerWidth,
darkMask = document.querySelector('.darkMask'),
mainRight = document.querySelector('.main-right'),
mainLeft = document.querySelector('.main-left'),
open = mainLeft.style.width == '';
if (width > 992 || ev.type == 'resize')
open = true;
darkMask.style.visibility = open ? '' : 'visible';
darkMask.style.opacity = open ? '': 1;
if (width <= 992)
mainLeft.style.width = open ? '0' : '';
else
mainLeft.style.width = ''
mainLeft.style.visibility = open ? '' : 'visible';
mainRight.style['overflow-y'] = open ? 'visible' : 'hidden';
}
});

View File

@ -1,769 +0,0 @@

body {
font-family: "Microsoft Yahei", "Google Sans", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB"!important
}
body {
color: #98a6ad;
}
*::-webkit-scrollbar {
background: transparent
}
*::-webkit-scrollbar-thumb {
background: #666;
height: 10px;
border-radius: 5px
}
*::-webkit-scrollbar-thumb:hover {
background-color: #bbb
}
*::-webkit-scrollbar-track {
background: transparent
}
::selection {
background-color: #374564!important;
color: #ccc;
}
a:link,
a:visited,
a:active {
color: #d0d7de;
}
a {
color: #d0d7de;
}
header.bar-primary .container-bar-right,
header.bar-primary .container-bar-left {
background-color: rgba(var(--primary-rgbm), 1);
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
transition: all .2s ease;
transition: 0.3s ease-in-out
}
header.bar-primary .container-bar-right .labelbar:hover::before,
header.bar-primary .container-bar-left .labelbar:hover::before {
color: #d0d7de;
}
header.bar-primary .container-bar-left .pdboy-closebar:before {
color: #d0d7de
}
header.bar-primary .container-bar-right .pdboy-openbar:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gohome:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gossr:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gonet:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gouser:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-gocontrol:before {
color: #d0d7de
}
header.bar-primary .container-bar-left .pdboy-goadvanced:before {
color: #d0d7de
}
#detail-bubble>div {
border: 1px solid rgba(255,255,255,0.3);
border-radius: 3px;
padding: 1px;
background-color: rgba(var(--primary-rgbbody), 1)!important;
}
#detail-bubble .head .dismiss {
color: #8391a2;
}
#bubble-arrow {
border: 1px solid rgba(255,255,255,0.3);
background-color: rgba(var(--primary-rgbbody), 1);
}
header.bg-primary {
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.35);
}
.uci_change_indicator.label.notice,
.pd-primary .fill .container .flex1 .showSide,
.pd-primary .fill .container .flex1 .brand,
.showWord::after,
.showWord::before ,
header>.fill>.container>.showWord ,
.showWord {
color: #e9eff3
}
header>.fill>.container>.brand {
font-family: "Microsoft Yahei", "Google Sans", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB";
color: #e9eff3;
}
.pull-right a,
.pull-right span a {
color: #bbb;
}
.pull-right a:hover,
.pull-right span a:hover {
background-color: rgba(255, 255, 255, 0.2);
color: #f8f8f8;
}
.pdboy-status_on::before {
color: #e9eff3
}
.showSide {
color: #e9eff3;
}
.notice {
color: #bbb
}
.label {
color: #bbb;
}
footer {
color: #bbb;
}
footer a {
color: #bbb;
}
.main .main-left {
-webkit-box-shadow: rgb(250 250 250 / 75%) 0 0 15px -5px;
box-shadow: 2px 2px 8px #666,-2px -2px 8px #bbb;
}
.main .main-left::-webkit-scrollbar-thumb {
height: 8px;
background: #555;
border-radius: 5px
}
.main .main-left::-webkit-scrollbar-thumb:hover,
.main .main-left::-webkit-scrollbar-thumb:active {
background: #bbb;
border: none
}
.main .main-left .nav li.slide .menu {
color: #bbb
}
.main .main-left .nav .slide .menu:after,
.main .main-left .nav li.slide .menu::after {
color: #bbb;
}
.main .main-left .nav li.slide .menu:hover a::after,
.main .main-left .nav li.slide .menu.active a::after {
color: #bbb;
}
.main>.main-left>.nav>.slide>.menu.active::before,
.main .main-left .nav li.slide .menu:hover::after,
.main .main-left .nav li.slide .menu.active::after {
color: #e9eff3
}
.main .main-left .nav>li>a:hover,
.main .main-left .nav>li>a.active,
.main .main-left .nav li.slide .menu:hover,
.main .main-left .nav li.slide .menu.active {
background-color: rgba(255, 255, 255, 0.2);
color: #e9eff3 !important;
}
.main .main-left .nav li.slide .menu:hover a,
.main .main-left .nav li.slide .menu.active a {
color: #e9eff3
}
.main .main-left .nav li.slide .menu:hover::before,
.main .main-left .nav li.slide .menu.active::before {
color: #e9eff3
}
.main .main-left .nav li.slide .slide-menu li a {
color: #bbb;
}
.main .main-left .nav .slide .slide-menu .active a {
color: #e9eff3;
}
.main .main-left .nav .slide .slide-menu > li.active {
color: #e9eff3;
background-color: rgba(255, 255, 255, 0.2);
border-left: 4px solid #fd8c73
}
.main .main-left .nav .slide .slide-menu li:hover {
background-color: rgba(255, 255, 255, 0.2);
}
.main .main-left .nav .slide .slide-menu li:active a {
color: #e9eff3
}
.main .main-left .nav .slide .slide-menu li:hover a {
color: #e9eff3;
}
.main .main-left .sidenav-header .brand {
font-family: "Microsoft Yahei",-apple-system, "WenQuanYi Micro Hei", "sans-serif";
color: #ccc;
}
.main .main-right #maincontent .container>div:nth-child(1).alert-message.warning>a {
color: #ccc;
}
.main .main-left .nav>li>a:first-child,
.main .main-left .nav li.slide .menu::before,
.main .main-left .nav>li>a:first-child::before,
.main .main-left .nav .slide .menu::before {
color: #bbb
}
select,
input {
font-family: "Microsoft Yahei", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB";
}
input[type="checkbox"] {
background: rgba(255,255,255,0.1);
}
input:checked[type="checkbox"]:before {
transform: rotate(45deg);
width: 12px;
margin-left: 5px;
border-color: #f5f5f5;
border-width: 3px;
border-top-color: transparent;
border-left-color: transparent;
border-radius: 0
}
.cbi-input-radio:checked {
background-image: url('data:image/svg+xml,%3csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'-4 -4 8 8\'%3e%3ccircle r=\'3\' fill=\'%23fff\'/%3e%3c/svg%3e') !important;
background-color: rgba(255,255,255,0.7) !important;
background-size: 70%;
background-repeat: no-repeat;
background-position: center
}
select:not([multiple="multiple"]):focus, input:not(.cbi-button):focus, .cbi-dropdown:focus {
background-color: rgba(255,255,255,0.18);
box-shadow: 0 0.5rem 1rem rgba(255,255,255, 0.35);
-webkit-box-shadow: 0 0 6px rgba(255,255,255, 0.35);
-moz-box-shadow: 0 0 6px rgba(255,255,255, 0.35);
}
.btn, button, select, input, .cbi-dropdown,.item::after {
color: #d0d7de;
border: 1px solid rgba(255,255,255,0.12)!important;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.12)!important;
}
.btn, .cbi-button, .item::after {
color: #eee;
}
.cbi-input-textarea,
textarea {
color: #8391a2;
background-color: rgba(255,255,255,0.1);
border: 1px solid rgba(255,255,255,0.12)!important;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.12)!important;
}
#diag-rc-output>pre {
color: #bbb
}
#swaptotal>div>div>div>small,
#swapfree>div>div>div>small,
#memfree>div>div>div>small,
#membuff>div>div>div>small,
#conns>div>div>div>small,
#memtotal>div>div>div>small {
color: #ccc !important;
}
.node-main-login .main .main-right #maincontent .alert-message p {
color: #eee;
font-weight: normal;
}
.node-main-login .errorbox {
color: #eee !important;
}
.table {
color: #8391a2;
}
.table-titles .th {
color: #8391a2
}
button:hover,
.btn:hover,
.cbi-button:hover,
.item:hover::after {
transform: scale(1.05) translate(0, -0.15rem);
box-shadow: 0 0.5rem 1rem rgba(255,255,255, 0.35);
-webkit-box-shadow: 0 0 6px rgba(255,255,255, 0.35);
-moz-box-shadow: 0 0 6px rgba(255,255,255, 0.35);
}
.btn:active ,
.cbi-button:active ,
button:active,
.item:hover::after {
transform: scale(1) translate(0, 0.15rem);
box-shadow: 0 0.5rem 1rem rgba(255,255,255, 0.15);
-webkit-box-shadow: 0 0 6px rgba(255,255,255, 0.15);
-moz-box-shadow: 0 0 6px rgba(255,255,255, 0.15);
}
fieldset[id^="cbi-apply-"] {
box-shadow: 0 2px 2px 0 rgba(255, 255, 255, 0.14), 0 3px 1px -2px rgba(255, 255, 255, 0.32), 0 1px 5px 0 rgba(255, 255, 255, 0.2);
}
.cbi-section>h3:first-child,
.panel-title {
color: #bbb
}
table>tbody>tr>td,
table>tbody>tr>th,
table>tfoot>tr>td,
table>tfoot>tr>th,
table>thead>tr>td,
table>thead>tr>th,
.table>.tbody>.tr>.td,
.table>.tbody>.tr>.th,
.table>.tfoot>.tr>.td,
.table>.tfoot>.tr>.th,
.table>.thead>.tr>.td,
.table>.thead>.tr>.th {
color: #8391a2
}
.cbi-tabcontainer>.cbi-value:nth-of-type(4n+2):hover,.cbi-map>.cbi-section .cbi-value:nth-of-type(4n+2):hover,fieldset>table>tbody>tr:nth-of-type(4n+2):hover,table>tbody>tr:nth-of-type(4n+2):hover,div>.table>.tr:nth-of-type(4n+2):hover {
background-color: rgba(250,250,250,0.05);
}
.cbi-tabcontainer>.cbi-value:nth-of-type(2n+1):hover,.cbi-map>.cbi-section .cbi-value:nth-of-type(2n+1):hover,fieldset>table>tbody>tr:nth-of-type(2n+1):hover,table>tbody>tr:nth-of-type(2n+1):hover,div>.table>.tr:nth-of-type(2n+1):hover {
background-color: rgba(250,250,250,0.05);
}
.cbi-tabcontainer>.cbi-value:nth-of-type(4n):hover,.cbi-map>.cbi-section .cbi-value:nth-of-type(4n):hover,fieldset>table>tbody>tr:nth-of-type(4n):hover,table>tbody>tr:nth-of-type(4n):hover,div>.table>.tr:nth-of-type(4n):hover {
background-color: rgba(250,250,250,0.05);
}
.cbi-rowstyle-2 .cbi-button-up, .cbi-rowstyle-2 .cbi-button-down, body:not(.Interfaces) .cbi-rowstyle-2:first-child {
background-color: rgba(0,0,0,0, 0.2) !important;
}
.cbi-rowstyle-1 .cbi-button-up, .cbi-rowstyle-1 .cbi-button-down, body:not(.Interfaces) .cbi-rowstyle-1:first-child {
background-color: rgba(0,0,0,0, 0.1) !important;
}
.status-bar {
font-size: var(--font-x);
color: #8391a2 !important;
background-color: rgba(var(--primary-rgbbody), 0.9)
}
.success {
color: #ddd;
}
.danger {
color: #ddd;
}
.errorbox {
color: #ccc;
}
h2 {
color: #bbb
}
h3 {
color: #bbb;
}
.panel-title {
color: #bbb;
}
.tabs {
margin: 1rem;
color: #b4c9e3;
}
.tabs::-webkit-scrollbar-thumb {
background-color: #555
}
.tabs::-webkit-scrollbar-track {
background: transparent
}
.tabs>li {
background: #343a40;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
}
.tabs li[class~="active"] {
border-right: 0.18751rem solid #fd8c73;
border-left: 0.18751rem solid #fd8c73;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
background-color: rgba(255, 255, 255, 0.2);
}
.tabs li[class~="hover"] {
background-color: rgba(255, 255, 255, 0.2);
}
.tabs li:hover {
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.35);
background-color: rgba(255, 255, 255, 0.2);
}
.tabs li[class~="active"] a {
color: #bbb
}
.tabs li:hover a {
color: #bbb
}
.tabs li a {
color: #8391a2
}
.cbi-tabmenu {
color: #8391a2;
}
.cbi-tabmenu::-webkit-scrollbar {
width: 5px;
height: 5px;
}
.cbi-tabmenu::-webkit-scrollbar-thumb {
background-color: #555;
}
.cbi-tabmenu li {
background: #343a40;
font-size: 1rem;
border-radius: 0.25rem;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
}
.cbi-tabmenu li a {
color: ##8391a2;
}
.cbi-tabmenu li:hover {
color: #bbb;
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.35);
background-color: rgba(255, 255, 255, 0.2);
}
.cbi-tabmenu li:hover a {
color: #bbb
}
.cbi-tabmenu li[class~="cbi-tab"] {
border-right: 0.18751rem solid #fd8c73;
border-left: 0.18751rem solid #fd8c73;
transform: scale(1) translate(0, 0.15rem);
box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
background-color: rgba(255, 255, 255, 0.2);
}
.cbi-tabmenu li[class~="cbi-tab"] a {
color: #bbb
}
.cbi-tab-descr {
color: #8391a2;
}
.cbi-dropdown>.open {
background: #333
}
.cbi-dropdown>.more,
.cbi-dropdown>ul>li[placeholder] {
text-shadow: 1px 1px 0 #ccc;
}
.cbi-dropdown[open]>ul.dropdown {
background: #ccc;
}
.cbi-dropdown[open]>ul.dropdown>li[selected] {
background-color: #8391a2;
color: #fff;
}
.cbi-progressbar {
color: #8391a2;
}
.cbi-value-title {
color: #8391a2;
}
.cbi-section-descr {
color: #8391a2
}
.cbi-map-descr {
color: #8391a2;
}
#content_syslog{
box-shadow: 0 0 1px rgba(255, 255, 255, 0.12);
}
#syslog {
color: #8391a2;
font-family: "Microsoft Yahei",-apple-system, "WenQuanYi Micro Hei", "sans-serif";
background-color: rgba(0,0,0,0.1);
}
.request>.requestBody,
.response .markdown-body,
.markdown-body {
color: #8391a2!important;
background-color: rgba(255,255,255,0)!important;
}
.bottom_wrapper .message_input_wrapper .message_input_text{
background-color: rgba(255,255,255,0.35)!important;
color: #d0d7de!important;
}
#chatlog .response .markdown-body>pre {
background-color: rgba(0,0,0,0.15)!important;
}
#chatlog .response {
background-color: rgba(255,255,255,0.03)!important;
}
.ifacebox-head {
color: #8391a2
}
.zonebadge {
color: #8391a2;
}
.zonebadge strong {
color: #8391a2
}
.Reboot>.main>.main-right #maincontent .container p {
color: #8391a2;
}
.node-services-vssr .block h4 {
color: #8391a2
}
.node-services-vssr .status-bar {
color: #8391a2;
box-shadow: 0 0 .5rem 0 rgba(0, 0, 0, 0.35);
background-color: rgba(0, 0, 0, 0.1) !important;
}
.node-services-vssr .block,
.node-services-shadowsocksr>.block,
.node-services-ssrpro>.block,
.block,
.node-services-bypass>.main .block,
.node-services-vssr>.main .block,
.main .block {
color: #8391a2;
background-color: rgba(255, 255, 255, 0.08) !important;
}
.node-services-shadowsocksr>.block:active,
.node-services-ssrpro>.block:active,
.block:active,
.node-services-bypass>.main .block:active,
.main .block:active,
.node-services-shadowsocksr>.block:hover,
.node-services-ssrpro>.block:hover,
.block:hover,
.node-services-bypass>.main .block:hover,
.main .block:hover {
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 6px rgba(0, 0, 0, 0.35);
background-color: rgba(250, 250, 250, 0.1)
}
/* log */
#cbi-openclash .CodeMirror.cm-s-idea.CodeMirror-wrap {
background: rgba(0,0,0,0.1)!important;
color: #adbcc9!important;
}
/* set modi file */
#cbi-openclash .cm-s-material.CodeMirror
{
background-color: #1b4c53!important;
color: #31b9c1!important;
}
/* card */
#cbi-openclash .card
{
background: linear-gradient(#337ab7, #a8bfcf)!important;
box-shadow: 0 8px 16px -8px rgba(255,255,255,0.5)!important;
}
.node-services-adguardhome>.main .cbi-value .cbi-input-textarea {
box-shadow: 0 0 1px rgba(255, 255, 255, 0.3)!important;
}
.Software >.main table tr td:nth-last-child(1) ,
.node-system-packages>.main table tr td:nth-last-child(1) {
color: #8391a2
}
.node-system-packages>.main .cbi-value>pre {
background-color: rgba(0, 0, 0, 0.22) ;
}
.Software >.main .cbi-section-node:first-child .cbi-value-last>div,
.node-system-packages>.main .cbi-section-node:first-child .cbi-value-last>div {
border-color: rgba(255, 255, 255, 0.3) !important;
background-color: rgba(255, 255, 255,0.22) !important;
}
.node-system-packages>.main .cbi-section-node:first-child .cbi-value-last>div>div {
background-color: rgba(var(--primary-rgbm), 1)!important;
}
.cbi-section {
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.08);
}
.cbi-section em {
color: #8391a2;
}
.node-status-realtime table>tbody>tr>td,
.node-status-realtime table>tfoot>tr>td,
.node-status-realtime table>thead>tr>td {
color: #8391a2;
border-bottom: 1px solid rgba(255,255,255,0.3);
}
.cbi-dynlist > .item > span
{
color: #aaa;
}
.cbi-dropdown[open]>ul.dropdown {
background-color: rgba(var(--primary-rgbbody), 1);
}
.ifacebox {
color: #bbb;
}
.ifacebadge {
background-color: #797d7f;
color: #bbb;
}
.cbi-dropdown > .open,
.cbi-dropdown > .more {
background-color: rgba(255,255,255,0)!important;
}
@media screen and (max-width:992px) {
.main .main-left {
-webkit-box-shadow: rgba(250 250 250, 0.75) 0 0 20px -5px;
box-shadow: rgba(250 250 250, 0.75) 0 0 20px -5px;
}
.showSide:hover {
background-color: rgba(255, 255, 255, 0.2);
}
table>tbody>tr>td,
table>tfoot>tr>td,
table>thead>tr>td {
color: #8391a2;
}
}

View File

@ -1,253 +0,0 @@
/**
* kucat is a clean HTML5 theme for LuCI. It is based on luci-theme-material
*
* luci-theme-material
* Copyright 2015 Lutty Yang <lutty@wcan.in>
*
* Copyright 2019-2023 sirpdboy <sirpdboy@qq.com>
*
* Licensed to the public under the Apache License 2.0
*/
@font-face {
font-family: 'kucat';
src: url('../fonts/kucat.eot?9qz8zf');
src: url('../fonts/kucat.eot?9qz8zf#iefix') format('embedded-opentype'),
url('../fonts/kucat.ttf?9qz8zf') format('truetype'),
url('../fonts/kucat.woff?9qz8zf') format('woff'),
url('../fonts/kucat.svg?9qz8zf#kucat') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'kucat' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-brightness_low:before {
content: "\e926";
}
.icon-brightness_4:before {
content: "\e92e";
}
.icon-sync_disabled:before {
content: "\e932";
}
.icon-sync_problem:before {
content: "\e933";
}
.icon-power_settings_new:before {
content: "\e934";
}
.icon-logout:before {
content: "\e935";
}
.icon-menu_open:before {
content: "\e92f";
}
.icon-menu_open1:before {
content: "\e930";
}
.icon-published_with_changes:before {
content: "\e936";
}
.icon-update_disabled:before {
content: "\e937";
}
.icon-arrow-left:before {
content: "\e938";
}
.icon-arrow-right:before {
content: "\e939";
}
.icon-chevrons-right:before {
content: "\e931";
}
.icon-download:before {
content: "\e904";
}
.icon-eye:before {
content: "\e92b";
}
.icon-eye-off:before {
content: "\e92c";
}
.icon-fast-forward:before {
content: "\e93a";
}
.icon-gitlab:before {
content: "\e93d";
}
.icon-heart:before {
content: "\e927";
}
.icon-key:before {
content: "\e93b";
}
.icon-message-square:before {
content: "\e91f";
}
.icon-more-horizontal:before {
content: "\e928";
}
.icon-navigation-2:before {
content: "\e93e";
}
.icon-rewind:before {
content: "\e921";
}
.icon-save:before {
content: "\e923";
}
.icon-slash:before {
content: "\e92d";
}
.icon-thumbs-up:before {
content: "\e924";
}
.icon-twitch:before {
content: "\e925";
}
.icon-unlock:before {
content: "\e93c";
}
.icon-upload-cloud:before {
content: "\e929";
}
.icon-user-plus:before {
content: "\e92a";
}
.icon-airplay:before {
content: "\e900";
}
.icon-align-justify:before {
content: "\e922";
}
.icon-archive:before {
content: "\e901";
}
.icon-box:before {
content: "\e902";
}
.icon-chevron-down:before {
content: "\e20b";
}
.icon-chevron-right:before {
content: "\e920";
}
.icon-chevron-up:before {
content: "\e20a";
}
.icon-chevrons-left:before {
content: "\e903";
}
.icon-clock:before {
content: "\e905";
}
.icon-codesandbox:before {
content: "\e906";
}
.icon-database:before {
content: "\e907";
}
.icon-download-cloud:before {
content: "\e908";
}
.icon-gift:before {
content: "\e909";
}
.icon-globe:before {
content: "\e90a";
}
.icon-grid:before {
content: "\e90b";
}
.icon-help-circle:before {
content: "\f059";
}
.icon-home:before {
content: "\e90c";
}
.icon-layers:before {
content: "\e90d";
}
.icon-lock:before {
content: "\e90e";
}
.icon-log-out:before {
content: "\e90f";
}
.icon-menu:before {
content: "\e20e";
}
.icon-minus-circle:before {
content: "\e910";
}
.icon-monitor:before {
content: "\e911";
}
.icon-moon:before {
content: "\e912";
}
.icon-pie-chart:before {
content: "\e913";
}
.icon-plus-circle:before {
content: "\e914";
}
.icon-power:before {
content: "\e915";
}
.icon-refresh-cw:before {
content: "\e916";
}
.icon-send:before {
content: "\e917";
}
.icon-server:before {
content: "\e918";
}
.icon-settings:before {
content: "\e919";
}
.icon-sliders:before {
content: "\e91a";
}
.icon-sun:before {
content: "\e91b";
}
.icon-tool:before {
content: "\e91c";
}
.icon-user:before {
content: "\e91d";
}
.icon-wifi:before {
content: "\e91e";
}
.icon-spinner3:before {
content: "\e602";
}
.icon-spinner6:before {
content: "\e603";
}
.icon-github:before {
content: "\eab0";
}
.icon-appleinc:before {
content: "\eabe";
}
.icon-eye1:before {
content: "\e9ce";
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1 +0,0 @@
https://www.github.com/sirpdboy/openwrt

View File

@ -1 +0,0 @@
做事先做人,尊重他人劳动成果,是为人的基本准则!

View File

@ -1,7 +0,0 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="768" height="768" viewBox="0 0 768 768">
<title></title>
<g id="icomoon-ignore">
</g>
<path d="M154.573 302.973c22.405-63.323 68.309-111.537 124.518-138.38s122.572-32.193 185.864-9.789c36.054 12.768 67.062 33.075 90.683 57.151l86.032 80.863h-105.67c-16.78 0-30.4 13.619-30.4 30.4s13.619 30.4 30.4 30.4h182.308c0.152 0 0.274 0 0.425 0 4.165-0.031 8.147-0.943 11.734-2.493 3.617-1.55 6.962-3.83 9.85-6.84 0.364-0.395 0.73-0.79 1.094-1.186 2.28-2.645 4.043-5.564 5.259-8.664s1.946-6.415 2.098-9.91c0.031-0.456 0.031-0.881 0.031-1.307v-182.399c0-16.781-13.619-30.4-30.4-30.4s-30.4 13.619-30.4 30.4v112.145l-88.95-83.569c-30.156-30.704-69.038-56.027-113.786-71.865-79.13-27.998-162.183-21.25-232.345 12.221s-127.649 93.814-155.647 172.945c-5.624 15.808 2.675 33.166 18.483 38.79s33.196-2.675 38.79-18.514zM80.001 515.102l89.831 84.42c58.641 58.702 136.495 88.403 214.258 88.433s155.617-29.64 214.987-88.98c33.561-33.561 57.79-73.172 71.774-113.848 5.472-15.868-2.979-33.166-18.878-38.638s-33.166 2.979-38.638 18.878c-10.975 31.92-30.187 63.566-57.242 90.622-47.515 47.484-109.713 71.196-171.971 71.196s-124.457-23.773-172.64-71.926l-85.12-80.042h105.64c16.781 0 30.4-13.619 30.4-30.4s-13.619-30.4-30.4-30.4h-182.308c-0.151 0-0.274 0-0.425 0-4.165 0.031-8.147 0.943-11.734 2.493-3.617 1.55-6.961 3.83-9.85 6.84-0.364 0.395-0.73 0.791-1.094 1.186-2.28 2.644-4.043 5.563-5.259 8.664s-1.945 6.415-2.098 9.91c-0.031 0.456-0.031 0.881-0.031 1.307v182.399c0 16.78 13.619 30.4 30.4 30.4s30.4-13.619 30.4-30.4z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#888" d="M8,0c-4.355,0-7.898,3.481-7.998,7.812,0.092-3.779,2.966-6.812,6.498-6.812,3.59,0,6.5,3.134,6.5,7,0,0.828,0.672,1.5,1.5,1.5s1.5-0.672,1.5-1.5c0-4.418-3.582-8-8-8zM8,16c4.355,0,7.898-3.481,7.998-7.812-0.092,3.779-2.966,6.812-6.498,6.812-3.59,0-6.5-3.134-6.5-7,0-0.828-0.672-1.5-1.5-1.5s-1.5,0.672-1.5,1.5c0,4.418,3.582,8,8,8z"/></svg>

Before

Width:  |  Height:  |  Size: 413 B

View File

@ -1,33 +0,0 @@
// const isDark = localStorage.getItem("isDark");
// if (isDark == 1) {
// const element = document.querySelector("body");
// element.classList.add("dark");
// }
// const themetoggler = document.querySelector(".themetoggler");
// themetoggler.addEventListener(
// "click",
// function (e) {
// e.preventDefault();
// const element = document.querySelector("body");
// element.classList.toggle("dark");
// const isDark = localStorage.getItem("isDark");
// localStorage.setItem("isDark", isDark == 1 ? 0 : 1);
// },
// false
// );
function pdopenbar() {
document.getElementById("header-bar-left").style.width = "300px";
document.getElementById("header-bar-left").style.display = "block";
document.getElementById("header-bar-right").style.width = "0";
document.getElementById("header-bar-right").style.display = "none"
}
function pdclosebar() {
document.getElementById("header-bar-left").style.display = "none";
document.getElementById("header-bar-left").style.width = "0";
document.getElementById("header-bar-right").style.display = "block";
document.getElementById("header-bar-right").style.width = "50px"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -1,47 +0,0 @@
{
"name":"Kucat",
"short_name":"Kucat",
"description":"Kucat for OpenWRT by sirpdboy.",
"start_url":"/",
"scope": "/",
"orientation":"portrait",
"prompt_message":"fast read Kucat",
"icons":[
{
"src":"img/logo16.png",
"sizes":"16x16",
"type":"image/png"
},
{
"src":"img/logo32.png",
"sizes":"32x32",
"type":"image/png"
},
{
"src":"img/logo48.png",
"sizes":"48x48",
"type":"image/png"
},
{
"src":"img/logo64.png",
"sizes":"64x64",
"type":"image/png"
},
{
"src":"img/logo96.png",
"sizes":"96x96",
"type":"image/png"
},
{
"src":"img/applelogo144.png",
"sizes":"144x144",
"type":"image/png"
},
{
"src":"logo.png",
"sizes":"192x192",
"type":"image/png"
}
],
"display":"standalone"
}

View File

@ -1,25 +0,0 @@
<%#
Copyright 2019-2023 sirpdboy <herboy2008@gmail.com>
luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in>
Licensed to the public under the Apache License 2.0
-%>
<% local ver = require "luci.version" %>
</div>
<footer class="mobile-hide">
<a class="luci-link" href="https://github.com/openwrt/luci" target="_blank">Powered by <%= ver.luciname %>
(<%= ver.luciversion %>)</a> /
<a href="https://github.com/sirpdboy/kucat" target="_blank">KuCatTheme <%# vPKG_VERSION %></a> /
<%= ver.distversion %>
</footer>
</div>
</div>
<script type="text/javascript">L.require('menu-kucat')</script>
</body>
</html>

View File

@ -1,412 +0,0 @@
<%#
Copyright 2019-2023 sirpdboy <herboy2008@gmail.com>
luci-theme-material:
Copyright 2015 Lutty Yang <lutty@wcan.in>
luci-theme-bootstrap:
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 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 json = require "luci.jsonc"
local fs = require "nixio.fs"
local nutil = require "nixio.util"
local uci = require 'luci.model.uci'.cursor()
local urlencode = luci.http.protocol and luci.http.protocol.urlencode or luci.util.urlencode
local boardinfo = util.ubus("system", "board") or { }
local node = disp.context.dispatched
local path = table.concat(disp.context.path, "-")
function glob(...)
local iter, code, msg = fs.glob(...)
if iter then
return nutil.consume(iter)
else
return nil, code, msg
end
end
function getExtension(str)
return str:match(".+%.(%w+)$")
end
http.prepare_content("text/html; charset=UTF-8")
local theme_dir = resource .. "/background/"
if not fs.access("/www" .. resource .. "/background/") then
local theme_dir = media .. "/background/"
end
local bingUrl = "http://www.bing.com/"
local dark_css = fs.readfile('/www/luci-static/kucat/css/dark.css')
local bg_url = media.."/img/bg1.jpg"
local bg_lock = bg_url
local bar="/cgi-bin/luci/admin/"
local mode = 'light'
local home = "overview"
local user = "admin"
local setbar = "1"
local bgqs = '1'
local showword = sys.exec("cat /www/luci-static/kucat/img/logoword")
local showurl = sys.exec("cat /www/luci-static/kucat/img/logourl")
local ssr = ""
local gohome = bar .. "status/" ..home
local gouser = bar .. "system/" ..user
local gossr = bar .. "services/" ..ssr
local background = '0'
local fontd = '1.2rem'
local fontz = '0.92rem'
local fontx = '0.875rem'
local primary_rgbbody = '248,248,248'
local primary_rgbm = '45,102,147'
local primary_rgbm_ts = '0.8'
local primary_rgbs = '132,188,218'
local primary_rgbs_ts = '0.1'
local primary_opacity = '0'
local bkuse = '0'
local bk_use='none'
local bklock = '1'
local dayword = '0'
local checknet = '0'
if fs.access('/etc/config/advancedplus') then
primary_rgbbody = uci:get_first('advancedplus', 'basic', 'primary_rgbbody')
primary_rgbm = uci:get_first('advancedplus', 'basic', 'primary_rgbm')
primary_rgbm_ts = uci:get_first('advancedplus', 'basic', 'primary_rgbm_ts')
primary_opacity = uci:get_first('advancedplus', 'basic', 'primary_opacity')
primary_rgbs = uci:get_first('advancedplus', 'basic', 'primary_rgbs')
primary_rgbs_ts = uci:get_first('advancedplus', 'basic', 'primary_rgbs_ts')
mode = uci:get_first('advancedplus', 'basic', 'mode')
setbar = uci:get_first('advancedplus', 'basic', 'setbar')
home = uci:get_first('advancedplus', 'basic', 'gohome')
user = uci:get_first('advancedplus', 'basic', 'gouser')
ssr = uci:get_first('advancedplus', 'basic', 'gossr')
gohome = bar .. "status/" .. home
gouser = bar .. "system/" .. user
gossr = bar .. "services/" .. ssr
background = uci:get_first('advancedplus', 'basic', 'background')
bkuse = uci:get_first('advancedplus', 'basic', 'bkuse')
bklock = uci:get_first('advancedplus', 'basic', 'bklock')
fontd = uci:get_first('advancedplus', 'basic', 'font_d')
fontz = uci:get_first('advancedplus', 'basic', 'font_z')
fontx = uci:get_first('advancedplus', 'basic', 'font_x')
bgqs = uci:get_first('advancedplus', 'basic', 'bgqs')
dayword = uci:get_first('advancedplus', 'basic', 'dayword')
end
local primary_ufilter = "saturate(150%) contrast(50%) blur(" .. primary_opacity .. "px)"
if primary_opacity == '0' then
primary_ufilter = 'none'
end
local bgqs_image = '-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent)'
local bgqs_color = 'rgba(var(--primary-rgbm),var(--primary-rgbm-ts))'
if bgqs == '1' then
bgqs_image = 'none'
end
function downunsplashUrl()
local check = 1
if fs.access('/tmp/kucatunsplash.tmp') then
local localtime = sys.exec("a=$(date +%Y%m%d) && cat /tmp/kucatunsplash.tmp | grep $a")
if localtime ~= '' then
check = 0
end
end
if check == 1 or not fs.access('/www/luci-static/kucat/img/down2.jpg') then
io.popen("(curl -k -L \"$(curl -s https://instant.unsplash.com | grep -oE '\"raw\":\".*?\",\"full\"'| grep -o 'https://.*,' | sed 's/\",//g' | awk -F '\"raw\"' '{printf $(NF)}' | sed 's/:\"//g')\&q=80\&w=1680\" -o /www/luci-static/kucat/img/down2.jpg >/dev/null 2>&1) &")
sys.exec("date +%Y%m%d > /tmp/kucatunsplash.tmp")
end
if fs.access('/www/luci-static/kucat/img/down2.jpg') then
bg_url = media .. "/img/down2.jpg"
end
end
function downbingUrl()
local check = 1
if fs.access('/tmp/kucatbing.tmp') then
local localtime = sys.exec("cat /tmp/kucatbing.tmp | grep `date +%Y%m%d`")
if localtime ~= '' then
check = 0
end
end
if check == 1 or not fs.access('/www/luci-static/kucat/img/down3.jpg') then
local dbing = sys.exec("curl -s 'http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=3&mkt=en-US'" )
if (dbing and dbing ~= '') then
bUrl = bingUrl .. json.parse(dbing).images[1].url
end
sys.exec("curl -kLfsm 5 -o /www/luci-static/kucat/img/down3.jpg '%s'" %bUrl)
sys.exec("date +%Y%m%d > /tmp/kucatbing.tmp")
end
if fs.access('/www/luci-static/kucat/img/down3.jpg') then
bg_url = media .. "/img/down3.jpg"
end
end
function downIcibaword()
local check = 1
if fs.access('/tmp/kucaticibaword.tmp') then
local localtime = sys.exec("cat /tmp/kucaticibaword.tmp | grep `date +%Y%m%d`")
if localtime ~= '' then
check = 0
end
end
if check == 1 or not fs.access('/tmp/showword.tmp') then
local localword = sys.exec("a=`curl -kLfsm 5 https://v1.hitokoto.cn | awk -F 'hitokoto\":\"' '{print $2}'| awk -F '\"' '{print $1}' ` && printf $a ")
if localword ~= '' then
sys.exec("a=`curl -kLfsm 5 https://v1.hitokoto.cn | awk -F 'hitokoto\":\"' '{print $2}'| awk -F '\"' '{print $1}' ` && echo -e $a >/tmp/showword.tmp")
sys.exec("date +%Y%m%d > /tmp/kucaticibaword.tmp")
end
end
if fs.access('/tmp/showword.tmp') then
localword = sys.exec("a=`cat /tmp/showword.tmp` && printf $a ")
if localword ~= '' then
showword = localword
end
end
end
function downbirdUrl()
local check = 1
if fs.access('/tmp/kucatbird.tmp') then
local localtime = sys.exec("cat /tmp/kucatbird.tmp | grep `date +%Y%m%d` ")
if localtime ~= '' then
check = 0
end
end
if check == 1 or not fs.access('/www/luci-static/kucat/img/down5.jpg') then
math.randomseed(tostring(os.time()):reverse():sub(1,9))
local j = math.random(1, 9)
local i = math.random(1, 400)
local bUrl = "http://wp.birdpaper.com.cn/intf/search?content=4k&pageno=" .. i .. "&count=9"
bUrl = sys.exec("curl -s '%s' | awk -F '\"count\":9' '{print $2}' | awk -F ',\"processTime\"' '{print $1}' | sed 's#,#{#' " %bUrl)
if (bUrl and bUrl ~= '') then
bUrl = "" .. json.parse(bUrl).list[j].url
end
io.popen("curl -kLfsm 3 -o /www/luci-static/kucat/img/down5.jpg '%s'" %bUrl )
sys.exec("date +%Y%m%d > /tmp/kucatbird.tmp")
end
if fs.access('/www/luci-static/kucat/img/down5.jpg') then
bg_url = media .. "/img/down5.jpg"
end
end
checknet = sys.exec("curl -so /dev/null --connect-timeout 2 https://www.taobao.com && echo -ne 1 || echo -ne 0 ")
if ( background == "0" ) then
math.randomseed(os.time())
local bgcount = 0
local currentBg = {}
local bgs,attr = {}
for i, f in ipairs(glob("/www" .. theme_dir .. "*")) do
attr = fs.stat(f)
if attr then
local ext = getExtension(fs.basename(f))
if ext == "jpg" or ext == "png" or ext == "gif" then
local bg = {}
bg.type = ext
bg.url = theme_dir .. fs.basename(f)
table.insert(bgs,bg)
bgcount = bgcount + 1
end
end
end
if bgcount > 0 then
currentBg = bgs[math.random(1,bgcount)]
bg_url = currentBg.url
end
elseif ( background == "2" and checknet == "1" ) then
pcall(downunsplashUrl)
elseif background == "3" and checknet == "1" then
pcall(downbingUrl)
elseif background == "4" and checknet == "1" then
pcall(downbirdUrl)
end
if bklock == '1' then
bg_lock = bg_url
else
math.randomseed(os.time())
local bk_dir = media .. "/bg/"
local bkcount = 0
local currentbk = {}
local bgs,attr = {}
for i, f in ipairs(glob("/www" .. bk_dir .. "*")) do
attr = fs.stat(f)
if attr then
local ext = getExtension(fs.basename(f))
if ext == "jpg" or ext == "png" or ext == "gif" then
local bg = {}
bg.type = ext
bg.url = bk_dir .. fs.basename(f)
table.insert(bgs,bg)
bkcount = bkcount + 1
end
end
end
if bkcount > 0 then
currentbk = bgs[math.random(1,bkcount)]
bg_lock = currentbk.url
end
end
if dayword == '1' and checknet == "1" then
pcall(downIcibaword)
end
if bkuse == '1' then
bk_use="url("..bg_lock..")"
end
%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,viewport-fit=cover" />
<link rel="manifest" href="<%=media%>/manifest.json">
<title> <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
<meta name="format-detection" content="telephone=no, email=no" />
<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="msapplication-tap-highlight" content="no">
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="black">
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "OpenWrt") ) %> - LuCI">
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "OpenWrt") ) %> - LuCI">
<meta name="msapplication-TileImage" content="<%=media%>/logo.png"/>
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/logo.png">
<meta name="msapplication-TileColor" content="<%=bar_color%>">
<meta name="theme-color" content="<%=bar_color%>">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes" />
<link rel="apple-touch-icon" sizes="180x180" href="<%=media%>/img/apple-touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="<%=media%>/img/applelogo144.png" sizes="144x144">
<link rel="stylesheet" href="<%=media%>/css/style.css?v=<%= ver.luciversion %>">
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
<style title="text/css">
<% if mode == 'dark' then %>
<%=dark_css%>
<% end -%>
:root {
--primary-rgbbody:<%=primary_rgbbody%>;
--primary-rgbm: <%=primary_rgbm%>;
--primary-rgbm-ts: <%=primary_rgbm_ts%>;
--primary-rgbs: <%=primary_rgbs%>;
--primary-rgbs-ts: <%=primary_rgbs_ts%>;
--primary-ufilter: <%=primary_ufilter%>;
--font-d: <%=fontd%>;
--font-z: <%=fontz%>;
--font-x: <%=fontx%>;
--theme-background: <%=bk_use%>;
--bgqs-image: <%=bgqs_image%>;
--bgqs-color: <%=bgqs_color%>;
}
<% if setbar == "1" then %>
header.bar-primary .container-bar-left {
width: 300px;
display: block;
}
header.bar-primary .container-bar-right {
width: 0;
display: none;
}
<% else %>
header.bar-primary .container-bar-left {
width: 0;
display: none;
}
header.bar-primary .container-bar-right {
width: 50px;
display: block;
}
<% end -%>
</style>
<% if node and node.css then %>
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
<% end -%>
<script src="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
<script src="<%=resource%>/cbi.js"></script>
<script src="<%=resource%>/luci.js?v=<%=ver.luciversion%>"></script>
<% if css then %>
<style title="text/css">
<%= css %>
</style>
<% end -%>
</head>
<body class="lang_<%=luci.i18n.context.lang%> <% if luci.dispatcher.context.authsession then %>logged-in<% end %> <% if not (path == "") then %>node-<%= path %><% else %>node-main-login<% end %>" data-page="<%= pcdata(path) %>">
<header class="bar-primary">
<div id="header-bar-left" class="container-bar-left">
<a class="labelbar pdboy-closebar" href="javascript:void(0)" onclick="pdclosebar()" title="Close" ></a>
<a class="labelbar pdboy-gohome" href="<%=gohome%>" title="<%=home%>"></a>
<a class="labelbar pdboy-goadvanced" href="<%=gouser%>" title="<%=user%>"></a>
<a class="labelbar pdboy-gossr" href="<%=gossr%>" title="<%=ssr%>"></a>
<a class="labelbar pdboy-gonet" href="<%=url("admin/network/network")%>" title="<%:Network%>"></a>
<a class="labelbar pdboy-gopoweroff" href="<%=url("admin/system/reboot")%>" title="<%:Reboot%>"></a>
</div>
<div id="header-bar-right" class="container-bar-right">
<a class="labelbar pdboy-openbar" href="javascript:void(0)" title="Open" onclick="pdopenbar()"></a>
</div>
</header>
<div class="main">
<div style="" class="loading">
</div>
<div class="main-left">
<div class="sidenav-header d-flex align-items-center">
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
</div>
<div class="mainmenu" id="mainmenu" style="display:none"></div>
</div>
<div class="main-right">
<header class="pd-primary">
<div class="fill">
<div class="container">
<div class="flex1">
<a class="showSide" title="<%:Menu%>" ></a>
<a class="brand" href="#"><%=striptags(boardinfo.hostname or "OpenWrt")%></a>
</div>
<% if dayword == '1' then %>
<a class="showWord" href="<%=showurl%>"><%=showword%></a>
<% end -%>
<div class="status" id="indicators"></div>
<span > <a class="pdboy-qlogout" href="<%=url("admin/logout")%>" title="<%:Logout%>" > </a></span>
</div>
</div>
</header>
<div class="modemenu-buttons" style="display:none">
<ul id="modemenu"></ul>
</div>
<div class="darkMask"></div>
<div class="login-bg" style="background-image:url(<%=bg_url%>)"></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.%></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>
<div id="tabmenu" style="display:none"></div>
<script src="<%=media%>/js/style.js"></script>