Skip to content

Commit

Permalink
Merge pull request #493 from HSLdevcom/DT-6646
Browse files Browse the repository at this point in the history
DT-6646 Alert logo accessibility
  • Loading branch information
Antiik91 authored Jan 8, 2025
2 parents cd37cfe + 8d34f0c commit b54b8e5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/defaultConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@ export default {
},
lineCodeMaxLength: 7, // Maximum length of line code to show in the monitor, values larger than 7 are not supported by horizontal layouts
rtVehicleOffsetSeconds: 120, // How many seconds in the future the real-time vehicle should be shown
alertIcon: 'alert',
};
1 change: 1 addition & 0 deletions src/monitorConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,5 +217,6 @@ export default {
map: {
inUse: true,
},
alertIcon: 'query-error-alert',
},
};
1 change: 1 addition & 0 deletions src/test/MonitorRow.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const defaultProps = {
const mockConfig = {
useTilde: true,
lineCodeMaxLength: 7,
alertIcon: 'alert',
};

const withContext = prps => {
Expand Down
8 changes: 4 additions & 4 deletions src/ui/MonitorRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,13 @@ const MonitorRow: FC<IProps> = ({
)}
</div>
<div className="via-destination">
{isCancelled && <Icon img={'alert'} />}
{isCancelled && <Icon img={config.alertIcon} />}
{t('cancelled', { lng: currentLang })}
</div>
</>
) : (
<>
<Icon img={'alert'} />
<Icon img={config.alertIcon} />
<div className="cancelled-row">
{t('cancelled', { lng: currentLang })}
</div>
Expand All @@ -315,7 +315,7 @@ const MonitorRow: FC<IProps> = ({
)}
</div>
<div className="via-destination">
{isCancelled && <Icon img={'alert'} />}
{isCancelled && <Icon img={config.alertIcon} />}
{viaDestination ||
(isCancelled && t('cancelled', { lng: currentLang }))}
{replaceViaMetroStringWithIcon && (
Expand All @@ -332,7 +332,7 @@ const MonitorRow: FC<IProps> = ({
</>
) : (
<>
{isCancelled && <Icon img={'alert'} />}
{isCancelled && <Icon img={config.alertIcon} />}
<div className="destination-row">
{destination}
{replaceMetroStringWithIcon && (
Expand Down

0 comments on commit b54b8e5

Please sign in to comment.