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

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