From 8f8073342c6639974eb46b27ebe9be2f94309a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E5=A4=9C?= Date: Wed, 29 Jan 2025 13:00:49 +0800 Subject: [PATCH] fix: eew --- signature.json | 10 +++++----- web/js/eew.js | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/signature.json b/signature.json index 7d612fd..9f1edba 100644 --- a/signature.json +++ b/signature.json @@ -1,10 +1,10 @@ { - "timestamp": 1738121408904, - "version": "1.0.0", + "timestamp": 1738126807155, + "version": "1.0.1", "fileHashes": { "config.yml": "73a6eb7e322e82b108b1ca18ca159a430a36c219a501847ca6504f424c55baf7", "index.js": "e9029368314c6feb199abbd4e443399e0093655ad42960e32949f3ddf74cb3d2", - "info.json": "ddbfb31f60ad086a3880162ab909f4d1ef1b2611789dc269cab33d1df1451065", + "info.json": "8496c5fc508ee41229d739c065818256476addbf160944333b23b25312d46e0e", "resource/default.yml": "73a6eb7e322e82b108b1ca18ca159a430a36c219a501847ca6504f424c55baf7", "web/audio/1.wav": "1f7fea8773b5a2dc85b858673eeeaed35b855928a3bb79c7ae07ea9364ce8569", "web/audio/2.wav": "b462a693887188e64b961201468d49aee992193a0817dfccdbaa5212587c019d", @@ -32,12 +32,12 @@ "web/css/toast.css": "f2555beb5e21ba66a99d6ce244c4c68df11fc3302ff139f88a21ad912e9bef92", "web/index.html": "cd6a85399a6e838968314a1ebd13036e6222266400d7284fb90d065f6f639f16", "web/js/box.js": "89c611e48c3417a503be6a482f4cf4e6d154fb8e5de7bf6a2565c955949bb740", - "web/js/eew.js": "ae02dccb03761922d05f08f4789152d393db92d7f43e055106b9e54033890501", + "web/js/eew.js": "cca0e6042a087311f24f70e2217037e3ed905a9006ebf33498f74e32e5b55730", "web/js/index.js": "bd59fc99807f656a6aac6c1c438f77f2eb15b6444e0936104e2602e5a3f2a875", "web/js/nav.js": "9f7c1e0226b8b6cffd3d46d791166651e8c2c1e7081a8c8cf4911cac54b6eb1e", "web/resource/js/echarts.js": "4ff1bfa8176d508c2c654960111ae00044fe891358c0c7b692a92698357011b0", "web/resource/region_v2.json": "1e6837a1d099e866a327c521ee539fa29b3e4454d4d3cfe2046a74b6baaa0652" }, - "signature": "uF9MwHfTnlNLcF4dyk7slDeV8FY6C/uggmyt1I8/XK5udJDlDvKOVc/vAgseiP1E5Rku3DRl1r/swURsfUX6SCyH49wd0/AznNryG9i9b5UNaY+VUOIzgUnn5OOtqX5IyHB3zw3z9iZhkWcqwPZnE2rbInGjulglWJpUPxRh+fDVvOuMwTW98+Rjn3k5hqnNi2EQE8/w/Lhgba004a9QvqCYyUDKzFpRj2nmwEX4UqGZ5DpCTtJaqcWgR2puULkCo2J2WQiTkx8tzPlwbmXbiW0gFHsie5un+rYfcX9Lqp80gwvjKZzI26KGno+WjnShcP5bjIHg3sL1EsuwvfwZ2Q==", + "signature": "jcX9KCROFJQrtq1mr6fiR8XwgCdv8foQKbALW9Nbw7EdaUxuUhTq7SPIBnPENf8A8Hi8Xc6sODm0IHutm28mObDyVRFYR9Pf0Y2403Zg0R490r3gqL5bDfwg4UGzLDwFbERYRbgfaXaYcnzhRwPB+K0IN0qm9SZzLj02xRh+BAI1eMJadvC87ynsdtFyhJDIdJbgDBm2fLto9DN2GwgP6ASdIwgEgHQgRfJKK0AcRZYKFAULcxs4s67jpbwWxUSNbpqlK7dBrxiXnyMcyzYj8ZfYiiE84caVy1QAjG6Ke6SEnHevxM/McEtZ64tfQQ2iGErdvEKIDUPj3pDWOpLT6g==", "keyId": "official" } \ No newline at end of file diff --git a/web/js/eew.js b/web/js/eew.js index 3813dd8..033fcb5 100644 --- a/web/js/eew.js +++ b/web/js/eew.js @@ -106,7 +106,7 @@ let area_alert_text = ""; ipcRenderer.on("play_mode", (event, ans) => { if (ans == 0) { play_mode_name = "HTTP"; - if (play_mode_num == 2) eew_timer_fun(); + if (play_mode_num == 2) eew_timer_fun(true); } else if (ans == 1) { play_mode_name = "websocket"; } else if (ans == 2) { @@ -181,7 +181,9 @@ function eew_area_pga(lat, lon, depth, mag) { return json; } -function eew_timer_fun() { +function eew_timer_fun(stop = false) { + let time = 60_000; + if (stop) time = 0; if (eew_timer) clearTimeout(eew_timer); eew_timer = null; eew_timer = setTimeout(() => { @@ -209,7 +211,7 @@ function eew_timer_fun() { eew_rts = 0; eew_alert = 0; area_alert_text = ""; - }, 60_000); + }, time); } ipcRenderer.on("showEew", (event, ans) => { @@ -370,7 +372,7 @@ ipcRenderer.on("showEew", (event, ans) => { ], }); - if (play_mode_num == 2) eew_timer_fun(); + if (play_mode_num == 2) eew_timer_fun(true); }); ipcRenderer.on("EewEnd", (event, ans) => {