File tree Expand file tree Collapse file tree 2 files changed +29
-7
lines changed Expand file tree Collapse file tree 2 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,19 @@ body {
194
194
margin-left : auto ;
195
195
}
196
196
}
197
+
198
+ & .camera-unavailable {
199
+ background-color : $Surface-status-red ;
200
+ border-left : 3px solid ;
201
+ border-color : $Type-status-red ;
202
+ padding : 1rem ;
203
+ min-height : 225px ;
204
+ font-size : 1rem ;
205
+ p , .card-img-box {
206
+ color : $Type-status-red ;
207
+ font-weight : 700 ;
208
+ }
209
+ }
197
210
}
198
211
}
199
212
}
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import { useNavigate } from 'react-router-dom';
8
8
import Button from 'react-bootstrap/Button' ;
9
9
import FriendlyTime from '../FriendlyTime' ;
10
10
import parse from 'html-react-parser' ;
11
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
12
+ import { faVideoSlash } from '@fortawesome/free-solid-svg-icons' ;
11
13
12
14
import colocatedCamIcon from '../../images/colocated-camera.svg' ;
13
15
@@ -84,14 +86,21 @@ export default function CamPopup(props) {
84
86
< img className = "colocated-camera-icon" src = { colocatedCamIcon } role = "presentation" alt = "colocated cameras icon" />
85
87
{ renderCamGroup ( ) }
86
88
</ div >
87
- < div className = "camera-image" >
88
- < img src = { camera . links . imageSource } width = '300' />
89
-
90
- < div className = "timestamp" >
91
- < p className = "driveBC" > Drive< span > BC</ span > </ p >
92
- < FriendlyTime date = { camera . last_update_modified } />
89
+ { camera . is_on ?
90
+ < div className = "camera-image" >
91
+ < img src = { camera . links . imageSource } width = '300' />
92
+ < div className = "timestamp" >
93
+ < p className = "driveBC" > Drive< span > BC</ span > </ p >
94
+ < FriendlyTime date = { camera . last_update_modified } />
95
+ </ div >
96
+ </ div > :
97
+ < div className = 'camera-image camera-unavailable' >
98
+ < div className = "card-img-box unavailable" >
99
+ < FontAwesomeIcon icon = { faVideoSlash } />
100
+ </ div >
101
+ < p > This camera image is currently unavailable due to technical difficulties.</ p >
93
102
</ div >
94
- </ div >
103
+ }
95
104
</ div >
96
105
</ div >
97
106
</ div >
You can’t perform that action at this time.
0 commit comments