🛸 Sync 2026-10-12 19:55:25

This commit is contained in:
github-actions[bot] committed 2026-10-12 19:55:25 +08:00
1 parent accbfee648
commit 8247b3bbae
16 files changed
+42 -95

No files matched your search

@@ -134,9 +134,9 @@ return view.extend({
dhcp: uci.get('dhcp', 'lan', 'ignore') === '1' ? '0' : '1',
ipv6: uci.get('network', 'wan6', 'auto') === '0' ? '0' : '1',
https: uci.get('wizard', 'default', 'https') || '0',
cookie_p: uci.get('wizard', 'default', 'persistent_cookies') || '1',
cookie_p: uci.get('luci', 'main', 'persistent_cookies') || '1',
landing_page: uci.get('luci', 'main', 'landing_page') || 'auto',
autoupgrade_fm: uci.get('wizard', 'default', 'autoupgrade_fm') || '0',
autoupgrade_fm: uci.get('luci', 'main', 'autoupgrade_fm') || '0',
coremark: uci.get('wizard', 'default', 'coremark') || '0',
wifi_ssid: baseSsid || (this.hasWireless ? 'Kwrt' : ''),
wifi_key: (ap && ap.key) || ''
@@ -482,7 +482,7 @@ return view.extend({
// I. 页面与会话设置(持久Cookie双向同步至luci系统底层与向导配置包)
if (has(changed, 'cookie_p')) {
uci.set('wizard', 'default', 'persistent_cookies', cur.cookie_p);
uci.set('luci', 'main', 'persistent_cookies', cur.cookie_p);
}
if (has(changed, 'landing_page')) {
uci.set('luci', 'main', 'landing_page', cur.landing_page);
@@ -490,7 +490,7 @@ return view.extend({
// J. 向导专属项(完整保留 autoupgrade_fm 与 coremark)
if (has(changed, 'autoupgrade_fm')) {
uci.set('wizard', 'default', 'autoupgrade_fm', cur.autoupgrade_fm);
uci.set('luci', 'main', 'autoupgrade_fm', cur.autoupgrade_fm);
}
if (has(changed, 'coremark')) {
uci.set('wizard', 'default', 'coremark', cur.coremark);
+2 -12
View File
@@ -53,9 +53,8 @@ process_shortcut() {
# 配置 HTTPS 访问重定向 (适配 Nginx / Lighttpd / uHTTPd)
sethttps() {
local cfg="${1:-default}"
local https
config_get https "$cfg" https 0
config_get https default https 0
if [ -x /etc/init.d/nginx ] && [ -f /etc/nginx/uci.conf ]; then
if [ "x${https}" = "x1" ]; then
@@ -120,21 +119,12 @@ start_service() {
(sleep 5;/sbin/coremark >/dev/null 2>&1) &
fi
# 2. 持久 Cookie 会话配置同步到 LuCI 底层系统
local cookie_p
config_get cookie_p default persistent_cookies 1
if [ -n "$cookie_p" ]; then
[ -z "$(uci -q get luci.sgi)" ] && uci -q set luci.sgi=sgi
uci -q set luci.sgi.persistent_cookies="$cookie_p"
uci -q commit luci
fi
# 3. 清理并重新配置所有 Shortcuts
clean_shortcuts
config_foreach process_shortcut shortcuts
# 4. 设置 HTTPS 重定向
sethttps default
sethttps
# 5. 提交并重载生效服务
reload_services