mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
acitivity is back and emergency is highlighted
This commit is contained in:
@@ -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 = () => {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -108,6 +108,7 @@ const CallItem = (props) => {
|
||||
} else if (call.emergency) {
|
||||
rowSelected = {
|
||||
positive: true,
|
||||
error: true,
|
||||
color: "red",
|
||||
key: "red",
|
||||
inverted: "true"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user