mirror of
https://github.com/kenzok8/small-package
synced 2025-09-18 18:51:16 +08:00
update-12.18
This commit is contained in:
@ -58,11 +58,11 @@ br.submit = false
|
||||
|
||||
s = br:section(SimpleSection)
|
||||
|
||||
--o = s:option(ListValue, 'bing_background', translate('Wallpaper Source'))
|
||||
--o:value('0', translate('Built-in'))
|
||||
--o:value('1', translate('Bing Wallpapers'))
|
||||
--o.default = bing_background
|
||||
--o.rmempty = false
|
||||
o = s:option(ListValue, 'bing_background', translate('Wallpaper Source'))
|
||||
o:value('0', translate('Built-in'))
|
||||
o:value('1', translate('Bing Wallpapers'))
|
||||
o.default = bing_background
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(ListValue, 'mode', translate('Theme mode'))
|
||||
o.description = translate('You can choose Theme color mode here')
|
||||
|
@ -6,11 +6,16 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Argon Theme
|
||||
LUCI_DEPENDS:=
|
||||
PKG_NAME:=luci-theme-argon
|
||||
PKG_VERSION:=2.2.9
|
||||
PKG_RELEASE:=20211016-1
|
||||
PKG_RELEASE:=20211217-1
|
||||
|
||||
PKG_MAINTAINER:=jerrykuku <jerrykuku@qq.com>
|
||||
|
||||
LUCI_TITLE:=Argon Theme
|
||||
LUCI_PKGARCH:=all
|
||||
LUCI_DEPENDS:=
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
@ -40,14 +40,14 @@
|
||||
local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css')
|
||||
local bar_color = '#5e72e4'
|
||||
local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity
|
||||
if fs.access('/etc/config/argon') then
|
||||
primary = uci:get_first('argon', 'global', 'primary')
|
||||
dark_primary = uci:get_first('argon', 'global', 'dark_primary')
|
||||
blur_radius = uci:get_first('argon', 'global', 'blur')
|
||||
blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark')
|
||||
blur_opacity = uci:get_first('argon', 'global', 'transparency')
|
||||
blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark')
|
||||
mode = uci:get_first('argon', 'global', 'mode')
|
||||
if fs.access('/etc/config/argon-config') then
|
||||
primary = uci:get_first('argon-config', 'global', 'primary')
|
||||
dark_primary = uci:get_first('argon-config', 'global', 'dark_primary')
|
||||
blur_radius = uci:get_first('argon-config', 'global', 'blur')
|
||||
blur_radius_dark = uci:get_first('argon-config', 'global', 'blur_dark')
|
||||
blur_opacity = uci:get_first('argon-config', 'global', 'transparency')
|
||||
blur_opacity_dark = uci:get_first('argon-config', 'global', 'transparency_dark')
|
||||
mode = uci:get_first('argon-config', 'global', 'mode')
|
||||
bar_color = mode == 'dark' and dark_primary or primary
|
||||
end
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
<% elseif mode == 'dark' then %>
|
||||
<%=dark_css%>
|
||||
<% end -%>
|
||||
<% if fs.access('/etc/config/argon') then %>
|
||||
<% if fs.access('/etc/config/argon-config') then %>
|
||||
:root {
|
||||
--primary: <%=primary%>;
|
||||
--dark-primary: <%=dark_primary%>;
|
||||
|
@ -40,14 +40,14 @@
|
||||
local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css')
|
||||
local bar_color = '#5e72e4'
|
||||
local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity
|
||||
if fs.access('/etc/config/argon') then
|
||||
primary = uci:get_first('argon', 'global', 'primary')
|
||||
dark_primary = uci:get_first('argon', 'global', 'dark_primary')
|
||||
blur_radius = uci:get_first('argon', 'global', 'blur')
|
||||
blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark')
|
||||
blur_opacity = uci:get_first('argon', 'global', 'transparency')
|
||||
blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark')
|
||||
mode = uci:get_first('argon', 'global', 'mode')
|
||||
if fs.access('/etc/config/argon-config') then
|
||||
primary = uci:get_first('argon-config', 'global', 'primary')
|
||||
dark_primary = uci:get_first('argon-config', 'global', 'dark_primary')
|
||||
blur_radius = uci:get_first('argon-config', 'global', 'blur')
|
||||
blur_radius_dark = uci:get_first('argon-config', 'global', 'blur_dark')
|
||||
blur_opacity = uci:get_first('argon-config', 'global', 'transparency')
|
||||
blur_opacity_dark = uci:get_first('argon-config', 'global', 'transparency_dark')
|
||||
mode = uci:get_first('argon-config', 'global', 'mode')
|
||||
bar_color = mode == 'dark' and dark_primary or primary
|
||||
end
|
||||
-%>
|
||||
@ -91,7 +91,7 @@
|
||||
<% elseif mode == 'dark' then %>
|
||||
<%=dark_css%>
|
||||
<% end -%>
|
||||
<% if fs.access('/etc/config/argon') then %>
|
||||
<% if fs.access('/etc/config/argon-config') then %>
|
||||
:root {
|
||||
--primary: <%=primary%>;
|
||||
--dark-primary: <%=dark_primary%>;
|
||||
|
@ -66,7 +66,7 @@
|
||||
local bingApiUrl = bingUrl .. "HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
|
||||
local themeDir = media .. "/background/"
|
||||
local bgUrl = media .. "/img/bg1.jpg"
|
||||
local useBing = fs.access('/etc/config/argon') and "1" or "0"
|
||||
local useBing = fs.access('/etc/config/argon-config') and "1" or "0"
|
||||
local backgroundTable, backgroundCount = fetchMedia("/www" .. themeDir .. "*",themeDir)
|
||||
local backgroundType = "Image"
|
||||
|
||||
|
0
luci-theme-argon/root/etc/uci-defaults/30_luci-theme-argon
Normal file → Executable file
0
luci-theme-argon/root/etc/uci-defaults/30_luci-theme-argon
Normal file → Executable file
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nft-qos
|
||||
PKG_VERSION:=1.0.6
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_MAINTAINER:=Rosy Song <rosysong@rosinson.com>
|
||||
|
@ -3,6 +3,9 @@
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
# for uci_validate_section()
|
||||
. /lib/functions/procd.sh
|
||||
|
||||
NFT_QOS_HAS_BRIDGE=
|
||||
NFT_QOS_INET_FAMILY=ip
|
||||
NFT_QOS_SCRIPT_TEXT=
|
||||
|
@ -3,6 +3,8 @@
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. /lib/nft-qos/core.sh
|
||||
|
||||
qosdef_validate_dynamic() {
|
||||
uci_load_validate nft-qos default "$1" "$2" \
|
||||
'limit_enable:bool:0' \
|
||||
|
@ -3,6 +3,8 @@
|
||||
# Copyright (C) 2020 Tong Zhang<ztong0001@gmail.com>
|
||||
#
|
||||
|
||||
. /lib/nft-qos/core.sh
|
||||
|
||||
qosdef_validate_mac() {
|
||||
uci_load_validate nft-qos default "$1" "$2" \
|
||||
'limit_mac_enable:bool:0'
|
||||
|
@ -3,12 +3,10 @@
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
qosdef_monitor_get_ip_handle() { # <family> <chain> <ip>
|
||||
echo $(nft -a list chain $1 nft-qos-monitor $2 2>/dev/null | grep " $3 " | awk '{print $11}')
|
||||
}
|
||||
. /lib/nft-qos/core.sh
|
||||
|
||||
qosdef_monitor_delete_handle() { # <family> <chain> <handle>
|
||||
nft delete rule $1 nft-qos-monitor $2 handle $3
|
||||
qosdef_monitor_get_ip_handle() { # <family> <chain> <ip>
|
||||
echo $(nft -a list chain $1 nft-qos-monitor $2 2>/dev/null | grep $3 | awk '{print $11}')
|
||||
}
|
||||
|
||||
qosdef_monitor_add() { # <mac> <ip> <hostname>
|
||||
@ -22,8 +20,8 @@ qosdef_monitor_del() { # <mac> <ip> <hostname>
|
||||
local handle_dl handle_ul
|
||||
handle_dl=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY download $2)
|
||||
handle_ul=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY upload $2)
|
||||
[ -n "$handle_dl" ] && qosdef_monitor_delete_handle $NFT_QOS_INET_FAMILY download $handle_dl
|
||||
[ -n "$handle_ul" ] && qosdef_monitor_delete_handle $NFT_QOS_INET_FAMILY upload $handle_ul
|
||||
[ -n "$handle_dl" ] && nft delete handle $handle_dl
|
||||
[ -n "$handle_ul" ] && nft delete handle $handle_ul
|
||||
}
|
||||
|
||||
# init qos monitor
|
||||
|
@ -3,6 +3,9 @@
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. /lib/functions/network.sh
|
||||
. /lib/nft-qos/core.sh
|
||||
|
||||
P1=""; P2=""; P3=""; P4=""; P5=""; P6="";
|
||||
P7=""; P8=""; P9=""; P10=""; P11="";
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. /lib/nft-qos/core.sh
|
||||
|
||||
qosdef_validate_static() {
|
||||
uci_load_validate nft-qos default "$1" "$2" \
|
||||
'limit_enable:bool:0' \
|
||||
|
@ -5,10 +5,9 @@
|
||||
|
||||
export initscript="nft-qos-dynamic"
|
||||
|
||||
. $IPKG_INSTROOT/lib/functions/procd.sh
|
||||
. $IPKG_INSTROOT/lib/functions.sh
|
||||
. $IPKG_INSTROOT/lib/nft-qos/core.sh
|
||||
. $IPKG_INSTROOT/lib/nft-qos/dynamic.sh
|
||||
. /lib/functions.sh
|
||||
. /lib/nft-qos/core.sh
|
||||
. /lib/nft-qos/dynamic.sh
|
||||
|
||||
NFT_QOS_DYNAMIC_ON=
|
||||
|
||||
|
@ -5,10 +5,7 @@
|
||||
|
||||
export initscript="nft-qos-monitor"
|
||||
|
||||
. $IPKG_INSTROOT/lib/functions/procd.sh
|
||||
. $IPKG_INSTROOT/lib/functions.sh
|
||||
. $IPKG_INSTROOT/lib/nft-qos/core.sh
|
||||
. $IPKG_INSTROOT/lib/nft-qos/monitor.sh
|
||||
. /lib/nft-qos/monitor.sh
|
||||
|
||||
logger -t nft-qos-monitor "ACTION=$ACTION, MACADDR=$MACADDR, IPADDR=$IPADDR, HOSTNAME=$HOSTNAME"
|
||||
|
||||
@ -16,11 +13,11 @@ case "$ACTION" in
|
||||
add | update)
|
||||
qosdef_init_env
|
||||
qosdef_init_monitor
|
||||
qosdef_monitor_add "$MACADDR" "$IPADDR" "$HOSTNAME"
|
||||
qosdef_monitor_add $MACADDR $IPADDR $HOSTNAME
|
||||
;;
|
||||
remove)
|
||||
qosdef_init_env
|
||||
qosdef_init_monitor
|
||||
qosdef_monitor_del "$MACADDR" "$IPADDR" "$HOSTNAME"
|
||||
qosdef_monitor_del $MACADDR $IPADDR $HOSTNAME
|
||||
;;
|
||||
esac
|
||||
|
@ -3,13 +3,14 @@
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. ${IPKG_INSTROOT}/lib/functions/network.sh
|
||||
. ${IPKG_INSTROOT}/lib/nft-qos/core.sh
|
||||
. ${IPKG_INSTROOT}/lib/nft-qos/monitor.sh
|
||||
. ${IPKG_INSTROOT}/lib/nft-qos/dynamic.sh
|
||||
. ${IPKG_INSTROOT}/lib/nft-qos/static.sh
|
||||
. ${IPKG_INSTROOT}/lib/nft-qos/mac.sh
|
||||
. ${IPKG_INSTROOT}/lib/nft-qos/priority.sh
|
||||
if [ -z "${IPKG_INSTROOT}" ]; then
|
||||
. /lib/nft-qos/core.sh
|
||||
. /lib/nft-qos/monitor.sh
|
||||
. /lib/nft-qos/dynamic.sh
|
||||
. /lib/nft-qos/static.sh
|
||||
. /lib/nft-qos/mac.sh
|
||||
. /lib/nft-qos/priority.sh
|
||||
fi
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
Reference in New Issue
Block a user