fix(geoportal-v2): remove eterra.live links + fix Actualizează wrap
Per Marius's feedback: eterra.live is a separate product, ArchiTools
shouldn't link out to it. Removed both touch-points:
1. The "eterra.live" button I'd added beside "Actualizează" in the
Date eTerra header — gone. This was also breaking layout (the
second button forced "acum câteva secunde" to wrap into "acum /
câteva / secunde" stacked above the button text).
2. The "Export GPKG" action in the toolbar — gone. It used to deep-
link to eterra.live/harta?…&autoexport=geopackage. Toolbar now
holds just "Comandă CF" which stays internal (/parcel-sync).
While in there:
- Actualizează button: `whitespace-nowrap` + `shrink-0` so it stops
wrapping when the panel is at min-width.
- Dropped the inline " · acum X min" beside the button label —
cleaner button, less truncation risk.
- Resurfaced the relative time as a small line at the bottom of the
Date eTerra body ("Actualizat din ANCPI · acum 3 min"). Same info,
no layout pressure.
- Cleaned unused lucide imports (Download, ExternalLink, Hash,
Layers, CalendarDays) that were leftover from the removed
eterra.live button + Cladire icon experiments.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { signIn } from "next-auth/react";
|
||||
import {
|
||||
X, RefreshCw, Loader2, FileText, Download, AlertCircle,
|
||||
X, RefreshCw, Loader2, FileText, AlertCircle,
|
||||
Home, Building, Building2, MapPin, ChevronRight, Users,
|
||||
Sparkles, User, ShieldCheck, AlertTriangle, HelpCircle,
|
||||
Factory, Warehouse, ExternalLink, Hash, Layers, CalendarDays,
|
||||
Factory, Warehouse,
|
||||
} from "lucide-react";
|
||||
import { cn } from "@/shared/lib/utils";
|
||||
|
||||
@@ -914,13 +914,12 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
|
||||
<Sparkles className="h-2.5 w-2.5" />
|
||||
Date eTerra
|
||||
</p>
|
||||
<div className="ml-auto flex items-center gap-1">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => refreshFromAncpi({ manual: true })}
|
||||
disabled={refreshing || !feature.siruta || !feature.cadastralRef}
|
||||
className={cn(
|
||||
"inline-flex h-7 items-center gap-1.5 rounded px-2 text-[11px] font-medium transition-colors",
|
||||
"ml-auto inline-flex h-7 shrink-0 items-center gap-1.5 whitespace-nowrap rounded px-2 text-[11px] font-medium transition-colors",
|
||||
"border bg-background hover:bg-muted disabled:opacity-50",
|
||||
)}
|
||||
>
|
||||
@@ -929,24 +928,8 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
|
||||
) : (
|
||||
<RefreshCw className="h-3 w-3 shrink-0" />
|
||||
)}
|
||||
<span>{hasEnrich ? "Actualizează" : "Încarcă"}</span>
|
||||
{enrichedAgo && hasEnrich && !refreshing && (
|
||||
<span className="hidden text-muted-foreground/80 sm:inline">
|
||||
· {enrichedAgo}
|
||||
</span>
|
||||
)}
|
||||
<span>{hasEnrich ? "Actualizează" : "Încarcă din ANCPI"}</span>
|
||||
</button>
|
||||
<a
|
||||
href={`https://eterra.live/harta?siruta=${encodeURIComponent(feature.siruta)}&cad=${encodeURIComponent(feature.cadastralRef)}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex h-7 items-center gap-1 rounded border bg-background px-2 text-[11px] font-medium hover:bg-muted"
|
||||
title="Deschide parcela în eterra.live"
|
||||
>
|
||||
<ExternalLink className="h-3 w-3 shrink-0" />
|
||||
eterra.live
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={cn("space-y-2 px-2.5 py-2", refreshing && "animate-pulse opacity-70")}>
|
||||
@@ -1022,6 +1005,12 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
|
||||
</div>
|
||||
</details>
|
||||
)}
|
||||
|
||||
{enrichedAgo && hasEnrich && (
|
||||
<p className="border-t pt-1.5 text-[10px] text-muted-foreground">
|
||||
Actualizat din ANCPI · {enrichedAgo}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -1224,18 +1213,6 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
|
||||
|
||||
{/* Actions toolbar */}
|
||||
<div className="flex flex-wrap gap-1 border-t bg-muted/30 p-1.5">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
const url = `https://eterra.live/harta?siruta=${encodeURIComponent(feature.siruta)}&cad=${encodeURIComponent(feature.cadastralRef)}&autoexport=geopackage`;
|
||||
window.open(url, "_blank", "noopener,noreferrer");
|
||||
}}
|
||||
className="inline-flex items-center gap-1 rounded bg-background px-2 py-1 text-[11px] font-medium hover:bg-muted"
|
||||
title="Deschide în eterra.live pentru export"
|
||||
>
|
||||
<Download className="h-3 w-3" />
|
||||
Export GPKG
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user