add system name

This commit is contained in:
Luke Berndt
2023-01-29 21:23:11 -05:00
parent 20de3600b8
commit e79620196b
8 changed files with 87 additions and 46 deletions

View File

@@ -89,11 +89,21 @@ const CallItem = (props) => {
} else {
talkgroup = talkgroups.talkgroups[call.talkgroupNum].description;
}
let playStatus = (<></>)
if (activeCall) {
playStatus = (<Icon name="play" size='small' color="green"/>)
} else if (!call.played) {
playStatus = (<Icon name="chevron right" size='small' disabled/>)
}
return (
<Table.Row draggable="true" onClick={(e) => props.onClick({ call: call }, e)} {...rowSelected} onDragStart={onDragStart} data-callid={call._id}>
<Table.Cell> {call.len} </Table.Cell>
<Table.Cell> {talkgroup} </Table.Cell>
<Table.Cell> {time.toLocaleTimeString()} </Table.Cell>
<Table.Cell>{playStatus}</Table.Cell>
<Table.Cell>{call.len}</Table.Cell>
<Table.Cell>{talkgroup}</Table.Cell>
<Table.Cell>{time.toLocaleTimeString()}</Table.Cell>
<Table.Cell onMouseEnter={() => setStarVisible(true)} onMouseLeave={() => setStarVisible(false)} onClick={handleStarClicked}>{starButton}</Table.Cell>
</Table.Row>
);

View File

@@ -33,6 +33,7 @@ const ListCalls = (props) => {
<Table id="calls" unstackable >
<Table.Header >
<Table.Row>
<Table.HeaderCell> </Table.HeaderCell>
<Table.HeaderCell>Len</Table.HeaderCell>
<Table.HeaderCell>Talkgroup</Table.HeaderCell>
<Table.HeaderCell>Time</Table.HeaderCell>

View File

@@ -18,9 +18,20 @@ const MediaPlayer = (props) => {
const [isPlaying, setIsPlaying] = useState(false);
const parentHandlePlayPause = props.onPlayPause
const handlePause = () => { setIsPlaying(false); parentHandlePlayPause(false); }
const handlePlay = () => { setIsPlaying(true); parentHandlePlayPause(true); }
const playPause = () => { const audio = audioRef.current.audioEl.current; if (isPlaying) { audio.pause(); } else { audio.play(); } }
const handlePause = () => { setIsPlaying(false); }
const handlePlay = () => { setIsPlaying(true); }
const playPause = () => {
const audio = audioRef.current.audioEl.current;
if (isPlaying) {
setIsPlaying(false);
parentHandlePlayPause(false);
audio.pause();
} else {
setIsPlaying(true);
parentHandlePlayPause(true);
audio.play();
}
}
const call = props.call;