Add smaller location labels to overlay

This commit is contained in:
Max Goodhart
2026-01-24 16:25:32 -08:00
parent 6bca751f54
commit e6467bdd54

View File

@@ -5,6 +5,7 @@ import { useHotkeys } from 'react-hotkeys-hook'
import {
FaFacebook,
FaInstagram,
FaMapMarkerAlt,
FaTiktok,
FaTwitch,
FaVolumeUp,
@@ -80,18 +81,18 @@ function Overlay({
isListening={isListening}
>
<StreamIcon url={content.url} />
<span>
{data.label ? (
data.label
) : (
<>
{data.source} &ndash; {data.city} {data.state}
</>
)}
</span>
<span>{data.label ? data.label : <>{data.source}</>}</span>
{(isListening || isBackgroundListening) && <FaVolumeUp />}
</StreamTitle>
)}
{data?.city && (
<StreamLocation>
<FaMapMarkerAlt />
<span>
{data.city} {data.state}
</span>
</StreamLocation>
)}
{isLoading && <LoadingSpinner />}
</SpaceBorder>
)
@@ -276,6 +277,34 @@ const StreamTitle = styled.div`
}
`
const StreamLocation = styled.div`
position: absolute;
bottom: 0px;
left: 0px;
max-width: calc(100% - 18px);
display: flex;
align-items: center;
gap: 3px;
margin: 5px 9px;
font-weight: 800;
font-size: 14px;
color: white;
letter-spacing: -0.025em;
opacity: 0.9;
filter: drop-shadow(0 0 4px black);
span {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
svg {
flex-shrink: 0;
}
`
const LoadingSpinner = styled(TailSpin)`
position: absolute;
left: 50%;