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 { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { signIn } from "next-auth/react";
|
import { signIn } from "next-auth/react";
|
||||||
import {
|
import {
|
||||||
X, RefreshCw, Loader2, FileText, Download, AlertCircle,
|
X, RefreshCw, Loader2, FileText, AlertCircle,
|
||||||
Home, Building, Building2, MapPin, ChevronRight, Users,
|
Home, Building, Building2, MapPin, ChevronRight, Users,
|
||||||
Sparkles, User, ShieldCheck, AlertTriangle, HelpCircle,
|
Sparkles, User, ShieldCheck, AlertTriangle, HelpCircle,
|
||||||
Factory, Warehouse, ExternalLink, Hash, Layers, CalendarDays,
|
Factory, Warehouse,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { cn } from "@/shared/lib/utils";
|
import { cn } from "@/shared/lib/utils";
|
||||||
|
|
||||||
@@ -914,39 +914,22 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
|
|||||||
<Sparkles className="h-2.5 w-2.5" />
|
<Sparkles className="h-2.5 w-2.5" />
|
||||||
Date eTerra
|
Date eTerra
|
||||||
</p>
|
</p>
|
||||||
<div className="ml-auto flex items-center gap-1">
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
onClick={() => refreshFromAncpi({ manual: true })}
|
||||||
onClick={() => refreshFromAncpi({ manual: true })}
|
disabled={refreshing || !feature.siruta || !feature.cadastralRef}
|
||||||
disabled={refreshing || !feature.siruta || !feature.cadastralRef}
|
className={cn(
|
||||||
className={cn(
|
"ml-auto inline-flex h-7 shrink-0 items-center gap-1.5 whitespace-nowrap rounded px-2 text-[11px] font-medium transition-colors",
|
||||||
"inline-flex h-7 items-center gap-1.5 rounded px-2 text-[11px] font-medium transition-colors",
|
"border bg-background hover:bg-muted disabled:opacity-50",
|
||||||
"border bg-background hover:bg-muted disabled:opacity-50",
|
)}
|
||||||
)}
|
>
|
||||||
>
|
{refreshing ? (
|
||||||
{refreshing ? (
|
<Loader2 className="h-3 w-3 shrink-0 animate-spin" />
|
||||||
<Loader2 className="h-3 w-3 shrink-0 animate-spin" />
|
) : (
|
||||||
) : (
|
<RefreshCw className="h-3 w-3 shrink-0" />
|
||||||
<RefreshCw className="h-3 w-3 shrink-0" />
|
)}
|
||||||
)}
|
<span>{hasEnrich ? "Actualizează" : "Încarcă din ANCPI"}</span>
|
||||||
<span>{hasEnrich ? "Actualizează" : "Încarcă"}</span>
|
</button>
|
||||||
{enrichedAgo && hasEnrich && !refreshing && (
|
|
||||||
<span className="hidden text-muted-foreground/80 sm:inline">
|
|
||||||
· {enrichedAgo}
|
|
||||||
</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>
|
||||||
|
|
||||||
<div className={cn("space-y-2 px-2.5 py-2", refreshing && "animate-pulse opacity-70")}>
|
<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>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{enrichedAgo && hasEnrich && (
|
||||||
|
<p className="border-t pt-1.5 text-[10px] text-muted-foreground">
|
||||||
|
Actualizat din ANCPI · {enrichedAgo}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -1224,18 +1213,6 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
|
|||||||
|
|
||||||
{/* Actions toolbar */}
|
{/* Actions toolbar */}
|
||||||
<div className="flex flex-wrap gap-1 border-t bg-muted/30 p-1.5">
|
<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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user