Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/map/components/Markers/StationMarker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ export const StationMarker = ({ station }: StationMarkerProps) => {
const { colorScheme } = useMantineColorScheme();

let botIcon = "/markers/icon-bot-simrail.jpg";
if (colorScheme === "dark")
if (colorScheme === "dark" || colorScheme === "auto" && window.matchMedia('(prefers-color-scheme: dark)').matches)
botIcon = "/markers/icon-bot-simrail-dark.jpg";
// window.matchMedia('(prefers-color-scheme: dark)').matches incase colorScheme === auto we need to see what the system uses

const icon = L.icon({
iconUrl: station.DispatchedBy[0] && avatar ? avatar : botIcon,
Expand Down
4 changes: 2 additions & 2 deletions packages/map/components/Markers/TrainMarker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const TrainMarker = ({ train }: TrainMarkerProps) => {

const { colorScheme } = useMantineColorScheme();


let botIcon = "/markers/icon-bot-simrail.jpg";
if (colorScheme === "dark")
if (colorScheme === "dark" || colorScheme === "auto" && window.matchMedia('(prefers-color-scheme: dark)').matches)
botIcon = "/markers/icon-bot-simrail-dark.jpg";
// window.matchMedia('(prefers-color-scheme: dark)').matches incase colorScheme === auto we need to see what the system uses

const icon = L.icon({
iconUrl: train.TrainData.ControlledBySteamID && avatar ? avatar : botIcon,
Expand Down
Loading