feat(tours): take a tour over from another trip, the dialog (LIB-02)

The Tours tab's list of the trip's tours gains a button beside the GPX
import: take a tour over from another trip. Its dialog lists the tours of
the user's other trips, searched by name and filtered by trip and type,
each with its trip and the measures it has (time, distance, ascent; one it
lacks is left out, a paddle tour's climb too). Choosing one shows it on a
map with where it comes from, its type, distance, time, heights and number
of waypoints, and the name it gets in this trip, its own name to start
with. The note under the name says the copy is a tour of this trip of its
own, on no day yet, and that later changes stay apart.

Only the button in the foot takes it over. The new tour then comes into
the trip's lists and map and opens in the editor, unless the editor holds
unsaved work, which it never replaces. Nothing is written before the
confirm, and closing writes nothing. The library is online only: offline,
or when the list fails, the dialog says so and offers to try again; a list
cut at 100 tours says to search or filter.

A tour taken over names its source in its provenance: "Taken over from"
with the trip and the tour as they were called then.
This commit is contained in:
Maurice
2026-10-19 15:28:53 +02:00
parent f6fd2722d0
commit 692373c8b8
39 changed files with 1545 additions and 6 deletions
+24
View File
@@ -279,6 +279,30 @@ const tours: TranslationStrings = {
'tours.scope.imported': 'Temps de les importacions',
'tours.scope.planned': 'Planificat amb pauses',
'tours.scope.noMeasures': 'Encara no hi ha distància, alçades ni temps coneguts.',
'tours.library.open': "Agafar una ruta d'un altre viatge",
'tours.library.eyebrow': 'Agafar una ruta',
'tours.library.title': "D'un altre viatge",
'tours.library.sub': "Copia una ruta dels teus altres viatges a aquest viatge. L'original es queda tal com és.",
'tours.library.search': 'Cerca per nom',
'tours.library.trip': 'Viatge',
'tours.library.allTrips': 'Tots els viatges',
'tours.library.allTypes': 'Tots els tipus',
'tours.library.empty': 'Cap ruta coincideix.',
'tours.library.noTrips': 'Els teus altres viatges encara no tenen rutes.',
'tours.library.truncated': 'Es mostren les primeres 100 rutes. Cerca o filtra per trobar les altres.',
'tours.library.offline': 'Per agafar una ruta cal connexió.',
'tours.library.loadFailed': "No s'han pogut carregar les rutes.",
'tours.library.previewFailed': "No s'ha pogut carregar la vista prèvia.",
'tours.library.chooseHint': "Tria una ruta per veure-la aquí abans d'agafar-la.",
'tours.library.fromTrip': 'Del viatge',
'tours.library.controlPoints': 'Punts de ruta',
'tours.library.nameHere': 'Nom en aquest viatge',
'tours.library.independent':
"Esdevé una ruta pròpia d'aquest viatge: encara en cap dia, i els canvis posteriors en qualsevol de les dues es mantenen separats.",
'tours.library.confirm': 'Agafar',
'tours.library.taken': "S'ha agafat «{name}» en aquest viatge.",
'tours.library.failed': "No s'ha pogut agafar la ruta.",
'tours.provenance.takenOverFrom': 'Agafada de',
'tours.copy.action': 'Desa com a excursió nova',
'tours.copy.hint':
'Copia aquesta excursió com una excursió nova i independent, sense els seus dies. L’original es queda com està.',