mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 10:44:23 +00:00
feat(native): home-screen widget and travel-day Live Activity on iOS
A WidgetKit extension (TREKWidgets) with two parts: the next trip on the home screen, with a countdown before it starts and today's day and next stops while it runs, and a Live Activity for the travel day on the lock screen and in the Dynamic Island showing the next timed stop and the day's progress. The web app builds both from the trips stored offline on the device (native/widgets.ts) and hands them over through TrekShell (setWidgetSnapshot, syncTripDay, endTripDay). The texts are already translated, so the widget needs no localisation of its own. The snapshot lives in the keychain group the app shares with its extensions, so no App Group is needed. Taps open com.liketrek.trek://navigate/<path>. NativeWidgetsSync refreshes on start, on returning to the foreground and every quarter hour. Both parts are gated behind the widgets / liveActivity capabilities, so older binaries and the PWA are unaffected.
This commit is contained in:
@@ -87,6 +87,13 @@ const native: TranslationStrings = {
|
||||
'Ζητείται κατά το άνοιγμα του TREK και μετά από μισό λεπτό στο παρασκήνιο, και η εφαρμογή κρύβεται στην εναλλαγή εφαρμογών.',
|
||||
'native.share.title': 'Εισαγωγή σε ποιο ταξίδι;',
|
||||
'native.share.noTrips': 'Δεν υπάρχει ακόμα ταξίδι. Δημιουργήστε ένα πρώτα και κοινοποιήστε ξανά το έγγραφο.',
|
||||
'native.widget.dayOf': 'Ημέρα {n} από {m}',
|
||||
'native.widget.today': 'Σήμερα',
|
||||
'native.widget.noTrip': 'Δεν υπάρχει ακόμα προγραμματισμένο ταξίδι',
|
||||
'native.widget.inDays': 'σε {n} ημέρες',
|
||||
'native.widget.tomorrow': 'Αύριο',
|
||||
'native.widget.nothingPlanned': 'Τίποτα προγραμματισμένο για σήμερα',
|
||||
'native.widget.dayDone': 'Όλα έγιναν για σήμερα',
|
||||
};
|
||||
|
||||
export default native;
|
||||
|
||||
Reference in New Issue
Block a user