🏅 Sync 2022-04-21 20:44

This commit is contained in:
github-actions[bot] 2022-04-21 20:44:43 +08:00
parent 6ef783a4ad
commit a88cf1edd5
6 changed files with 78 additions and 78 deletions

View File

@ -1379,7 +1379,7 @@ msgid "Hosts added into No Sniffing Lists will not resolve again on server (Xray
msgstr "加入的域名不会再次在服务器解析仅适用于Xray。"
msgid "Buffer Size (Xray)"
msgstr "缓冲区大小"
msgstr "缓冲区大小Xray"
msgid "Buffer size for every connection (kB)"
msgstr "每一个连接的缓冲区大小kB"

View File

@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall2
PKG_VERSION:=1.3
PKG_RELEASE:=16
PKG_RELEASE:=17
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_$(PKG_NAME)_Transparent_Proxy \

View File

@ -692,8 +692,8 @@ if remote_dns_server or remote_dns_doh_url or remote_dns_fake then
end
if direct_dns_doh_url and direct_dns_doh_host then
if direct_dns_doh_host ~= direct_dns_server and not api.is_ip(direct_dns_doh_host) then
dns.hosts[remote_dns_doh_host] = direct_dns_server
if direct_dns_server and direct_dns_doh_host ~= direct_dns_server and not api.is_ip(direct_dns_doh_host) then
dns.hosts[direct_dns_doh_host] = direct_dns_server
end
_direct_dns.address = direct_dns_doh_url:gsub("https://", "https+local://")
_direct_dns.port = tonumber(direct_dns_port) or 443

View File

@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=Argon Theme
LUCI_DEPENDS:=
PKG_VERSION:=1.7.2
PKG_RELEASE:=20210309
PKG_VERSION:=1.7.3
PKG_RELEASE:=20220421
include $(TOPDIR)/feeds/luci/luci.mk
@ -24,4 +24,4 @@ rm -Rf /var/luci-indexcache
exit 0
endef
# call BuildPackage - OpenWrt buildroot signature
# call BuildPackage - OpenWrt buildroot signature

View File

@ -44,7 +44,7 @@
local node = disp.context.dispatched
local categories = disp.node_childs(tree)
local currentNode = luci.dispatcher.context.path
local c = tree
local i, r
@ -108,16 +108,22 @@
end
end
local function render_submenu(prefix, node)
local function render_submenu(prefix,parent, node)
local childs = disp.node_childs(node)
if #childs > 0 then
write('<ul class="slide-menu">')
local active = (currentNode[2] == parent) and "active" or ""
local display = (currentNode[2] == parent) and 'style="display: block;"' or ""
write('<ul class="slide-menu %s" %s>' %{
active,
display
})
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>' %{
local subactive = (currentNode[3] == r) and 'class="active"' or ""
write('<li %s><a data-title="%s" href="%s">%s</a></li>' %{
subactive,
title,
nodeurl(prefix, r, nnode.query),
title
@ -132,20 +138,21 @@
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 active = (currentNode[2] == r) and "active" or ""
local title = pcdata(striptags(translate(nnode.title)))
local en_title = pcdata(striptags(string.gsub(nnode.title," ","_")))
write('<li class="slide"><a class="menu" data-title="%s" href="#">%s</a>' %{
write('<li class="slide"><a class="menu %s" data-title="%s" href="#">%s</a>' %{
active,
en_title,
title
})
render_submenu(category .. "/" .. r, nnode)
render_submenu(category .. "/" .. r,r, nnode)
write('</li>')
else
local title = pcdata(striptags(translate(nnode.title)))

View File

@ -2,7 +2,7 @@
Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI and Argon Template
luci-theme-argon
Copyright 2020 Jerryk <jerrykuku@gmail.com>
Copyright 2021 Jerryk <jerrykuku@gmail.com>
Have a bug? Please create an issue here on GitHub!
https://github.com/jerrykuku/luci-theme-argon/issues
@ -23,12 +23,15 @@
<%+header_login%>
<%
local util = require "luci.util"
local boardinfo = util.ubus("system", "board")
local util = require "luci.util"
local fs = require "nixio.fs"
local nutil = require "nixio.util"
local uci = require 'luci.model.uci'.cursor()
local theme_dir = media .. "/background/"
local sys = require "luci.sys"
local json = require "luci.jsonc"
local uci = require 'luci.model.uci'.cursor()
-- Fetch Local Background Media
function glob(...)
local iter, code, msg = fs.glob(...)
if iter then
@ -38,81 +41,71 @@
end
end
function getExtension(str)
return str:match(".+%.(%w+)$")
end
function fetchMedia(path)
local bgArr = {}
local numBg = 0
function fetchMedia(path,themeDir)
local backgroundTable = {}
local backgroundCount = 0
for i, f in ipairs(glob(path)) do
attr = fs.stat(f)
if attr then
local ext = getExtension(fs.basename(f))
local ext = fs.basename(f):match(".+%.(%w+)$")
if ext == "jpg" or ext == "png" or ext == "gif" or ext == "mp4" then
local bg = {}
bg.type = ext
bg.url = theme_dir .. fs.basename(f)
table.insert(bgArr,bg)
numBg = numBg + 1
bg.url = themeDir .. fs.basename(f)
table.insert(backgroundTable,bg)
backgroundCount = backgroundCount + 1
end
end
end
return bgArr,numBg
return backgroundTable,backgroundCount
end
local bgcount = 0
local currentBg = {}
local bgs = {}
local theme_dir = media .. "/background/"
local bing_background = fs.access('/etc/config/argon') and uci:get_first('argon', 'global', 'bing_background') or "0"
bgs,bgcount=fetchMedia("/www" .. theme_dir .. "*")
local boardinfo = util.ubus("system", "board")
local bingUrl = "http://www.bing.com/"
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 uci:get_first('argon', 'global', 'bing_background') or "0"
local backgroundTable, backgroundCount = fetchMedia("/www" .. themeDir .. "*",themeDir)
local backgroundType = "Image"
function getBing()
local bing = sys.exec("wget --timeout=0.5 -qO- '%s'" %bingApiUrl)
if (bing and bing ~= '') then
bgUrl = bingUrl .. json.parse(bing).images[1].url
end
end
if ( useBing == "0" ) then
if ( backgroundCount > 0 ) then
local currentBg = backgroundTable[math.random(1,backgroundCount)]
bgUrl = currentBg.url
if (currentBg.type == "mp4" ) then
backgroundType = "Video"
end
end
else
pcall(getBing)
end
%>
<!-- Login Page Start -->
<div class="login-page">
<%
local bg_url = media .. "/img/bg1.jpg"
if ( bing_background == "0" ) then
if bgcount > 0 then
currentBg = bgs[math.random(1,bgcount)]
end
if ( bgcount > 0 and currentBg.type == "mp4" ) then
%>
<div class="video">
<% if ( backgroundType == "Video" ) then %>
<!-- Video Player Start -->
<div class="video ar-flex ar-justify-content-center ar-align-items-center">
<video autoplay loop muted id="video">
<source src="<%=currentBg.url%>" type="video/mp4">
<source src="<%=bgUrl%>" type="video/mp4">
</video>
</div>
<div class="volume-control mute"></div>
<script>
$(".volume-control").click(function(){
if($(this).hasClass("mute")){
$(this).removeClass("mute")
$("#video").prop('muted', false);
}else{
$(this).addClass("mute")
$("#video").prop('muted', true);
}
})
</script>
<% elseif ( bgcount > 0 and currentBg["type"] ~= "mp4") then
bg_url = currentBg.url
end
else
local bing = "123"
local sys = require "luci.sys"
local json = require "luci.jsonc"
local remote_bg_url="http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
--bing = sys.httpget(remote_bg_url)
bing = sys.exec("wget --timeout=0.5 -qO- '%s'" %remote_bg_url)
if (bing and bing ~= '') then
bg_url = "https://www.bing.com" .. json.parse(bing).images[1].url
end
end
%>
<% if(currentBg["type"] ~= "mp4") then %>
<div class="main-bg" id="main-bg" style="background-image:url(<%=bg_url%>)"></div>
<!-- Video Player End -->
<% else %>
<!-- Image Background Start -->
<div class="main-bg" id="main-bg" style="background-image:url(<%=bgUrl%>)"></div>
<!-- Image Background End -->
<% end %>
<!-- Login Container Start -->
<div class="login-container">
<div class="login-form">
<a class="brand" href="/"><img src="<%=media%>/img/argon.svg" class="icon"><span