Show empty-state CTA on Route detail page when no waypoints
Observed: both non-maintainer users (pistazie, nelli) created a route, never planned in it, and stopped. The Route detail page rendered as a dead end — name, a row of buttons, then blank. Changes: - Detect "empty" as no geometry AND no distance (the state every new route has before any planning happens). - When empty, hide the top-row button cluster (Edit in Planner / Edit / Export GPX) and render a centered dashed-border card in its place. - Card shows: large headline, short body (owner-specific vs viewer-only copy), primary "Open in Planner" button (same action as the existing top-row button, just visually prominent), and a secondary "or upload a GPX file" link to the edit page. - Bilingual copy added under routes.empty.*. No non-empty route loses any UI — those paths stay identical. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1158080b26
commit
5b40bd9b00
3 changed files with 49 additions and 1 deletions
|
|
@ -179,6 +179,13 @@ export default {
|
|||
noRoutesYet: "Noch keine Routen. Erstelle deine erste Route!",
|
||||
noMapPreview: "Keine Kartenvorschau",
|
||||
saveChanges: "Änderungen speichern",
|
||||
empty: {
|
||||
heading: "Diese Route ist leer",
|
||||
bodyOwner: "Du hast noch keine Wegpunkte geplant. Öffne sie im Planer, um eine Strecke zu skizzieren, oder lade eine GPX-Datei hoch.",
|
||||
bodyViewer: "Diese Route enthält noch keine Wegpunkte.",
|
||||
openInPlanner: "Im Planer öffnen",
|
||||
uploadGpx: "oder eine GPX-Datei hochladen",
|
||||
},
|
||||
},
|
||||
activities: {
|
||||
title: "Aktivitäten",
|
||||
|
|
|
|||
|
|
@ -179,6 +179,13 @@ export default {
|
|||
noRoutesYet: "No routes yet. Create your first route!",
|
||||
noMapPreview: "No map preview",
|
||||
saveChanges: "Save Changes",
|
||||
empty: {
|
||||
heading: "This route is empty",
|
||||
bodyOwner: "You haven't planned any waypoints yet. Open it in the Planner to sketch a path, or upload a GPX file.",
|
||||
bodyViewer: "This route doesn't have any waypoints yet.",
|
||||
openInPlanner: "Open in Planner",
|
||||
uploadGpx: "or upload a GPX file",
|
||||
},
|
||||
},
|
||||
activities: {
|
||||
title: "Activities",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue