|
@@ -106,6 +106,8 @@ const App = () => {
|
|
|
*/
|
|
|
() => {
|
|
|
|
|
|
+ // 创建一个名为"triggerAlarm"的闹钟,5秒后触发,之后每10秒触发一次
|
|
|
+ chrome.alarms.create("triggerAlarmFromApp", {delayInMinutes: 0.083, periodInMinutes: 0.166});
|
|
|
//
|
|
|
chrome.storage?.local.get(['log'], (obj) => {
|
|
|
if (obj.log) {
|
|
@@ -123,6 +125,7 @@ const App = () => {
|
|
|
}
|
|
|
});
|
|
|
chrome.storage?.local.get(['voiceNames', 'voiceName', 'voiceVolume', 'wsUrl', 'startAlert', 'wifi'], (obj) => {
|
|
|
+ console.log("get", obj);
|
|
|
const voiceNames = obj.voiceNames;
|
|
|
// appendLog(voiceNames);
|
|
|
setOptions(voiceNames.map((voiceName) => {
|
|
@@ -248,7 +251,7 @@ const App = () => {
|
|
|
appendLog("停止报警");
|
|
|
setAlert(false);
|
|
|
});
|
|
|
- }}>停止</Button>
|
|
|
+ }}>静音</Button>
|
|
|
{alert ?
|
|
|
<SoundOutlined/>
|
|
|
:
|