mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 07:07:31 +00:00
feat(tours): bike tours in the planner, CyclOSM, and the planned cards' last points (BIK-01 to BIK-06, RTE-01, IO-01, LIB-02)
The tour type is a dropdown; a bike tour picks its profile, routes for it, says when a point lies off every way, and shows what it runs on: surfaces, kinds of way and, for a mountain bike, the trail grades, each pointed at on the map. A type's own map (OpenHikingMap for a hike, CyclOSM for a bike tour) is offered while a tour of that type is open, with an admin switch each. From the planned cards: a hike avoids steep climbs, steps or ferries, nothing else; a saved tour can be shared where the platform takes GPX files; and the tours rail adds a tour from one menu: plan new, import GPX, or take one over from another trip.
This commit is contained in:
@@ -29,6 +29,8 @@ interface AddonState {
|
||||
toursWanderer: boolean
|
||||
/** Tours is on and the admin offers OpenHikingMap in its planner (MAP-01). */
|
||||
toursHikingMap: boolean
|
||||
/** Tours is on and the admin offers CyclOSM in its planner (BIK-06). */
|
||||
toursCycleMap: boolean
|
||||
loaded: boolean
|
||||
loadAddons: () => Promise<void>
|
||||
isEnabled: (id: string) => boolean
|
||||
@@ -39,6 +41,7 @@ export const useAddonStore = create<AddonState>((set, get) => ({
|
||||
bagTracking: false,
|
||||
toursWanderer: false,
|
||||
toursHikingMap: false,
|
||||
toursCycleMap: false,
|
||||
loaded: false,
|
||||
|
||||
loadAddons: async () => {
|
||||
@@ -47,6 +50,7 @@ export const useAddonStore = create<AddonState>((set, get) => ({
|
||||
set({ addons: data.addons || [], bagTracking: !!data.bagTracking,
|
||||
toursWanderer: !!data.toursWanderer,
|
||||
toursHikingMap: !!data.toursHikingMap,
|
||||
toursCycleMap: !!data.toursCycleMap,
|
||||
loaded: true,
|
||||
})
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user