Skip to content

Commit

Permalink
语音球设置优化
Browse files Browse the repository at this point in the history
优化语音球在设置中更改后需要重启才能生效的问题

Issue: #472
  • Loading branch information
lingbopro committed Sep 19, 2024
1 parent dbb80a4 commit ce6a2c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion desktop.html
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,7 @@ <h2>请求记录</h2>
</div>
<div class="border-radius"><icon><i class="bi bi-mic-fill"></i></icon><div><p>语音输入球</p><p>是否启用语音输入球</p></div>
<div class="alr">
<a class="a checkbox checked" id="sys_setting_7" onclick="sys_setting[6]=1-sys_setting[6];document.querySelector('.rainbow-container-main').setAttribute('style', 'display:' + (sys_setting[6] ? 'block' : 'none')+ ';');document.getElementById('sys_setting_7').setAttribute('class', 'a checkbox' + (sys_setting[6]?' checked':''));saveDesktop();"></a>
<a class="a checkbox checked" id="sys_setting_7" onclick="sys_setting[6]=1-sys_setting[6];document.querySelector('.rainbow-container-main').setAttribute('style', 'display:' + (sys_setting[6] ? 'block' : 'none')+ ';');document.getElementById('sys_setting_7').setAttribute('class', 'a checkbox' + (sys_setting[6]?' checked':''));updateVoiceBallStatus();saveDesktop();"></a>
</div>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2957,6 +2957,10 @@ function startSpeechRecognition() {

}

function updateVoiceBallStatus() {
document.getElementById('voiceBall').style.setProperty('display', use_mic_voice ? 'block' : 'none');
}

// 小组件功能
let widgets = {
widgets: {
Expand Down Expand Up @@ -4193,7 +4197,7 @@ document.getElementsByTagName('body')[0].onload = () => {
}
}
});
document.getElementById('voiceBall').style.setProperty('display', use_mic_voice ? 'block' : 'none');
updateVoiceBallStatus();
// loadlang();
};

Expand Down

0 comments on commit ce6a2c1

Please sign in to comment.