mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 01:07:42 -05:00
add system name
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user