mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 17:03:15 +00:00
Add a dayTintProvider plugin hook
Lets a plugin colour-code days in the Plan sidebar. trip-segments can already announce "Kanazawa begins" in the day plan, but it can't make day 12 look like it belongs to Kanazawa. dayScheduleProvider can't cover this: it renders a fixed row, and it's capped at 60 items per provider, so one item per day would tint the first 60 days of a six-month trip and silently stop. This hook is bounded by day count instead. GET /api/day-tints/:tripId returns per-day tones for three regions of a day card - the number badge (also the mobile day chip), the header row, and the expanded activity list. `tone` is a shorthand filling every region a contribution doesn't name; unnamed regions render as they do today. Tones only, never hex, so the host can pick the alpha per theme and per region. One contribution per day, resolved whole: first entry wins within a provider, first granted provider wins across plugins.
This commit is contained in:
@@ -461,6 +461,8 @@ const admin: TranslationStrings = {
|
||||
'Oferir perfils de ruta amb què el planificador pot calcular els dies (p. ex. rutes per a cotxe elèctric amb parades de recàrrega)',
|
||||
'admin.plugins.perm.hook:day-schedule-provider':
|
||||
'Afegir entrades horàries al pla del dia (parades de recàrrega, marges de seguretat)',
|
||||
'admin.plugins.perm.hook:day-tint-provider':
|
||||
'Acolorir els dies del pla del dia (per exemple, a quin tram del viatge pertany un dia)',
|
||||
'admin.plugins.perm.geolocation:read':
|
||||
"Consultar la teva ubicació en temps real mentre una de les seves vistes és oberta (el teu navegador també t'ho demanarà)",
|
||||
'admin.plugins.updateConsentTitle': 'Aquesta actualització necessita permisos nous',
|
||||
@@ -566,6 +568,7 @@ const admin: TranslationStrings = {
|
||||
'admin.plugins.cap.mapLayers': 'Dibuixa al mapa',
|
||||
'admin.plugins.cap.routing': 'Calcula rutes',
|
||||
'admin.plugins.cap.daySchedule': 'Afegeix horaris al pla',
|
||||
'admin.plugins.cap.dayTint': 'Acoloreix els dies',
|
||||
'admin.plugins.cap.geolocation': 'Llegeix la teva ubicació',
|
||||
'admin.plugins.cap.events': "Reacciona a l'activitat",
|
||||
'admin.plugins.cap.requiresAddon': 'Requereix {addon}',
|
||||
|
||||
Reference in New Issue
Block a user