mirror of
https://github.com/YuleBest/LuminPro.git
synced 2026-12-04 00:54:42 +08:00
Compare commits
No files matched your search
+121
@@ -0,0 +1,121 @@
|
||||
# LuminPro 开发文档 (Development Guide)
|
||||
|
||||
欢迎回到 LuminPro 的开发!本指南旨在帮助开发者快速找回开发节奏,了解项目结构、构建流程以及如何进行本地调试。
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **无需本地环境全套配置**:本项目已配置完善的 GitHub Actions,每次推送代码到 `main` 分支或发布标签 (`v*`),云端会自动完成前端编译、Rust 交叉编译及模块打包,并生成可直接刷入的 ZIP 包。
|
||||
|
||||
---
|
||||
|
||||
## 1. 项目架构概览
|
||||
|
||||
LuminPro 是一个基于 KernelSU WebUI 的 Android 亮度增强模块,结合了 Rust 底层监听与 Vue.js 前端控制。
|
||||
|
||||
- `webui/`: 基于 Vite + Vue 3 的前端源码。
|
||||
- `rust/`: 负责底层文件监听的二进制程序 (`lumipro`) 源码。
|
||||
- `bin/`: 存放预编译的二进制文件(如 `jq`, `lumipro`)。
|
||||
- `script/`: 核心逻辑 shell 脚本(守护进程、逻辑触发等)。
|
||||
- `webroot/`: WebUI 编译产物存放地,模块刷入后 KernelSU 会读取此处。
|
||||
- `module.prop`: 模块基础信息。
|
||||
- `build-module.js`: 模块自动化打包脚本。
|
||||
|
||||
---
|
||||
|
||||
## 2. 环境搭建 (本地)
|
||||
|
||||
如果你仅进行 WebUI 界面调整或脚本逻辑修改,只需安装 Node.js:
|
||||
|
||||
- **Node.js**: 推荐 v18+ (项目中使用 pnpm/npm)
|
||||
|
||||
如果你需要**在本地编译 Rust 程序**(通常不需要,建议交给云端),才需要安装以下工具:
|
||||
|
||||
- **Rust**: 需要安装 Android Target: `rustup target add aarch64-linux-android`
|
||||
- **Android NDK**: 交叉编译所需 (推荐 r27c+)。
|
||||
- **cargo-ndk**: 安装命令: `cargo install cargo-ndk`
|
||||
|
||||
---
|
||||
|
||||
## 3. WebUI 开发
|
||||
|
||||
WebUI 负责所有可视化配置与状态显示。
|
||||
|
||||
### 本地预览
|
||||
|
||||
```bash
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 启动开发服务器
|
||||
npm run dev
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> 由于 WebUI 依赖 `kernelsu` JavaScript API,在普通浏览器中预览时,部分 API 调用(如 `exec`)会失效。建议配合 KernelSU 管理器的「自定义页面」功能进行实机调试。
|
||||
|
||||
### 编译前端
|
||||
|
||||
生成的静态文件会自动同步到根目录的 `webroot/`。
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. 自动化构建 (推荐方式)
|
||||
|
||||
本项目依赖 GitHub Actions 进行稳定构建,避免本地环境差异导致的编译问题。
|
||||
|
||||
### 触发流程
|
||||
|
||||
1. **推送代码**:修改代码并 `git push` 后,GitHub 会自动启动 [Build & Package Module] 工作流。
|
||||
2. **下载产物**:
|
||||
- 流程结束后,在 GitHub Actions 运行记录的 **Artifacts** 栏目中可下载编译好的 ZIP 模块。
|
||||
- 产物文件名格式为:`LuminPro_V2.x.x-shortsha.zip`。
|
||||
|
||||
---
|
||||
|
||||
## 5. Rust 底层开发 (可选)
|
||||
|
||||
`lumipro` 源码位于 `rust/`。通常修改逻辑后直接推送即可,若需本地测试编译:
|
||||
|
||||
```bash
|
||||
cd rust
|
||||
cargo ndk -t arm64-v8a --platform 26 build --release
|
||||
cp target/aarch64-linux-android/release/lumipro ../bin/lumipro
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6. 模块打包脚本
|
||||
|
||||
`build-module.js` 负责版本同步、生成校验和并打包。即便不在本地编译 Rust,你也可以用它临时打包当前目录文件:
|
||||
|
||||
```bash
|
||||
# 自动执行:前端编译 + 模块打包
|
||||
npm run build
|
||||
|
||||
# 仅打包(不重编前端):
|
||||
node build-module.js
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 7. 核心逻辑说明
|
||||
|
||||
- **service.sh**: 模块启动入口,负责拉起守护进程。
|
||||
- **script/daemon.sh**: 持续监控 `lumipro` 进程,并处理亮度提升逻辑。
|
||||
- **customize.sh**: 刷入时的安装逻辑,处理初次校准与文件权限。
|
||||
- **action.sh**: 快捷操作逻辑(音量键或管理器按钮触发)。
|
||||
|
||||
---
|
||||
|
||||
## 8. 调试技巧
|
||||
|
||||
- **查看日志**: 在 WebUI 界面、日志页,或执行 `tail -f /data/adb/modules/luminpro/luminpro.log`。
|
||||
- **手动触发逻辑**: 执行 `/data/adb/modules/luminpro/boost.sh`。
|
||||
- **配置文件**: `/data/adb/modules/luminpro/config/config.json`。
|
||||
|
||||
---
|
||||
|
||||
祝你开发愉快!如有疑问,请查阅 [README.md](./README.md) 或提交 Issue。
|
||||
@@ -13,10 +13,16 @@ _基于 KernelSU WebUI + Rust 事件驱动架构_
|
||||
|
||||
无论当前屏幕亮度如何,只要触发亮度超过设定阈值,LuminPro 便会自动且平滑地将屏幕提升至硬件支持的峰值亮度,确保你在强光户外也能获得清晰的显示效果。模块采用 Rust 编写的 `lumipro` 二进制程序进行底层文件事件监听,零轮询、零空转,配合 KernelSU WebUI 提供完整的可视化配置与状态监控。
|
||||
|
||||
## V2.3 核心特性
|
||||
> [!TIP]
|
||||
> 如果你是开发者,请参阅 [开发文档 (DEVELOPMENT.md)](./DEVELOPMENT.md) 了解构建与调试流程。
|
||||
|
||||
## V2.3+ 核心特性
|
||||
|
||||
- **零耗电底层监听 (lumipro)**
|
||||
彻底告别死循环与轮询。使用 Rust 编写的 `lumipro` 二进制程序替代 `inotifyd`,内置防抖动与调试模式,仅在亮度节点文件发生变更的瞬间响应,守护进程 (`daemon.sh`) 负责持续监视 lumipro 进程稳定性,确保监听链路永不中断。
|
||||
彻底告别死循环与轮询。使用 Rust 编写的 `lumipro` 二进制程序替代 `inotifyd`,内置防抖动与调试模式,仅在亮度节点文件发生变更的瞬间响应,守护进程 (`daemon.sh`) 负责持续监视 lumipro 进程稳定性,并具备**失效自动修复(Stale Lock 回收)**机制。
|
||||
|
||||
- **兼容模式 (轮询驱动)**
|
||||
针对部分无法触发 inotify 事件的特殊机型,新增兼容模式。开启后模块切换为 2 秒一次的低频轮询,确保在任何环境下都能正常工作。
|
||||
|
||||
- **KernelSU WebUI 可视化配置**
|
||||
在管理器的模块设置页面中,通过暗色面板实时调整所有参数,保存后**立即生效**,无需重启:
|
||||
@@ -53,6 +59,7 @@ _基于 KernelSU WebUI + Rust 事件驱动架构_
|
||||
| ------------------- | ------------------------------- | ----------------- |
|
||||
| `ui_max_bri` | 前台触发阈值(UI 亮度值) | `0`(需手动校准) |
|
||||
| `max_bri` | 峰值目标亮度 | `0`(需手动校准) |
|
||||
| `compatibility_mode`| 兼容模式(轮询驱动) | `0`(禁用) |
|
||||
| `steps_num` | 亮度过渡步数 | `50` |
|
||||
| `sleep_time` | 休眠时段,格式 `HHMM-HHMM` | 空(禁用) |
|
||||
| `auto_bri_sleep` | 自动亮度开启时跳过 | `1`(启用) |
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
## V2.4-2401
|
||||
|
||||
- 新增: **兼容模式 (轮询驱动)**,支持部分无法通过事件驱动监听亮度的机型,增强设备兼容性
|
||||
- 修复: 遗留文件锁 (Stale Lock) 导致脚本失效的问题,引入 PID 存活检测与自动自愈机制
|
||||
- 优化: 提升守护进程与系统服务的健壮性,开机及手动重启会自动刷新环境标记
|
||||
- 新增: 完善 **[DEVELOPMENT.md](./DEVELOPMENT.md)** 开发文档,规范化云端 GitHub Actions 自动化构建流程
|
||||
- 修复: 其他已知逻辑漏洞与 UI 细节显示优化
|
||||
|
||||
## V2.3-2301
|
||||
|
||||
- 新增: 引入 Rust 编写的 `lumipro` 二进制程序,取代 `inotifyd` 作为亮度文件监听器,内置防抖动与调试模式,提升稳定性
|
||||
|
||||
@@ -64,6 +64,7 @@ write_config_json() {
|
||||
--arg log_max_size "${cfg_log_max_size:-512}" \
|
||||
--arg auto_bri_sleep "${cfg_auto_bri_sleep:-1}" \
|
||||
--arg display_hdr_sleep "${cfg_display_hdr_sleep:-0}" \
|
||||
--arg compatibility_mode "${cfg_compatibility_mode:-0}" \
|
||||
--arg sleep_time "${cfg_sleep_time:-}" \
|
||||
--arg inotify_events "${cfg_inotify_events:-c}" \
|
||||
--arg now_bri_file "${cfg_now_bri_file:-$DEFAULT_NOW_BRI_FILE}" \
|
||||
@@ -77,6 +78,7 @@ write_config_json() {
|
||||
log_max_size: ($log_max_size | tonumber),
|
||||
auto_bri_sleep: ($auto_bri_sleep | tonumber),
|
||||
display_hdr_sleep: ($display_hdr_sleep | tonumber),
|
||||
compatibility_mode:($compatibility_mode | tonumber),
|
||||
sleep_time: $sleep_time,
|
||||
inotify_events: $inotify_events,
|
||||
now_bri_file: $now_bri_file,
|
||||
@@ -249,6 +251,7 @@ IMPORT_OLD_CONFIG() {
|
||||
cfg_log_max_size="$(read_old_txt log_max_size.txt '512')"
|
||||
cfg_auto_bri_sleep="$(read_old_txt auto_bri_sleep.txt '1')"
|
||||
cfg_display_hdr_sleep="$(read_old_txt display_hdr_sleep.txt '0')"
|
||||
cfg_compatibility_mode="$(read_old_txt compatibility_mode.txt '0')"
|
||||
cfg_sleep_time="$(read_old_txt sleep_time.txt '')"
|
||||
cfg_inotify_events="$(read_old_txt inotify_events.txt 'c')"
|
||||
cfg_now_bri_file="$(read_old_txt path/now_bri_file.txt "$DEFAULT_NOW_BRI_FILE")"
|
||||
@@ -288,6 +291,7 @@ INIT_CONFIG() {
|
||||
cfg_log_max_size=512
|
||||
cfg_auto_bri_sleep=1
|
||||
cfg_display_hdr_sleep=0
|
||||
cfg_compatibility_mode=0
|
||||
cfg_sleep_time=""
|
||||
cfg_inotify_events="c"
|
||||
cfg_now_bri_file="$DEFAULT_NOW_BRI_FILE"
|
||||
@@ -305,6 +309,7 @@ ENSURE_DEFAULTS() {
|
||||
.log_max_size = (.log_max_size // 512) |
|
||||
.auto_bri_sleep = (.auto_bri_sleep // 1) |
|
||||
.display_hdr_sleep = (.display_hdr_sleep // 0) |
|
||||
.compatibility_mode= (.compatibility_mode // 0) |
|
||||
.sleep_time = (.sleep_time // "") |
|
||||
.inotify_events = (.inotify_events // "c") |
|
||||
.log_level = (.log_level // "info") |
|
||||
@@ -393,6 +398,11 @@ END() {
|
||||
else
|
||||
echo " - HDR 内容时跳过: 关闭"
|
||||
fi
|
||||
if [ "$("$JQ" -re '.compatibility_mode' "$CONFIG_FILE" 2>/dev/null || echo "0")" = "1" ]; then
|
||||
echo " - 兼容模式 (轮询): 开启"
|
||||
else
|
||||
echo " - 兼容模式 (轮询): 关闭"
|
||||
fi
|
||||
if [ -n "$st" ]; then
|
||||
echo " - 休眠时段: $st"
|
||||
else
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
id=LuminPro
|
||||
name=LuminPro丨日用屏幕亮度强化
|
||||
version=V2.3-2301
|
||||
versionCode=2301
|
||||
version=V2.4-2401
|
||||
versionCode=2401
|
||||
author=酷安@Yule
|
||||
description=本模块旨在让你的 Android 设备随时可以使用高亮度显示屏幕内容。无论设备当前亮度如何,只要满足设定的前台触发亮度条件,模块便会自动且平滑地提升屏幕亮度至硬件支持的峰值状态,确保你在强光室外也能获得清晰的显示效果
|
||||
updateJson=https://raw.githubusercontent.com/YuleBest/LuminPro/main/update.json
|
||||
+37
-16
@@ -81,25 +81,46 @@ while true; do
|
||||
echo "$current_config" >"$config_cache_file"
|
||||
fi
|
||||
|
||||
_log "正在启动 lumipro 监听" "INFO"
|
||||
now_bri_file="${current_config%|*}"
|
||||
inotify_events="${current_config#*|}"
|
||||
debug_mode="$(get_cfg debug_mode "0")"
|
||||
compatibility_mode="$(get_cfg compatibility_mode "0")"
|
||||
|
||||
# 缓存当前监听路径(供参考)
|
||||
echo -n "$now_bri_file" >"$MODDIR/config/.cached_path"
|
||||
|
||||
if [ "$debug_mode" = "1" ]; then
|
||||
"$MODDIR/bin/lumipro" --debug "$MODDIR/script/up.sh" "$now_bri_file:$inotify_events" >>"$log_file" 2>&1 &
|
||||
if [ "$compatibility_mode" = "1" ]; then
|
||||
_log "兼容模式已开启 (轮询驱动)" "WARN"
|
||||
# 写入一个特殊的 PID 标识轮询模式
|
||||
echo "polling" >"$pid_file"
|
||||
while true; do
|
||||
if [ -f "$stop_file" ] || [ -f "$pause_file" ]; then
|
||||
break
|
||||
fi
|
||||
# 检查配置哈希是否变化
|
||||
new_config="$(get_config_hash)"
|
||||
if [ "$new_config" != "$current_config" ]; then
|
||||
break
|
||||
fi
|
||||
sh "$MODDIR/script/up.sh" &
|
||||
sleep 2
|
||||
done
|
||||
_log "轮询模式已退出" "INFO"
|
||||
else
|
||||
"$MODDIR/bin/lumipro" "$MODDIR/script/up.sh" "$now_bri_file:$inotify_events" >>"$log_file" 2>&1 &
|
||||
fi
|
||||
inotify_pid=$!
|
||||
echo "$inotify_pid" >"$pid_file"
|
||||
_log "lumipro 已启动 (PID: $inotify_pid), 监听: $now_bri_file, 事件: $inotify_events" "SUCCESS"
|
||||
_log "正在启动 lumipro 监听" "INFO"
|
||||
now_bri_file="${current_config%|*}"
|
||||
inotify_events="${current_config#*|}"
|
||||
debug_mode="$(get_cfg debug_mode "0")"
|
||||
|
||||
wait "$inotify_pid"
|
||||
_log "lumipro 进程 (PID: $inotify_pid) 已退出,即将重启" "WARN"
|
||||
# 缓存当前监听路径(供参考)
|
||||
echo -n "$now_bri_file" >"$MODDIR/config/.cached_path"
|
||||
|
||||
if [ "$debug_mode" = "1" ]; then
|
||||
"$MODDIR/bin/lumipro" --debug "$MODDIR/script/up.sh" "$now_bri_file:$inotify_events" >>"$log_file" 2>&1 &
|
||||
else
|
||||
"$MODDIR/bin/lumipro" "$MODDIR/script/up.sh" "$now_bri_file:$inotify_events" >>"$log_file" 2>&1 &
|
||||
fi
|
||||
inotify_pid=$!
|
||||
echo "$inotify_pid" >"$pid_file"
|
||||
_log "lumipro 已启动 (PID: $inotify_pid), 监听: $now_bri_file, 事件: $inotify_events" "SUCCESS"
|
||||
|
||||
wait "$inotify_pid"
|
||||
_log "lumipro 进程 (PID: $inotify_pid) 已退出,即将重启" "WARN"
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
done
|
||||
@@ -23,6 +23,7 @@ touch "$pause_file"
|
||||
# 2. 清理遗留标记
|
||||
rm -f "$pid_file"
|
||||
rm -f "$flag_file"
|
||||
rm -f "$PID_DIR/up.lock"
|
||||
_log "已清理锁文件"
|
||||
|
||||
# 3. 恢复守护进程 (它会自动拉起新 inotifyd)
|
||||
|
||||
+16
-5
@@ -1,4 +1,4 @@
|
||||
#!/system/bin/sh
|
||||
#!/system/bin/sh
|
||||
#shellcheck shell=ash
|
||||
# 亮度提升脚本
|
||||
|
||||
@@ -50,13 +50,26 @@ _log() {
|
||||
printf '[%s] [%s] [%s] %s\n' "$(date '+%m-%d %H:%M:%S')" "up" "$level" "$1" >>"$log_file"
|
||||
}
|
||||
|
||||
_log "收到亮度变更通知 (PID: $$)" "INFO"
|
||||
|
||||
if [ -f "$stop_file" ]; then
|
||||
_log "服务已暂停,跳过本次处理" "WARN"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 防止 up.sh 自身读写亮度节点时触发 inotify 事件导致递归调用
|
||||
lock_file="$PID_DIR/up.lock"
|
||||
if [ -f "$lock_file" ]; then
|
||||
old_pid=$(cat "$lock_file" 2>/dev/null)
|
||||
if [ -n "$old_pid" ] && [ -d "/proc/$old_pid" ]; then
|
||||
exit 0
|
||||
fi
|
||||
# PID 不存在,说明是遗留的锁,清理之
|
||||
_log "检测到遗留的锁文件 (PID: $old_pid 不存在),已自动清除" "WARN"
|
||||
rm -f "$lock_file"
|
||||
fi
|
||||
echo $$ >"$lock_file"
|
||||
# shellcheck disable=SC2064
|
||||
trap "rm -f '$lock_file'" EXIT HUP INT TERM
|
||||
|
||||
# 读取配置
|
||||
ui_max_bri="$(get_cfg ui_max_bri 0)"
|
||||
max_bri="$(get_cfg max_bri 0)"
|
||||
@@ -119,7 +132,6 @@ CHECK_BRI() {
|
||||
fi
|
||||
sleep 0.3
|
||||
done
|
||||
_log "检测超时: 亮度未持续达到提升阈値" "INFO"
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -188,7 +200,6 @@ MAIN() {
|
||||
fi
|
||||
fi
|
||||
|
||||
_log "正在检测亮度变化..." "INFO"
|
||||
CHECK_BRI
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ _log() {
|
||||
sleep 30
|
||||
|
||||
# 清理上次遗留的标记文件
|
||||
rm -f "$MODDIR/pid/"*.flag "$MODDIR/pid/"*.pause "$MODDIR/pid/.hdr_ratio_cache"
|
||||
rm -f "$MODDIR/pid/"*.flag "$MODDIR/pid/"*.pause "$MODDIR/pid/"*.lock "$MODDIR/pid/.hdr_ratio_cache"
|
||||
|
||||
_log "LuminPro 服务启动" "INFO"
|
||||
_log "前台最大亮度: $(get_cfg ui_max_bri 0)" "INFO"
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"versionCode": 2208,
|
||||
"version": "V2.2-2208",
|
||||
"zipUrl": "https://share.yule.ink/magisk/mod/luminpro/module/LuminPro_V2.3-2301.zip",
|
||||
"versionCode": 2401,
|
||||
"version": "V2.4-2401",
|
||||
"zipUrl": "https://share.yule.ink/magisk/mod/luminpro/module/LuminPro_V2.4-2401.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/YuleBest/LuminPro/main/changelog.md"
|
||||
}
|
||||
@@ -21,6 +21,7 @@ export function useConfig() {
|
||||
// 执行策略
|
||||
const autoBriSleep = ref(false)
|
||||
const displayHdrSleep = ref(false)
|
||||
const compatibilityMode = ref(false)
|
||||
const sleepMode = ref(false)
|
||||
const sleepStartH = ref('19')
|
||||
const sleepStartM = ref('00')
|
||||
@@ -58,6 +59,7 @@ export function useConfig() {
|
||||
logMaxSize,
|
||||
autoBriSleep,
|
||||
displayHdrSleep,
|
||||
compatibilityMode,
|
||||
sleepMode,
|
||||
sleepStartH,
|
||||
sleepStartM,
|
||||
@@ -88,6 +90,7 @@ export function useConfig() {
|
||||
logMaxSize.value = cfg.log_max_size != null ? String(cfg.log_max_size) : '500'
|
||||
autoBriSleep.value = cfg.auto_bri_sleep === 1
|
||||
displayHdrSleep.value = cfg.display_hdr_sleep === 1
|
||||
compatibilityMode.value = cfg.compatibility_mode === 1
|
||||
nowBriFile.value = cfg.now_bri_file || DEFAULT_NOW_BRI_FILE
|
||||
sysMaxBriFile.value = cfg.max_bri_file || DEFAULT_SYS_MAX_BRI_FILE
|
||||
inotifyEvents.value = cfg.inotify_events || 'c'
|
||||
@@ -136,6 +139,7 @@ export function useConfig() {
|
||||
log_max_size: parseInt(logMaxSize.value) || 500,
|
||||
auto_bri_sleep: autoBriSleep.value ? 1 : 0,
|
||||
display_hdr_sleep: displayHdrSleep.value ? 1 : 0,
|
||||
compatibility_mode: compatibilityMode.value ? 1 : 0,
|
||||
sleep_time: getSleepTimeStr(),
|
||||
log_level: logLevel.value,
|
||||
})
|
||||
@@ -143,7 +147,7 @@ export function useConfig() {
|
||||
const pidRes = await runCmd(`cat "${PID_FILE}"`)
|
||||
toast(
|
||||
pidRes.errno === 0 && pidRes.stdout.trim()
|
||||
? '配置已保存 (下次调整时生效)'
|
||||
? '配置已保存 (下次重启或触发时生效)'
|
||||
: '配置已保存 (服务未运行)',
|
||||
)
|
||||
dirty.value = false
|
||||
@@ -181,6 +185,7 @@ export function useConfig() {
|
||||
maxBri.value = backup.max_bri != null ? String(backup.max_bri) : ''
|
||||
autoBriSleep.value = backup.auto_bri_sleep === 1
|
||||
displayHdrSleep.value = backup.display_hdr_sleep === 1
|
||||
compatibilityMode.value = backup.compatibility_mode === 1
|
||||
stepsNum.value = backup.steps_num != null ? String(backup.steps_num) : '50'
|
||||
logMaxSize.value = backup.log_max_size != null ? String(backup.log_max_size) : '500'
|
||||
nowBriFile.value = backup.now_bri_file || DEFAULT_NOW_BRI_FILE
|
||||
@@ -244,6 +249,7 @@ export function useConfig() {
|
||||
logMaxSize,
|
||||
autoBriSleep,
|
||||
displayHdrSleep,
|
||||
compatibilityMode,
|
||||
sleepMode,
|
||||
sleepStartH,
|
||||
sleepStartM,
|
||||
|
||||
@@ -144,6 +144,17 @@ function handleSaveWebUI() {
|
||||
<Switch v-model="config.displayHdrSleep.value" />
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<div class="config-label">
|
||||
<span class="config-name">兼容模式 (轮询驱动)</span>
|
||||
<span class="config-desc">不使用事件监听,改用 2 秒一次轮询</span>
|
||||
<span class="config-desc" style="color: var(--color-warning)"
|
||||
>仅在事件驱动失效时开启,会略微增加耗电</span
|
||||
>
|
||||
</div>
|
||||
<Switch v-model="config.compatibilityMode.value" />
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<div class="config-label">
|
||||
<span class="config-name">定时休眠</span>
|
||||
|
||||
Reference in new issue
Block a user