acitivity is back and emergency is highlighted

This commit is contained in:
Luke Berndt
2025-07-12 10:43:04 -04:00
parent 0f69a3e9da
commit 57d3cb87da
8 changed files with 47 additions and 10 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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 = () => {

View File

@@ -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 = (<div><Icon name="warning sign" color="red" /> Emergency </div>)
}
if(patches && (patches.length > 1)) {
patchString = patches.join(", ");
@@ -100,6 +105,7 @@ function CallInfoPane(props) {
return (
<>
<Header as='h1'>{header}</Header>
{callEmergnecy}
<List bulleted horizontal link>
{srcList}
</List>

View File

@@ -108,6 +108,7 @@ const CallItem = (props) => {
} else if (call.emergency) {
rowSelected = {
positive: true,
error: true,
color: "red",
key: "red",
inverted: "true"

View File

@@ -115,9 +115,9 @@ const MediaPlayer = (props) => {
}
if (regionsPlugin) {
try {
regionsPlugin.destroy();
regionsPlugin.clearRegions();
} catch (error) {
console.warn('Error destroying regions plugin:', error);
console.warn('Error clearing regions in cleanup:', error);
}
}
};

View File

@@ -24,3 +24,7 @@ COPY *.conf /etc/nginx/
# Add virtual hosts
COPY ${STAGE}/vhosts/ /etc/nginx/conf.d/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

20
nginx-proxy/entrypoint.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -e
# Render the config from template
envsubst '$DOMAIN_NAME' < /etc/nginx/conf.d/site.template > /etc/nginx/conf.d/default.conf
# Test Nginx config
nginx -t
# Background job: reload Nginx every 6 hours to pick up new certs
(
while true; do
sleep 6h
echo "[nginx] Reloading config..."
nginx -s reload && echo "[nginx] Reload succeeded" || echo "[nginx] Reload failed"
done
) &
# Start Nginx in the foreground
exec nginx -g 'daemon off;'