mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2026-03-21 09:13:10 +00:00
feat: 更新噪音监测设置,默认启用监测和自动启动功能
This commit is contained in:
parent
9f95ca19cb
commit
aa09a1ffe1
@ -811,6 +811,10 @@ export default {
|
||||
// 先加载配置,再启动会话检查(自动检测当前是否在晚自习时段并自动开始)
|
||||
this.loadNoiseSessionConfig().then(() => {
|
||||
this.startSessionCheck()
|
||||
// autoStart: 不在自习时段时也自动开始监测(但不记录会话)
|
||||
if (getSetting('noiseMonitor.autoStart') && !this.noiseMonitoring) {
|
||||
this.startNoise()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@ -103,13 +103,13 @@ const settingsDefinitions = {
|
||||
// 噪音监测设置
|
||||
"noiseMonitor.enabled": {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
description: "启用环境噪音监测卡片",
|
||||
default: true,
|
||||
description: "启用环境噪音监测",
|
||||
icon: "mdi-microphone",
|
||||
},
|
||||
"noiseMonitor.autoStart": {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
default: true,
|
||||
description: "打开页面时自动开始监测",
|
||||
icon: "mdi-play-circle-outline",
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user