From bda1e7d09f41143da12d7408de36e0896fcdde65 Mon Sep 17 00:00:00 2001 From: kenzok8 Date: Sun, 7 Jul 2024 00:16:45 +0800 Subject: [PATCH] update 2024-07-07 00:16:45 --- adguardhome/Makefile | 3 ++- .../luci-static/resources/view/wizard/initsetup.js | 13 ++++++++++--- luci-app-wizard/luasrc/controller/wizard.lua | 6 ++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/adguardhome/Makefile b/adguardhome/Makefile index 015fbf2d9..fdcfea33d 100644 --- a/adguardhome/Makefile +++ b/adguardhome/Makefile @@ -12,6 +12,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/AdGuardHome/tar.gz/v$(PKG_VERSION)? PKG_HASH:=de6d99c4420d131b76e5d22b58ac91159e74e5783f02ada8b2f993f353e254f9 +PKG_BUILD_DIR:=$(BUILD_DIR)/AdGuardHome-$(PKG_VERSION) PKG_LICENSE:=GPL-3.0-only PKG_LICENSE_FILES:=LICENSE.txt @@ -57,7 +58,7 @@ define Download/adguardhome-frontend URL:=https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(PKG_VERSION)/ URL_FILE:=AdGuardHome_frontend.tar.gz FILE:=$(FRONTEND_FILE) - HASH:=af9ae57b55a09a0aaf7c9a69a46734827443f98135d4c4b176874de3f9a449d8 + HASH:=af9ae57b55a09a0aaf7c9a69a46734827443f98135d4c4b176874de3f9a449d8 endef define Build/Prepare diff --git a/luci-app-wizard/htdocs/luci-static/resources/view/wizard/initsetup.js b/luci-app-wizard/htdocs/luci-static/resources/view/wizard/initsetup.js index 877bfde54..1c1a22558 100644 --- a/luci-app-wizard/htdocs/luci-static/resources/view/wizard/initsetup.js +++ b/luci-app-wizard/htdocs/luci-static/resources/view/wizard/initsetup.js @@ -14,10 +14,12 @@ return view.extend({ uci.changes(), L.resolveDefault(uci.load('wireless')), uci.load('wizard'), - L.resolveDefault(fs.stat('/www/luci-static/istorex/style.css'), null) + L.resolveDefault(fs.stat('/www/luci-static/istorex/style.css'), null), + L.resolveDefault(fs.stat('/www/luci-static/routerdog/style.css'), null) ]); const data = { - istorex: promises[4] + istorex: promises[4], + routerdog: promises[5] }; return data; }, @@ -96,12 +98,17 @@ return view.extend({ _('Keep the background login state to avoid the need to log in again every time the browser is closed')); o.default = o.enabled; - if (data.istorex){ + if (data.istorex || data.routerdog){ o = s.taboption('firmware', form.ListValue, 'landing_page', _('主题模式')); o.value('default', _('默认')); + if (data.routerdog){ + o.value('routerdog', _('路由狗(专业NAS模式)')); + } + if (data.istorex){ o.value('nas', _('NAS模式')); o.value('next-nas', _('NEXT-NAS模式')); o.value('router', _('路由模式')); + } o.default = 'default'; } diff --git a/luci-app-wizard/luasrc/controller/wizard.lua b/luci-app-wizard/luasrc/controller/wizard.lua index 76e0378b4..0f247c6c0 100644 --- a/luci-app-wizard/luasrc/controller/wizard.lua +++ b/luci-app-wizard/luasrc/controller/wizard.lua @@ -8,8 +8,10 @@ function index() end function landing_page() - local landing_page = uci:get("wizard", "default", "landing_page") - if luci.sys.call("pgrep quickstart >/dev/null") == 0 then + local landing_page = uci:get("wizard", "default", "landing_page") + if (luci.sys.call("pgrep routergo >/dev/null") == 0 and landing_page == "routerdog") then + http.redirect(luci.dispatcher.build_url("admin","routerdog")); + elseif luci.sys.call("pgrep quickstart >/dev/null") == 0 then if landing_page == "nas" then http.redirect(luci.dispatcher.build_url("admin","istorex","nas")); elseif landing_page == "next-nas" then