Commit Graph

349 Commits

Author SHA1 Message Date
Horváth Gergely
35e1e2c6ab Add Apple Watch app and watch sync support
Add a new Firka Watch app target with UI components, views and services: DataStore, BackgroundRefreshManager, WatchConnectivity/WatchSession integration, localization (WatchL10n), entitlements and assets. Move widget/shared models into ios/Shared and update Xcode project/schemes; add native Kreta API client and TokenManager for watch use. Implement watch-side caching, proactive token refresh, background scheduling, and pairing/pairing UI. Update Flutter side (watch_sync_helper, main, API/token helper changes) and tweak iOS .gitignore and project metadata to enable the watch integration and data sync between phone and watch.
2026-02-27 23:23:56 +01:00
Horváth Gergely
874f5d4297 Add Shortcuts intents, entities & localizations
Introduce App Shortcuts and AppIntents support: add multiple shortcut intents (next/closest lesson, today/tomorrow/closest timetable, recent grades, subject/overall averages), AppShortcuts provider, and ShortcutError. Add AppEntity types (Average, Grade, Lesson, Subject) and corresponding entity queries. Refactor Controls to use AppIntent-based navigation (OpenHome/OpenGrades/OpenTimetable) with localized labels/descriptions and remove duplicate SubjectEntity from AveragesIntent. Update TimetableProvider to use a lock-screen-friendly timeline refresh policy. Add localization resources (AppShortcuts.strings and expanded Localizable.strings) for en/de/hu and register new strings in project files; update Info.plist/project.pbxproj accordingly.
2026-02-27 23:23:56 +01:00
Horváth Gergely
71ef509021 Show active break in timetable widget
Add break detection and UI for active breaks in timetable widgets. Introduces a new localization key "break_between" and a BreakIndicatorRow view that displays a break marker and minutes left. TimetableMediumView and TimetableLargeView now detect when the current time falls between consecutive lessons, reduce the number of visible lessons accordingly, and inject a BreakIndicatorRow between lessons when in a break (minutes are calculated using ceil of time interval). Also clean up commented/debug lines in the iOS widget cache helper (widget.dart) for locale/theme and removed a TODO comment.
2026-02-27 23:23:56 +01:00
Horváth Gergely
16b7d2f70a Add next-school-day support to iOS widgets
Add support for showing the next school day in widgets. Changes include: new localization keys (next_school_day_timetable, no_lessons_ahead) and a formatShortDate helper; updated Hungarian hours abbreviation. Widget model updated (TimetableData) to include nextSchoolDay and nextSchoolDayDate. TimetableProvider now sets isNextSchoolDay/nextSchoolDayDate and returns an entry when a future school day is found. Views (inline, lock screen, small/medium/large) updated to display the next school day header/date and show no_lessons_ahead where appropriate. Flutter helpers (widget cache/IOS helper) extended to serialize nextSchoolDayLessons/nextSchoolDayDate and to search up to a week ahead for the next school day when tomorrow is empty.
2026-02-27 23:23:56 +01:00
Horváth Gergely
402067d624 Add logging, await token callback and widget refresh
Fixes async token handling and improves observability: await the callback in KretaClient to ensure proper async flow, add informative logs for token expiry/refresh and warn on empty 200/201 API responses. Enhance token refresh flow in token_grant with detailed info/warning/severe logs and exception logging for easier debugging. Update widget DB helper to force fresh fetches for timetables/grades when updating widget cache, avoid writing empty caches and add debug prints for counts and cache status. Wire widget refresh into LiveActivityService background fetch (with import and try/catch logging) so iOS widgets get refreshed during background processing.
2026-02-27 23:23:56 +01:00
Horváth Gergely
f76b5fbcca Add iOS Control widgets & timetable UI updates
Introduce iOS 18 Control widgets and improve timetable/widget UI and behavior.

- Add Home, Grades and Timetable Control widgets (AppIntents) that write a "controlNavigation" value into the app group (group.app.firka.firkaa) so the main app can open the requested page.
- Register control widgets in HomeWidgetsBundle for iOS 18+.
- Extend WidgetLocalization with short/abbrev strings (tomorrow_short, hours_abbrev, in_hours) and related localization keys.
- Enhance Lock Screen and Timetable widgets to handle next-day lessons, show hours when >60 minutes, and use localized hour/minute strings.
- Update TimetableProvider timeline generation to avoid producing per-minute entries far before the next lesson; if the next lesson is >60 minutes away, add only a single entry ~60 minutes before it.
- Adjust various widget views (Averages, Grades, Timetable) for more compact layout: spacing, font weights/sizes, compact modes, and added average color logic.
- Update project.pbxproj to add a file-system-synchronized exception for the HomeWidgetsExtension files in the Runner target.
- AppDelegate: read and remove "controlNavigation" from the shared app group and return it via the Flutter method channel as a pending deep link; fall back to existing pendingWidgetDeepLink.
- Flutter: map a received 'home' deep link to HomePage.home in the home screen navigation switch.

These changes add Control Center / Lock Screen launch shortcuts and refine widget presentation and timeline performance.
2026-02-27 23:23:56 +01:00
Horváth Gergely
d395529282 Add lock-screen/inline widgets & timeline updates
Introduce Lock Screen and Inline variants for Timetable, Grades and Averages widgets and register them in HomeWidgetsBundle. Add new views and widget configurations (accessoryInline, accessoryCircular, accessoryRectangular) under LockScreen/, plus grade badge and average display UI. Extend Localization with many new keys in Helpers/Localization.swift and add lock-screen descriptions in en/de/hu Localizable.strings. Update TimetableProvider timeline logic to generate more frequent (per-minute) update entries for lock-screen families, deduplicate timeline dates and ensure proper midnight transition. Adjust TimetableViews display logic to prefer next lesson when current is absent and fix displayed label selection. Apply project.pbxproj updates to file-exception/group entries and some build phase metadata.
2026-02-27 23:23:56 +01:00
Horváth Gergely
1038b49092 iOS: rename LiveActivity widget & update configs
Rename TimetableWidget to LiveActivityWidget and clean up HomeWidgetsExtension targets/files. Update entitlements (group id and formatting) and remove duplicate HomeWidgetsExtensionExtension entitlements file. Update Runner.xcodeproj: bump objectVersion, rename targets/products/references, add WidgetExtension.xcconfig, switch entitlements/infoplist paths, set live-activity related flags, adjust deployment targets/locales and MARKETING_VERSION/CURRENT_PROJECT_VERSION to use Flutter variables. Change app display name to "Firka Testing" and move CFBundleVersion in Info.plist. Also change default widget style to .liquidGlass for Averages, Grades and Timetable intents and fix null-safety when serializing subject/grade category fields in ios_widget_helper.dart.
2026-02-27 23:23:56 +01:00
Horváth Gergely
d06a3dee69 Improve iOS widgets: UI, timeline and JSON fixes
Multiple widget improvements and bug fixes:

- Models: WidgetGrade now exposes subjectNameWithWeight and teacherName for display.
- AveragesProvider: added isFiltered flag, improved subject filtering logic and propagated flag to entries.
- Averages views: show filtered count badge, use configurable max visible items, and respect isFiltered.
- Grades views: display subject name with weight, show teacher in grade rows (renamed flag to showTeacher) and preserve topic display.
- TimetableProvider: build unique transition times for timeline updates, sort entries, and determine current lesson using the provided date instead of Date().
- Timetable views: compute visibleLessons window around the current lesson based on entry.date and use isLessonActive checks against entry.date.
- iOS widget JSON helper: fix subject.category serialization structure, use grade.creationDate for recordDate, and use grade.teacher for teacherName.

These changes fix incorrect JSON exports, improve timeline accuracy, and enhance widget UX when subjects are filtered or when showing teacher/weight info.
2026-02-27 23:23:56 +01:00
Horváth Gergely
d617efec80 Add deep link handling for widgets; implement navigation from widget links 2026-02-27 23:23:56 +01:00
Horváth Gergely
beb4127ef8 Add iOS Home Widgets Extension with timetable, grades, and averages
Introduces a new HomeWidgetsExtension for iOS, including widgets for timetable, recent grades, and subject averages. Adds widget models, providers, intents, localization, and SwiftUI views. Updates project files and main app to support widget data sharing and communication. Also includes new Dart helper for widget data and updates to relevant Flutter screens.
2026-02-27 23:23:56 +01:00
Horváth Gergely
1f57281004 Add tokenExpired property and update warning display logic in live activity 2026-02-27 23:23:56 +01:00
Horváth Gergely
f866052905 Add user-specific bell delay settings; implement retrieval and storage in SharedPreferences 2026-02-27 23:23:56 +01:00
Horváth Gergely
deb013a30e Add morning notification settings; implement user-specific preferences for time and enabled state 2026-02-27 23:23:56 +01:00
Horváth Gergely
8a3f77d565 Implement token expiration handling and reauthentication UI; add reauth toast and update seasonal icon logic 2026-02-27 23:23:56 +01:00
Horváth Gergely
1ea46ede0a Refactor logging in live activity manager and backend client; streamline lesson data handling and improve break event detection logic 2026-02-27 23:23:56 +01:00
Horváth Gergely
79f59b6938 Refactor lesson filtering and add logic to handle break events in live activity manager 2026-02-27 23:23:56 +01:00
Horváth Gergely
e2b98125fc Enhance time formatting by adding language detection for compact time and seasonal break methods 2026-02-27 23:23:56 +01:00
Horváth Gergely
8c877e43db Add time formatting helper and update seasonal display logic 2026-02-27 23:23:56 +01:00
Horváth Gergely
02acf0e59b Add morning notification settings and debounce handling for Live Activities 2026-02-27 23:23:56 +01:00
Horváth Gergely
04870205f9 Refactor date calculations for start of the week in live activity service 2026-02-27 23:23:56 +01:00
Horváth Gergely
bcc95ed0af Reduce bellDelay debounce interval from 5 seconds to 3 seconds;
Enhance lesson fetching logic for improved notification scheduling
2026-02-27 23:23:56 +01:00
88fd491281 Update project settings and entitlements for improved configuration
- Bump object version in project.pbxproj
- Refactor TimetableWidget folder exceptions in project.pbxproj
- Add BGTaskSchedulerPermittedIdentifiers to Info.plist
- Update development team and product bundle identifiers in entitlements
- Mark subproject as dirty in l10n
2026-02-27 23:23:56 +01:00
Horváth Gergely
9a435235b6 - Fixed UI/UX bugs in the Live Activities
- Fixed the unhandled language get, when the Live Activity is turned off
- Fixed bellDelay bugs
2026-02-27 23:23:56 +01:00
Horváth Gergely
e583c77a7e - Added bellDelay support for Live Activities; both standard push notifications and Live Activities now use the bellDelay value (default: 0). IMPORTANT: Holidays and school break(spring,summer,autumn,winter) activities do not apply bellDelay.
- Implemented background fetch on iOS: the app now refreshes every 30 minutes in the background and sends timetable changes to the backend if any are detected.
2026-02-27 23:23:56 +01:00
Horváth Gergely
8dbcc1e2a9 - Fixed user switching so previous user data is now properly cleared.
- Fixed re-login behavior: after every new login, the Live Activities privacy notice is shown as intended.
- Made the Live Activity toggle user-specific to prevent settings from carrying over after switching accounts.
- Fixed user logout so the backend now correctly removes all related data.
- Fixed first-install behavior so the Live Activities privacy notice no longer appears on the public beta screen; it now only appears after reaching the home page.
2026-02-27 23:23:56 +01:00
Horváth Gergely
f631d52d5a - Fixed lesson language data; backend now passes the correct values.
- Updated handling of cancelled lessons: removed timer and now displaying the localized “Cancelled” text.
- Aligned the icon and lesson number in the Dynamic Island so they are now level with the label text.
2026-02-27 23:23:56 +01:00
Horváth Gergely
768d0904a8 Add data privacy consent dialog for Live Activity
A new data privacy consent dialog has been added to the Live Activity feature. Users must accept this dialog to use Live Activity. If they decline, all their data will be immediately deleted from the database, and cannot use the Live Activities feature. Additionally, users receive a detailed description explaining what data we store, for how long, and their GDPR rights.
2026-02-27 23:23:56 +01:00
Horváth Gergely
c21ff3e15f Added an example of the .env file. 2026-02-27 23:23:56 +01:00
0e08919209 feat: add logging for device registration and timetable updates 2025-11-19 15:58:53 +01:00
e651552dec fix: enable iOS platform and update build settings for arm64 architecture 2025-11-19 15:49:28 +01:00
8f683561b9 fix: update version number to 1.0.9+1030 2025-11-19 15:46:25 +01:00
519c9a4043 fix: update development team and bundle identifiers 2025-11-19 13:41:11 +01:00
Horváth Gergely
887d765f65 Live activity support added!
I have merged the latest repo myself and decided to publish my version to the repo.
2025-11-19 01:57:24 +01:00
Pearoo
34cf77f216 feat: add error page 2025-11-07 15:25:48 +01:00
7b382563ba Jenkinsfile: fdroid -> artifacts 2025-10-26 09:14:10 +01:00
667a8e0e4d refactor: use streams for fetching data 2025-10-26 09:08:05 +01:00
147dff3696 fix: payload cast 2025-10-12 16:53:56 +02:00
0fd36de4a3 Increment base build number
Since we rebased the commit count is smaller
2025-10-12 15:50:53 +02:00
d4fe91860a cast jwt payload to Map<String, dynamic> 2025-10-12 13:57:20 +02:00
45d0b298c4 settings/licenses: fix text & spinner style 2025-10-11 20:14:13 +02:00
c812b0721f update l10n module 2025-10-11 20:07:18 +02:00
b62140c0d0 Fordítás hozzáadása 2025-10-09 22:21:28 +02:00
f55cc65f07 License menü 2025-10-09 20:57:55 +02:00
3690cf0462 Fordítás, License menü 2025-10-09 20:57:23 +02:00
233f0c9ed0 Órarend kinézet javítás 2025-10-09 20:56:59 +02:00
6912e44b7e Órarenden igazítás 2025-10-08 20:50:13 +02:00
369febba91 Discord, PP átirányítás 2025-10-08 20:50:01 +02:00
2ca5e8c54b Helyettesítések elrejtése, Discord + PP átirányítás 2025-10-08 20:49:35 +02:00
dd515955ba Helyettesítések elrejtése 2025-10-08 20:48:31 +02:00