Commit Graph

352 Commits

Author SHA1 Message Date
Horváth Gergely
42b8eea0ba Improve watch sync error handling and reauthentication logic 2026-02-05 18:24:02 +01:00
Horváth Gergely
ce9781f1c0 Fix typo in import statement
Corrects a misspelled 'mport SwiftUI' to 'import SwiftUI' in LessonCard.swift, restoring the proper SwiftUI import and preventing compilation errors.
2026-02-05 16:04:54 +01:00
Horváth Gergely
e5224cbfff 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-05 16:01:58 +01:00
Horváth Gergely
2d14c41070 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-01-31 11:52:01 +01:00
Horváth Gergely
ecb1745d9e 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-01-30 20:44:48 +01:00
Horváth Gergely
0abc568a64 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-01-30 20:25:02 +01:00
Horváth Gergely
0845290929 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-01-30 10:41:26 +01:00
Horváth Gergely
3a0eb5fe54 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-01-29 23:48:59 +01:00
Horváth Gergely
503a51ca23 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-01-29 13:36:11 +01:00
Horváth Gergely
0781685015 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-01-29 02:33:39 +01:00
Horváth Gergely
2a4836c42f 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-01-28 23:37:27 +01:00
Horváth Gergely
4ff6f2fdb0 Add deep link handling for widgets; implement navigation from widget links 2026-01-27 22:22:10 +01:00
Horváth Gergely
f80ce9bc4f 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-01-27 18:58:25 +01:00
Horváth Gergely
91bf7a359c Add tokenExpired property and update warning display logic in live activity 2025-12-30 04:03:09 +01:00
Horváth Gergely
6d7d3641ea Add user-specific bell delay settings; implement retrieval and storage in SharedPreferences 2025-12-29 22:07:13 +01:00
Horváth Gergely
873e0f209b Add morning notification settings; implement user-specific preferences for time and enabled state 2025-12-24 20:44:40 +01:00
Horváth Gergely
8d768ca6b8 Implement token expiration handling and reauthentication UI; add reauth toast and update seasonal icon logic 2025-12-19 14:51:12 +01:00
Horváth Gergely
229eabfd4f Refactor logging in live activity manager and backend client; streamline lesson data handling and improve break event detection logic 2025-12-18 00:33:13 +01:00
Horváth Gergely
80599c13d8 Refactor lesson filtering and add logic to handle break events in live activity manager 2025-12-15 23:06:28 +01:00
Horváth Gergely
c92e83aadd Enhance time formatting by adding language detection for compact time and seasonal break methods 2025-12-13 03:54:25 +01:00
Horváth Gergely
47670fb558 Add time formatting helper and update seasonal display logic 2025-12-13 03:31:03 +01:00
Horváth Gergely
b8058cd4cb Add morning notification settings and debounce handling for Live Activities 2025-12-12 23:59:32 +01:00
Horváth Gergely
4fd3e2a09b Refactor date calculations for start of the week in live activity service 2025-12-08 09:41:06 +01:00
Horváth Gergely
0e0fa549cf Reduce bellDelay debounce interval from 5 seconds to 3 seconds;
Enhance lesson fetching logic for improved notification scheduling
2025-12-04 13:54:30 +01:00
39e9c097a0 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
2025-11-26 16:33:37 +01:00
Horváth Gergely
ea8315a993 - Fixed UI/UX bugs in the Live Activities
- Fixed the unhandled language get, when the Live Activity is turned off
- Fixed bellDelay bugs
2025-11-26 05:05:14 +01:00
Horváth Gergely
6d33f6b0d8 - 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.
2025-11-25 19:07:30 +01:00
Horváth Gergely
8c4bbd0905 - 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.
2025-11-25 14:18:23 +01:00
Horváth Gergely
fe70fc7bd1 - 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.
2025-11-24 21:21:12 +01:00
Horváth Gergely
eb3ed957f1 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.
2025-11-24 04:43:14 +01:00
cd525898bb Merge branch 'dev' of https://github.com/hgeryy2004/firka into dev 2025-11-20 09:00:31 +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
626d6aefdd Added an example of the .env file. 2025-11-19 13:36:35 +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