Skip to content

Commit 7d56090

Browse files
Merge pull request #341 from ipnet-mesh/fix/mobile-overflow-dashboard-routes
Fix horizontal overflow on Dashboard and Routes (mobile portrait)
2 parents d13695e + 471830d commit 7d56090

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/meshcore_hub/web/static/js/spa-react/pages/Dashboard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ export function DashboardPage() {
563563
<div className={`grid grid-cols-1 ${gridCols(bottomCount)} gap-6`}>
564564
{showAdverts && (
565565
<div
566-
className="card bg-base-100 shadow-xl panel-accent"
566+
className="card bg-base-100 shadow-xl panel-accent min-w-0"
567567
style={panelStyle("--color-adverts")}
568568
>
569569
<div className="card-body">
@@ -604,12 +604,12 @@ export function DashboardPage() {
604604
to={`/nodes/${ad.public_key}`}
605605
className="link link-hover"
606606
>
607-
<div className="font-medium">
607+
<div className="font-medium max-w-[10rem] truncate">
608608
{displayName}
609609
</div>
610610
</Link>
611611
{friendlyName && (
612-
<div className="text-xs opacity-50 font-mono">
612+
<div className="text-xs opacity-50 font-mono max-w-[10rem] truncate">
613613
{ad.public_key.slice(0, 12)}...
614614
</div>
615615
)}
@@ -642,7 +642,7 @@ export function DashboardPage() {
642642

643643
{showMessages && channelEntries.length > 0 && (
644644
<div
645-
className="card bg-base-100 shadow-xl panel-accent"
645+
className="card bg-base-100 shadow-xl panel-accent min-w-0"
646646
style={panelStyle("--color-messages")}
647647
>
648648
<div className="card-body">

src/meshcore_hub/web/static/js/spa-react/pages/Routes.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,12 +466,12 @@ function DetailContent({
466466
return (
467467
<div className="mt-2 space-y-3 text-sm">
468468
{history && (
469-
<div className="mb-3">
469+
<div className="mb-3 min-w-0">
470470
<RouteDetailStrip data={history} />
471471
{historyData.length > 0 && (
472-
<div className="flex text-xs opacity-50 mt-0.5">
472+
<div className="flex text-xs opacity-50 mt-0.5 min-w-0">
473473
{historyData.map((d, i) => (
474-
<span key={d.date} className="flex-1 text-center">
474+
<span key={d.date} className="flex-1 text-center min-w-0 truncate">
475475
{i === historyData.length - 1
476476
? t("routes.last_n_hours", { n: route.window_hours })
477477
: new Date(`${d.date}T00:00:00`).toLocaleDateString(
@@ -487,7 +487,7 @@ function DetailContent({
487487
{matches.length > 0 && (
488488
<div>
489489
<strong className="opacity-70">{t("routes.recent_packets")}</strong>
490-
<div className="mt-2 space-y-2">
490+
<div className="mt-2 space-y-2 overflow-hidden">
491491
{matches.map((m, i) => (
492492
<MatchRow
493493
key={`${m.packet_hash || "match"}-${i}`}
@@ -542,7 +542,7 @@ function RouteCard({
542542

543543
return (
544544
<div
545-
className="card bg-base-100 shadow-xl h-full"
545+
className="card bg-base-100 shadow-xl h-full min-w-0"
546546
data-testid="route-card"
547547
data-route-label={`${route.from_label}${route.to_label}`}
548548
>

0 commit comments

Comments
 (0)