Skip to content

Commit cd55224

Browse files
committed
DBC22-1677
1 parent 797d732 commit cd55224

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

src/frontend/src/App.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,19 @@ body {
194194
margin-left: auto;
195195
}
196196
}
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+
}
197210
}
198211
}
199212
}

src/frontend/src/Components/map/camPopup.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { useNavigate } from 'react-router-dom';
88
import Button from 'react-bootstrap/Button';
99
import FriendlyTime from '../FriendlyTime';
1010
import parse from 'html-react-parser';
11+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
12+
import { faVideoSlash } from '@fortawesome/free-solid-svg-icons';
1113

1214
import colocatedCamIcon from '../../images/colocated-camera.svg';
1315

@@ -84,14 +86,21 @@ export default function CamPopup(props) {
8486
<img className="colocated-camera-icon" src={colocatedCamIcon} role="presentation" alt="colocated cameras icon" />
8587
{renderCamGroup()}
8688
</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>
93102
</div>
94-
</div>
103+
}
95104
</div>
96105
</div>
97106
</div>

0 commit comments

Comments
 (0)