mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 17:41:51 +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:
@@ -376,6 +376,8 @@ const admin: TranslationStrings = {
|
||||
'Παροχή προφίλ δρομολόγησης με τα οποία ο σχεδιαστής υπολογίζει τις διαδρομές των ημερών (π.χ. δρομολόγηση ηλεκτρικού οχήματος με στάσεις φόρτισης)',
|
||||
'admin.plugins.perm.hook:day-schedule-provider':
|
||||
'Προσθήκη χρονικών καταχωρίσεων στο πλάνο της ημέρας (στάσεις φόρτισης, περιθώρια ασφαλείας)',
|
||||
'admin.plugins.perm.hook:day-tint-provider':
|
||||
'Χρωματική σήμανση ημερών στο πλάνο της ημέρας (π.χ. σε ποιο σκέλος του ταξιδιού ανήκει μια ημέρα)',
|
||||
'admin.plugins.perm.geolocation:read':
|
||||
'Αίτημα της τρέχουσας τοποθεσίας σας όσο μία από τις προβολές του είναι ανοιχτή (το πρόγραμμα περιήγησής σας θα ζητήσει επιπλέον επιβεβαίωση)',
|
||||
'admin.plugins.perm.hook:pdf-section-provider': 'Προσθήκη ενοτήτων κειμένου στην εξαγωγή PDF του ταξιδιού',
|
||||
@@ -501,6 +503,7 @@ const admin: TranslationStrings = {
|
||||
'admin.plugins.cap.mapLayers': 'Σχεδιάζει στον χάρτη',
|
||||
'admin.plugins.cap.routing': 'Παρέχει δρομολόγηση',
|
||||
'admin.plugins.cap.daySchedule': 'Προσθέτει χρόνους πλάνου',
|
||||
'admin.plugins.cap.dayTint': 'Χρωματίζει τις ημέρες',
|
||||
'admin.plugins.cap.geolocation': 'Διαβάζει την τοποθεσία σας',
|
||||
'admin.plugins.cap.events': 'Αντιδρά σε δραστηριότητα',
|
||||
'admin.plugins.cap.requiresAddon': 'Απαιτεί {addon}',
|
||||
|
||||
Reference in New Issue
Block a user