mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-05-20 14:44:51 +02:00
fix: normalize action button sizing, hide generic Poi subtitle
This commit is contained in:
parent
0c5f9f47d0
commit
31d1ef07dd
2 changed files with 3 additions and 3 deletions
|
|
@ -396,7 +396,7 @@ export function PlaceCard({ place, variant = "preview", expanded = true, onToggl
|
||||||
<div className="flex flex-col min-w-0">
|
<div className="flex flex-col min-w-0">
|
||||||
<span className="text-sm font-medium truncate" style={{ color: "var(--text-primary)" }}>{(place.raw?.name || place.name) || "Unknown place"}</span>
|
<span className="text-sm font-medium truncate" style={{ color: "var(--text-primary)" }}>{(place.raw?.name || place.name) || "Unknown place"}</span>
|
||||||
<div className="flex items-center gap-1.5 text-[11px]" style={{ color: "var(--text-tertiary)" }}>
|
<div className="flex items-center gap-1.5 text-[11px]" style={{ color: "var(--text-tertiary)" }}>
|
||||||
{place.type && <span className="capitalize">{place.type}</span>}
|
{place.type && !["poi", "unknown", ""].includes(place.type.toLowerCase()) && <span className="capitalize">{place.type}</span>}
|
||||||
{driveTime != null && <><span>{"\u00b7"}</span><span>{formatDriveTime(driveTime)} drive</span></>}
|
{driveTime != null && <><span>{"\u00b7"}</span><span>{formatDriveTime(driveTime)} drive</span></>}
|
||||||
{nearbyLabel && <><span>{"\u00b7"}</span><span>Near {nearbyLabel}</span></>}
|
{nearbyLabel && <><span>{"\u00b7"}</span><span>Near {nearbyLabel}</span></>}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -420,7 +420,7 @@ export function PlaceCard({ place, variant = "preview", expanded = true, onToggl
|
||||||
<div className="mt-3 pt-3 flex gap-2" style={{ borderTop: "1px solid var(--border)" }}>
|
<div className="mt-3 pt-3 flex gap-2" style={{ borderTop: "1px solid var(--border)" }}>
|
||||||
{variant === "preview" && (
|
{variant === "preview" && (
|
||||||
<>
|
<>
|
||||||
{stops.length < 2 && <button onClick={handleDirections} className="flex-1 flex items-center justify-center gap-1.5 py-2 px-3 rounded-lg text-xs font-medium" style={{ background: "var(--accent)", color: "var(--text-inverse)" }}><Navigation size={13} />Get Directions</button>}
|
{stops.length < 2 && <button onClick={handleDirections} className="flex-1 flex items-center justify-center gap-1.5 py-2 px-3 rounded-lg text-xs font-medium" style={{ background: "var(--accent)", color: "var(--text-inverse)" }}><Navigation size={13} />Directions</button>}
|
||||||
{existingStopIndex >= 0 ? (
|
{existingStopIndex >= 0 ? (
|
||||||
<span className="flex-1 flex items-center justify-center gap-1.5 py-2 px-3 rounded-lg text-xs font-medium" style={{ background: "var(--accent-muted)", color: "var(--accent)" }}>Stop {String.fromCharCode(65 + existingStopIndex)}</span>
|
<span className="flex-1 flex items-center justify-center gap-1.5 py-2 px-3 rounded-lg text-xs font-medium" style={{ background: "var(--accent-muted)", color: "var(--accent)" }}>Stop {String.fromCharCode(65 + existingStopIndex)}</span>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
||||||
|
|
@ -677,7 +677,7 @@ export default function PlaceDetail() {
|
||||||
{(() => {
|
{(() => {
|
||||||
const cat = placeDetails && placeDetails !== 'loading' ? placeDetails.category : null
|
const cat = placeDetails && placeDetails !== 'loading' ? placeDetails.category : null
|
||||||
const parts = []
|
const parts = []
|
||||||
if (cat) parts.push(cat)
|
if (cat && !["poi", "unknown", ""].includes(cat.toLowerCase())) parts.push(cat)
|
||||||
if (nearbyLabel) parts.push(`near ${nearbyLabel}`)
|
if (nearbyLabel) parts.push(`near ${nearbyLabel}`)
|
||||||
if (driveTime != null) parts.push(formatDriveTime(driveTime))
|
if (driveTime != null) parts.push(formatDriveTime(driveTime))
|
||||||
if (parts.length === 0) return null
|
if (parts.length === 0) return null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue