必应壁纸会使 Login 加载变得缓慢,这很糟糕😝

This commit is contained in:
sbwml 2022-03-07 08:06:50 +08:00
parent 5ee9bd875b
commit 322e033a97
6 changed files with 6 additions and 32 deletions

View File

@ -23,7 +23,6 @@ if nxfs.access('/etc/config/argon') then
blur_opacity = uci:get_first('argon', 'global', 'transparency') blur_opacity = uci:get_first('argon', 'global', 'transparency')
blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark') blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark')
mode = uci:get_first('argon', 'global', 'mode') mode = uci:get_first('argon', 'global', 'mode')
bing_background = uci:get_first('argon', 'global', 'bing_background')
end end
function glob(...) function glob(...)
@ -55,12 +54,6 @@ br.reset = false
br.submit = false br.submit = false
s = br:section(SimpleSection) 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, 'mode', translate('Theme mode')) o = s:option(ListValue, 'mode', translate('Theme mode'))
o:value('normal', translate('Follow System')) o:value('normal', translate('Follow System'))
o:value('light', translate('Force Light')) o:value('light', translate('Force Light'))

View File

@ -17,15 +17,6 @@ msgstr "Argon 主题设置"
msgid "Here you can set the blur and transparency of the login page of argon theme, and manage the background pictures and videos.[Chrome is recommended]" msgid "Here you can set the blur and transparency of the login page of argon theme, and manage the background pictures and videos.[Chrome is recommended]"
msgstr "在这里你可以设置argon 主题的登录页面的模糊和透明度,并管理背景图片与视频。[建议使用 Chrome]" msgstr "在这里你可以设置argon 主题的登录页面的模糊和透明度,并管理背景图片与视频。[建议使用 Chrome]"
msgid "Wallpaper Source"
msgstr "壁纸来源"
msgid "Built-in"
msgstr "内建"
msgid "Bing Wallpapers"
msgstr "Bing 壁纸"
msgid "Theme mode" msgid "Theme mode"
msgstr "主题模式" msgstr "主题模式"

View File

@ -6,4 +6,3 @@ config global
option transparency '0.2' option transparency '0.2'
option transparency_dark '0.2' option transparency_dark '0.2'
option mode 'normal' option mode 'normal'
option bing_background '0'

View File

@ -1,2 +1,3 @@
Drop background here! 登录页面背景图片目录
accept jpg png gif and mp4
支持格式jpg、png、gif、webp、mp4

View File

Before

Width:  |  Height:  |  Size: 793 KiB

After

Width:  |  Height:  |  Size: 793 KiB

View File

@ -83,18 +83,8 @@
}) })
</script> </script>
<% else <% else
local bg_url = media .. "/img/bg1.webp" local bg_url = media .. "/img/bg.webp"
local bing = "123" if (bgcount > 0 and currentBg["type"] ~= "mp4") then
if (bgcount == 0 ) then
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=ZH-CN"
--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
elseif (bgcount > 0 and currentBg["type"] ~= "mp4") then
bg_url = currentBg.url bg_url = currentBg.url
end end
%> %>