diff --git a/backend/controllers/calls.js b/backend/controllers/calls.js index 060e820..a8fa53c 100644 --- a/backend/controllers/calls.js +++ b/backend/controllers/calls.js @@ -19,6 +19,7 @@ const build_call_list = (items) => { time: item.time, srcList: item.srcList, star: item.star, + emergency: item.emergency, freq: item.freq, patches: item.patches, len: Math.round(item.len) @@ -37,6 +38,7 @@ async function get_calls(query, numResults, middleDate, res) { path: true, name: true, time: true, + emergency: true, srcList: true, freq: true, patches: true, @@ -216,6 +218,7 @@ function package_call(item) { freq: item.freq, srcList: item.srcList, star: item.star, + emergency: item.emergency, len: Math.round(item.len) }; return call; diff --git a/docker-compose.yml b/docker-compose.yml index 7093c68..57ad39d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,7 +25,6 @@ services: - frontend - account - admin - command: /bin/bash -c "envsubst '$$DOMAIN_NAME' < /etc/nginx/conf.d/site.template > /etc/nginx/conf.d/default.conf && while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g 'daemon off;'" certbot: image: certbot/certbot:latest diff --git a/frontend/src/Call/CallPlayer.js b/frontend/src/Call/CallPlayer.js index c30bd9e..fe4c121 100644 --- a/frontend/src/Call/CallPlayer.js +++ b/frontend/src/Call/CallPlayer.js @@ -177,13 +177,17 @@ function CallPlayer(props) { } }, [system]) - useEffect(async () => { - try { - const wakeLock = await navigator.wakeLock.request("screen"); - } catch (err) { - // the wake lock request fails - usually system related, such being low on battery - console.log(`${err.name}, ${err.message}`); - } + useEffect(() => { + const requestWakeLock = async () => { + try { + const wakeLock = await navigator.wakeLock.request("screen"); + } catch (err) { + // the wake lock request fails - usually system related, such being low on battery + console.log(`${err.name}, ${err.message}`); + } + }; + + requestWakeLock(); }, []); const handleStatusDismiss = () => { diff --git a/frontend/src/Call/components/CallInfoPane.js b/frontend/src/Call/components/CallInfoPane.js index a92c368..e8b08aa 100644 --- a/frontend/src/Call/components/CallInfoPane.js +++ b/frontend/src/Call/components/CallInfoPane.js @@ -26,6 +26,7 @@ function CallInfoPane(props) { let patchString = ""; let header = "Call Info" let title = "" + let callEmergnecy = (<> >); const currentCall = props.call ? props.call : false; const { callLink, callDownload, callTweet } = useCallLink(props.call) const { data: allSystems, isSuccess } = useGetSystemsQuery(); @@ -54,6 +55,10 @@ function CallInfoPane(props) { callLength = currentCall.len; talkgroupNum = currentCall.talkgroupNum; patches = currentCall.patches; + + if (currentCall.emergency) { + callEmergnecy = (