Compare commits
160 Commits
v5.1.5patc
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5aed7c74f | ||
|
|
eadf7e81a5 | ||
|
|
be3050faed | ||
|
|
4b430eb3fa | ||
|
|
13a51a8a1f | ||
|
|
46a6f38ad6 | ||
|
|
9ece125d9f | ||
|
|
87eddff7c0 | ||
|
|
b801e8277b | ||
|
|
2c4c226470 | ||
|
|
6fde731fe8 | ||
|
|
4385785bb8 | ||
|
|
071ab301bb | ||
|
|
e5e0386777 | ||
|
|
f9dfc808c4 | ||
|
|
02340c9e6f | ||
|
|
36f3a57a1f | ||
|
|
48aba53ae7 | ||
| 3f4323731c | |||
| c3c89362b4 | |||
| 6b8b0d53de | |||
| c618755472 | |||
| 5560ff9279 | |||
| 7889d9bd4f | |||
| 66daf83e92 | |||
| d36ba67cb5 | |||
| bc97a1224e | |||
| a976743c45 | |||
| 39bf2f1ec1 | |||
| bcfdaf0953 | |||
| 9c0159d65b | |||
| 5905630c49 | |||
| a9d35c7414 | |||
| bfa69e3cd2 | |||
| 8d19ce4a68 | |||
| 44ff18e56b | |||
|
|
1d32b9e1e7 | ||
| e25f62bd8c | |||
| f86bce4877 | |||
| 702912d476 | |||
| 5210106032 | |||
| 02fecf7ac7 | |||
| 90165f257c | |||
| 2ece6bd36f | |||
| 446988ec0b | |||
| b33a6d2ca0 | |||
| c3b1e783b8 | |||
| 84e8346ccc | |||
| cd0026e4c7 | |||
| 0dc6cd915c | |||
| c301b62d37 | |||
| d9268505e4 | |||
| 906e2c97cf | |||
| b8b996a5d3 | |||
| fc261d4005 | |||
| 10f24af7e4 | |||
| 5cc3d3d38a | |||
| 9bafd2647f | |||
| 96ebd10ed1 | |||
| 225e75e8d2 | |||
| 649381ebbf | |||
| f524019779 | |||
| 70ada25915 | |||
| 0a3d0183f2 | |||
| 7e254654d1 | |||
| 439c98dfd9 | |||
| 93d8bef238 | |||
| c4945f6ab9 | |||
| 1ce961eaaa | |||
| 0046d18f3a | |||
| 36637e889b | |||
| f2fdd0005d | |||
| 86d90adf2b | |||
| 022d5c81ce | |||
| aea12d20fc | |||
| 5d95e1e1d7 | |||
| 7720cbd07d | |||
| 30d75d6a60 | |||
| 68c76afdde | |||
| 55035b535c | |||
| fe33bb2db0 | |||
| e857f10073 | |||
| d8ae92e0f7 | |||
| b8ae1c7c69 | |||
| 70a1c99ea7 | |||
| 340d9d1d8e | |||
| 280d3561cf | |||
| 4ec24aa69f | |||
| 1adc7b0a15 | |||
| 5c9248c3eb | |||
| 53623d84df | |||
| dc5a5723fc | |||
| 6c5279205b | |||
| 7c329b0ae6 | |||
| 556a49646d | |||
| a661098855 | |||
|
|
1021cdc6b2 | ||
| fb471a3dc8 | |||
| 29157b60a5 | |||
| 1e2a8f787d | |||
| 8a7b4bcf21 | |||
| 432276a966 | |||
| 2052dfd60a | |||
| e4844fef38 | |||
| 5d29e19845 | |||
| dccf97fb91 | |||
| 5cae4b43e9 | |||
| 7a429b3770 | |||
| 5c682b16e6 | |||
| 5b37056052 | |||
|
|
c49a221e19 | ||
|
|
084eb00e5b | ||
|
|
e3e1983265 | ||
|
|
125453c8ab | ||
|
|
9a018c6f37 | ||
|
|
b107a9a800 | ||
|
|
ed5f1d3e05 | ||
|
|
c1d9da6c58 | ||
|
|
ef6aa0142b | ||
|
|
a0336b9122 | ||
|
|
4e7fbab6ce | ||
|
|
8252cfe13c | ||
|
|
709b3c3cfa | ||
|
|
e0fdf33dc3 | ||
|
|
ab07606af3 | ||
|
|
82522dfa19 | ||
|
|
9ef500adf3 | ||
|
|
9af84f4df5 | ||
|
|
ce075adb28 | ||
|
|
4090b0817b | ||
|
|
aeef3429e5 | ||
|
|
29a6fc242a | ||
| c67c965049 | |||
| 7411136261 | |||
|
|
7b405ddaef | ||
|
|
96f10d5411 | ||
|
|
d129503fe5 | ||
|
|
2f5a9928fd | ||
|
|
f7caa6118b | ||
|
|
4c89c45db6 | ||
|
|
761f7232e7 | ||
|
|
68c1a89105 | ||
|
|
cc4a5e18b5 | ||
|
|
18cd3277b9 | ||
|
|
a51c20414c | ||
|
|
08ad07d286 | ||
|
|
f33730ffe2 | ||
|
|
85b8f69d88 | ||
|
|
5b13fbf3be | ||
|
|
6b6fdbc191 | ||
|
|
16d7142af3 | ||
|
|
1dbf4d5362 | ||
|
|
903b159184 | ||
|
|
5ff04e9fd1 | ||
|
|
39c6c26f8e | ||
|
|
7dae16efe3 | ||
|
|
7cf2429bee | ||
|
|
66324b986e | ||
|
|
22dd132c64 | ||
|
|
5cc6d26ce1 |
133
.gitignore
vendored
133
.gitignore
vendored
@@ -1,57 +1,98 @@
|
|||||||
|
# /refilc
|
||||||
|
refilc/debug-info/
|
||||||
|
|
||||||
refilc/.flutter-plugins
|
# /refilc/android
|
||||||
refilc/.flutter-plugins-dependencies
|
refilc/android/*.jks
|
||||||
refilc/pubspec.lock
|
refilc/android/*key.properties
|
||||||
refilc/.dart_tool/
|
**/.gradle/
|
||||||
# refilc/android/
|
**/.kotlin/
|
||||||
# refilc/ios/
|
|
||||||
# refilc/windows/
|
|
||||||
# refilc/linux/
|
|
||||||
# refilc/macos/
|
|
||||||
refilc/build/
|
|
||||||
refilc/android/key.properties
|
|
||||||
refilc/android/debug.keystore
|
|
||||||
|
|
||||||
# refilc_desktop_ui/.flutter-plugins
|
# flutter
|
||||||
# refilc_desktop_ui/.flutter-plugins-dependencies
|
**/.dart_tool/
|
||||||
# refilc_desktop_ui/pubspec.lock
|
**/.flutter-plugins
|
||||||
# refilc_desktop_ui/.dart_tool/
|
**/.flutter-plugins-dependencies
|
||||||
|
**/pubspec.lock
|
||||||
|
**/.pub-cache/
|
||||||
|
**/.pub/
|
||||||
|
**/build/
|
||||||
|
**/.packages
|
||||||
|
**/doc/api/
|
||||||
|
**/ios/Flutter/.last_build_id
|
||||||
|
**/.symlinks/
|
||||||
|
|
||||||
refilc_kreta_api/.flutter-plugins
|
# ides
|
||||||
refilc_kreta_api/.flutter-plugins-dependencies
|
.idea/
|
||||||
refilc_kreta_api/pubspec.lock
|
.vscode/
|
||||||
refilc_kreta_api/.dart_tool/
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
|
||||||
refilc_mobile_ui/.flutter-plugins
|
# Miscellaneous
|
||||||
refilc_mobile_ui/.flutter-plugins-dependencies
|
**.class
|
||||||
refilc_mobile_ui/pubspec.lock
|
**.log
|
||||||
refilc_mobile_ui/.dart_tool/
|
**.pyc
|
||||||
|
**.swp
|
||||||
|
**/.DS_Store
|
||||||
|
**/.atom/
|
||||||
|
**/.build/
|
||||||
|
**/.buildlog/
|
||||||
|
**/.history
|
||||||
|
**/.svn/
|
||||||
|
**/.swiftpm/
|
||||||
|
**/migrate_working_dir/
|
||||||
|
**/.plugin_symlinks/
|
||||||
|
**/local.properties
|
||||||
|
|
||||||
# filcnaplo_premium/.flutter-plugins
|
# symbols, obfuscations
|
||||||
# filcnaplo_premium/.flutter-plugins-dependencies
|
**/app.*.symbols
|
||||||
# filcnaplo_premium/pubspec.lock
|
**/app.*.map.json
|
||||||
# filcnaplo_premium/.dart_tool/
|
|
||||||
|
|
||||||
.vscode
|
# android releated
|
||||||
.github
|
**/android/app/debug
|
||||||
.idea
|
**/android/app/profile
|
||||||
.gitmodules
|
**/android/app/release
|
||||||
.gradle
|
**/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
|
||||||
.kotlin
|
|
||||||
|
|
||||||
refilc/.DS_Store
|
# ios releated
|
||||||
.DS_Store
|
**/Pods
|
||||||
refilc/linux/flutter/
|
**/Podfile.lock
|
||||||
.plugin_symlinks/
|
**/UserInterfaceState.xcuserstate
|
||||||
refilc/macos/Flutter/
|
**/ios/**/*.mode1v3
|
||||||
refilc/ios/Flutter/
|
**/ios/**/*.mode2v3
|
||||||
refilc/ios/Runner/GeneratedPluginRegistrant.h
|
**/ios/**/*.moved-aside
|
||||||
refilc/ios/Runner/GeneratedPluginRegistrant.m
|
**/ios/**/*.pbxuser
|
||||||
refilc/android/local.properties
|
**/ios/**/*.perspectivev3
|
||||||
refilc/android/debugkey.properties
|
**/ios/**/*sync/
|
||||||
refilc/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
|
**/ios/**/.sconsign.dblite
|
||||||
|
**/ios/**/.tags*
|
||||||
|
**/ios/**/.vagrant/
|
||||||
|
**/ios/**/DerivedData/
|
||||||
|
**/ios/**/Icon?
|
||||||
|
**/ios/**/Pods/
|
||||||
|
**/ios/**/.symlinks/
|
||||||
|
**/ios/**/profile
|
||||||
|
**/ios/**/xcuserdata
|
||||||
|
**/ios/.generated/
|
||||||
|
**/ios/Flutter/App.framework
|
||||||
|
**/ios/Flutter/Flutter.framework
|
||||||
|
**/ios/Flutter/Flutter.podspec
|
||||||
|
**/ios/Flutter/Generated.xcconfig
|
||||||
|
**/ios/Flutter/ephemeral
|
||||||
|
**/ios/Flutter/app.flx
|
||||||
|
**/ios/Flutter/app.zip
|
||||||
|
**/ios/Flutter/flutter_assets/
|
||||||
|
**/ios/Flutter/flutter_export_environment.sh
|
||||||
|
**/ios/ServiceDefinitions.json
|
||||||
|
**/ios/Runner/GeneratedPluginRegistrant.*
|
||||||
|
**/ios/Flutter/
|
||||||
|
|
||||||
|
# dart
|
||||||
|
**/.env*
|
||||||
|
**/*.dart.js
|
||||||
|
**/*.info.json
|
||||||
|
|
||||||
|
# tools.py logs
|
||||||
tool_logs/build/*.log
|
tool_logs/build/*.log
|
||||||
tool_logs/d8dx_fix/*.log
|
tool_logs/d8dx_fix/*.log
|
||||||
tool_logs/pub_fix/*.log
|
tool_logs/pub_fix/*.log
|
||||||
refilc_mobile_ui/android/local.properties
|
refilc/android/app/key.jks
|
||||||
|
|||||||
30
.idea/libraries/Dart_SDK.xml
generated
30
.idea/libraries/Dart_SDK.xml
generated
@@ -1,30 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Dart SDK">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/async" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/cli" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/collection" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/concurrent" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/convert" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/core" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/developer" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/ffi" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/html" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/io" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/isolate" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/js" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/js_interop" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/js_interop_unsafe" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/js_util" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/math" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/mirrors" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/svg" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/typed_data" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/web_audio" />
|
|
||||||
<root url="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/web_gl" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC />
|
|
||||||
<SOURCES />
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
8
.idea/misc.xml
generated
8
.idea/misc.xml
generated
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="PWA">
|
|
||||||
<option name="enabled" value="true" />
|
|
||||||
<option name="wasEnabledAtLeastOnce" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 33, extension level 3 Platform" project-jdk-type="Android SDK" />
|
|
||||||
</project>
|
|
||||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/naplo.iml" filepath="$PROJECT_DIR$/.idea/naplo.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
150
.idea/naplo.iml
generated
150
.idea/naplo.iml
generated
@@ -1,150 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="JAVA_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_desktop_ui/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_desktop_ui/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_desktop_ui/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_premium/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_premium/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_premium/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_kreta_api/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_kreta_api/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_kreta_api/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_mobile_ui/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_mobile_ui/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_mobile_ui/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc_kreta_api/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc_kreta_api/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc_kreta_api/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc_mobile_ui/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc_mobile_ui/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc_mobile_ui/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc_plus/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc_plus/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc_plus/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_picker/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_picker/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_picker/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_picker/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_picker/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_picker/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/flutter_local_notifications_linux/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/flutter_local_notifications_linux/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/flutter_local_notifications_linux/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/image_picker_linux/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/image_picker_linux/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/image_picker_linux/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/image_picker_linux/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/image_picker_linux/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/image_picker_linux/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/maps_launcher/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/maps_launcher/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/maps_launcher/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/maps_launcher/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/maps_launcher/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/maps_launcher/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/share_plus/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/share_plus/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/share_plus/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/share_plus/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/share_plus/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/share_plus/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/example/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/wakelock_plus/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/wakelock_plus/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/wakelock_plus/build" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/wakelock_plus/example/.dart_tool" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/wakelock_plus/example/.pub" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/refilc/linux/flutter/ephemeral/.plugin_symlinks/wakelock_plus/example/build" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="library" name="Dart SDK" level="project" />
|
|
||||||
<orderEntry type="library" name="Dart Packages" level="project" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
36
Jenkinsfile
vendored
36
Jenkinsfile
vendored
@@ -1,56 +1,40 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
environment {
|
|
||||||
ANDROID_SDK = '/home/jenkins/flutter_things/android-sdk'
|
|
||||||
ANDROID_PATH="$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools"
|
|
||||||
FLUTTER = '/home/jenkins/flutter_things/flutter/bin'
|
|
||||||
PATH = "$PATH:$ANDROID_PATH:$FLUTTER"
|
|
||||||
//TODO: need to fix flutter
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Copy Key Properties') {
|
stage('Copy Key Properties') {
|
||||||
steps {
|
steps {
|
||||||
// Copy the key.properties file
|
sh 'cp /var/lib/jenkins/key.properties "$WORKSPACE/refilc/android/key.properties"'
|
||||||
sh 'cp /home/jenkins/key.properties refilc/android/key.properties'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Flutter Doctor') {
|
stage('Flutter Doctor') {
|
||||||
steps {
|
steps {
|
||||||
// Ensure Flutter is set up correctly
|
|
||||||
sh 'flutter doctor'
|
sh 'flutter doctor'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Dependencies') {
|
stage('Dependencies') {
|
||||||
steps {
|
steps {
|
||||||
// Get Flutter dependencies
|
|
||||||
sh 'cd refilc && flutter pub get'
|
sh 'cd refilc && flutter pub get'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
// Build the Flutter project
|
sh '''
|
||||||
sh 'cd refilc && flutter build apk --release'
|
cd refilc
|
||||||
|
flutter build apk --release
|
||||||
|
flutter build appbundle --release
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Archive') {
|
stage('Archive') {
|
||||||
steps {
|
steps {
|
||||||
// Archive the APK
|
archiveArtifacts artifacts: 'refilc/build/app/outputs/flutter-apk/app-release.apk,refilc/build/app/outputs/bundle/release/app-release.aab',
|
||||||
archiveArtifacts artifacts: 'build/app/outputs/flutter-apk/app-release.apk', fingerprint: true
|
fingerprint: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
// Clean up workspace after build
|
deleteDir()
|
||||||
cleanWs()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,50 @@
|
|||||||
# <img src="https://github.com/user-attachments/assets/dadb8ed3-7073-4591-a004-0d4c646fa963" alt width="100px"> A Firka IPA fájlainak telepítéséhez kövesd ezt a útmutatót.
|
# <img src="https://github.com/user-attachments/assets/dadb8ed3-7073-4591-a004-0d4c646fa963" alt width="24px"> A Firka IPA fájlainak telepítéséhez kövesd ezt az útmutatót.
|
||||||
|
|
||||||
## WSF metódus (**FONTOS**: az iPhoneodon csináld.)
|
Három lehetőséged van a Firka telepítésére:
|
||||||
|
- [Feather](#1-feather-metódus) - Fizetős, nem kell gép hozzá, 1 évre érvényes (ha lejár a certificate, újra meg kell vásárolni!)
|
||||||
|
- [ESign](#2-esign-metódus) - Ingyenes, nem kell gép hozzá, örökre van (ajánlott)
|
||||||
|
- [SideStore](#3-sidestore-metódus-a-sidestore-az-altstore-nak-egy-jobb-verziója) - Ingyenes, kell hozzá Mac, viszont Windowsal is működik, 7 naponta resign (telefonon megteheted lejárat előtt.)
|
||||||
|
|
||||||
|
|
||||||
|
## 1. Feather metódus
|
||||||
|
|
||||||
|
### 1. A .p12 és .mobileprovision beszerzése
|
||||||
|
- Vegyél certet a [kravasign.com](https://kravasign.com) oldalon
|
||||||
|
- Várnod kell kis időt (általában 72 óra)
|
||||||
|
- Csatlakozz a [Discord szerverünkhöz](https://discord.gg/kravasign) és nyiss egy ticketet a rendelési számoddal
|
||||||
|
|
||||||
|
### 2. A várakozás után kapsz egy letöltési linket egy zip fájlhoz, ami három dolgot tartalmaz:
|
||||||
|
- .p12
|
||||||
|
- .mobileprovision
|
||||||
|
- Egy mappa a tanúsítvány jelszavával
|
||||||
|
|
||||||
|
### 3. Töltsd le a legújabb Feather ipa-t innen: [Feather GitHub Releases](https://github.com/khcrysalis/Feather/releases)
|
||||||
|
### 4. Telepítés:
|
||||||
|
- Menj a sign.kravasign.com oldalra
|
||||||
|
- Töltsd fel a szükséges fájlokat:
|
||||||
|
- .p12
|
||||||
|
- .mobileprovision
|
||||||
|
- feather.ipa
|
||||||
|
- Add meg a tanúsítvány jelszavát
|
||||||
|
- Nyomd meg az `Upload and Sign` gombot, és várj, ez egy kis ideig eltarthat
|
||||||
|
|
||||||
|
### 5. Certificate importálása:
|
||||||
|
- Menj a `Settings` fülre és kattints a `Add Certificate` gombra
|
||||||
|
- Kattints a `+`-ra és importáld a .mobileprovision-t a .p12-t és írd be a .p12 jelszavát aztán kattints a `Save` gombra
|
||||||
|
|
||||||
|
### 6. Firka telepítése:
|
||||||
|
- Amint telepített a Feather, nyisd meg és menj a `Sources` fülre alul
|
||||||
|
- Kattints a `Add Repo` gombra és másold be hogy `https://raw.githubusercontent.com/spitkov/firkarepo/refs/heads/main/feather.json` és kattints az `Add` gombra
|
||||||
|
- Menj a `Firka Repository` menüpontra és kattints a letöltésre
|
||||||
|
- Ha letöltött menj a `Library` fülre és kattints a Firka appra azután `Sign Firka` aztán `Start Signing`
|
||||||
|
- A Signed Apps alatt látni fogod a firkát kattints rá és `Install Firka`
|
||||||
|
|
||||||
|
## 2. ESign metódus
|
||||||
|
|
||||||
|
## Szükséged van iOS 16 vagy újabb iOSre.
|
||||||
|
|
||||||
### 1. DNS profil telepítése
|
### 1. DNS profil telepítése
|
||||||
- Nyisd meg az [Ultimate Sideloading Guide by WSF](https://whysoooofurious.netlify.app/) weboldalt a Safariban
|
- Nyisd meg az [WSF Sideloading](https://whysoooofurious.netlify.app/) weboldalt a Safariban
|
||||||
- Nyomj rá a `Downloads` gombra, majd a `Config Profiles` gombra
|
- Nyomj rá a `Downloads` gombra, majd a `Config Profiles` gombra
|
||||||
- Válaszd a `madNS` profilt
|
- Válaszd a `madNS` profilt
|
||||||
- A profil letöltése után nyisd meg a **Beállításokat**
|
- A profil letöltése után nyisd meg a **Beállításokat**
|
||||||
@@ -15,7 +56,7 @@
|
|||||||
- Válaszd a **DNS** opciót és válassz egyet a lehetőségek közül:
|
- Válaszd a **DNS** opciót és válassz egyet a lehetőségek közül:
|
||||||
- **Sima**: Ajánlott, alap funkcionalitás
|
- **Sima**: Ajánlott, alap funkcionalitás
|
||||||
- **AdBlock**: Letiltja a reklámokat (néhány script is letiltásra kerülhet, ami problémákat okozhat)
|
- **AdBlock**: Letiltja a reklámokat (néhány script is letiltásra kerülhet, ami problémákat okozhat)
|
||||||
- **OTA blocker**: Letiltja az Over-The-Air (rendszer) frissítéseket
|
- **OTA blocker**: Letiltja az Over-The-Air (Apple szerverekről küldött) frissítéseket
|
||||||
|
|
||||||
### 2. Tanúsítványok telepítése
|
### 2. Tanúsítványok telepítése
|
||||||
- Menj vissza a korábban megnyitott weboldalra
|
- Menj vissza a korábban megnyitott weboldalra
|
||||||
@@ -28,9 +69,10 @@
|
|||||||
- Nyomj a `Portal` gombra
|
- Nyomj a `Portal` gombra
|
||||||
- Próbáld meg a `Portal - Continent` opciót
|
- Próbáld meg a `Portal - Continent` opciót
|
||||||
- Ha "*Integritás nem ellenőrizhető*" hibát kapsz, próbáld a többi lehetőséget
|
- Ha "*Integritás nem ellenőrizhető*" hibát kapsz, próbáld a többi lehetőséget
|
||||||
- Ha az **Avex** működik, csak azt az egy appot választhatod
|
- Ha az **Avex** működik, csak az ESign-t választhatod
|
||||||
- Ha egyik sem működik, feketelistán lehetsz - írj a Firka Discord szerverbe segítségért
|
- Ha egyik sem működik, feketelistán lehetsz - írj a Firka Discord szerverbe segítségért, vagy olvasd el a "[Revoke Fix Guide](https://github.com/TheAppleUser1/Revoke-Fixing-Guide)"-ot.
|
||||||
|
- Menj a beállitásokba utána Általános az alatt VPN és eszközfelügyelet ott keresd meg a Profilt amit letöltöttél menjn rá és azon belül kattints a megbizásra utána megbizás (vagy megbizás és újraindítás)
|
||||||
|
|
||||||
### 4. ESign telepítése
|
### 4. ESign telepítése
|
||||||
- Nyisd meg a **Portal**t
|
- Nyisd meg a **Portal**t
|
||||||
- Menj végig a beállítási folyamaton
|
- Menj végig a beállítási folyamaton
|
||||||
@@ -52,21 +94,98 @@
|
|||||||
- Add meg a jelszót: `WSF`
|
- Add meg a jelszót: `WSF`
|
||||||
|
|
||||||
### 6. Firka telepítése
|
### 6. Firka telepítése
|
||||||
- Töltsd le a Firka IPA fájlt a Firka [Github repojából](https://github.com/QwIT-Development/app-legacy/releases/latest)
|
- Menj az `AppStore` fülre alul aztán bal felül kattints az `App Source` gombra azután jobb felül kattints az +-ra és másold be hogy `https://raw.githubusercontent.com/spitkov/firkarepo/refs/heads/main/esign.json`
|
||||||
- Nyisd meg az **ESignt**
|
- Menj vissza és az AppStore fülben látni fogod a Firká-t
|
||||||
- Az `Import` gombbal importáld a Firka IPA fájlt
|
- Kattints hogy `Download`
|
||||||
- Nyomj rá a fájlra, majd válaszd az `Import App Library` opciót
|
- A `Download` fülben láthatod a letöltést, ha letöltött kattints rá és nyomd meg a `Import App Library` gombot
|
||||||
- Menj az `Apps` fülre
|
- Azután menj a `Apps` fülre és válaszd ki a Firkát kattints a `Signature`-re aztán megint `Signature` (fontos ne lépj ki az esign-bol amíg nem jelentek meg az `Install` és az `Exit` gombok)
|
||||||
- Nyomj a Firka appra, majd a `Signature` opcióra
|
- Ha végzett kattints az `Install` gombra és fel fog jönni egy kis menü hogy esign.yyyue.xyz telepíteni akarja a Firkát akkor kattints arra hogy Telepítés
|
||||||
- Kapcsold be az `Install After Signed` opciót
|
- És kész is 🎉
|
||||||
- Nyomj a piros `Signature` gombra
|
|
||||||
- Amikor megjelenik az "*esign.yyyue.xyz* would like to Install **Firka**" üzenet, nyomj a **Telepítés/Install** gombra
|
### ESign FAQ:
|
||||||
- Várj, amíg befejeződik a telepítés
|
- Q1: Törölhetem az ESignt meg a profilt amiután meg lett a Firka?
|
||||||
- Menj a kezdőképernyőre és nyisd meg a Firkát
|
- A1: Igen, ha elakarod b*szni az egészet. Nem, ha meg szeretnéd tartani.
|
||||||
|
- Több kérdés? Írj a Firka Discord szerverébe.
|
||||||
|
|
||||||
|
## 3. SideStore metódus (A SideStore az AltStore-nak egy jobb verziója)
|
||||||
|
|
||||||
|
### 1. Előfeltételek
|
||||||
|
- Mac számítógép macOS 10.15 vagy újabb verzióval
|
||||||
|
- Apple fiók
|
||||||
|
- Internet kapcsolat
|
||||||
|
- iPhone iOS 14 vagy újabb verzióval
|
||||||
|
|
||||||
|
### 2. Szükséges fájlok letöltése (Maceden)
|
||||||
|
- AltServer: https://cdn.altstore.io/file/altstore/altserver.zip
|
||||||
|
- SideStore IPA: https://github.com/sidestore/sidestore/releases/latest/download/sidestore.ipa
|
||||||
|
- JitterBugPair: https://github.com/osy/Jitterbug/releases/download/v1.3.1/jitterbugpair-macos.zip
|
||||||
|
|
||||||
|
### 3. AltServer telepítése és beállítása (Maceden)
|
||||||
|
- Csomagold ki az AltServer-t a ZIP fájlból
|
||||||
|
- Helyezd át az Alkalmazások mappába
|
||||||
|
- Indítsd el az AltServer-t
|
||||||
|
|
||||||
|
### 4. SideStore telepítése (Maceden és az iPhoneodon)
|
||||||
|
- Csatlakoztasd az iPhone-od a Mac-hez
|
||||||
|
- Engedélyezd a "Megbízható számítógép" opciót az iPhone-on (ha kéri)
|
||||||
|
- A Mac menüsorában tartsd nyomva az Option⌥/Alt⌥ gombot
|
||||||
|
- Kattints az AltStore ikonra (rombusz alakú)
|
||||||
|
- Válaszd a "Sideload .ipa" opciót
|
||||||
|
- Válaszd ki az eszközöd nevét
|
||||||
|
- Válaszd ki a letöltött SideStore IPA fájlt
|
||||||
|
- Add meg az Apple fiókod adatait
|
||||||
|
- Várd meg a telepítést
|
||||||
|
- Az iPhone-on menj a Beállítások > Általános > VPN & Eszközfelügyelet menübe
|
||||||
|
- Keresd meg az Apple email címed és nyomd meg a "Megbízható" gombot
|
||||||
|
|
||||||
|
### 5. Fejlesztői mód engedélyezése (iOS 16 vagy újabb esetén) (iPhoneodon)
|
||||||
|
- Menj a Beállítások > Adatvédelem és Biztonság menübe
|
||||||
|
- Görgess az aljára
|
||||||
|
- Kapcsold be a Fejlesztői módot
|
||||||
|
- Várd meg az iPhone újraindulását
|
||||||
|
- Húzd fel a képernyőt az indítás közben amikor kéri
|
||||||
|
|
||||||
|
### 6. Párosítás beállítása (Maceden)
|
||||||
|
- Csomagold ki a JitterBugPair ZIP fájlt
|
||||||
|
- Állíts be jelkódot az iPhone-on (ha még nincs)
|
||||||
|
- Csatlakoztasd az iPhone-od
|
||||||
|
- Oldd fel az eszközt és hagyd a kezdőképernyőn
|
||||||
|
- Futtasd a JitterBugPair parancs fájlt
|
||||||
|
- A generált párosító fájl neve: "(UDID).mobiledevicepairing"
|
||||||
|
- Tömörítsd be a párosító fájlt
|
||||||
|
- Küldd át az iPhone-ra (AirDrop vagy email)
|
||||||
|
- Az iPhone-on nyisd meg a Fájlok alkalmazást
|
||||||
|
- Csomagold ki a ZIP fájlt.
|
||||||
|
|
||||||
|
### 7. WireGuard VPN beállítása (iPhoneodon)
|
||||||
|
- Töltsd le a WireGuard VPN alkalmazást az App Store-ból: https://apps.apple.com/us/app/wireguard/id1441195209 [WireGuard App Store link](https://apps.apple.com/us/app/wireguard/id1441195209)
|
||||||
|
- Telepítsd az alábbi Configuration Fájlt: https://github.com/sidestore/sidestore/releases/download/0.1.1/sidestore.conf Amint ez megvan, nyisd meg a Fájlok alkalmazást, és keresd meg hogy "SideStore.conf". Nyomj rá hosszan és "oszd meg". A Megosztó ablakba ha kell, görgess a "Több/More" gombra, és nyisd meg a WireGuard-al.
|
||||||
|
- Nyomj az Engedélyezésre mikor azt mondja hogy: "A "WireGuard" VPN konfigurációt szeretne hozzáadni". Megynyitja a Beállításokat. Mikor kéri, írd be a jelkódodat. Ez vissza fog dobni a WireGuardba. Kapcsold be a SideStore-t. (Ez a "VPN" quote-unquote nem egy VPN, csak letiltja az Applenek az oscp-jét. Az OSCP az ami ellenőrzi hogy mit sideloadingolsz. Magyarúl, ez bisztonságos)
|
||||||
|
|
||||||
|
### 8. SideStore app beállítása (iPhoneodon)
|
||||||
|
- Indítsd el a SideStore alkalmazást
|
||||||
|
- Nyomj az OK gombra
|
||||||
|
- Válaszd ki a párosító fájlt
|
||||||
|
- Jelentkezz be az Apple Fiókoddal
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Megjegyzések:
|
||||||
|
- Ha frissíted az eszközöd, újra kell csinálnod a párosítást
|
||||||
|
- Új párosító fájl hozzáadásához:
|
||||||
|
- Menj a SideStore beállításaiba
|
||||||
|
- Nyomd meg a "Reset Pairing File" gombot
|
||||||
|
- Add hozzá az új verziót
|
||||||
|
- Sajnáljuk a komplikált fojamatot. Sajnálatos módon a Testflight vagy az App Storera való kitétel jelenleg nem nagyon egy opció, mivel az Applenek 100 eurós fejelsztői membership vásárlása kötelező.
|
||||||
|
|
||||||
## Kreditek
|
## Kreditek
|
||||||
- **A Firka csapat**: Az app zöld verziójának fejlesztői
|
- **A Firka csapat**: Az app zöld verziójának fejlesztői
|
||||||
- Discord: [https://discord.gg/6awUPSMFKe](https://discord.gg/6awUPSMFKe)
|
- Discord: [https://discord.gg/6awUPSMFKe](https://discord.gg/6awUPSMFKe)
|
||||||
- GitHub: [https://github.com/QwIT-Development/app-legacy](https://github.com/QwIT-Development/app-legacy)
|
- GitHub: [https://github.com/QwIT-Development/app-legacy](https://github.com/QwIT-Development/app-legacy)
|
||||||
- **WSF**: A Permanent Signing lehetővé tétele
|
- **WSF**: A Permanent Signing lehetővé tétele
|
||||||
- X (korábban Twitter): [https://x.com/wsf_team](https://x.com/wsf_team)
|
- X (korábban Twitter): [https://x.com/wsf_team](https://x.com/wsf_team)
|
||||||
|
- **Spitkov**: A Feather útmutató írója, és a repok készítője/maintainelője.
|
||||||
|
- Weboldal: [https://spitkov.hu](https://spitkov.hu)
|
||||||
|
- **TheAppleUser**: Az Esign és SideStore útmutató írója.
|
||||||
|
- X (korábban Twitter): [https://x.com/TheAppleUser11](https://x.com/TheAppleUser11)
|
||||||
|
|||||||
82
refilc/.gitignore
vendored
82
refilc/.gitignore
vendored
@@ -1,82 +0,0 @@
|
|||||||
# Miscellaneous
|
|
||||||
*.class
|
|
||||||
*.log
|
|
||||||
*.pyc
|
|
||||||
*.swp
|
|
||||||
.DS_Store
|
|
||||||
.atom/
|
|
||||||
.build/
|
|
||||||
.buildlog/
|
|
||||||
.history
|
|
||||||
.svn/
|
|
||||||
.swiftpm/
|
|
||||||
migrate_working_dir/
|
|
||||||
|
|
||||||
# IntelliJ related
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
*.iws
|
|
||||||
.idea/
|
|
||||||
|
|
||||||
# The .vscode folder contains launch configuration and tasks you configure in
|
|
||||||
# VS Code which you may wish to be included in version control, so this line
|
|
||||||
# is commented out by default.
|
|
||||||
#.vscode/
|
|
||||||
|
|
||||||
# Flutter/Dart/Pub related
|
|
||||||
**/doc/api/
|
|
||||||
**/ios/Flutter/.last_build_id
|
|
||||||
.dart_tool/
|
|
||||||
.flutter-plugins
|
|
||||||
.flutter-plugins-dependencies
|
|
||||||
.packages
|
|
||||||
.pub-cache/
|
|
||||||
.pub/
|
|
||||||
/build/
|
|
||||||
|
|
||||||
# Symbolication related
|
|
||||||
app.*.symbols
|
|
||||||
|
|
||||||
# Obfuscation related
|
|
||||||
app.*.map.json
|
|
||||||
|
|
||||||
# Android Studio will place build artifacts here
|
|
||||||
/android/app/debug
|
|
||||||
/android/app/profile
|
|
||||||
/android/app/release
|
|
||||||
|
|
||||||
.symlinks/
|
|
||||||
Pods
|
|
||||||
Podfile.lock
|
|
||||||
UserInterfaceState.xcuserstate
|
|
||||||
**/ios/**/*.mode1v3
|
|
||||||
**/ios/**/*.mode2v3
|
|
||||||
**/ios/**/*.moved-aside
|
|
||||||
**/ios/**/*.pbxuser
|
|
||||||
**/ios/**/*.perspectivev3
|
|
||||||
**/ios/**/*sync/
|
|
||||||
**/ios/**/.sconsign.dblite
|
|
||||||
**/ios/**/.tags*
|
|
||||||
**/ios/**/.vagrant/
|
|
||||||
**/ios/**/DerivedData/
|
|
||||||
**/ios/**/Icon?
|
|
||||||
**/ios/**/Pods/
|
|
||||||
**/ios/**/.symlinks/
|
|
||||||
**/ios/**/profile
|
|
||||||
**/ios/**/xcuserdata
|
|
||||||
**/ios/.generated/
|
|
||||||
**/ios/Flutter/.last_build_id
|
|
||||||
**/ios/Flutter/App.framework
|
|
||||||
**/ios/Flutter/Flutter.framework
|
|
||||||
**/ios/Flutter/Flutter.podspec
|
|
||||||
**/ios/Flutter/Generated.xcconfig
|
|
||||||
**/ios/Flutter/ephemeral
|
|
||||||
**/ios/Flutter/app.flx
|
|
||||||
**/ios/Flutter/app.zip
|
|
||||||
**/ios/Flutter/flutter_assets/
|
|
||||||
**/ios/Flutter/flutter_export_environment.sh
|
|
||||||
**/ios/ServiceDefinitions.json
|
|
||||||
**/ios/Runner/GeneratedPluginRegistrant.*
|
|
||||||
|
|
||||||
#don't include debugging symbols, bc they get generated on build
|
|
||||||
debug-info/
|
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
# refilc
|
# refilc - Fő library
|
||||||
|
|
||||||
Main lib
|
### A következőket tartalmazza:
|
||||||
|
- Android és iPhone építéshez szükséges mappák
|
||||||
|
- az app forrásai (képek, ikonok, egyebek)
|
||||||
|
- téma rendszer kódja
|
||||||
|
- lokális db (sqlite) kezelő kódja
|
||||||
|
- reklámok, analítika és egyéb finomságok kódjai
|
||||||
|
- értesítés rendszer kódja
|
||||||
|
- kisebb része a kréta bejelentkezésnek
|
||||||
|
|||||||
2
refilc/android/.gitignore
vendored
2
refilc/android/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
key.properties
|
|
||||||
debugkey.properties
|
|
||||||
1
refilc/android/app/.gitignore
vendored
1
refilc/android/app/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
*.jks
|
|
||||||
@@ -33,11 +33,17 @@ if (flutterVersionName == null) {
|
|||||||
|
|
||||||
def keystoreProperties = new Properties()
|
def keystoreProperties = new Properties()
|
||||||
def keystorePropertiesFile = rootProject.file("key.properties")
|
def keystorePropertiesFile = rootProject.file("key.properties")
|
||||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
}
|
||||||
|
|
||||||
def debugKeystoreProperties = new Properties()
|
def debugKeystoreProperties = new Properties()
|
||||||
def debugKeystorePropertiesFile = rootProject.file("debugkey.properties")
|
def debugKeystorePropertiesFile = rootProject.file("debugkey.properties")
|
||||||
debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile))
|
if (debugKeystorePropertiesFile.exists()) {
|
||||||
|
debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile))
|
||||||
|
}
|
||||||
|
|
||||||
|
def hasReleaseKeystore = keystorePropertiesFile.exists() && keystoreProperties['storeFile']
|
||||||
|
|
||||||
// magical code that fixes builds
|
// magical code that fixes builds
|
||||||
subprojects {
|
subprojects {
|
||||||
@@ -53,12 +59,12 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "app.firka.legacy"
|
namespace = "hu.refilc.naplo"
|
||||||
|
|
||||||
ndkVersion "27.2.12479018"
|
ndkVersion "27.2.12479018"
|
||||||
|
|
||||||
// compileSdkVersion rootProject.ext.compileSdkVersion
|
// compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
compileSdkVersion 34
|
compileSdkVersion 36
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs += 'src/main/kotlin'
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
@@ -72,10 +78,10 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "app.firka.legacy"
|
applicationId "hu.refilc.naplo"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 34
|
targetSdkVersion 35
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode 6
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
@@ -100,17 +106,20 @@ android {
|
|||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
debug {
|
debug {
|
||||||
|
// Use the default Android debug keystore to avoid alias mismatches
|
||||||
keyAlias "androiddebugkey"
|
keyAlias "androiddebugkey"
|
||||||
keyPassword debugKeystoreProperties['keyPassword']
|
storeFile file(System.properties['user.home'] + "/.android/debug.keystore")
|
||||||
storeFile file(debugKeystoreProperties['storeFile'])
|
storePassword "android"
|
||||||
storePassword debugKeystoreProperties['storePassword']
|
keyPassword "android"
|
||||||
}
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
keyAlias keystoreProperties['keyAlias']
|
if (hasReleaseKeystore) {
|
||||||
keyPassword keystoreProperties['keyPassword']
|
keyAlias keystoreProperties['keyAlias']
|
||||||
storeFile file(keystoreProperties['storeFile'])
|
keyPassword keystoreProperties['keyPassword']
|
||||||
storePassword keystoreProperties['storePassword']
|
storeFile file(keystoreProperties['storeFile'])
|
||||||
|
storePassword keystoreProperties['storePassword']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +129,11 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
signingConfig signingConfigs.release
|
if (hasReleaseKeystore) {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
} else {
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
|
}
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
debuggable false
|
debuggable false
|
||||||
@@ -149,7 +162,7 @@ dependencies {
|
|||||||
implementation 'joda-time:joda-time:2.9.4'
|
implementation 'joda-time:joda-time:2.9.4'
|
||||||
androidTestImplementation 'androidx.test:runner:1.1.1'
|
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
|
||||||
implementation 'androidx.window:window:1.0.0'
|
implementation 'androidx.window:window:1.0.0'
|
||||||
implementation 'androidx.window:window-java:1.0.0'
|
implementation 'androidx.window:window-java:1.0.0'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="app.firka.legacy">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.refilc.naplo">
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools" package="app.firka.legacy">
|
xmlns:tools="http://schemas.android.com/tools" package="hu.refilc.naplo">
|
||||||
<application android:name="${applicationName}" android:label="Firka" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
|
<application android:name="${applicationName}" android:label="Firka" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
|
||||||
android:requestLegacyExternalStorage="true" android:enableOnBackInvokedCallback="false">
|
android:requestLegacyExternalStorage="true" android:enableOnBackInvokedCallback="false">
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
android:name="flutter.embedding.android.SurfaceView"
|
android:name="flutter.embedding.android.SurfaceView"
|
||||||
android:value="true" />
|
android:value="true" />
|
||||||
|
|
||||||
<activity android:exported="true" android:name="app.firka.legacy.MainActivity"
|
<activity android:exported="true" android:name="hu.refilc.naplo.MainActivity"
|
||||||
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
|
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"
|
android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<meta-data android:name="flutterEmbedding" android:value="2" />
|
<meta-data android:name="flutterEmbedding" android:value="2" />
|
||||||
|
|
||||||
<receiver android:name="app.firka.legacy.widget_timetable.WidgetTimetable"
|
<receiver android:name="hu.refilc.naplo.widget_timetable.WidgetTimetable"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
android:resource="@xml/home_widget_test_info" />
|
android:resource="@xml/home_widget_test_info" />
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<service android:name="app.firka.legacy.widget_timetable.WidgetTimetableService"
|
<service android:name="hu.refilc.naplo.widget_timetable.WidgetTimetableService"
|
||||||
android:permission="android.permission.BIND_REMOTEVIEWS" />
|
android:permission="android.permission.BIND_REMOTEVIEWS" />
|
||||||
|
|
||||||
<receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver"
|
<receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver"
|
||||||
@@ -89,12 +89,21 @@
|
|||||||
<meta-data android:name="flutterEmbedding" android:value="2" />
|
<meta-data android:name="flutterEmbedding" android:value="2" />
|
||||||
|
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="32"
|
||||||
|
tools:node="remove" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.READ_MEDIA_IMAGES"
|
||||||
|
tools:node="remove" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.READ_MEDIA_VIDEO"
|
||||||
|
tools:node="remove" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.READ_MEDIA_AUDIO"
|
||||||
|
tools:node="remove" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.firka.legacy
|
package hu.refilc.naplo
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.firka.legacy.database
|
package hu.refilc.naplo.database
|
||||||
|
|
||||||
import android.content.ContentValues
|
import android.content.ContentValues
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -7,7 +7,7 @@ import android.database.sqlite.SQLiteDatabase
|
|||||||
|
|
||||||
import java.sql.SQLException
|
import java.sql.SQLException
|
||||||
|
|
||||||
import app.firka.legacy.database.SQLiteHelper
|
import hu.refilc.naplo.database.SQLiteHelper
|
||||||
import kotlin.arrayOf
|
import kotlin.arrayOf
|
||||||
|
|
||||||
class DBManager(private val context: Context) {
|
class DBManager(private val context: Context) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.firka.legacy.database
|
package hu.refilc.naplo.database
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.database.sqlite.SQLiteDatabase
|
import android.database.sqlite.SQLiteDatabase
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.firka.legacy.utils
|
package hu.refilc.naplo.utils
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.ConnectivityManager
|
import android.net.ConnectivityManager
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.firka.legacy.utils
|
package hu.refilc.naplo.utils
|
||||||
|
|
||||||
import java.time.DayOfWeek
|
import java.time.DayOfWeek
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.firka.legacy.widget_timetable
|
package hu.refilc.naplo.widget_timetable
|
||||||
|
|
||||||
import android.app.PendingIntent
|
import android.app.PendingIntent
|
||||||
import android.app.UiModeManager
|
import android.app.UiModeManager
|
||||||
@@ -30,11 +30,11 @@ import java.text.ParseException
|
|||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
|
|
||||||
import app.firka.legacy.database.DBManager
|
import hu.refilc.naplo.database.DBManager
|
||||||
import app.firka.legacy.MainActivity
|
import hu.refilc.naplo.MainActivity
|
||||||
import app.firka.legacy.R
|
import hu.refilc.naplo.R
|
||||||
|
|
||||||
import app.firka.legacy.utils.Week
|
import hu.refilc.naplo.utils.Week
|
||||||
|
|
||||||
import es.antonborri.home_widget.HomeWidgetBackgroundIntent
|
import es.antonborri.home_widget.HomeWidgetBackgroundIntent
|
||||||
import es.antonborri.home_widget.HomeWidgetLaunchIntent
|
import es.antonborri.home_widget.HomeWidgetLaunchIntent
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.firka.legacy.widget_timetable
|
package hu.refilc.naplo.widget_timetable
|
||||||
|
|
||||||
import android.app.UiModeManager
|
import android.app.UiModeManager
|
||||||
import android.appwidget.AppWidgetManager
|
import android.appwidget.AppWidgetManager
|
||||||
@@ -19,8 +19,8 @@ import org.json.JSONObject
|
|||||||
import java.util.Collections
|
import java.util.Collections
|
||||||
import java.util.Comparator
|
import java.util.Comparator
|
||||||
|
|
||||||
import app.firka.legacy.database.DBManager
|
import hu.refilc.naplo.database.DBManager
|
||||||
import app.firka.legacy.R
|
import hu.refilc.naplo.R
|
||||||
|
|
||||||
class WidgetTimetableDataProvider(context: Context, intent: Intent) : RemoteViewsService.RemoteViewsFactory {
|
class WidgetTimetableDataProvider(context: Context, intent: Intent) : RemoteViewsService.RemoteViewsFactory {
|
||||||
private val context: Context
|
private val context: Context
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.firka.legacy.widget_timetable
|
package hu.refilc.naplo.widget_timetable
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="app.firka.legacy">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.refilc.naplo">
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -22,9 +22,12 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven {
|
def backgroundFetchProject = findProject(':background_fetch')
|
||||||
// [required] background_fetch
|
if (backgroundFetchProject != null) {
|
||||||
url "${project(':background_fetch').projectDir}/libs"
|
maven {
|
||||||
|
// [required] background_fetch
|
||||||
|
url "${backgroundFetchProject.projectDir}/libs"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,8 +50,8 @@ subprojects {
|
|||||||
afterEvaluate {project ->
|
afterEvaluate {project ->
|
||||||
if (project.plugins.hasPlugin('android') || project.plugins.hasPlugin('android-library')) {
|
if (project.plugins.hasPlugin('android') || project.plugins.hasPlugin('android-library')) {
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 34
|
compileSdkVersion 36
|
||||||
buildToolsVersion '31.0.0'
|
buildToolsVersion '36.0.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
org.gradle.jvmargs=-Xmx6G -XX:MaxMetaspaceSize=4G -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC
|
org.gradle.jvmargs=-Xmx28G -XX:MaxMetaspaceSize=4G -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
kotlin.compiler.execution.strategy=in-process
|
||||||
# kotlin.jvm.target.validation.mode=IGNORE
|
# kotlin.jvm.target.validation.mode=IGNORE
|
||||||
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ pluginManagement {
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
id "com.android.application" version "8.7.3" apply false
|
id "com.android.application" version "8.9.2" apply false
|
||||||
id "org.jetbrains.kotlin.android" version "2.0.21" apply false
|
id "org.jetbrains.kotlin.android" version "2.0.21" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
# Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
flutter build ipa --release --tree-shake-icons --split-debug-info=debug-info --obfuscate --no-codesign
|
flutter build ipa --release --tree-shake-icons --split-debug-info=debug-info --obfuscate --no-codesign
|
||||||
|
|||||||
@@ -1 +1,19 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
' Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
' Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
'
|
||||||
|
' This program is free software: you can redistribute it and/or modify
|
||||||
|
' it under the terms of the GNU Affero General Public License as
|
||||||
|
' published by the Free Software Foundation, either version 3 of the
|
||||||
|
' License, or (at your option) any later version.
|
||||||
|
'
|
||||||
|
' This program is distributed in the hope that it will be useful,
|
||||||
|
' but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
' GNU Affero General Public License for more details.
|
||||||
|
'
|
||||||
|
' You should have received a copy of the GNU Affero General Public License
|
||||||
|
' along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
flutter build apk --release --tree-shake-icons --split-debug-info=debug-info --split-per-abi --target-platform android-arm,android-arm64 --obfuscate
|
flutter build apk --release --tree-shake-icons --split-debug-info=debug-info --split-per-abi --target-platform android-arm,android-arm64 --obfuscate
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
# Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
flutter build apk --release --tree-shake-icons --split-debug-info=debug-info --split-per-abi --target-platform android-arm,android-arm64 --obfuscate
|
flutter build apk --release --tree-shake-icons --split-debug-info=debug-info --split-per-abi --target-platform android-arm,android-arm64 --obfuscate
|
||||||
|
|||||||
@@ -20,7 +20,5 @@
|
|||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0</string>
|
<string>1.0</string>
|
||||||
<key>MinimumOSVersion</key>
|
|
||||||
<string>12.0</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
|
|||||||
flutter_ios_podfile_setup
|
flutter_ios_podfile_setup
|
||||||
|
|
||||||
target 'Runner' do
|
target 'Runner' do
|
||||||
use_frameworks!
|
use_frameworks! :linkage => :static
|
||||||
use_modular_headers!
|
use_modular_headers!
|
||||||
|
|
||||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||||
@@ -41,23 +41,11 @@ post_install do |installer|
|
|||||||
flutter_additional_ios_build_settings(target)
|
flutter_additional_ios_build_settings(target)
|
||||||
target.build_configurations.each do |config|
|
target.build_configurations.each do |config|
|
||||||
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
|
||||||
|
if target.name == 'DKImagePickerController'
|
||||||
|
config.build_settings['SWIFT_VERSION'] = '5.0'
|
||||||
|
config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -Xfrontend -disable-reflection-metadata'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
|
|
||||||
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
|
||||||
framework_path = File.join(Dir.pwd, framework_relative_path)
|
|
||||||
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
|
|
||||||
puts "Stripping bitcode: #{command}"
|
|
||||||
system(command)
|
|
||||||
end
|
|
||||||
|
|
||||||
framework_paths = [
|
|
||||||
"Pods/Shake/Sources/Shake.xcframework/ios-arm64/Shake.framework/Shake",
|
|
||||||
"Pods/Shake/Sources/Shake.xcframework/ios-arm64_x86_64-simulator/Shake.framework/Shake"
|
|
||||||
]
|
|
||||||
|
|
||||||
framework_paths.each do |framework_relative_path|
|
|
||||||
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||||
|
1806187910CAF539F6FC2B28 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCB997B38F457FB73A5A9B6A /* Pods_Runner.framework */; };
|
||||||
3127F78D28EAEDE200C2EFB3 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3127F75528EAECC800C2EFB3 /* WidgetKit.framework */; };
|
3127F78D28EAEDE200C2EFB3 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3127F75528EAECC800C2EFB3 /* WidgetKit.framework */; };
|
||||||
3127F78E28EAEDE200C2EFB3 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3127F75728EAECC800C2EFB3 /* SwiftUI.framework */; };
|
3127F78E28EAEDE200C2EFB3 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3127F75728EAECC800C2EFB3 /* SwiftUI.framework */; };
|
||||||
3127F79828EAEDE300C2EFB3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3127F79728EAEDE300C2EFB3 /* Assets.xcassets */; };
|
3127F79828EAEDE300C2EFB3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3127F79728EAEDE300C2EFB3 /* Assets.xcassets */; };
|
||||||
@@ -15,7 +16,6 @@
|
|||||||
3127F7A428EAEE3D00C2EFB3 /* livecard.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 3127F7A328EAEE3D00C2EFB3 /* livecard.intentdefinition */; };
|
3127F7A428EAEE3D00C2EFB3 /* livecard.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 3127F7A328EAEE3D00C2EFB3 /* livecard.intentdefinition */; };
|
||||||
3127F7A628EAEE5900C2EFB3 /* livecard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3127F7A528EAEE5900C2EFB3 /* livecard.swift */; };
|
3127F7A628EAEE5900C2EFB3 /* livecard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3127F7A528EAEE5900C2EFB3 /* livecard.swift */; };
|
||||||
3127F7A828EAEE8500C2EFB3 /* lesson_model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3127F7A728EAEE8500C2EFB3 /* lesson_model.swift */; };
|
3127F7A828EAEE8500C2EFB3 /* lesson_model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3127F7A728EAEE8500C2EFB3 /* lesson_model.swift */; };
|
||||||
373A6ECB5FC71FE9D8AF2EDB /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F0ADD56276103500A3016C8 /* Pods_Runner.framework */; };
|
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
4F35BF332BE2FFA30098EF72 /* public_vars.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F35BF322BE2FFA30098EF72 /* public_vars.swift */; };
|
4F35BF332BE2FFA30098EF72 /* public_vars.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F35BF322BE2FFA30098EF72 /* public_vars.swift */; };
|
||||||
4F35BF352BE2FFD80098EF72 /* LiveActivityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F35BF342BE2FFD80098EF72 /* LiveActivityManager.swift */; };
|
4F35BF352BE2FFD80098EF72 /* LiveActivityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F35BF342BE2FFD80098EF72 /* LiveActivityManager.swift */; };
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||||
1F0ADD56276103500A3016C8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
2F639A73BBD0AA532FD89597 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
3127F73928EAEC3200C2EFB3 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
|
3127F73928EAEC3200C2EFB3 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
|
||||||
3127F73F28EAEC8A00C2EFB3 /* IntentsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IntentsUI.framework; path = System/Library/Frameworks/IntentsUI.framework; sourceTree = SDKROOT; };
|
3127F73F28EAEC8A00C2EFB3 /* IntentsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IntentsUI.framework; path = System/Library/Frameworks/IntentsUI.framework; sourceTree = SDKROOT; };
|
||||||
3127F75528EAECC800C2EFB3 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
|
3127F75528EAECC800C2EFB3 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
|
||||||
@@ -83,11 +83,10 @@
|
|||||||
4F35BF342BE2FFD80098EF72 /* LiveActivityManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivityManager.swift; sourceTree = "<group>"; };
|
4F35BF342BE2FFD80098EF72 /* LiveActivityManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivityManager.swift; sourceTree = "<group>"; };
|
||||||
4F35BF3B2BE303A40098EF72 /* app_group_directory.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = app_group_directory.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
4F35BF3B2BE303A40098EF72 /* app_group_directory.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = app_group_directory.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
4F35BF3D2BE304550098EF72 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
4F35BF3D2BE304550098EF72 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||||
707F8089D970F81C480F73C4 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
60F3B7142FA88CEF9B740E3C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
80777CF254888CE770D5F909 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
@@ -95,7 +94,8 @@
|
|||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
98578F0EBCC6D3FF8391AAEB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
CCB997B38F457FB73A5A9B6A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
DCFCD496781E9C672922FB23 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
373A6ECB5FC71FE9D8AF2EDB /* Pods_Runner.framework in Frameworks */,
|
1806187910CAF539F6FC2B28 /* Pods_Runner.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -137,10 +137,10 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
4F35BF3B2BE303A40098EF72 /* app_group_directory.framework */,
|
4F35BF3B2BE303A40098EF72 /* app_group_directory.framework */,
|
||||||
1F0ADD56276103500A3016C8 /* Pods_Runner.framework */,
|
|
||||||
3127F73F28EAEC8A00C2EFB3 /* IntentsUI.framework */,
|
3127F73F28EAEC8A00C2EFB3 /* IntentsUI.framework */,
|
||||||
3127F75528EAECC800C2EFB3 /* WidgetKit.framework */,
|
3127F75528EAECC800C2EFB3 /* WidgetKit.framework */,
|
||||||
3127F75728EAECC800C2EFB3 /* SwiftUI.framework */,
|
3127F75728EAECC800C2EFB3 /* SwiftUI.framework */,
|
||||||
|
CCB997B38F457FB73A5A9B6A /* Pods_Runner.framework */,
|
||||||
);
|
);
|
||||||
name = Frameworks;
|
name = Frameworks;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -148,9 +148,9 @@
|
|||||||
91FEB6212755D596FFFFEC73 /* Pods */ = {
|
91FEB6212755D596FFFFEC73 /* Pods */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
80777CF254888CE770D5F909 /* Pods-Runner.debug.xcconfig */,
|
60F3B7142FA88CEF9B740E3C /* Pods-Runner.debug.xcconfig */,
|
||||||
98578F0EBCC6D3FF8391AAEB /* Pods-Runner.release.xcconfig */,
|
2F639A73BBD0AA532FD89597 /* Pods-Runner.release.xcconfig */,
|
||||||
707F8089D970F81C480F73C4 /* Pods-Runner.profile.xcconfig */,
|
DCFCD496781E9C672922FB23 /* Pods-Runner.profile.xcconfig */,
|
||||||
);
|
);
|
||||||
path = Pods;
|
path = Pods;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
779338C8D92BCBC36F75F791 /* [CP] Check Pods Manifest.lock */,
|
FF86224C7703027F130483F3 /* [CP] Check Pods Manifest.lock */,
|
||||||
9740EEB61CF901F6004384FC /* Run Script */,
|
9740EEB61CF901F6004384FC /* Run Script */,
|
||||||
97C146EA1CF9000F007C117D /* Sources */,
|
97C146EA1CF9000F007C117D /* Sources */,
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||||
@@ -237,8 +237,8 @@
|
|||||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||||
3127F74F28EAEC8A00C2EFB3 /* Embed Foundation Extensions */,
|
3127F74F28EAEC8A00C2EFB3 /* Embed Foundation Extensions */,
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
71459C0EB905E05018E3D78F /* [CP] Embed Pods Frameworks */,
|
F87C348DE3B0D2671B7E9A6F /* [CP] Embed Pods Frameworks */,
|
||||||
262089761B766E074256257A /* [CP] Copy Pods Resources */,
|
B0FC589DBDE68DA21F80B4BB /* [CP] Copy Pods Resources */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -312,23 +312,6 @@
|
|||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
262089761B766E074256257A /* [CP] Copy Pods Resources */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
|
||||||
);
|
|
||||||
name = "[CP] Copy Pods Resources";
|
|
||||||
outputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
alwaysOutOfDate = 1;
|
alwaysOutOfDate = 1;
|
||||||
@@ -347,11 +330,43 @@
|
|||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
|
||||||
};
|
};
|
||||||
71459C0EB905E05018E3D78F /* [CP] Embed Pods Frameworks */ = {
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 12;
|
buildActionMask = 12;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "Run Script";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
|
||||||
|
};
|
||||||
|
B0FC589DBDE68DA21F80B4BB /* [CP] Copy Pods Resources */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Copy Pods Resources";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
F87C348DE3B0D2671B7E9A6F /* [CP] Embed Pods Frameworks */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
@@ -364,7 +379,7 @@
|
|||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
779338C8D92BCBC36F75F791 /* [CP] Check Pods Manifest.lock */ = {
|
FF86224C7703027F130483F3 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
@@ -386,21 +401,6 @@
|
|||||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
alwaysOutOfDate = 1;
|
|
||||||
buildActionMask = 12;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "Run Script";
|
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
|
|
||||||
};
|
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
@@ -500,7 +500,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
@@ -513,27 +513,31 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 283;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FLUTTER_BUILD_NAME = 5.1.1;
|
FLUTTER_BUILD_NAME = 5.1.2;
|
||||||
FLUTTER_BUILD_NUMBER = 283;
|
FLUTTER_BUILD_NUMBER = 0;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = Firka;
|
INFOPLIST_KEY_CFBundleDisplayName = "Firka Legacy";
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.1.1;
|
MARKETING_VERSION = 5.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.firka.legacy;
|
PRODUCT_BUNDLE_IDENTIFIER = app.firkaa.legacy;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Profile;
|
name = Profile;
|
||||||
@@ -552,7 +556,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 283;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@@ -568,15 +572,18 @@
|
|||||||
MARKETING_VERSION = 5.1.1;
|
MARKETING_VERSION = 5.1.1;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.firka.legacy.livecard;
|
PRODUCT_BUNDLE_IDENTIFIER = app.firkaa.legacy.livecard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -594,7 +601,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 283;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@@ -609,14 +616,17 @@
|
|||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.1.1;
|
MARKETING_VERSION = 5.1.1;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.firka.legacy.livecard;
|
PRODUCT_BUNDLE_IDENTIFIER = app.firkaa.legacy.livecard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -634,7 +644,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 283;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@@ -649,14 +659,17 @@
|
|||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.1.1;
|
MARKETING_VERSION = 5.1.1;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.firka.legacy.livecard;
|
PRODUCT_BUNDLE_IDENTIFIER = app.firkaa.legacy.livecard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
};
|
};
|
||||||
name = Profile;
|
name = Profile;
|
||||||
};
|
};
|
||||||
@@ -708,7 +721,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
@@ -758,7 +771,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
@@ -773,28 +786,32 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 283;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FLUTTER_BUILD_NAME = 5.1.1;
|
FLUTTER_BUILD_NAME = 5.1.2;
|
||||||
FLUTTER_BUILD_NUMBER = 283;
|
FLUTTER_BUILD_NUMBER = 0;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = Firka;
|
INFOPLIST_KEY_CFBundleDisplayName = "Firka Legacy";
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.1.1;
|
MARKETING_VERSION = 5.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.firka.legacy;
|
PRODUCT_BUNDLE_IDENTIFIER = app.firkaa.legacy;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@@ -803,27 +820,31 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 283;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
DEVELOPMENT_TEAM = R9PZGUCNJ3;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FLUTTER_BUILD_NAME = 5.1.1;
|
FLUTTER_BUILD_NAME = 5.1.2;
|
||||||
FLUTTER_BUILD_NUMBER = 283;
|
FLUTTER_BUILD_NUMBER = 0;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = Firka;
|
INFOPLIST_KEY_CFBundleDisplayName = "Firka Legacy";
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.1.1;
|
MARKETING_VERSION = 5.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = app.firka.legacy;
|
PRODUCT_BUNDLE_IDENTIFIER = app.firkaa.legacy;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
@@ -43,11 +44,13 @@
|
|||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
debugDocumentVersioning = "YES"
|
debugDocumentVersioning = "YES"
|
||||||
debugServiceExtension = "internal"
|
debugServiceExtension = "internal"
|
||||||
|
enableGPUValidationMode = "1"
|
||||||
allowLocationSimulation = "YES">
|
allowLocationSimulation = "YES">
|
||||||
<BuildableProductRunnable
|
<BuildableProductRunnable
|
||||||
runnableDebuggingMode = "0">
|
runnableDebuggingMode = "0">
|
||||||
|
|||||||
@@ -2,112 +2,168 @@ import UIKit
|
|||||||
import background_fetch
|
import background_fetch
|
||||||
import ActivityKit
|
import ActivityKit
|
||||||
import Flutter
|
import Flutter
|
||||||
|
import Security
|
||||||
|
|
||||||
@main
|
@main
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
private var methodChannel: FlutterMethodChannel?
|
private var methodChannel: FlutterMethodChannel?
|
||||||
|
private var tokenRotationObserver: NSObjectProtocol?
|
||||||
|
|
||||||
override func application(
|
override func application(
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
GeneratedPluginRegistrant.register(with: self)
|
||||||
guard let controller = window?.rootViewController as? FlutterViewController else {
|
guard let controller = window?.rootViewController as? FlutterViewController else {
|
||||||
fatalError("rootViewController is not type FlutterViewController")
|
fatalError("rootViewController is not type FlutterViewController")
|
||||||
}
|
|
||||||
methodChannel = FlutterMethodChannel(name: "app.firka/liveactivity",
|
|
||||||
binaryMessenger: controller as! FlutterBinaryMessenger)
|
|
||||||
methodChannel?.setMethodCallHandler({
|
|
||||||
[weak self] (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
|
|
||||||
guard call.method == "createLiveActivity" || call.method == "endLiveActivity" || call.method == "updateLiveActivity" else {
|
|
||||||
result(FlutterMethodNotImplemented)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
self?.handleMethodCall(call, result: result)
|
|
||||||
})
|
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
override func applicationWillTerminate(_ application: UIApplication) {
|
|
||||||
if #available(iOS 16.2, *) {
|
|
||||||
LiveActivityManager.stop()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func handleMethodCall(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
|
||||||
if call.method == "createLiveActivity" {
|
|
||||||
if let args = call.arguments as? [String: Any] {
|
|
||||||
lessonDataDictionary = args
|
|
||||||
globalLessonData = LessonData(from: lessonDataDictionary)
|
|
||||||
print("swift: megkapott flutter adatok:",lessonDataDictionary)
|
|
||||||
print("Live Activity bekapcsolva az eszközön: ",checkLiveActivityFeatureAvailable())
|
|
||||||
if(checkLiveActivityFeatureAvailable()) {
|
|
||||||
createLiveActivity(with: lessonDataDictionary)
|
|
||||||
result(checkLiveActivityFeatureAvailable())
|
|
||||||
} else {
|
|
||||||
result(nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
result(FlutterError(code: "INVALID_ARGUMENTS", message: "Invalid iOS arguments received", details: nil))
|
|
||||||
}
|
|
||||||
} else if call.method == "updateLiveActivity" {
|
|
||||||
if let args = call.arguments as? [String: Any] {
|
|
||||||
lessonDataDictionary = args
|
|
||||||
globalLessonData = LessonData(from: lessonDataDictionary)
|
|
||||||
updateLiveActivity(with: lessonDataDictionary)
|
|
||||||
result(nil)
|
|
||||||
} else {
|
|
||||||
result(FlutterError(code: "INVALID_ARGUMENTS", message: "Invalid iOS arguments received", details: nil))
|
|
||||||
}
|
}
|
||||||
} else if call.method == "endLiveActivity" {
|
methodChannel = FlutterMethodChannel(
|
||||||
endLiveActivity()
|
name: "app.firka/liveactivity",
|
||||||
result(nil)
|
binaryMessenger: controller as! FlutterBinaryMessenger
|
||||||
|
)
|
||||||
|
methodChannel?.setMethodCallHandler({ [weak self] (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
|
||||||
|
guard call.method == "createLiveActivity"
|
||||||
|
|| call.method == "endLiveActivity"
|
||||||
|
|| call.method == "updateLiveActivity"
|
||||||
|
else {
|
||||||
|
result(FlutterMethodNotImplemented)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
self?.handleMethodCall(call, result: result)
|
||||||
|
})
|
||||||
|
|
||||||
|
NotificationCenter.default.addObserver(
|
||||||
|
forName: NSNotification.Name("LiveActivityDismissed"),
|
||||||
|
object: nil,
|
||||||
|
queue: .main
|
||||||
|
) { [weak self] _ in
|
||||||
|
let deviceId = self?.getOrCreateDeviceId() ?? ""
|
||||||
|
self?.methodChannel?.invokeMethod("liveActivityDismissed", arguments: [
|
||||||
|
"deviceId": deviceId,
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
tokenRotationObserver = NotificationCenter.default.addObserver(
|
||||||
|
forName: NSNotification.Name("LiveActivityTokenUpdated"),
|
||||||
|
object: nil,
|
||||||
|
queue: .main
|
||||||
|
) { [weak self] notification in
|
||||||
|
if let newToken = notification.object as? String {
|
||||||
|
let deviceId = self?.getOrCreateDeviceId() ?? ""
|
||||||
|
let bundleId = Bundle.main.bundleIdentifier ?? ""
|
||||||
|
self?.methodChannel?.invokeMethod("liveActivityTokenUpdated", arguments: [
|
||||||
|
"pushToken": newToken,
|
||||||
|
"deviceId": deviceId,
|
||||||
|
"bundleId": bundleId,
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private func createLiveActivity(with activityData: [String: Any]) -> String? {
|
|
||||||
var lessonData = LessonData(from: activityData)
|
|
||||||
print("Live Activity létrehozása...")
|
|
||||||
if #available(iOS 16.2, *) {
|
|
||||||
LiveActivityManager.create()
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
private func updateLiveActivity(with activityData: [String: Any]) {
|
override func applicationWillTerminate(_ application: UIApplication) {
|
||||||
let lessonData = LessonData(from: activityData)
|
let deviceId = getOrCreateDeviceId()
|
||||||
print("swift: megkapott flutter adatok:",lessonDataDictionary)
|
unregisterFromServer(deviceId: deviceId)
|
||||||
print("Live Activity frissítés...")
|
if #available(iOS 16.2, *) {
|
||||||
if #available(iOS 16.2, *) {
|
LiveActivityManager.stop()
|
||||||
LiveActivityManager.update()
|
}
|
||||||
}
|
if let observer = tokenRotationObserver {
|
||||||
}
|
NotificationCenter.default.removeObserver(observer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private func unregisterFromServer(deviceId: String) {
|
||||||
private func endLiveActivity() {
|
guard let url = URL(string: "https://legacy-la.devbeni.lol/unregister") else { return }
|
||||||
print("Live Activity befejezése...")
|
var request = URLRequest(url: url)
|
||||||
if #available(iOS 16.2, *) {
|
request.httpMethod = "POST"
|
||||||
LiveActivityManager.stop()
|
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
|
||||||
}
|
request.httpBody = try? JSONSerialization.data(withJSONObject: ["device_id": deviceId])
|
||||||
}
|
let semaphore = DispatchSemaphore(value: 0)
|
||||||
|
URLSession.shared.dataTask(with: request) { _, _, _ in
|
||||||
private func checkIfLiveActivityExists() -> Bool {
|
semaphore.signal()
|
||||||
if let activityID = activityID {
|
}.resume()
|
||||||
if #available(iOS 16.2, *) {
|
_ = semaphore.wait(timeout: .now() + 3)
|
||||||
return LiveActivityManager.isRunning(activityID)
|
}
|
||||||
}
|
|
||||||
}
|
private func handleMethodCall(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
return false
|
if call.method == "createLiveActivity" {
|
||||||
}
|
guard let args = call.arguments as? [String: Any] else {
|
||||||
|
result(FlutterError(code: "INVALID_ARGUMENTS", message: "Invalid iOS arguments received", details: nil))
|
||||||
private func checkLiveActivityFeatureAvailable() -> Bool {
|
return
|
||||||
if #available(iOS 16.2, *) {
|
}
|
||||||
guard ActivityAuthorizationInfo().areActivitiesEnabled else {
|
lessonDataDictionary = args
|
||||||
return false
|
globalLessonData = LessonData(from: lessonDataDictionary)
|
||||||
}
|
print("swift: megkapott flutter adatok:", lessonDataDictionary)
|
||||||
return true
|
print("Live Activity bekapcsolva az eszközön:", checkLiveActivityFeatureAvailable())
|
||||||
}
|
|
||||||
return false
|
guard checkLiveActivityFeatureAvailable() else {
|
||||||
}
|
result(nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if #available(iOS 16.2, *) {
|
||||||
|
LiveActivityManager.create { success in
|
||||||
|
let deviceId = self.getOrCreateDeviceId()
|
||||||
|
let bundleId = Bundle.main.bundleIdentifier ?? ""
|
||||||
|
result([
|
||||||
|
"success": success,
|
||||||
|
"deviceId": deviceId,
|
||||||
|
"bundleId": bundleId,
|
||||||
|
])
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result(nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if call.method == "updateLiveActivity" {
|
||||||
|
guard let args = call.arguments as? [String: Any] else {
|
||||||
|
result(FlutterError(code: "INVALID_ARGUMENTS", message: "Invalid iOS arguments received", details: nil))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
lessonDataDictionary = args
|
||||||
|
globalLessonData = LessonData(from: lessonDataDictionary)
|
||||||
|
if #available(iOS 16.2, *) {
|
||||||
|
LiveActivityManager.update()
|
||||||
|
}
|
||||||
|
result(nil)
|
||||||
|
|
||||||
|
} else if call.method == "endLiveActivity" {
|
||||||
|
if #available(iOS 16.2, *) {
|
||||||
|
LiveActivityManager.stop()
|
||||||
|
}
|
||||||
|
result(nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private func getOrCreateDeviceId() -> String {
|
||||||
|
let keychainKey = "refilc.live.device_id"
|
||||||
|
let query: [String: Any] = [
|
||||||
|
kSecClass as String: kSecClassGenericPassword,
|
||||||
|
kSecAttrAccount as String: keychainKey,
|
||||||
|
kSecReturnData as String: true,
|
||||||
|
kSecMatchLimit as String: kSecMatchLimitOne,
|
||||||
|
]
|
||||||
|
var item: CFTypeRef?
|
||||||
|
if SecItemCopyMatching(query as CFDictionary, &item) == errSecSuccess,
|
||||||
|
let data = item as? Data,
|
||||||
|
let existingId = String(data: data, encoding: .utf8) {
|
||||||
|
return existingId
|
||||||
|
}
|
||||||
|
let newId = UUID().uuidString
|
||||||
|
let addQuery: [String: Any] = [
|
||||||
|
kSecClass as String: kSecClassGenericPassword,
|
||||||
|
kSecAttrAccount as String: keychainKey,
|
||||||
|
kSecValueData as String: newId.data(using: .utf8)!,
|
||||||
|
]
|
||||||
|
SecItemAdd(addQuery as CFDictionary, nil)
|
||||||
|
return newId
|
||||||
|
}
|
||||||
|
|
||||||
|
private func checkLiveActivityFeatureAvailable() -> Bool {
|
||||||
|
if #available(iOS 16.2, *) {
|
||||||
|
return ActivityAuthorizationInfo().areActivitiesEnabled
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,138 +1,138 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
||||||
|
<array>
|
||||||
|
<string>com.transistorsoft.firkanotification</string>
|
||||||
|
<string>com.transistorsoft.firkaliveactivity</string>
|
||||||
|
</array>
|
||||||
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
|
<true/>
|
||||||
|
<key>CFBundleAlternateIcons</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
<key>firka_concept</key>
|
||||||
<array>
|
|
||||||
<string>com.transistorsoft.firkanotification</string>
|
|
||||||
<string>com.transistorsoft.firkaliveactivity</string>
|
|
||||||
</array>
|
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
|
||||||
<true/>
|
|
||||||
<key>CFBundleAlternateIcons</key>
|
|
||||||
<dict>
|
<dict>
|
||||||
<key>firka_concept</key>
|
<key>CFBundleIconFiles</key>
|
||||||
<dict>
|
<array>
|
||||||
<key>CFBundleIconFiles</key>
|
<string>firka_concept</string>
|
||||||
<array>
|
</array>
|
||||||
<string>firka_concept</string>
|
<key>UIPrerenderedIcon</key>
|
||||||
</array>
|
<false/>
|
||||||
<key>UIPrerenderedIcon</key>
|
|
||||||
<false/>
|
|
||||||
</dict>
|
|
||||||
<key>firka_default</key>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleIconFiles</key>
|
|
||||||
<array>
|
|
||||||
<string>firka_default</string>
|
|
||||||
</array>
|
|
||||||
<key>UIPrerenderedIcon</key>
|
|
||||||
<false/>
|
|
||||||
</dict>
|
|
||||||
<key>firka_overcomplicated</key>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleIconFiles</key>
|
|
||||||
<array>
|
|
||||||
<string>firka_overcomplicated</string>
|
|
||||||
</array>
|
|
||||||
<key>UIPrerenderedIcon</key>
|
|
||||||
<false/>
|
|
||||||
</dict>
|
|
||||||
<key>firka_pride</key>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleIconFiles</key>
|
|
||||||
<array>
|
|
||||||
<string>firka_pride</string>
|
|
||||||
</array>
|
|
||||||
<key>UIPrerenderedIcon</key>
|
|
||||||
<false/>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
</dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>firka_default</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIcons</key>
|
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundlePrimaryIcon</key>
|
<key>CFBundleIconFiles</key>
|
||||||
<dict>
|
<array>
|
||||||
<key>CFBundleIconFiles</key>
|
<string>firka_default</string>
|
||||||
<array>
|
</array>
|
||||||
<string></string>
|
<key>UIPrerenderedIcon</key>
|
||||||
</array>
|
<false/>
|
||||||
<key>CFBundleIconName</key>
|
</dict>
|
||||||
<string></string>
|
<key>firka_overcomplicated</key>
|
||||||
<key>UIPrerenderedIcon</key>
|
<dict>
|
||||||
<false/>
|
<key>CFBundleIconFiles</key>
|
||||||
</dict>
|
<array>
|
||||||
|
<string>firka_overcomplicated</string>
|
||||||
|
</array>
|
||||||
|
<key>UIPrerenderedIcon</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<key>firka_pride</key>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleIconFiles</key>
|
||||||
|
<array>
|
||||||
|
<string>firka_pride</string>
|
||||||
|
</array>
|
||||||
|
<key>UIPrerenderedIcon</key>
|
||||||
|
<false/>
|
||||||
</dict>
|
</dict>
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>Firka</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleURLTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Editor</string>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>firkaapp</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
|
||||||
<false/>
|
|
||||||
<key>LSApplicationQueriesSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>https</string>
|
|
||||||
<string>http</string>
|
|
||||||
</array>
|
|
||||||
<key>LSRequiresIPhoneOS</key>
|
|
||||||
<true/>
|
|
||||||
<key>NSCameraUsageDescription</key>
|
|
||||||
<string>The app requires the camera access to set a custom profile picture.</string>
|
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
|
||||||
<string>The app requires the photo library to set a custom profile picture.</string>
|
|
||||||
<key>NSSupportsLiveActivities</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIBackgroundModes</key>
|
|
||||||
<array>
|
|
||||||
<string>fetch</string>
|
|
||||||
<string>processing</string>
|
|
||||||
</array>
|
|
||||||
<key>UILaunchStoryboardName</key>
|
|
||||||
<string>LaunchScreen</string>
|
|
||||||
<key>UIMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
<key>UIStatusBarHidden</key>
|
|
||||||
<false/>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
|
||||||
<false/>
|
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIcons</key>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundlePrimaryIcon</key>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleIconFiles</key>
|
||||||
|
<array>
|
||||||
|
<string></string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleIconName</key>
|
||||||
|
<string></string>
|
||||||
|
<key>UIPrerenderedIcon</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Firka Legacy</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Editor</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>firkaapp</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
|
<false/>
|
||||||
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>https</string>
|
||||||
|
<string>http</string>
|
||||||
|
</array>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSCameraUsageDescription</key>
|
||||||
|
<string>The app requires the camera access to set a custom profile picture.</string>
|
||||||
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
|
<string>The app requires the photo library to set a custom profile picture.</string>
|
||||||
|
<key>NSSupportsLiveActivities</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIBackgroundModes</key>
|
||||||
|
<array>
|
||||||
|
<string>fetch</string>
|
||||||
|
<string>processing</string>
|
||||||
|
</array>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIMainStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
<key>UIStatusBarHidden</key>
|
||||||
|
<false/>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>aps-environment</key>
|
<key>aps-environment</key>
|
||||||
<string>development</string>
|
<string>production</string>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
<array/>
|
<array>
|
||||||
|
<string>group.firkaa.legacy</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
//
|
|
||||||
// public_vars.swift
|
|
||||||
// Runner
|
|
||||||
//
|
|
||||||
// Created by Geryy on 02/05/2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
var lessonDataDictionary: [String: Any] = [:]
|
var lessonDataDictionary: [String: Any] = [:]
|
||||||
var globalLessonData = LessonData(from: lessonDataDictionary)
|
var globalLessonData = LessonData(from: lessonDataDictionary)
|
||||||
var activityID: String? = ""
|
var activityID: String? = ""
|
||||||
|
var activityPushToken: String? = nil
|
||||||
|
var isCleaningUpOldActivities = false
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public struct LiveActivitiesAppAttributes: ActivityAttributes, Identifiable {
|
|||||||
var nextSubject: String
|
var nextSubject: String
|
||||||
var nextRoom: String
|
var nextRoom: String
|
||||||
}
|
}
|
||||||
|
|
||||||
public var id = UUID()
|
public var id = UUID()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,67 +26,153 @@ final class LiveActivityManager {
|
|||||||
static let shared = LiveActivityManager()
|
static let shared = LiveActivityManager()
|
||||||
var currentActivity: Activity<LiveActivitiesAppAttributes>?
|
var currentActivity: Activity<LiveActivitiesAppAttributes>?
|
||||||
|
|
||||||
class func create() {
|
class func create(completion: @escaping (Bool) -> Void) {
|
||||||
|
Task {
|
||||||
Task {
|
isCleaningUpOldActivities = true
|
||||||
do {
|
for activity in Activity<LiveActivitiesAppAttributes>.activities {
|
||||||
let contentState = LiveActivitiesAppAttributes.ContentState(color: globalLessonData.color, icon: globalLessonData.icon, index: globalLessonData.index, title: globalLessonData.title, subtitle: globalLessonData.subtitle, description: globalLessonData.description, startDate: globalLessonData.startDate, endDate: globalLessonData.endDate, date: globalLessonData.date, nextSubject: globalLessonData.nextSubject, nextRoom: globalLessonData.nextRoom)
|
await activity.end(nil, dismissalPolicy: .immediate)
|
||||||
|
|
||||||
let activityContent = ActivityContent(state: contentState, staleDate: globalLessonData.endDate, relevanceScore: 0)
|
|
||||||
|
|
||||||
let activity = try Activity<LiveActivitiesAppAttributes>.request(
|
|
||||||
attributes: LiveActivitiesAppAttributes(),
|
|
||||||
content: activityContent,
|
|
||||||
pushType: nil
|
|
||||||
)
|
|
||||||
|
|
||||||
activityID = activity.id
|
|
||||||
print("Live Activity létrehozva. Azonosító: \(activity.id)")
|
|
||||||
} catch {
|
|
||||||
print("Hiba történt a Live Activity létrehozásakor: \(error)")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
try? await Task.sleep(nanoseconds: 200_000_000)
|
||||||
|
isCleaningUpOldActivities = false
|
||||||
class func update() {
|
|
||||||
Task {
|
|
||||||
for activity in Activity<LiveActivitiesAppAttributes>.activities {
|
|
||||||
do {
|
|
||||||
let contentState = LiveActivitiesAppAttributes.ContentState(color: globalLessonData.color, icon: globalLessonData.icon, index: globalLessonData.index, title: globalLessonData.title, subtitle: globalLessonData.subtitle, description: globalLessonData.description, startDate: globalLessonData.startDate, endDate: globalLessonData.endDate, date: globalLessonData.date, nextSubject: globalLessonData.nextSubject, nextRoom: globalLessonData.nextRoom)
|
|
||||||
|
|
||||||
let activityContent = ActivityContent(state: contentState, staleDate: globalLessonData.endDate, relevanceScore: 0)
|
|
||||||
|
|
||||||
await activity.update(activityContent)
|
do {
|
||||||
activityID = activity.id
|
let contentState = LiveActivitiesAppAttributes.ContentState(
|
||||||
print("Live Activity frissítve. Azonosító: \(activity.id)")
|
color: globalLessonData.color,
|
||||||
} catch {
|
icon: globalLessonData.icon,
|
||||||
print("Hiba történt a Live Activity frissítésekor: \(error)")
|
index: globalLessonData.index,
|
||||||
}
|
title: globalLessonData.title,
|
||||||
|
subtitle: globalLessonData.subtitle,
|
||||||
|
description: globalLessonData.description,
|
||||||
|
startDate: globalLessonData.startDate,
|
||||||
|
endDate: globalLessonData.endDate,
|
||||||
|
date: globalLessonData.date,
|
||||||
|
nextSubject: globalLessonData.nextSubject,
|
||||||
|
nextRoom: globalLessonData.nextRoom
|
||||||
|
)
|
||||||
|
|
||||||
|
let activityContent = ActivityContent(
|
||||||
|
state: contentState,
|
||||||
|
staleDate: globalLessonData.endDate,
|
||||||
|
relevanceScore: 0
|
||||||
|
)
|
||||||
|
|
||||||
|
let activity = try Activity<LiveActivitiesAppAttributes>.request(
|
||||||
|
attributes: LiveActivitiesAppAttributes(),
|
||||||
|
content: activityContent,
|
||||||
|
pushType: .token
|
||||||
|
)
|
||||||
|
|
||||||
|
activityID = activity.id
|
||||||
|
print("Live Activity létrehozva. Azonosító: \(activity.id)")
|
||||||
|
|
||||||
|
completion(true)
|
||||||
|
|
||||||
|
Task { await monitorActivityState(activity: activity) }
|
||||||
|
|
||||||
|
Task {
|
||||||
|
for await tokenData in activity.pushTokenUpdates {
|
||||||
|
let tokenHex = tokenData.map { String(format: "%02x", $0) }.joined()
|
||||||
|
activityPushToken = tokenHex
|
||||||
|
print("Live Activity push token: \(tokenHex)")
|
||||||
|
NotificationCenter.default.post(
|
||||||
|
name: NSNotification.Name("LiveActivityTokenUpdated"),
|
||||||
|
object: tokenHex
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch {
|
||||||
|
print("Hiba történt a Live Activity létrehozásakor: \(error)")
|
||||||
|
completion(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class func monitorActivityState(activity: Activity<LiveActivitiesAppAttributes>) async {
|
||||||
|
for await state in activity.activityStateUpdates {
|
||||||
|
if state == .dismissed || state == .ended {
|
||||||
|
if isCleaningUpOldActivities {
|
||||||
|
print("Live Activity ended during cleanup - ignoring dismiss")
|
||||||
|
break
|
||||||
|
}
|
||||||
|
print("Live Activity dismissed/ended by user or system")
|
||||||
|
activityID = nil
|
||||||
|
activityPushToken = nil
|
||||||
|
NotificationCenter.default.post(
|
||||||
|
name: NSNotification.Name("LiveActivityDismissed"),
|
||||||
|
object: nil
|
||||||
|
)
|
||||||
|
await activity.end(nil, dismissalPolicy: .immediate)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class func update() {
|
||||||
|
Task {
|
||||||
|
for activity in Activity<LiveActivitiesAppAttributes>.activities {
|
||||||
|
let contentState = LiveActivitiesAppAttributes.ContentState(
|
||||||
|
color: globalLessonData.color,
|
||||||
|
icon: globalLessonData.icon,
|
||||||
|
index: globalLessonData.index,
|
||||||
|
title: globalLessonData.title,
|
||||||
|
subtitle: globalLessonData.subtitle,
|
||||||
|
description: globalLessonData.description,
|
||||||
|
startDate: globalLessonData.startDate,
|
||||||
|
endDate: globalLessonData.endDate,
|
||||||
|
date: globalLessonData.date,
|
||||||
|
nextSubject: globalLessonData.nextSubject,
|
||||||
|
nextRoom: globalLessonData.nextRoom
|
||||||
|
)
|
||||||
|
|
||||||
|
let activityContent = ActivityContent(
|
||||||
|
state: contentState,
|
||||||
|
staleDate: globalLessonData.endDate,
|
||||||
|
relevanceScore: 0
|
||||||
|
)
|
||||||
|
|
||||||
|
await activity.update(activityContent)
|
||||||
|
activityID = activity.id
|
||||||
|
print("Live Activity frissítve. Azonosító: \(activity.id)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class func stop() {
|
class func stop() {
|
||||||
if (activityID != "") {
|
if activityID != "" {
|
||||||
Task {
|
Task {
|
||||||
for activity in Activity<LiveActivitiesAppAttributes>.activities{
|
for activity in Activity<LiveActivitiesAppAttributes>.activities {
|
||||||
let contentState = LiveActivitiesAppAttributes.ContentState(color: globalLessonData.color, icon: globalLessonData.icon, index: globalLessonData.index, title: globalLessonData.title, subtitle: globalLessonData.subtitle, description: globalLessonData.description, startDate: globalLessonData.startDate, endDate: globalLessonData.endDate, date: globalLessonData.date, nextSubject: globalLessonData.nextSubject, nextRoom: globalLessonData.nextRoom)
|
let contentState = LiveActivitiesAppAttributes.ContentState(
|
||||||
|
color: globalLessonData.color,
|
||||||
await activity.end(ActivityContent(state: contentState, staleDate: Date.distantFuture),dismissalPolicy: .immediate)
|
icon: globalLessonData.icon,
|
||||||
|
index: globalLessonData.index,
|
||||||
|
title: globalLessonData.title,
|
||||||
|
subtitle: globalLessonData.subtitle,
|
||||||
|
description: globalLessonData.description,
|
||||||
|
startDate: globalLessonData.startDate,
|
||||||
|
endDate: globalLessonData.endDate,
|
||||||
|
date: globalLessonData.date,
|
||||||
|
nextSubject: globalLessonData.nextSubject,
|
||||||
|
nextRoom: globalLessonData.nextRoom
|
||||||
|
)
|
||||||
|
|
||||||
|
await activity.end(
|
||||||
|
ActivityContent(state: contentState, staleDate: Date.distantFuture),
|
||||||
|
dismissalPolicy: .immediate
|
||||||
|
)
|
||||||
}
|
}
|
||||||
activityID = nil
|
activityID = nil
|
||||||
|
activityPushToken = nil
|
||||||
print("Live Activity sikeresen leállítva")
|
print("Live Activity sikeresen leállítva")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class func isRunning(_ activityID: String) -> Bool {
|
class func isRunning(_ activityID: String) -> Bool {
|
||||||
for activity in Activity<LiveActivitiesAppAttributes>.activities {
|
for activity in Activity<LiveActivitiesAppAttributes>.activities {
|
||||||
if activity.id == activityID {
|
if activity.id == activityID {
|
||||||
return true
|
return true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>aps-environment</key>
|
<key>aps-environment</key>
|
||||||
<string>development</string>
|
<string>production</string>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
<array/>
|
<array>
|
||||||
|
<string>group.firkaa.legacy</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -51,72 +51,103 @@ extension Color {
|
|||||||
struct LockScreenLiveActivityView: View {
|
struct LockScreenLiveActivityView: View {
|
||||||
let context: ActivityViewContext<LiveActivitiesAppAttributes>
|
let context: ActivityViewContext<LiveActivitiesAppAttributes>
|
||||||
|
|
||||||
|
private var isExpired: Bool {
|
||||||
|
context.state.endDate <= Date()
|
||||||
|
}
|
||||||
|
|
||||||
|
private var hasNextLesson: Bool {
|
||||||
|
!context.state.nextSubject.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
|
||||||
|
}
|
||||||
|
|
||||||
|
private var nextLessonLine: String {
|
||||||
|
if context.state.nextRoom.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||||
|
return context.state.nextSubject
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\(context.state.nextSubject) - \(context.state.nextRoom)"
|
||||||
|
}
|
||||||
|
|
||||||
|
private var countdownFont: Font {
|
||||||
|
// h:mm:ss needs more space than mm:ss
|
||||||
|
let remaining = max(0, context.state.endDate.timeIntervalSinceNow)
|
||||||
|
return remaining >= 3600 ? .title3 : .title2
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(alignment: .center) {
|
HStack(alignment: .center, spacing: 0) {
|
||||||
// Ikon
|
// Ikon
|
||||||
Image(systemName: context.state.icon)
|
Image(systemName: context.state.icon)
|
||||||
.resizable()
|
.resizable()
|
||||||
.aspectRatio(contentMode: .fit)
|
.aspectRatio(contentMode: .fit)
|
||||||
.frame(width: CGFloat(30), height: CGFloat(30))
|
.frame(width: 28, height: 28)
|
||||||
.padding(.leading, CGFloat(24))
|
.padding(.leading, 16)
|
||||||
|
|
||||||
VStack(alignment: .center) {
|
VStack(alignment: .leading, spacing: 3) {
|
||||||
// Jelenlegi óra
|
// Jelenlegi óra
|
||||||
VStack {
|
if context.state.title.contains("Az első órádig") {
|
||||||
if(context.state.title.contains("Az első órádig")) {
|
|
||||||
Text(context.state.title)
|
Text(context.state.title)
|
||||||
.font(.system(size: 15))
|
.font(.system(size: 14, weight: .semibold))
|
||||||
.bold()
|
.lineLimit(2)
|
||||||
.multilineTextAlignment(.center)
|
} else if context.state.title == "Szünet" {
|
||||||
} else if(context.state.title == "Szünet") {
|
|
||||||
Text(context.state.title)
|
Text(context.state.title)
|
||||||
.font(.body)
|
.font(.system(size: 15, weight: .bold))
|
||||||
.bold()
|
} else {
|
||||||
.padding(.trailing, 90)
|
Text("\(context.state.index) \(context.state.title) - \(context.state.subtitle)")
|
||||||
} else {
|
.font(.system(size: 15, weight: .bold))
|
||||||
MultilineTextView(text: "\(context.state.index) \(context.state.title) - \(context.state.subtitle)", limit: 25)
|
.lineLimit(2)
|
||||||
.font(.body)
|
|
||||||
.bold()
|
|
||||||
.multilineTextAlignment(.center)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Leírás
|
// Leírás
|
||||||
if (context.state.description != "") {
|
if !context.state.description.isEmpty {
|
||||||
Text(context.state.description)
|
Text(context.state.description)
|
||||||
.font(.subheadline)
|
.font(.system(size: 13))
|
||||||
|
.lineLimit(2)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Következő óra
|
// Következő óra
|
||||||
if(context.state.nextSubject != "" && context.state.nextRoom != "") {
|
if hasNextLesson {
|
||||||
HStack {
|
HStack(spacing: 4) {
|
||||||
Image(systemName: "arrow.right")
|
Image(systemName: "arrow.right")
|
||||||
.resizable()
|
.font(.system(size: 8, weight: .semibold))
|
||||||
.aspectRatio(contentMode: .fit)
|
.foregroundStyle(.secondary)
|
||||||
.frame(width: CGFloat(8), height: CGFloat(8))
|
Text(nextLessonLine)
|
||||||
|
.font(.system(size: 12))
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Text("Ez az utolsó óra! Kitartást!")
|
||||||
|
.font(.system(size: 13))
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
Text("\(context.state.nextSubject) - \(context.state.nextRoom)")
|
|
||||||
.font(.caption)
|
|
||||||
}
|
}
|
||||||
.multilineTextAlignment(.center)
|
|
||||||
} else {
|
|
||||||
Spacer(minLength: 5)
|
|
||||||
Text("Ez az utolsó óra! Kitartást!")
|
|
||||||
.font(.system(size: 15))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.padding(15)
|
.padding(.horizontal, 12)
|
||||||
|
.padding(.vertical, 14)
|
||||||
|
.layoutPriority(0)
|
||||||
|
|
||||||
Spacer()
|
Spacer(minLength: 4)
|
||||||
|
|
||||||
// Visszaszámláló
|
// Visszaszámláló
|
||||||
Text(timerInterval: context.state.date, countsDown: true)
|
if isExpired {
|
||||||
.multilineTextAlignment(.center)
|
Text("Vége")
|
||||||
.frame(width: 85)
|
.multilineTextAlignment(.trailing)
|
||||||
.font(.title2)
|
.frame(minWidth: 86, maxWidth: 100, alignment: .trailing)
|
||||||
.monospacedDigit()
|
.font(.headline)
|
||||||
.padding(.trailing)
|
.lineLimit(1)
|
||||||
|
.minimumScaleFactor(0.75)
|
||||||
|
.layoutPriority(1)
|
||||||
|
.padding(.trailing, 16)
|
||||||
|
} else {
|
||||||
|
Text(timerInterval: context.state.date, countsDown: true)
|
||||||
|
.multilineTextAlignment(.trailing)
|
||||||
|
.frame(minWidth: 86, maxWidth: 100, alignment: .trailing)
|
||||||
|
.font(countdownFont)
|
||||||
|
.monospacedDigit()
|
||||||
|
.lineLimit(1)
|
||||||
|
.minimumScaleFactor(0.75)
|
||||||
|
.layoutPriority(1)
|
||||||
|
.padding(.trailing, 16)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// .activityBackgroundTint(
|
// .activityBackgroundTint(
|
||||||
// context.state.color != "#676767"
|
// context.state.color != "#676767"
|
||||||
@@ -210,14 +241,18 @@ struct LiveCardWidget: Widget {
|
|||||||
|
|
||||||
Spacer(minLength: 2)
|
Spacer(minLength: 2)
|
||||||
|
|
||||||
if(context.state.nextRoom != "" && context.state.nextSubject != "") {
|
if(!context.state.nextSubject.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) {
|
||||||
Text("Következő óra és terem:")
|
Text("Következő óra és terem:")
|
||||||
.font(.system(size: 14))
|
.font(.system(size: 14))
|
||||||
.padding(.trailing, -45)
|
.padding(.trailing, -45)
|
||||||
Spacer(minLength: 2)
|
Spacer(minLength: 2)
|
||||||
|
|
||||||
Text("\(context.state.nextSubject) - \(context.state.nextRoom)")
|
let nextLessonLine = context.state.nextRoom.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
|
||||||
.modifier(DynamicFontSizeModifier(text: "\(context.state.nextSubject) - \(context.state.nextRoom)"))
|
? context.state.nextSubject
|
||||||
|
: "\(context.state.nextSubject) - \(context.state.nextRoom)"
|
||||||
|
|
||||||
|
Text(nextLessonLine)
|
||||||
|
.modifier(DynamicFontSizeModifier(text: nextLessonLine))
|
||||||
.padding(.trailing, 35)
|
.padding(.trailing, 35)
|
||||||
} else {
|
} else {
|
||||||
Text("Ez az utolsó óra! Kitartást!")
|
Text("Ez az utolsó óra! Kitartást!")
|
||||||
@@ -232,14 +267,26 @@ struct LiveCardWidget: Widget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Compact
|
/// Compact
|
||||||
} compactLeading: {
|
} compactLeading: {
|
||||||
Image(systemName: context.state.icon)
|
Image(systemName: context.state.icon)
|
||||||
}
|
}
|
||||||
compactTrailing: {
|
compactTrailing: {
|
||||||
Text(timerInterval: context.state.date, countsDown: true)
|
if context.state.endDate <= Date() {
|
||||||
.multilineTextAlignment(.center)
|
Text("Vége")
|
||||||
.frame(width: 40)
|
.multilineTextAlignment(.center)
|
||||||
.font(.caption2)
|
.frame(width: 52)
|
||||||
|
.font(.caption2)
|
||||||
|
.lineLimit(1)
|
||||||
|
.minimumScaleFactor(0.7)
|
||||||
|
} else {
|
||||||
|
Text(timerInterval: context.state.date, countsDown: true)
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
.frame(width: 52)
|
||||||
|
.font(.caption2)
|
||||||
|
.monospacedDigit()
|
||||||
|
.lineLimit(1)
|
||||||
|
.minimumScaleFactor(0.7)
|
||||||
|
}
|
||||||
|
|
||||||
/// Collapsed
|
/// Collapsed
|
||||||
} minimal: {
|
} minimal: {
|
||||||
|
|||||||
@@ -1,15 +1,31 @@
|
|||||||
|
/*
|
||||||
|
Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:developer';
|
import 'dart:developer';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:refilc/models/ad.dart';
|
|
||||||
import 'package:refilc/models/config.dart';
|
import 'package:refilc/models/config.dart';
|
||||||
import 'package:refilc/models/news.dart';
|
import 'package:refilc/models/news.dart';
|
||||||
import 'package:refilc/models/release.dart';
|
import 'package:refilc/models/release.dart';
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
import 'package:refilc/models/shared_theme.dart';
|
import 'package:refilc/models/shared_theme.dart';
|
||||||
import 'package:refilc/models/supporter.dart';
|
|
||||||
import 'package:refilc_kreta_api/models/school.dart';
|
import 'package:refilc_kreta_api/models/school.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -17,51 +33,40 @@ import 'package:http/http.dart' as http;
|
|||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
|
|
||||||
class FilcAPI {
|
class FilcAPI {
|
||||||
// API base
|
// base url
|
||||||
static const baseUrl = "https://api.refilcapp.hu";
|
static const baseUrl = "https://api.firka.app/api/v1";
|
||||||
|
|
||||||
// Public API
|
// unused schools list
|
||||||
static const schoolList = "https://api.refilcapp.hu/v3/public/school-list";
|
static const schoolList = "0.0.0.0";
|
||||||
static const news = "https://staticrf-api.pages.dev/news/index.json";
|
|
||||||
static const supporters = "0.0.0.0";
|
|
||||||
|
|
||||||
// Private API
|
// news endpoint
|
||||||
static const ads = "0.0.0.0";
|
static const news = "$baseUrl/news/legacy";
|
||||||
static const config = "$baseUrl/v3/private/config";
|
|
||||||
static const reportApi = "$baseUrl/v3/private/crash-report";
|
|
||||||
static const rfPlus = "0.0.0.0";
|
|
||||||
static const plusAuthLogin = "0.0.0.0";
|
|
||||||
static const plusAuthCallback = "0.0.0.0";
|
|
||||||
static const plusActivation = "0.0.0.0";
|
|
||||||
static const plusScopes = "0.0.0.0";
|
|
||||||
|
|
||||||
// Updates
|
// analytics endpoint
|
||||||
static const repo = "QwIT-Development/app-legacy";
|
static const config = "$baseUrl/config/";
|
||||||
static const releases = "https://api.github.com/repos/$repo/releases";
|
|
||||||
|
|
||||||
// Share API
|
// bug report endpoint, always gets sent, no matter if the user pressed the button or no
|
||||||
static const themeShare = "$baseUrl/v3/shared/theme/add";
|
static const reportApi = "$baseUrl/crash/legacy";
|
||||||
static const themeGet = "$baseUrl/v3/shared/theme/get";
|
|
||||||
static const allThemes = "$themeGet/all";
|
|
||||||
static const themeByID = "$themeGet/";
|
|
||||||
|
|
||||||
static const gradeColorsShare = "$baseUrl/v3/shared/grade-colors/add";
|
// updates path to github
|
||||||
static const gradeColorsGet = "$baseUrl/v3/shared/grade-colors/get";
|
static const releases =
|
||||||
static const allGradeColors = "$gradeColorsGet/all";
|
"https://api.github.com/repos/QwIT-Development/app-legacy/releases";
|
||||||
|
|
||||||
|
// theme sharing api
|
||||||
|
static const themeShare = "$baseUrl/theme/";
|
||||||
|
static const themeGet = "$baseUrl/theme/";
|
||||||
|
static const allThemes = "$themeGet/theme/";
|
||||||
|
static const themeByID = "$themeGet/theme/";
|
||||||
|
|
||||||
|
// i don't know why it is separated
|
||||||
|
static const gradeColorsShare = "$baseUrl/theme/color/";
|
||||||
|
static const gradeColorsGet = "$baseUrl/theme/color/";
|
||||||
|
static const allGradeColors = "$gradeColorsGet/";
|
||||||
static const gradeColorsByID = "$gradeColorsGet/";
|
static const gradeColorsByID = "$gradeColorsGet/";
|
||||||
|
|
||||||
// Payment API
|
|
||||||
static const payment = "0.0.0.0";
|
|
||||||
static const stripeSheet = "0.0.0.0";
|
|
||||||
|
|
||||||
// Cloud Sync
|
|
||||||
// cloud sync? for what reason
|
|
||||||
static const cloudSyncApi = "0.0.0.0";
|
|
||||||
|
|
||||||
static Future<bool> checkConnectivity() async =>
|
static Future<bool> checkConnectivity() async =>
|
||||||
(await Connectivity().checkConnectivity())[0] != ConnectivityResult.none;
|
(await Connectivity().checkConnectivity())[0] != ConnectivityResult.none;
|
||||||
|
|
||||||
|
|
||||||
// nem tudom nem vazar-e senkit se, de mar ertelmetlen ez
|
// nem tudom nem vazar-e senkit se, de mar ertelmetlen ez
|
||||||
static Future<List<School>?> getSchools() async {
|
static Future<List<School>?> getSchools() async {
|
||||||
try {
|
try {
|
||||||
@@ -94,7 +99,8 @@ class FilcAPI {
|
|||||||
"rf-platform-version": settings.analyticsEnabled
|
"rf-platform-version": settings.analyticsEnabled
|
||||||
? Platform.operatingSystemVersion
|
? Platform.operatingSystemVersion
|
||||||
: "unknown",
|
: "unknown",
|
||||||
"rf-app-version": const String.fromEnvironment("APPVER", defaultValue: "?"),
|
"rf-app-version":
|
||||||
|
const String.fromEnvironment("APPVER", defaultValue: "?"),
|
||||||
"rf-uinid": settings.xFilcId,
|
"rf-uinid": settings.xFilcId,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -139,45 +145,12 @@ class FilcAPI {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<Supporters?> getSupporters() async {
|
|
||||||
try {
|
|
||||||
http.Response res = await http.get(Uri.parse(supporters));
|
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
|
||||||
return Supporters.fromJson(jsonDecode(res.body));
|
|
||||||
} else {
|
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
|
||||||
}
|
|
||||||
} on Exception catch (error, stacktrace) {
|
|
||||||
log("ERROR: FilcAPI.getSupporters: $error $stacktrace");
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Future<List<Ad>?> getAds() async {
|
|
||||||
try {
|
|
||||||
http.Response res = await http.get(Uri.parse(ads));
|
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
|
||||||
return (jsonDecode(res.body) as List)
|
|
||||||
.cast<Map>()
|
|
||||||
.map((e) => Ad.fromJson(e))
|
|
||||||
.toList();
|
|
||||||
} else {
|
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
|
||||||
}
|
|
||||||
} on Exception catch (error, stacktrace) {
|
|
||||||
log("ERROR: FilcAPI.getAds: $error $stacktrace");
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Future<List<Release>?> getReleases() async {
|
static Future<List<Release>?> getReleases() async {
|
||||||
try {
|
try {
|
||||||
http.Response res = await http.get(Uri.parse(releases));
|
http.Response res = await http.get(Uri.parse(releases));
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
return (jsonDecode(res.body) as List)
|
return (jsonDecode(utf8.decode(res.bodyBytes)) as List)
|
||||||
.cast<Map>()
|
.cast<Map>()
|
||||||
.map((e) => Release.fromJson(e))
|
.map((e) => Release.fromJson(e))
|
||||||
.toList();
|
.toList();
|
||||||
@@ -299,7 +272,7 @@ class FilcAPI {
|
|||||||
http.Response res = await http.get(Uri.parse(allThemes));
|
http.Response res = await http.get(Uri.parse(allThemes));
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
return (jsonDecode(res.body) as List);
|
return (jsonDecode(utf8.decode(res.bodyBytes)) as List);
|
||||||
} else {
|
} else {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
}
|
}
|
||||||
@@ -358,40 +331,6 @@ class FilcAPI {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// payment
|
|
||||||
static Future<Map?> createPaymentSheet(String product) async {
|
|
||||||
try {
|
|
||||||
Map body = {
|
|
||||||
"product": product,
|
|
||||||
};
|
|
||||||
|
|
||||||
var client = http.Client();
|
|
||||||
|
|
||||||
http.Response res = await client.post(
|
|
||||||
Uri.parse(stripeSheet),
|
|
||||||
body: body,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
if (res.statusCode != 200) {
|
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
|
||||||
}
|
|
||||||
|
|
||||||
return jsonDecode(res.body);
|
|
||||||
} on Exception catch (error, stacktrace) {
|
|
||||||
log("ERROR: FilcAPI.sendReport: $error $stacktrace");
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// cloud sync
|
|
||||||
static Future<Map?> cloudSync(Map<String, String> data, String token) async {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ErrorReport {
|
class ErrorReport {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
import 'package:refilc/models/ad.dart';
|
import 'package:refilc/models/ad.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,14 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:refilc/api/providers/liveactivity/platform_channel.dart';
|
import 'package:refilc/api/providers/liveactivity/platform_channel.dart';
|
||||||
|
import 'package:refilc/api/providers/liveactivity/server_sync_provider.dart';
|
||||||
import 'package:refilc/helpers/subject.dart';
|
import 'package:refilc/helpers/subject.dart';
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
import 'package:refilc/ui/flutter_colorpicker/utils.dart';
|
import 'package:refilc/ui/flutter_colorpicker/utils.dart';
|
||||||
import 'package:refilc_kreta_api/models/lesson.dart';
|
import 'package:refilc_kreta_api/models/lesson.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/subject.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/category.dart' as kreta;
|
||||||
|
import 'package:refilc_kreta_api/models/teacher.dart';
|
||||||
import 'package:refilc_kreta_api/models/week.dart';
|
import 'package:refilc_kreta_api/models/week.dart';
|
||||||
import 'package:refilc/utils/format.dart';
|
import 'package:refilc/utils/format.dart';
|
||||||
import 'package:refilc_kreta_api/providers/timetable_provider.dart';
|
import 'package:refilc_kreta_api/providers/timetable_provider.dart';
|
||||||
@@ -30,21 +34,24 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
Lesson? prevLesson;
|
Lesson? prevLesson;
|
||||||
List<Lesson>? nextLessons;
|
List<Lesson>? nextLessons;
|
||||||
|
|
||||||
// new variables
|
|
||||||
static bool hasActivityStarted = false;
|
static bool hasActivityStarted = false;
|
||||||
static bool hasDayEnd = false;
|
static bool hasDayEnd = false;
|
||||||
|
static bool hasUserDismissed = false;
|
||||||
static DateTime? storeFirstRunDate;
|
static DateTime? storeFirstRunDate;
|
||||||
|
static DateTime? _lastProcessedDay;
|
||||||
static bool hasActivitySettingsChanged = false;
|
static bool hasActivitySettingsChanged = false;
|
||||||
// ignore: non_constant_identifier_names
|
// ignore: non_constant_identifier_names
|
||||||
static Map<String, String> LAData = {};
|
static Map<String, String> LAData = {};
|
||||||
static DateTime? now;
|
static DateTime? now;
|
||||||
//
|
|
||||||
|
|
||||||
LiveCardState currentState = LiveCardState.empty;
|
LiveCardState currentState = LiveCardState.empty;
|
||||||
|
static LiveCardState _previousState = LiveCardState.empty;
|
||||||
|
static String? _previousLessonId;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
late Timer _timer;
|
late Timer _timer;
|
||||||
late final TimetableProvider _timetable;
|
late final TimetableProvider _timetable;
|
||||||
late final SettingsProvider _settings;
|
late final SettingsProvider _settings;
|
||||||
|
static final ServerSyncProvider serverSync = ServerSyncProvider();
|
||||||
|
|
||||||
late Duration _delay;
|
late Duration _delay;
|
||||||
|
|
||||||
@@ -59,12 +66,31 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
_delay = settings.bellDelayEnabled
|
_delay = settings.bellDelayEnabled
|
||||||
? Duration(seconds: settings.bellDelay)
|
? Duration(seconds: settings.bellDelay)
|
||||||
: Duration.zero;
|
: Duration.zero;
|
||||||
|
|
||||||
|
PlatformChannel.onTokenUpdated = (pushToken, deviceId, bundleId) {
|
||||||
|
if (!_settings.liveActivityEnabled) return;
|
||||||
|
debugPrint("Push token érkezett: $pushToken");
|
||||||
|
serverSync.registerAndSync(
|
||||||
|
deviceId: deviceId,
|
||||||
|
pushToken: pushToken,
|
||||||
|
bundleId: bundleId,
|
||||||
|
liveActivityColor:
|
||||||
|
'#${settings.liveActivityColor.toHexString().substring(2)}',
|
||||||
|
todayLessons: _today(_timetable),
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
PlatformChannel.onActivityDismissed = (deviceId) {
|
||||||
|
debugPrint("Live Activity dismissed by user");
|
||||||
|
serverSync.forceUnregister(deviceId);
|
||||||
|
hasActivityStarted = false;
|
||||||
|
hasUserDismissed = true;
|
||||||
|
};
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debugging
|
|
||||||
static DateTime _now() {
|
static DateTime _now() {
|
||||||
// return DateTime(2023, 9, 27, 9, 30);
|
|
||||||
return DateTime.now();
|
return DateTime.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,8 +111,6 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> toMap() {
|
Map<String, String> toMap() {
|
||||||
// print("LIVE ACTIVITY COLOR BELOW:");
|
|
||||||
// print(_settings.liveActivityColor.toHexString().substring(2));
|
|
||||||
String color = '#${_settings.liveActivityColor.toHexString().substring(2)}';
|
String color = '#${_settings.liveActivityColor.toHexString().substring(2)}';
|
||||||
|
|
||||||
switch (currentState) {
|
switch (currentState) {
|
||||||
@@ -242,6 +266,12 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
: Duration.zero;
|
: Duration.zero;
|
||||||
|
|
||||||
DateTime now = _now().add(_delay);
|
DateTime now = _now().add(_delay);
|
||||||
|
_resetDayScopedState(now);
|
||||||
|
|
||||||
|
currentLesson = null;
|
||||||
|
nextLesson = null;
|
||||||
|
prevLesson = null;
|
||||||
|
nextLessons = null;
|
||||||
|
|
||||||
if ((currentState == LiveCardState.morning ||
|
if ((currentState == LiveCardState.morning ||
|
||||||
currentState == LiveCardState.afternoon ||
|
currentState == LiveCardState.afternoon ||
|
||||||
@@ -250,17 +280,14 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
storeFirstRunDate = now;
|
storeFirstRunDate = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter cancelled lessons #20
|
|
||||||
// Filter label lessons #128
|
|
||||||
today = today
|
today = today
|
||||||
.where((lesson) =>
|
.where((lesson) =>
|
||||||
lesson.status?.name != "Elmaradt" &&
|
(lesson.status?.name != "Elmaradt" || lesson.substituteTeacher != null) &&
|
||||||
lesson.subject.id != '' &&
|
lesson.subject.id != '' &&
|
||||||
!lesson.isEmpty)
|
!lesson.isEmpty)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
if (today.isNotEmpty) {
|
if (today.isNotEmpty) {
|
||||||
// sort
|
|
||||||
today.sort((a, b) => a.start.compareTo(b.start));
|
today.sort((a, b) => a.start.compareTo(b.start));
|
||||||
|
|
||||||
final _lesson = today.firstWhere(
|
final _lesson = today.firstWhere(
|
||||||
@@ -294,7 +321,8 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (now.isBefore(DateTime(now.year, DateTime.august, 31)) &&
|
if (now.isBefore(DateTime(now.year, DateTime.august, 31)) &&
|
||||||
now.isAfter(DateTime(now.year, DateTime.june, 14))) {
|
now.isAfter(DateTime(now.year, DateTime.june, 14)) &&
|
||||||
|
!(_settings.developerMode && _settings.devLiveFakeLessons)) {
|
||||||
currentState = LiveCardState.summary;
|
currentState = LiveCardState.summary;
|
||||||
} else if (currentLesson != null) {
|
} else if (currentLesson != null) {
|
||||||
currentState = LiveCardState.duringLesson;
|
currentState = LiveCardState.duringLesson;
|
||||||
@@ -305,7 +333,9 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
} else if (now.hour >= 20) {
|
} else if (now.hour >= 20) {
|
||||||
currentState = LiveCardState.night;
|
currentState = LiveCardState.night;
|
||||||
} else if (now.hour >= 5 && now.hour <= 10) {
|
} else if (now.hour >= 5 && now.hour <= 10) {
|
||||||
if (nextLesson == null || now.weekday == 6 || now.weekday == 7) {
|
if (nextLesson == null ||
|
||||||
|
((now.weekday == 6 || now.weekday == 7) &&
|
||||||
|
!(_settings.developerMode && _settings.devLiveFakeLessons))) {
|
||||||
currentState = LiveCardState.empty;
|
currentState = LiveCardState.empty;
|
||||||
} else {
|
} else {
|
||||||
currentState = LiveCardState.morning;
|
currentState = LiveCardState.morning;
|
||||||
@@ -314,84 +344,195 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
currentState = LiveCardState.empty;
|
currentState = LiveCardState.empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
//LIVE ACTIVITIES
|
if (!_settings.liveActivityEnabled) {
|
||||||
|
if (hasActivityStarted) {
|
||||||
|
debugPrint("Live Activity nincs engedélyezve, de fut – leállítás...");
|
||||||
|
PlatformChannel.endLiveActivity();
|
||||||
|
serverSync.unregister();
|
||||||
|
hasActivityStarted = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!hasActivityStarted &&
|
||||||
|
!hasUserDismissed &&
|
||||||
|
nextLesson != null &&
|
||||||
|
nextLesson!.start.difference(now).inMinutes <= 120 &&
|
||||||
|
(currentState == LiveCardState.morning ||
|
||||||
|
currentState == LiveCardState.afternoon ||
|
||||||
|
currentState == LiveCardState.night)) {
|
||||||
|
debugPrint(
|
||||||
|
"Az első óra előtt állunk, kevesebb mint két órával. Létrehozás...");
|
||||||
|
hasActivityStarted = true;
|
||||||
|
_createAndSync();
|
||||||
|
} else if (!hasActivityStarted &&
|
||||||
|
!hasUserDismissed &&
|
||||||
|
((currentState == LiveCardState.duringLesson &&
|
||||||
|
currentLesson != null) ||
|
||||||
|
currentState == LiveCardState.duringBreak)) {
|
||||||
|
debugPrint(
|
||||||
|
"Óra van, vagy szünet, de nincs LiveActivity. létrehozás...");
|
||||||
|
hasActivityStarted = true;
|
||||||
|
_createAndSync();
|
||||||
|
} else if (!hasActivityStarted &&
|
||||||
|
_settings.developerMode &&
|
||||||
|
_settings.devLiveFakeLessons &&
|
||||||
|
today.isNotEmpty) {
|
||||||
|
debugPrint("Fake mód: Live Activity létrehozás...");
|
||||||
|
hasActivityStarted = true;
|
||||||
|
hasUserDismissed = false;
|
||||||
|
_createAndSync();
|
||||||
|
} else if (hasActivityStarted) {
|
||||||
|
final currentLessonId = currentLesson?.id ?? nextLesson?.id;
|
||||||
|
final stateChanged = currentState != _previousState;
|
||||||
|
final lessonChanged = currentLessonId != _previousLessonId;
|
||||||
|
|
||||||
//CREATE
|
if (hasActivitySettingsChanged) {
|
||||||
if (!hasActivityStarted &&
|
debugPrint("Valamelyik beállítás megváltozott. Frissítés...");
|
||||||
nextLesson != null &&
|
PlatformChannel.updateLiveActivity(toMap());
|
||||||
nextLesson!.start.difference(now).inMinutes <= 60 &&
|
hasActivitySettingsChanged = false;
|
||||||
(currentState == LiveCardState.morning ||
|
} else if (stateChanged || lessonChanged) {
|
||||||
currentState == LiveCardState.afternoon ||
|
|
||||||
currentState == LiveCardState.night)) {
|
|
||||||
debugPrint(
|
|
||||||
"Az első óra előtt állunk, kevesebb mint egy órával. Létrehozás...");
|
|
||||||
PlatformChannel.createLiveActivity(toMap());
|
|
||||||
hasActivityStarted = true;
|
|
||||||
} else if (!hasActivityStarted &&
|
|
||||||
((currentState == LiveCardState.duringLesson &&
|
|
||||||
currentLesson != null) ||
|
|
||||||
currentState == LiveCardState.duringBreak)) {
|
|
||||||
debugPrint("Óra van, vagy szünet, de nincs LiveActivity. létrehozás...");
|
|
||||||
PlatformChannel.createLiveActivity(toMap());
|
|
||||||
hasActivityStarted = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//UPDATE
|
|
||||||
else if (hasActivityStarted) {
|
|
||||||
if (hasActivitySettingsChanged) {
|
|
||||||
debugPrint("Valamelyik beállítás megváltozott. Frissítés...");
|
|
||||||
PlatformChannel.updateLiveActivity(toMap());
|
|
||||||
hasActivitySettingsChanged = false;
|
|
||||||
} else if (nextLesson != null || currentLesson != null) {
|
|
||||||
bool afterPrevLessonEnd = prevLesson != null &&
|
|
||||||
now
|
|
||||||
.subtract(const Duration(seconds: 1))
|
|
||||||
.isBefore(prevLesson!.end) &&
|
|
||||||
now.isAfter(prevLesson!.end);
|
|
||||||
|
|
||||||
bool afterCurrentLessonStart = currentLesson != null &&
|
|
||||||
now
|
|
||||||
.subtract(const Duration(seconds: 1))
|
|
||||||
.isBefore(currentLesson!.start) &&
|
|
||||||
now.isAfter(currentLesson!.start);
|
|
||||||
if (afterPrevLessonEnd || afterCurrentLessonStart) {
|
|
||||||
debugPrint(
|
debugPrint(
|
||||||
"Óra kezdete/vége után 1 másodperccel vagyunk. Frissítés...");
|
"Állapot vagy óra váltás: $currentState, lesson: $currentLessonId. Frissítés...");
|
||||||
PlatformChannel.updateLiveActivity(toMap());
|
PlatformChannel.updateLiveActivity(toMap());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//END
|
_previousState = currentState;
|
||||||
if ((currentState == LiveCardState.afternoon ||
|
_previousLessonId = currentLessonId;
|
||||||
currentState == LiveCardState.morning ||
|
}
|
||||||
currentState == LiveCardState.night) &&
|
|
||||||
hasActivityStarted &&
|
if (_settings.developerMode && _settings.devLiveFakeLessons) {
|
||||||
nextLesson != null &&
|
} else if ((currentState == LiveCardState.afternoon ||
|
||||||
nextLesson!.start.difference(now).inMinutes > 60) {
|
currentState == LiveCardState.morning ||
|
||||||
debugPrint("Több, mint 1 óra van az első óráig. Befejezés...");
|
currentState == LiveCardState.night) &&
|
||||||
PlatformChannel.endLiveActivity();
|
hasActivityStarted &&
|
||||||
hasActivityStarted = false;
|
nextLesson != null &&
|
||||||
} else if (hasActivityStarted &&
|
nextLesson!.start.difference(now).inMinutes > 120) {
|
||||||
!hasDayEnd &&
|
debugPrint("Több, mint 2 óra van az első óráig. Befejezés...");
|
||||||
nextLesson == null &&
|
PlatformChannel.endLiveActivity();
|
||||||
now.isAfter(prevLesson!.end)) {
|
serverSync.unregister();
|
||||||
debugPrint("Az utolsó óra véget ért. Befejezés...");
|
hasActivityStarted = false;
|
||||||
PlatformChannel.endLiveActivity();
|
} else if (hasActivityStarted &&
|
||||||
hasDayEnd = true;
|
!hasDayEnd &&
|
||||||
hasActivityStarted = false;
|
nextLesson == null &&
|
||||||
}
|
prevLesson != null &&
|
||||||
|
now.isAfter(prevLesson!.end) &&
|
||||||
|
today.every((l) => l.end.isBefore(now))) {
|
||||||
|
debugPrint("Az utolsó óra véget ért. Befejezés...");
|
||||||
|
PlatformChannel.endLiveActivity();
|
||||||
|
serverSync.unregister();
|
||||||
|
hasDayEnd = true;
|
||||||
|
hasActivityStarted = false;
|
||||||
|
hasUserDismissed = false;
|
||||||
|
} else if (hasActivityStarted && currentState == LiveCardState.empty) {
|
||||||
|
debugPrint("Nincs több megjeleníthető mai állapot. Befejezés...");
|
||||||
|
PlatformChannel.endLiveActivity();
|
||||||
|
serverSync.unregister();
|
||||||
|
hasActivityStarted = false;
|
||||||
|
}
|
||||||
|
} // end of liveActivityEnabled else block
|
||||||
|
|
||||||
LAData = toMap();
|
LAData = toMap();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> _createAndSync() async {
|
||||||
|
final result = await PlatformChannel.createLiveActivity(toMap());
|
||||||
|
if (result != null && result['success'] == 'true') {
|
||||||
|
debugPrint("Live Activity létrehozva, várunk a push tokenre...");
|
||||||
|
} else {
|
||||||
|
debugPrint("Live Activity létrehozás sikertelen");
|
||||||
|
hasActivityStarted = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool get show => currentState != LiveCardState.empty;
|
bool get show => currentState != LiveCardState.empty;
|
||||||
Duration get delay => _delay;
|
Duration get delay => _delay;
|
||||||
|
|
||||||
bool _sameDate(DateTime a, DateTime b) =>
|
bool _sameDate(DateTime a, DateTime b) =>
|
||||||
(a.year == b.year && a.month == b.month && a.day == b.day);
|
(a.year == b.year && a.month == b.month && a.day == b.day);
|
||||||
|
|
||||||
List<Lesson> _today(TimetableProvider p) => (p.getWeek(Week.current()) ?? [])
|
void _resetDayScopedState(DateTime now) {
|
||||||
.where((l) => _sameDate(l.date, _now()))
|
if (_lastProcessedDay != null && _sameDate(_lastProcessedDay!, now)) {
|
||||||
.toList();
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasActivityStarted) {
|
||||||
|
PlatformChannel.endLiveActivity();
|
||||||
|
serverSync.unregister();
|
||||||
|
}
|
||||||
|
|
||||||
|
_lastProcessedDay = DateTime(now.year, now.month, now.day);
|
||||||
|
hasActivityStarted = false;
|
||||||
|
hasDayEnd = false;
|
||||||
|
hasUserDismissed = false;
|
||||||
|
storeFirstRunDate = null;
|
||||||
|
_previousState = LiveCardState.empty;
|
||||||
|
_previousLessonId = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Lesson> _today(TimetableProvider p) {
|
||||||
|
final real = (p.getWeek(Week.current()) ?? [])
|
||||||
|
.where((l) => _sameDate(l.date, _now()))
|
||||||
|
.toList();
|
||||||
|
if (!_settings.developerMode || !_settings.devLiveFakeLessons) {
|
||||||
|
return real;
|
||||||
|
}
|
||||||
|
if (real.isNotEmpty) {
|
||||||
|
final sorted = List<Lesson>.from(real)
|
||||||
|
..sort((a, b) => a.end.compareTo(b.end));
|
||||||
|
final lastEnd = sorted.last.end;
|
||||||
|
final now = _now();
|
||||||
|
final nextIndex = sorted.length;
|
||||||
|
if (lastEnd.isBefore(now)) {
|
||||||
|
return [...real, ..._generateFakeLessons(startIndex: nextIndex)];
|
||||||
|
}
|
||||||
|
|
||||||
|
final fakeStart = lastEnd.add(const Duration(minutes: 10));
|
||||||
|
return [
|
||||||
|
...real,
|
||||||
|
..._generateFakeLessons(baseStart: fakeStart, startIndex: nextIndex)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return _generateFakeLessons();
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Lesson> _generateFakeLessons(
|
||||||
|
{DateTime? baseStart, int startIndex = 0}) {
|
||||||
|
final now = _now();
|
||||||
|
final start0 = baseStart ?? now.subtract(const Duration(minutes: 10));
|
||||||
|
|
||||||
|
const subjects = [
|
||||||
|
('Matematika', 'fake_math', 'Egyenletek'),
|
||||||
|
('Magyar', 'fake_hun', 'Nyelvtan'),
|
||||||
|
('Angol', 'fake_eng', 'Writing'),
|
||||||
|
('Fizika', 'fake_phys', 'Mechanika'),
|
||||||
|
('Történelem', 'fake_hist', 'XX. század'),
|
||||||
|
('Informatika', 'fake_info', 'Programozás'),
|
||||||
|
];
|
||||||
|
|
||||||
|
final lessons = <Lesson>[];
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
|
final start = start0.add(Duration(minutes: i * 55));
|
||||||
|
final end = start.add(const Duration(minutes: 45));
|
||||||
|
final (name, id, desc) = subjects[i];
|
||||||
|
lessons.add(Lesson(
|
||||||
|
id: 'fake_lesson_${startIndex + i}',
|
||||||
|
date: DateTime(now.year, now.month, now.day),
|
||||||
|
subject: GradeSubject(
|
||||||
|
id: id,
|
||||||
|
category: kreta.Category(id: '', name: ''),
|
||||||
|
name: name,
|
||||||
|
),
|
||||||
|
lessonIndex: '${startIndex + i + 1}',
|
||||||
|
teacher: Teacher(id: 'fake_teacher', name: 'Teszt Tanár'),
|
||||||
|
start: start,
|
||||||
|
end: end,
|
||||||
|
homeworkId: '',
|
||||||
|
description: desc,
|
||||||
|
room: '${(i + 1) * 100 + 1}',
|
||||||
|
groupName: '',
|
||||||
|
name: name,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
return lessons;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,25 +4,62 @@ import 'package:flutter/cupertino.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
class PlatformChannel {
|
class PlatformChannel {
|
||||||
static const MethodChannel _channel = MethodChannel('hu.refilc/liveactivity');
|
static const MethodChannel _channel = MethodChannel('app.firka/liveactivity');
|
||||||
|
|
||||||
static Future<void> createLiveActivity(
|
/// Callback token rotation esetén (iOS APNs új tokent ad ki).
|
||||||
|
static void Function(String pushToken, String deviceId, String bundleId)? onTokenUpdated;
|
||||||
|
|
||||||
|
/// Callback ha a user dismiss-eli a Live Activity-t (swipe left).
|
||||||
|
static void Function(String deviceId)? onActivityDismissed;
|
||||||
|
|
||||||
|
static void _setupMethodCallListener() {
|
||||||
|
_channel.setMethodCallHandler((call) async {
|
||||||
|
if (call.method == 'liveActivityTokenUpdated') {
|
||||||
|
final args = call.arguments as Map?;
|
||||||
|
if (args != null && onTokenUpdated != null) {
|
||||||
|
onTokenUpdated!(
|
||||||
|
args['pushToken'] as String? ?? '',
|
||||||
|
args['deviceId'] as String? ?? '',
|
||||||
|
args['bundleId'] as String? ?? '',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else if (call.method == 'liveActivityDismissed') {
|
||||||
|
final args = call.arguments as Map?;
|
||||||
|
final deviceId = args?['deviceId'] as String? ?? '';
|
||||||
|
debugPrint("Live Activity dismissed by user (device: $deviceId)");
|
||||||
|
onActivityDismissed?.call(deviceId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Létrehozza a Live Activity-t. Azonnal visszatér deviceId/bundleId-vel.
|
||||||
|
/// A push token később érkezik az onTokenUpdated callback-en.
|
||||||
|
static Future<Map<String, String>?> createLiveActivity(
|
||||||
Map<String, dynamic> activityData) async {
|
Map<String, dynamic> activityData) async {
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
|
_setupMethodCallListener();
|
||||||
try {
|
try {
|
||||||
debugPrint("creating...");
|
debugPrint("creating live activity...");
|
||||||
await _channel.invokeMethod('createLiveActivity', activityData);
|
final result = await _channel.invokeMethod<Map>(
|
||||||
|
'createLiveActivity', activityData);
|
||||||
|
if (result == null) return null;
|
||||||
|
return {
|
||||||
|
'success': (result['success'] as bool? ?? false).toString(),
|
||||||
|
'deviceId': result['deviceId'] as String? ?? '',
|
||||||
|
'bundleId': result['bundleId'] as String? ?? '',
|
||||||
|
};
|
||||||
} on PlatformException catch (e) {
|
} on PlatformException catch (e) {
|
||||||
debugPrint("Hiba történt a Live Activity létrehozásakor: ${e.message}");
|
debugPrint("Hiba történt a Live Activity létrehozásakor: ${e.message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> updateLiveActivity(
|
static Future<void> updateLiveActivity(
|
||||||
Map<String, dynamic> activityData) async {
|
Map<String, dynamic> activityData) async {
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
try {
|
try {
|
||||||
debugPrint("updating...");
|
debugPrint("updating live activity...");
|
||||||
await _channel.invokeMethod('updateLiveActivity', activityData);
|
await _channel.invokeMethod('updateLiveActivity', activityData);
|
||||||
} on PlatformException catch (e) {
|
} on PlatformException catch (e) {
|
||||||
debugPrint("Hiba történt a Live Activity frissítésekor: ${e.message}");
|
debugPrint("Hiba történt a Live Activity frissítésekor: ${e.message}");
|
||||||
@@ -33,11 +70,11 @@ class PlatformChannel {
|
|||||||
static Future<void> endLiveActivity() async {
|
static Future<void> endLiveActivity() async {
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
try {
|
try {
|
||||||
debugPrint("finishing...");
|
debugPrint("ending live activity...");
|
||||||
await _channel.invokeMethod('endLiveActivity');
|
await _channel.invokeMethod('endLiveActivity');
|
||||||
} on PlatformException catch (e) {
|
} on PlatformException catch (e) {
|
||||||
debugPrint("Hiba történt a Live Activity befejezésekor: ${e.message}");
|
debugPrint("Hiba történt a Live Activity befejezésekor: ${e.message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
176
refilc/lib/api/providers/liveactivity/server_sync_provider.dart
Normal file
176
refilc/lib/api/providers/liveactivity/server_sync_provider.dart
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
|
import 'package:refilc/helpers/subject.dart';
|
||||||
|
import 'package:refilc/utils/format.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/lesson.dart';
|
||||||
|
|
||||||
|
class ServerSyncProvider {
|
||||||
|
static const String _baseUrl = 'https://legacy-la.devbeni.lol';
|
||||||
|
|
||||||
|
String? _deviceId;
|
||||||
|
|
||||||
|
Future<void> registerAndSync({
|
||||||
|
required String deviceId,
|
||||||
|
required String pushToken,
|
||||||
|
required String bundleId,
|
||||||
|
required String liveActivityColor,
|
||||||
|
required List<Lesson> todayLessons,
|
||||||
|
}) async {
|
||||||
|
_deviceId = deviceId;
|
||||||
|
|
||||||
|
await _register(
|
||||||
|
deviceId: deviceId,
|
||||||
|
pushToken: pushToken,
|
||||||
|
bundleId: bundleId,
|
||||||
|
liveActivityColor: liveActivityColor,
|
||||||
|
);
|
||||||
|
|
||||||
|
final validLessons = _filterLessons(todayLessons);
|
||||||
|
if (validLessons.isNotEmpty) {
|
||||||
|
await _uploadSchedule(deviceId: deviceId, lessons: validLessons);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> refreshToken({
|
||||||
|
required String pushToken,
|
||||||
|
required String bundleId,
|
||||||
|
required String liveActivityColor,
|
||||||
|
}) async {
|
||||||
|
if (_deviceId == null) return;
|
||||||
|
await _register(
|
||||||
|
deviceId: _deviceId!,
|
||||||
|
pushToken: pushToken,
|
||||||
|
bundleId: bundleId,
|
||||||
|
liveActivityColor: liveActivityColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _register({
|
||||||
|
required String deviceId,
|
||||||
|
required String pushToken,
|
||||||
|
required String bundleId,
|
||||||
|
required String liveActivityColor,
|
||||||
|
}) async {
|
||||||
|
try {
|
||||||
|
final response = await http.post(
|
||||||
|
Uri.parse('$_baseUrl/register'),
|
||||||
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
body: jsonEncode({
|
||||||
|
'device_id': deviceId,
|
||||||
|
'apns_token': pushToken,
|
||||||
|
'bundle_id': bundleId,
|
||||||
|
'settings': {
|
||||||
|
'live_activity_color': liveActivityColor,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).timeout(const Duration(seconds: 10));
|
||||||
|
if (response.statusCode != 200 && response.statusCode != 201) {
|
||||||
|
debugPrint('ServerSync register hiba: ${response.statusCode} ${response.body}');
|
||||||
|
} else {
|
||||||
|
debugPrint('ServerSync: device regisztrálva');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint('ServerSync register kivétel: $e');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _uploadSchedule({
|
||||||
|
required String deviceId,
|
||||||
|
required List<Lesson> lessons,
|
||||||
|
}) async {
|
||||||
|
try {
|
||||||
|
final now = DateTime.now();
|
||||||
|
final dateStr =
|
||||||
|
'${now.year}-${now.month.toString().padLeft(2, '0')}-${now.day.toString().padLeft(2, '0')}';
|
||||||
|
|
||||||
|
final entries = <Map<String, dynamic>>[];
|
||||||
|
|
||||||
|
for (int i = 0; i < lessons.length; i++) {
|
||||||
|
final l = lessons[i];
|
||||||
|
entries.add({
|
||||||
|
'type': 'lesson',
|
||||||
|
'index': l.lessonIndex.toString(),
|
||||||
|
'subject': l.subject.renamedTo ??
|
||||||
|
ShortSubject.resolve(subject: l.subject).capital(),
|
||||||
|
'icon': SubjectIcon.resolveName(subject: l.subject),
|
||||||
|
'room': l.room.replaceAll('_', ' '),
|
||||||
|
'description': l.description,
|
||||||
|
'start': l.start.millisecondsSinceEpoch,
|
||||||
|
'end': l.end.millisecondsSinceEpoch,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (i < lessons.length - 1) {
|
||||||
|
final next = lessons[i + 1];
|
||||||
|
if (l.end.isBefore(next.start)) {
|
||||||
|
entries.add({
|
||||||
|
'type': 'break',
|
||||||
|
'index': '',
|
||||||
|
'subject': 'Szünet',
|
||||||
|
'icon': 'cup.and.saucer',
|
||||||
|
'room': '',
|
||||||
|
'description': '',
|
||||||
|
'start': l.end.millisecondsSinceEpoch,
|
||||||
|
'end': next.start.millisecondsSinceEpoch,
|
||||||
|
'nextSubject': next.subject.renamedTo ??
|
||||||
|
ShortSubject.resolve(subject: next.subject).capital(),
|
||||||
|
'nextIcon': SubjectIcon.resolveName(subject: next.subject),
|
||||||
|
'nextRoom': next.room.replaceAll('_', ' '),
|
||||||
|
'nextIndex': next.lessonIndex.toString(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final response = await http.post(
|
||||||
|
Uri.parse('$_baseUrl/schedule'),
|
||||||
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
body: jsonEncode({
|
||||||
|
'device_id': deviceId,
|
||||||
|
'date': dateStr,
|
||||||
|
'lessons': entries,
|
||||||
|
}),
|
||||||
|
).timeout(const Duration(seconds: 10));
|
||||||
|
if (response.statusCode != 200 && response.statusCode != 201) {
|
||||||
|
debugPrint('ServerSync schedule hiba: ${response.statusCode} ${response.body}');
|
||||||
|
} else {
|
||||||
|
debugPrint('ServerSync: ${entries.length} elem feltöltve ($dateStr)');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint('ServerSync schedule kivétel: $e');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> unregister() async {
|
||||||
|
if (_deviceId == null) return;
|
||||||
|
await forceUnregister(_deviceId!);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> forceUnregister(String deviceId) async {
|
||||||
|
try {
|
||||||
|
final response = await http.post(
|
||||||
|
Uri.parse('$_baseUrl/unregister'),
|
||||||
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
body: jsonEncode({'device_id': deviceId}),
|
||||||
|
).timeout(const Duration(seconds: 10));
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
debugPrint('ServerSync: device + schedule törölve (unregister)');
|
||||||
|
} else {
|
||||||
|
debugPrint('ServerSync unregister hiba: ${response.statusCode}');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint('ServerSync unregister kivétel: $e');
|
||||||
|
}
|
||||||
|
_deviceId = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Lesson> _filterLessons(List<Lesson> lessons) {
|
||||||
|
return lessons
|
||||||
|
.where((l) =>
|
||||||
|
(l.status?.name != 'Elmaradt' || l.substituteTeacher != null) &&
|
||||||
|
l.subject.id != '' &&
|
||||||
|
!l.isEmpty)
|
||||||
|
.toList()
|
||||||
|
..sort((a, b) => a.start.compareTo(b.start));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -42,7 +42,7 @@ class StatusProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
void _handleDNSFailure() {
|
void _handleDNSFailure() {
|
||||||
try {
|
try {
|
||||||
InternetAddress.lookup('api.refilc.hu').then((status) {
|
InternetAddress.lookup('firka.app').then((status) { // koszonjuk klima a hardcoded checket
|
||||||
if (status.isEmpty) {
|
if (status.isEmpty) {
|
||||||
if (!_stack.contains(Status.network)) {
|
if (!_stack.contains(Status.network)) {
|
||||||
_stack.remove(Status.apiError);
|
_stack.remove(Status.apiError);
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ import 'package:flutter/widgets.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:home_widget/home_widget.dart';
|
import 'package:home_widget/home_widget.dart';
|
||||||
|
|
||||||
import 'live_card_provider.dart';
|
|
||||||
import 'liveactivity/platform_channel.dart';
|
|
||||||
|
|
||||||
// Mutex
|
// Mutex
|
||||||
bool lock = false;
|
bool lock = false;
|
||||||
@@ -38,6 +36,22 @@ Future<void> syncAll(BuildContext context) async {
|
|||||||
print("INFO Syncing all");
|
print("INFO Syncing all");
|
||||||
|
|
||||||
UserProvider user = Provider.of<UserProvider>(context, listen: false);
|
UserProvider user = Provider.of<UserProvider>(context, listen: false);
|
||||||
|
|
||||||
|
// Demo mode: load demo data into providers without API calls
|
||||||
|
if (user.isDemo) {
|
||||||
|
await Provider.of<GradeProvider>(context, listen: false).fetch();
|
||||||
|
await Provider.of<TimetableProvider>(context, listen: false)
|
||||||
|
.fetch(week: Week.current());
|
||||||
|
await Provider.of<ExamProvider>(context, listen: false).fetch();
|
||||||
|
await Provider.of<HomeworkProvider>(context, listen: false)
|
||||||
|
.fetch(from: DateTime.now().subtract(const Duration(days: 30)));
|
||||||
|
await Provider.of<MessageProvider>(context, listen: false).fetchAll();
|
||||||
|
await Provider.of<NoteProvider>(context, listen: false).fetch();
|
||||||
|
await Provider.of<EventProvider>(context, listen: false).fetch();
|
||||||
|
await Provider.of<AbsenceProvider>(context, listen: false).fetch();
|
||||||
|
lock = false;
|
||||||
|
return Future.value();
|
||||||
|
}
|
||||||
StatusProvider statusProvider =
|
StatusProvider statusProvider =
|
||||||
Provider.of<StatusProvider>(context, listen: false);
|
Provider.of<StatusProvider>(context, listen: false);
|
||||||
|
|
||||||
@@ -142,15 +156,8 @@ Future<void> syncAll(BuildContext context) async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Future.wait(tasks).then((value) {
|
return Future.wait(tasks).then((value) {
|
||||||
// Unlock
|
|
||||||
lock = false;
|
lock = false;
|
||||||
|
|
||||||
if (Platform.isIOS && LiveCardProvider.hasActivityStarted == true) {
|
|
||||||
PlatformChannel.endLiveActivity();
|
|
||||||
LiveCardProvider.hasActivityStarted = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Widget
|
|
||||||
if (Platform.isAndroid) updateWidget();
|
if (Platform.isAndroid) updateWidget();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:refilc/api/client.dart';
|
|
||||||
import 'package:refilc/models/release.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
|
||||||
|
|
||||||
class UpdateProvider extends ChangeNotifier {
|
|
||||||
// Private
|
|
||||||
late List<Release> _releases;
|
|
||||||
bool _available = false;
|
|
||||||
bool get available => _available && _releases.isNotEmpty;
|
|
||||||
|
|
||||||
// Public
|
|
||||||
List<Release> get releases => _releases;
|
|
||||||
|
|
||||||
UpdateProvider({
|
|
||||||
List<Release> initialReleases = const [],
|
|
||||||
required BuildContext context,
|
|
||||||
}) {
|
|
||||||
_releases = List.castFrom(initialReleases);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> fetch() async {
|
|
||||||
late String currentVersion;
|
|
||||||
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
|
||||||
currentVersion = packageInfo.version;
|
|
||||||
|
|
||||||
if (!Platform.isAndroid) return;
|
|
||||||
|
|
||||||
_releases = await FilcAPI.getReleases() ?? [];
|
|
||||||
_releases.sort((a, b) => -a.version.compareTo(b.version));
|
|
||||||
|
|
||||||
// Check for new releases
|
|
||||||
if (_releases.isNotEmpty) {
|
|
||||||
if (!_releases.first.prerelease) {
|
|
||||||
_available = _releases.first.version
|
|
||||||
.compareTo(Version.fromString(currentVersion)) ==
|
|
||||||
1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ignore: avoid_print
|
|
||||||
if (_available) print("INFO: New update: ${releases.first.version}");
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Map> installedVersion() async {
|
|
||||||
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
|
||||||
|
|
||||||
String appName = packageInfo.appName;
|
|
||||||
String packageName = packageInfo.packageName;
|
|
||||||
String version = packageInfo.version;
|
|
||||||
String buildNumber = packageInfo.buildNumber;
|
|
||||||
|
|
||||||
Map<String, String> release = {
|
|
||||||
"app_name": appName,
|
|
||||||
"package_name": packageName,
|
|
||||||
"version": version,
|
|
||||||
"build_number": buildNumber,
|
|
||||||
};
|
|
||||||
|
|
||||||
return release;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -24,6 +24,7 @@ class UserProvider with ChangeNotifier {
|
|||||||
String get picture => user?.picture ?? "";
|
String get picture => user?.picture ?? "";
|
||||||
String? get displayName => user?.displayName;
|
String? get displayName => user?.displayName;
|
||||||
int? get gradeStreak => user?.gradeStreak;
|
int? get gradeStreak => user?.gradeStreak;
|
||||||
|
bool get isDemo => user?.isDemo ?? false;
|
||||||
|
|
||||||
final SettingsProvider _settings;
|
final SettingsProvider _settings;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
// ignore_for_file: deprecated_member_use
|
// ignore_for_file: deprecated_member_use
|
||||||
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
@@ -55,7 +73,6 @@ import 'package:refilc_kreta_api/providers/message_provider.dart';
|
|||||||
import 'package:refilc_kreta_api/providers/note_provider.dart';
|
import 'package:refilc_kreta_api/providers/note_provider.dart';
|
||||||
import 'package:refilc_kreta_api/providers/timetable_provider.dart';
|
import 'package:refilc_kreta_api/providers/timetable_provider.dart';
|
||||||
import 'package:refilc/api/providers/user_provider.dart';
|
import 'package:refilc/api/providers/user_provider.dart';
|
||||||
import 'package:refilc/api/providers/update_provider.dart';
|
|
||||||
import 'package:refilc_mobile_ui/pages/grades/calculator/grade_calculator_provider.dart';
|
import 'package:refilc_mobile_ui/pages/grades/calculator/grade_calculator_provider.dart';
|
||||||
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
||||||
import 'package:refilc_plus/providers/plus_provider.dart';
|
import 'package:refilc_plus/providers/plus_provider.dart';
|
||||||
@@ -111,9 +128,6 @@ class App extends StatelessWidget {
|
|||||||
ChangeNotifierProvider<NewsProvider>(
|
ChangeNotifierProvider<NewsProvider>(
|
||||||
create: (context) => NewsProvider(context: context),
|
create: (context) => NewsProvider(context: context),
|
||||||
),
|
),
|
||||||
ChangeNotifierProvider<UpdateProvider>(
|
|
||||||
create: (context) => UpdateProvider(context: context),
|
|
||||||
),
|
|
||||||
ChangeNotifierProvider<AdProvider>(
|
ChangeNotifierProvider<AdProvider>(
|
||||||
create: (context) => AdProvider(context: context),
|
create: (context) => AdProvider(context: context),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// ignore_for_file: avoid_print
|
// ignore_for_file: avoid_print
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:refilc/api/providers/database_provider.dart';
|
import 'package:refilc/api/providers/database_provider.dart';
|
||||||
@@ -14,6 +15,7 @@ const settingsDB = DatabaseStruct("settings", {
|
|||||||
"language": String, "start_page": int, "rounding": int, "theme": int,
|
"language": String, "start_page": int, "rounding": int, "theme": int,
|
||||||
"accent_color": int, "news": int, "seen_news": String,
|
"accent_color": int, "news": int, "seen_news": String,
|
||||||
"developer_mode": int,
|
"developer_mode": int,
|
||||||
|
"dev_live_fake_lessons": int,
|
||||||
"update_channel": int, "config": String, "custom_accent_color": int,
|
"update_channel": int, "config": String, "custom_accent_color": int,
|
||||||
"custom_background_color": int, "custom_highlight_color": int,
|
"custom_background_color": int, "custom_highlight_color": int,
|
||||||
"custom_text_color": int, // new txt color
|
"custom_text_color": int, // new txt color
|
||||||
@@ -56,6 +58,8 @@ const settingsDB = DatabaseStruct("settings", {
|
|||||||
"uwu_mode": int,
|
"uwu_mode": int,
|
||||||
"new_popups": int,
|
"new_popups": int,
|
||||||
"unseen_new_features": String,
|
"unseen_new_features": String,
|
||||||
|
"live_activity_enabled": int,
|
||||||
|
"live_activity_consent_accepted": int,
|
||||||
"cloud_sync_enabled": int,
|
"cloud_sync_enabled": int,
|
||||||
"cloud_sync_token": String,
|
"cloud_sync_token": String,
|
||||||
"local_updated_at": String,
|
"local_updated_at": String,
|
||||||
@@ -184,6 +188,25 @@ Future<Database> initDB(DatabaseProvider database) async {
|
|||||||
print("ERROR: migrateDB: $error");
|
print("ERROR: migrateDB: $error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// One-time migration: add 'live_activity_consent' to unseen_new_features for existing users
|
||||||
|
// Only if they haven't already accepted or dismissed it
|
||||||
|
try {
|
||||||
|
final rows = await db.query('settings', columns: ['unseen_new_features', 'live_activity_consent_accepted']);
|
||||||
|
if (rows.isNotEmpty) {
|
||||||
|
final consentAccepted = rows.first['live_activity_consent_accepted'] as int? ?? 0;
|
||||||
|
if (consentAccepted == 0) {
|
||||||
|
final raw = rows.first['unseen_new_features'] as String? ?? '[]';
|
||||||
|
final list = (jsonDecode(raw) as List).cast<String>();
|
||||||
|
if (!list.contains('live_activity_consent')) {
|
||||||
|
list.add('live_activity_consent');
|
||||||
|
await db.update('settings', {'unseen_new_features': jsonEncode(list)});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print("ERROR: live_activity_consent migration: $e");
|
||||||
|
}
|
||||||
|
|
||||||
return db;
|
return db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import 'package:refilc_kreta_api/client/client.dart';
|
|||||||
import 'package:refilc_kreta_api/models/attachment.dart';
|
import 'package:refilc_kreta_api/models/attachment.dart';
|
||||||
import 'package:refilc_kreta_api/models/homework.dart';
|
import 'package:refilc_kreta_api/models/homework.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:open_filex/open_filex.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
extension AttachmentHelper on Attachment {
|
extension AttachmentHelper on Attachment {
|
||||||
Future<String> download(BuildContext context,
|
Future<String> download(BuildContext context,
|
||||||
@@ -32,8 +32,10 @@ extension AttachmentHelper on Attachment {
|
|||||||
String downloads = await StorageHelper.downloadsPath();
|
String downloads = await StorageHelper.downloadsPath();
|
||||||
|
|
||||||
if (!await File("$downloads/$name").exists()) await download(context);
|
if (!await File("$downloads/$name").exists()) await download(context);
|
||||||
var result = await OpenFilex.open("$downloads/$name");
|
return launchUrl(
|
||||||
return result.type == ResultType.done;
|
Uri.file("$downloads/$name"),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +61,9 @@ extension HomeworkAttachmentHelper on HomeworkAttachment {
|
|||||||
String downloads = await StorageHelper.downloadsPath();
|
String downloads = await StorageHelper.downloadsPath();
|
||||||
|
|
||||||
if (!await File("$downloads/$name").exists()) await download(context);
|
if (!await File("$downloads/$name").exists()) await download(context);
|
||||||
var result = await OpenFilex.open("$downloads/$name");
|
return launchUrl(
|
||||||
return result.type == ResultType.done;
|
Uri.file("$downloads/$name"),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class LiveActivityHelper {
|
|||||||
await PlatformChannel.updateLiveActivity(LiveCardProvider.LAData);
|
await PlatformChannel.updateLiveActivity(LiveCardProvider.LAData);
|
||||||
} else {
|
} else {
|
||||||
await PlatformChannel.endLiveActivity();
|
await PlatformChannel.endLiveActivity();
|
||||||
|
LiveCardProvider.serverSync.unregister();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
import 'dart:async';
|
|
||||||
import 'dart:io';
|
|
||||||
import 'dart:typed_data';
|
|
||||||
|
|
||||||
import 'package:refilc/api/client.dart';
|
|
||||||
import 'package:refilc/helpers/storage_helper.dart';
|
|
||||||
import 'package:refilc/models/release.dart';
|
|
||||||
import 'package:open_filex/open_filex.dart';
|
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
|
||||||
|
|
||||||
enum UpdateState { none, preparing, downloading, installing }
|
|
||||||
|
|
||||||
typedef UpdateCallback = Function(double progress, UpdateState state);
|
|
||||||
|
|
||||||
// ignore: todo
|
|
||||||
// TODO: cleanup old apk files
|
|
||||||
|
|
||||||
extension UpdateHelper on Release {
|
|
||||||
Future<void> install({UpdateCallback? updateCallback}) async {
|
|
||||||
updateCallback!(-1, UpdateState.preparing);
|
|
||||||
|
|
||||||
String downloads = await StorageHelper.downloadsPath();
|
|
||||||
File apk = File("$downloads/refilc-v$version.apk");
|
|
||||||
|
|
||||||
if (!await apk.exists()) {
|
|
||||||
updateCallback(-1, UpdateState.downloading);
|
|
||||||
|
|
||||||
var bytes = await download(updateCallback: updateCallback);
|
|
||||||
if (!await StorageHelper.write(apk.path, bytes)) {
|
|
||||||
throw "failed to write apk: permission denied";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateCallback(-1, UpdateState.installing);
|
|
||||||
|
|
||||||
var installPerms =
|
|
||||||
(await Permission.manageExternalStorage.request().isGranted &&
|
|
||||||
await Permission.requestInstallPackages.request().isGranted);
|
|
||||||
if (installPerms) {
|
|
||||||
var result = await OpenFilex.open(apk.path);
|
|
||||||
|
|
||||||
if (result.type != ResultType.done) {
|
|
||||||
// ignore: avoid_print
|
|
||||||
print("ERROR: installUpdate.openFile: ${result.message}");
|
|
||||||
throw result.message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateCallback(-1, UpdateState.none);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Uint8List> download({UpdateCallback? updateCallback}) async {
|
|
||||||
var response = await FilcAPI.downloadRelease(downloads.first);
|
|
||||||
|
|
||||||
List<List<int>> chunks = [];
|
|
||||||
int downloaded = 0;
|
|
||||||
|
|
||||||
var completer = Completer<Uint8List>();
|
|
||||||
|
|
||||||
response?.stream.listen((List<int> chunk) {
|
|
||||||
updateCallback!(
|
|
||||||
downloaded / (response.contentLength ?? 0), UpdateState.downloading);
|
|
||||||
|
|
||||||
chunks.add(chunk);
|
|
||||||
downloaded += chunk.length;
|
|
||||||
}, onDone: () {
|
|
||||||
// Save the file
|
|
||||||
final Uint8List bytes = Uint8List(response.contentLength ?? 0);
|
|
||||||
int offset = 0;
|
|
||||||
for (List<int> chunk in chunks) {
|
|
||||||
bytes.setRange(offset, offset + chunk.length, chunk);
|
|
||||||
offset += chunk.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
completer.complete(bytes);
|
|
||||||
});
|
|
||||||
|
|
||||||
return completer.future;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:background_fetch/background_fetch.dart';
|
import 'package:background_fetch/background_fetch.dart';
|
||||||
@@ -15,8 +33,6 @@ import 'package:refilc/utils/service_locator.dart';
|
|||||||
import 'package:refilc_mobile_ui/screens/error_screen.dart';
|
import 'package:refilc_mobile_ui/screens/error_screen.dart';
|
||||||
import 'package:refilc_mobile_ui/screens/error_report_screen.dart';
|
import 'package:refilc_mobile_ui/screens/error_report_screen.dart';
|
||||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||||
import 'package:shake_flutter/models/shake_report_configuration.dart';
|
|
||||||
import 'package:shake_flutter/shake_flutter.dart';
|
|
||||||
|
|
||||||
import 'helpers/live_activity_helper.dart';
|
import 'helpers/live_activity_helper.dart';
|
||||||
|
|
||||||
@@ -40,28 +56,6 @@ void main() async {
|
|||||||
|
|
||||||
BackgroundFetch.registerHeadlessTask(backgroundHeadlessTask);
|
BackgroundFetch.registerHeadlessTask(backgroundHeadlessTask);
|
||||||
|
|
||||||
// setting up things for shakebugs
|
|
||||||
// List<ShakePickerItem> pickerItems = [
|
|
||||||
// ShakePickerItem('Bug', 'Hiba', tag: 'bug'),
|
|
||||||
// ShakePickerItem('Suggestion', 'Fejlesztési javaslat', tag: 'suggestion'),
|
|
||||||
// ShakePickerItem('Question', 'Kérdés', tag: 'question')
|
|
||||||
// ];
|
|
||||||
// ShakePicker picker =
|
|
||||||
// ShakePicker('Feedback type', 'Visszajelzés típusa', pickerItems);
|
|
||||||
// ShakeTitle title = ShakeTitle('Title', 'Leírás', required: true);
|
|
||||||
|
|
||||||
// ShakeInspectButton inspect = ShakeInspectButton();
|
|
||||||
// ShakeAttachments attachments = ShakeAttachments();
|
|
||||||
|
|
||||||
// List<ShakeFormComponent> components = [picker, title, inspect, attachments];
|
|
||||||
// ShakeForm form = ShakeForm(components);
|
|
||||||
|
|
||||||
// Shake.setShakeForm(form);
|
|
||||||
|
|
||||||
// shakebugs initialization
|
|
||||||
// Shake.setInvokeShakeOnScreenshot(true);
|
|
||||||
Shake.start('Y44AwzfY6091xO2Nr0w59RHSpNxJhhiSFGs4enmoJwelN82ZRzTLE5X');
|
|
||||||
|
|
||||||
// pre-cache required icons
|
// pre-cache required icons
|
||||||
const todaySvg = SvgAssetLoader('assets/svg/menu_icons/today_selected.svg');
|
const todaySvg = SvgAssetLoader('assets/svg/menu_icons/today_selected.svg');
|
||||||
const gradesSvg = SvgAssetLoader('assets/svg/menu_icons/grades_selected.svg');
|
const gradesSvg = SvgAssetLoader('assets/svg/menu_icons/grades_selected.svg');
|
||||||
@@ -188,18 +182,6 @@ Widget errorBuilder(FlutterErrorDetails details) {
|
|||||||
Navigator.of(context, rootNavigator: true)
|
Navigator.of(context, rootNavigator: true)
|
||||||
.push(MaterialPageRoute(builder: (context) {
|
.push(MaterialPageRoute(builder: (context) {
|
||||||
if (kReleaseMode) {
|
if (kReleaseMode) {
|
||||||
// silent report to shakebugs
|
|
||||||
ShakeReportConfiguration configuration = ShakeReportConfiguration();
|
|
||||||
configuration.blackBoxData = true;
|
|
||||||
configuration.activityHistoryData = true;
|
|
||||||
configuration.screenshot = true;
|
|
||||||
configuration.video = false;
|
|
||||||
Shake.silentReport(
|
|
||||||
configuration: configuration,
|
|
||||||
description:
|
|
||||||
'Silent Report #${DateTime.now().year}${DateTime.now().month}${DateTime.now().day}',
|
|
||||||
);
|
|
||||||
// show error report screen
|
|
||||||
return ErrorReportScreen(details);
|
return ErrorReportScreen(details);
|
||||||
} else {
|
} else {
|
||||||
return ErrorScreen(details);
|
return ErrorScreen(details);
|
||||||
@@ -310,7 +292,7 @@ Future<void> initAdditionalBackgroundFetch() async {
|
|||||||
print('[BackgroundFetch] configure success: $status');
|
print('[BackgroundFetch] configure success: $status');
|
||||||
}
|
}
|
||||||
BackgroundFetch.scheduleTask(TaskConfig(
|
BackgroundFetch.scheduleTask(TaskConfig(
|
||||||
taskId: "com.transistorsoft.refilcliveactivity",
|
taskId: "com.transistorsoft.firkaliveactivity",
|
||||||
delay: 300000, // 5 minute
|
delay: 300000, // 5 minute
|
||||||
periodic: true,
|
periodic: true,
|
||||||
forceAlarmManager: true,
|
forceAlarmManager: true,
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
// minutes: times 15
|
// minutes: times 15
|
||||||
int _notificationPollInterval;
|
int _notificationPollInterval;
|
||||||
bool _developerMode;
|
bool _developerMode;
|
||||||
|
bool _devLiveFakeLessons;
|
||||||
VibrationStrength _vibrate;
|
VibrationStrength _vibrate;
|
||||||
bool _abWeeks;
|
bool _abWeeks;
|
||||||
bool _swapABweeks;
|
bool _swapABweeks;
|
||||||
@@ -109,6 +110,8 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool _uwuMode;
|
bool _uwuMode;
|
||||||
bool _newPopups;
|
bool _newPopups;
|
||||||
List<String> _unseenNewFeatures;
|
List<String> _unseenNewFeatures;
|
||||||
|
bool _liveActivityEnabled;
|
||||||
|
bool _liveActivityConsentAccepted;
|
||||||
bool _cloudSyncEnabled;
|
bool _cloudSyncEnabled;
|
||||||
String _cloudSyncToken;
|
String _cloudSyncToken;
|
||||||
DateTime _updatedAt;
|
DateTime _updatedAt;
|
||||||
@@ -134,6 +137,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
required bool notificationsLessonsEnabled,
|
required bool notificationsLessonsEnabled,
|
||||||
required int notificationsBitfield,
|
required int notificationsBitfield,
|
||||||
required bool developerMode,
|
required bool developerMode,
|
||||||
|
required bool devLiveFakeLessons,
|
||||||
required int notificationPollInterval,
|
required int notificationPollInterval,
|
||||||
required VibrationStrength vibrate,
|
required VibrationStrength vibrate,
|
||||||
required bool abWeeks,
|
required bool abWeeks,
|
||||||
@@ -187,6 +191,8 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
required bool uwuMode,
|
required bool uwuMode,
|
||||||
required bool newPopups,
|
required bool newPopups,
|
||||||
required List<String> unseenNewFeatures,
|
required List<String> unseenNewFeatures,
|
||||||
|
required bool liveActivityEnabled,
|
||||||
|
required bool liveActivityConsentAccepted,
|
||||||
required bool cloudSyncEnabled,
|
required bool cloudSyncEnabled,
|
||||||
required String cloudSyncToken,
|
required String cloudSyncToken,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
@@ -209,6 +215,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
_notificationsLessonsEnabled = notificationsLessonsEnabled,
|
_notificationsLessonsEnabled = notificationsLessonsEnabled,
|
||||||
_notificationsBitfield = notificationsBitfield,
|
_notificationsBitfield = notificationsBitfield,
|
||||||
_developerMode = developerMode,
|
_developerMode = developerMode,
|
||||||
|
_devLiveFakeLessons = devLiveFakeLessons,
|
||||||
_notificationPollInterval = notificationPollInterval,
|
_notificationPollInterval = notificationPollInterval,
|
||||||
_vibrate = vibrate,
|
_vibrate = vibrate,
|
||||||
_abWeeks = abWeeks,
|
_abWeeks = abWeeks,
|
||||||
@@ -262,6 +269,8 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
_uwuMode = uwuMode,
|
_uwuMode = uwuMode,
|
||||||
_newPopups = newPopups,
|
_newPopups = newPopups,
|
||||||
_unseenNewFeatures = unseenNewFeatures,
|
_unseenNewFeatures = unseenNewFeatures,
|
||||||
|
_liveActivityEnabled = liveActivityEnabled,
|
||||||
|
_liveActivityConsentAccepted = liveActivityConsentAccepted,
|
||||||
_cloudSyncEnabled = cloudSyncEnabled,
|
_cloudSyncEnabled = cloudSyncEnabled,
|
||||||
_cloudSyncToken = cloudSyncToken,
|
_cloudSyncToken = cloudSyncToken,
|
||||||
_updatedAt = updatedAt,
|
_updatedAt = updatedAt,
|
||||||
@@ -303,6 +312,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
notificationsBitfield: map["notifications_bitfield"],
|
notificationsBitfield: map["notifications_bitfield"],
|
||||||
notificationPollInterval: map["notification_poll_interval"],
|
notificationPollInterval: map["notification_poll_interval"],
|
||||||
developerMode: map["developer_mode"] == 1,
|
developerMode: map["developer_mode"] == 1,
|
||||||
|
devLiveFakeLessons: map["dev_live_fake_lessons"] == 1,
|
||||||
vibrate: VibrationStrength.values[map["vibration_strength"]],
|
vibrate: VibrationStrength.values[map["vibration_strength"]],
|
||||||
abWeeks: map["ab_weeks"] == 1,
|
abWeeks: map["ab_weeks"] == 1,
|
||||||
swapABweeks: map["swap_ab_weeks"] == 1,
|
swapABweeks: map["swap_ab_weeks"] == 1,
|
||||||
@@ -356,6 +366,8 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
uwuMode: map['uwu_mode'] == 1,
|
uwuMode: map['uwu_mode'] == 1,
|
||||||
newPopups: map['new_popups'] == 1,
|
newPopups: map['new_popups'] == 1,
|
||||||
unseenNewFeatures: jsonDecode(map["unseen_new_features"]).cast<String>(),
|
unseenNewFeatures: jsonDecode(map["unseen_new_features"]).cast<String>(),
|
||||||
|
liveActivityEnabled: map['live_activity_enabled'] == 1,
|
||||||
|
liveActivityConsentAccepted: map['live_activity_consent_accepted'] == 1,
|
||||||
cloudSyncEnabled: map['cloud_sync_enabled'] == 1,
|
cloudSyncEnabled: map['cloud_sync_enabled'] == 1,
|
||||||
cloudSyncToken: map['cloud_sync_token'],
|
cloudSyncToken: map['cloud_sync_token'],
|
||||||
updatedAt: DateTime.tryParse(map['local_updated_at']) ?? DateTime.now(),
|
updatedAt: DateTime.tryParse(map['local_updated_at']) ?? DateTime.now(),
|
||||||
@@ -381,6 +393,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
"notifications_lessons": _notificationsLessonsEnabled ? 1 : 0,
|
"notifications_lessons": _notificationsLessonsEnabled ? 1 : 0,
|
||||||
"notifications_bitfield": _notificationsBitfield,
|
"notifications_bitfield": _notificationsBitfield,
|
||||||
"developer_mode": _developerMode ? 1 : 0,
|
"developer_mode": _developerMode ? 1 : 0,
|
||||||
|
"dev_live_fake_lessons": _devLiveFakeLessons ? 1 : 0,
|
||||||
"grade_color1": _gradeColors[0].value,
|
"grade_color1": _gradeColors[0].value,
|
||||||
"grade_color2": _gradeColors[1].value,
|
"grade_color2": _gradeColors[1].value,
|
||||||
"grade_color3": _gradeColors[2].value,
|
"grade_color3": _gradeColors[2].value,
|
||||||
@@ -438,6 +451,8 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
"uwu_mode": _uwuMode ? 1 : 0,
|
"uwu_mode": _uwuMode ? 1 : 0,
|
||||||
"new_popups": _newPopups ? 1 : 0,
|
"new_popups": _newPopups ? 1 : 0,
|
||||||
"unseen_new_features": jsonEncode(_unseenNewFeatures),
|
"unseen_new_features": jsonEncode(_unseenNewFeatures),
|
||||||
|
"live_activity_enabled": _liveActivityEnabled ? 1 : 0,
|
||||||
|
"live_activity_consent_accepted": _liveActivityConsentAccepted ? 1 : 0,
|
||||||
"cloud_sync_enabled": _cloudSyncEnabled ? 1 : 0,
|
"cloud_sync_enabled": _cloudSyncEnabled ? 1 : 0,
|
||||||
"cloud_sync_token": _cloudSyncToken,
|
"cloud_sync_token": _cloudSyncToken,
|
||||||
"local_updated_at": _updatedAt.toIso8601String(),
|
"local_updated_at": _updatedAt.toIso8601String(),
|
||||||
@@ -471,6 +486,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
notificationsLessonsEnabled: true,
|
notificationsLessonsEnabled: true,
|
||||||
notificationsBitfield: 255,
|
notificationsBitfield: 255,
|
||||||
developerMode: true,
|
developerMode: true,
|
||||||
|
devLiveFakeLessons: false,
|
||||||
notificationPollInterval: 1,
|
notificationPollInterval: 1,
|
||||||
vibrate: VibrationStrength.medium,
|
vibrate: VibrationStrength.medium,
|
||||||
abWeeks: false,
|
abWeeks: false,
|
||||||
@@ -523,7 +539,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
newColors: true,
|
newColors: true,
|
||||||
uwuMode: false,
|
uwuMode: false,
|
||||||
newPopups: false,
|
newPopups: false,
|
||||||
unseenNewFeatures: [],
|
unseenNewFeatures: ['live_activity_consent'],
|
||||||
|
liveActivityEnabled: false,
|
||||||
|
liveActivityConsentAccepted: false,
|
||||||
cloudSyncEnabled: false,
|
cloudSyncEnabled: false,
|
||||||
cloudSyncToken: '',
|
cloudSyncToken: '',
|
||||||
updatedAt: DateTime.now(),
|
updatedAt: DateTime.now(),
|
||||||
@@ -549,6 +567,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool get notificationsLessonsEnabled => _notificationsLessonsEnabled;
|
bool get notificationsLessonsEnabled => _notificationsLessonsEnabled;
|
||||||
int get notificationsBitfield => _notificationsBitfield;
|
int get notificationsBitfield => _notificationsBitfield;
|
||||||
bool get developerMode => _developerMode;
|
bool get developerMode => _developerMode;
|
||||||
|
bool get devLiveFakeLessons => _devLiveFakeLessons;
|
||||||
int get notificationPollInterval => _notificationPollInterval;
|
int get notificationPollInterval => _notificationPollInterval;
|
||||||
VibrationStrength get vibrate => _vibrate;
|
VibrationStrength get vibrate => _vibrate;
|
||||||
bool get abWeeks => _abWeeks;
|
bool get abWeeks => _abWeeks;
|
||||||
@@ -601,6 +620,8 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool get uwuMode => _uwuMode;
|
bool get uwuMode => _uwuMode;
|
||||||
bool get newPopups => _newPopups;
|
bool get newPopups => _newPopups;
|
||||||
List<String> get unseenNewFeatures => _unseenNewFeatures;
|
List<String> get unseenNewFeatures => _unseenNewFeatures;
|
||||||
|
bool get liveActivityEnabled => _liveActivityEnabled;
|
||||||
|
bool get liveActivityConsentAccepted => _liveActivityConsentAccepted;
|
||||||
bool get cloudSyncEnabled => _cloudSyncEnabled;
|
bool get cloudSyncEnabled => _cloudSyncEnabled;
|
||||||
String get cloudSyncToken => _cloudSyncToken;
|
String get cloudSyncToken => _cloudSyncToken;
|
||||||
DateTime get updatedAt => _updatedAt;
|
DateTime get updatedAt => _updatedAt;
|
||||||
@@ -626,6 +647,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool? notificationsLessonsEnabled,
|
bool? notificationsLessonsEnabled,
|
||||||
int? notificationsBitfield,
|
int? notificationsBitfield,
|
||||||
bool? developerMode,
|
bool? developerMode,
|
||||||
|
bool? devLiveFakeLessons,
|
||||||
int? notificationPollInterval,
|
int? notificationPollInterval,
|
||||||
VibrationStrength? vibrate,
|
VibrationStrength? vibrate,
|
||||||
bool? abWeeks,
|
bool? abWeeks,
|
||||||
@@ -675,6 +697,8 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool? uwuMode,
|
bool? uwuMode,
|
||||||
bool? newPopups,
|
bool? newPopups,
|
||||||
List<String>? unseenNewFeatures,
|
List<String>? unseenNewFeatures,
|
||||||
|
bool? liveActivityEnabled,
|
||||||
|
bool? liveActivityConsentAccepted,
|
||||||
bool? cloudSyncEnabled,
|
bool? cloudSyncEnabled,
|
||||||
String? cloudSyncToken,
|
String? cloudSyncToken,
|
||||||
bool? qTimetableLessonNum,
|
bool? qTimetableLessonNum,
|
||||||
@@ -727,6 +751,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
if (developerMode != null && developerMode != _developerMode) {
|
if (developerMode != null && developerMode != _developerMode) {
|
||||||
_developerMode = developerMode;
|
_developerMode = developerMode;
|
||||||
}
|
}
|
||||||
|
if (devLiveFakeLessons != null && devLiveFakeLessons != _devLiveFakeLessons) {
|
||||||
|
_devLiveFakeLessons = devLiveFakeLessons;
|
||||||
|
}
|
||||||
if (notificationPollInterval != null &&
|
if (notificationPollInterval != null &&
|
||||||
notificationPollInterval != _notificationPollInterval) {
|
notificationPollInterval != _notificationPollInterval) {
|
||||||
_notificationPollInterval = notificationPollInterval;
|
_notificationPollInterval = notificationPollInterval;
|
||||||
@@ -875,6 +902,15 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
if (unseenNewFeatures != null && unseenNewFeatures != _unseenNewFeatures) {
|
if (unseenNewFeatures != null && unseenNewFeatures != _unseenNewFeatures) {
|
||||||
_unseenNewFeatures = unseenNewFeatures;
|
_unseenNewFeatures = unseenNewFeatures;
|
||||||
}
|
}
|
||||||
|
if (liveActivityEnabled != null && liveActivityEnabled != _liveActivityEnabled) {
|
||||||
|
_liveActivityEnabled = liveActivityEnabled;
|
||||||
|
if (!liveActivityEnabled && Platform.isIOS) {
|
||||||
|
LiveCardProvider.hasActivitySettingsChanged = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (liveActivityConsentAccepted != null && liveActivityConsentAccepted != _liveActivityConsentAccepted) {
|
||||||
|
_liveActivityConsentAccepted = liveActivityConsentAccepted;
|
||||||
|
}
|
||||||
if (cloudSyncEnabled != null && cloudSyncEnabled != _cloudSyncEnabled) {
|
if (cloudSyncEnabled != null && cloudSyncEnabled != _cloudSyncEnabled) {
|
||||||
_cloudSyncEnabled = cloudSyncEnabled;
|
_cloudSyncEnabled = cloudSyncEnabled;
|
||||||
}
|
}
|
||||||
@@ -930,6 +966,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
notificationsBitfield: map["notifications_bitfield"],
|
notificationsBitfield: map["notifications_bitfield"],
|
||||||
notificationPollInterval: map["notification_poll_interval"],
|
notificationPollInterval: map["notification_poll_interval"],
|
||||||
developerMode: map["developer_mode"] == 1,
|
developerMode: map["developer_mode"] == 1,
|
||||||
|
devLiveFakeLessons: map["dev_live_fake_lessons"] == 1,
|
||||||
vibrate:
|
vibrate:
|
||||||
VibrationStrength.values[map["vibration_strength"] ?? _vibrate.index],
|
VibrationStrength.values[map["vibration_strength"] ?? _vibrate.index],
|
||||||
abWeeks: map["ab_weeks"] == 1,
|
abWeeks: map["ab_weeks"] == 1,
|
||||||
@@ -993,6 +1030,8 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
newPopups: map['new_popups'] == 1,
|
newPopups: map['new_popups'] == 1,
|
||||||
unseenNewFeatures:
|
unseenNewFeatures:
|
||||||
jsonDecode(map["unseen_new_features"] ?? "[]").cast<String>(),
|
jsonDecode(map["unseen_new_features"] ?? "[]").cast<String>(),
|
||||||
|
liveActivityEnabled: map['live_activity_enabled'] == 1,
|
||||||
|
liveActivityConsentAccepted: map['live_activity_consent_accepted'] == 1,
|
||||||
cloudSyncEnabled: map['cloud_sync_enabled'] == 1,
|
cloudSyncEnabled: map['cloud_sync_enabled'] == 1,
|
||||||
cloudSyncToken: map['cloud_sync_token'],
|
cloudSyncToken: map['cloud_sync_token'],
|
||||||
qTimetableLessonNum: map['q_timetable_lesson_num'] == 1,
|
qTimetableLessonNum: map['q_timetable_lesson_num'] == 1,
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import 'package:refilc_kreta_api/models/school.dart';
|
|||||||
import 'package:refilc_kreta_api/models/student.dart';
|
import 'package:refilc_kreta_api/models/student.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
|
const String demoUserId = 'demo-user-00000000-0000-0000-0000-000000000000';
|
||||||
|
|
||||||
enum Role { student, parent }
|
enum Role { student, parent }
|
||||||
|
|
||||||
class User {
|
class User {
|
||||||
@@ -115,6 +117,36 @@ class User {
|
|||||||
@override
|
@override
|
||||||
String toString() => jsonEncode(toMap());
|
String toString() => jsonEncode(toMap());
|
||||||
|
|
||||||
|
static User demo() {
|
||||||
|
return User(
|
||||||
|
id: demoUserId,
|
||||||
|
name: 'Demo Diák',
|
||||||
|
username: 'demo',
|
||||||
|
password: '',
|
||||||
|
instituteCode: 'demo',
|
||||||
|
student: Student(
|
||||||
|
id: demoUserId,
|
||||||
|
name: 'Demo Diák',
|
||||||
|
school: School(
|
||||||
|
instituteCode: 'demo',
|
||||||
|
name: 'Demo Iskola',
|
||||||
|
city: 'Budapest',
|
||||||
|
),
|
||||||
|
birth: DateTime(2005, 9, 1),
|
||||||
|
yearId: '1',
|
||||||
|
parents: [],
|
||||||
|
gradeDelay: 0,
|
||||||
|
),
|
||||||
|
role: Role.student,
|
||||||
|
nickname: 'Demo',
|
||||||
|
accessToken: 'demo',
|
||||||
|
accessTokenExpire: DateTime.now().add(const Duration(days: 365)),
|
||||||
|
refreshToken: 'demo',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool get isDemo => id == demoUserId;
|
||||||
|
|
||||||
static Map<String, Object?> loginBody({
|
static Map<String, Object?> loginBody({
|
||||||
required String username,
|
required String username,
|
||||||
required String password,
|
required String password,
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
import 'package:refilc/models/linked_account.dart';
|
import 'package:refilc/models/linked_account.dart';
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:home_widget/home_widget.dart';
|
import 'package:home_widget/home_widget.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:shake_flutter/models/shake_theme.dart';
|
|
||||||
import 'package:shake_flutter/shake_flutter.dart';
|
|
||||||
|
|
||||||
Future<bool?> updateWidget() async {
|
Future<bool?> updateWidget() async {
|
||||||
try {
|
try {
|
||||||
@@ -35,12 +33,5 @@ class ThemeModeObserver extends ChangeNotifier {
|
|||||||
_updateNavbarColor = updateNavbarColor;
|
_updateNavbarColor = updateNavbarColor;
|
||||||
if (Platform.isAndroid) updateWidget();
|
if (Platform.isAndroid) updateWidget();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
||||||
// change shake theme as well
|
|
||||||
ShakeTheme darkTheme = ShakeTheme();
|
|
||||||
darkTheme.accentColor = "#FFFFFF";
|
|
||||||
ShakeTheme lightTheme = ShakeTheme();
|
|
||||||
lightTheme.accentColor = "#000000";
|
|
||||||
Shake.setShakeTheme(mode == ThemeMode.dark ? darkTheme : lightTheme);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import 'package:refilc/api/providers/ad_provider.dart';
|
import 'package:refilc/api/providers/ad_provider.dart';
|
||||||
import 'package:refilc/api/providers/update_provider.dart';
|
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
import 'package:refilc/ui/date_widget.dart';
|
import 'package:refilc/ui/date_widget.dart';
|
||||||
import 'package:refilc/ui/filter/widgets/grades.dart' as grade_filter;
|
import 'package:refilc/ui/filter/widgets/grades.dart' as grade_filter;
|
||||||
@@ -12,7 +11,6 @@ import 'package:refilc/ui/filter/widgets/exams.dart' as exam_filter;
|
|||||||
import 'package:refilc/ui/filter/widgets/notes.dart' as note_filter;
|
import 'package:refilc/ui/filter/widgets/notes.dart' as note_filter;
|
||||||
import 'package:refilc/ui/filter/widgets/events.dart' as event_filter;
|
import 'package:refilc/ui/filter/widgets/events.dart' as event_filter;
|
||||||
import 'package:refilc/ui/filter/widgets/lessons.dart' as lesson_filter;
|
import 'package:refilc/ui/filter/widgets/lessons.dart' as lesson_filter;
|
||||||
import 'package:refilc/ui/filter/widgets/update.dart' as update_filter;
|
|
||||||
import 'package:refilc/ui/filter/widgets/missed_exams.dart'
|
import 'package:refilc/ui/filter/widgets/missed_exams.dart'
|
||||||
as missed_exam_filter;
|
as missed_exam_filter;
|
||||||
import 'package:refilc/ui/filter/widgets/ads.dart' as ad_filter;
|
import 'package:refilc/ui/filter/widgets/ads.dart' as ad_filter;
|
||||||
@@ -54,7 +52,6 @@ enum FilterType {
|
|||||||
notes,
|
notes,
|
||||||
events,
|
events,
|
||||||
lessons,
|
lessons,
|
||||||
updates,
|
|
||||||
certifications,
|
certifications,
|
||||||
missedExams,
|
missedExams,
|
||||||
ads,
|
ads,
|
||||||
@@ -70,7 +67,6 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
|
|||||||
final examProvider = Provider.of<ExamProvider>(context);
|
final examProvider = Provider.of<ExamProvider>(context);
|
||||||
final noteProvider = Provider.of<NoteProvider>(context);
|
final noteProvider = Provider.of<NoteProvider>(context);
|
||||||
final eventProvider = Provider.of<EventProvider>(context);
|
final eventProvider = Provider.of<EventProvider>(context);
|
||||||
final updateProvider = Provider.of<UpdateProvider>(context);
|
|
||||||
final settingsProvider = Provider.of<SettingsProvider>(context);
|
final settingsProvider = Provider.of<SettingsProvider>(context);
|
||||||
final adProvider = Provider.of<AdProvider>(context);
|
final adProvider = Provider.of<AdProvider>(context);
|
||||||
|
|
||||||
@@ -87,7 +83,6 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
|
|||||||
context: context, absencesNoExcused: true),
|
context: context, absencesNoExcused: true),
|
||||||
getFilterWidgets(FilterType.homework, context: context),
|
getFilterWidgets(FilterType.homework, context: context),
|
||||||
getFilterWidgets(FilterType.exams, context: context),
|
getFilterWidgets(FilterType.exams, context: context),
|
||||||
getFilterWidgets(FilterType.updates, context: context),
|
|
||||||
getFilterWidgets(FilterType.certifications, context: context),
|
getFilterWidgets(FilterType.certifications, context: context),
|
||||||
getFilterWidgets(FilterType.missedExams, context: context),
|
getFilterWidgets(FilterType.missedExams, context: context),
|
||||||
getFilterWidgets(FilterType.ads, context: context),
|
getFilterWidgets(FilterType.ads, context: context),
|
||||||
@@ -162,13 +157,6 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
|
|||||||
.getWidgets(timetableProvider.getWeek(Week.current()) ?? []);
|
.getWidgets(timetableProvider.getWeek(Week.current()) ?? []);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Updates
|
|
||||||
case FilterType.updates:
|
|
||||||
if (updateProvider.available) {
|
|
||||||
items = [update_filter.getWidget(updateProvider.releases.first)];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Missed Exams
|
// Missed Exams
|
||||||
case FilterType.missedExams:
|
case FilterType.missedExams:
|
||||||
items = missed_exam_filter
|
items = missed_exam_filter
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
import 'package:refilc/models/release.dart';
|
|
||||||
import 'package:refilc/ui/date_widget.dart';
|
|
||||||
import 'package:refilc_mobile_ui/common/widgets/update/update_viewable.dart'
|
|
||||||
as mobile;
|
|
||||||
|
|
||||||
DateWidget getWidget(Release providerRelease) {
|
|
||||||
return DateWidget(
|
|
||||||
date: DateTime.now(),
|
|
||||||
widget: mobile.UpdateViewable(providerRelease),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ description: "Egy nem hivatalos e-KRÉTA kliens, diákoktól diákoknak."
|
|||||||
homepage: https://refilc.hu
|
homepage: https://refilc.hu
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
|
|
||||||
version: 5.1.5+290
|
version: 5.1.2+0
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.6.0
|
sdk: ^3.6.0
|
||||||
@@ -26,22 +26,22 @@ dependencies:
|
|||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
i18n_extension: ^12.0.1
|
i18n_extension: ^12.0.1
|
||||||
sqflite: ^2.4.1
|
sqflite: 2.3.3+1
|
||||||
intl: ^0.19.0
|
|
||||||
|
intl: ^0.20.2
|
||||||
provider: ^6.1.2
|
provider: ^6.1.2
|
||||||
http: ^1.3.0
|
http: ^1.3.0
|
||||||
uuid: ^4.5.1
|
uuid: ^4.5.1
|
||||||
html: ^0.15.5
|
html: ^0.15.5
|
||||||
open_filex: ^4.6.0
|
|
||||||
path_provider: ^2.1.5
|
path_provider: ^2.1.5
|
||||||
permission_handler: ^11.3.1
|
permission_handler: ^12.0.0
|
||||||
share_plus: ^10.1.4
|
share_plus: ^10.1.4
|
||||||
connectivity_plus: ^6.1.3
|
connectivity_plus: ^6.1.3
|
||||||
flutter_displaymode: ^0.6.0
|
flutter_displaymode: ^0.6.0
|
||||||
quick_actions: ^1.1.0
|
quick_actions: ^1.1.0
|
||||||
animated_list_plus: ^0.5.2
|
animated_list_plus: ^0.5.2
|
||||||
dynamic_color: ^1.7.0
|
dynamic_color: 1.7.0
|
||||||
material_color_utilities: ^0.11.1
|
material_color_utilities: ">=0.11.1 <0.14.0"
|
||||||
crypto: ^3.0.6
|
crypto: ^3.0.6
|
||||||
elegant_notification: ^2.4.1
|
elegant_notification: ^2.4.1
|
||||||
flutter_feather_icons: ^2.0.0+1
|
flutter_feather_icons: ^2.0.0+1
|
||||||
@@ -55,21 +55,22 @@ dependencies:
|
|||||||
image_picker: ^1.1.2
|
image_picker: ^1.1.2
|
||||||
animations: ^2.0.11
|
animations: ^2.0.11
|
||||||
background_fetch: ^1.3.7
|
background_fetch: ^1.3.7
|
||||||
flutter_local_notifications: ^18.0.1
|
flutter_local_notifications: ^19.0.0
|
||||||
package_info_plus: ^8.2.1
|
package_info_plus: ^8.2.1
|
||||||
screenshot: ^3.0.0
|
screenshot: ^3.0.0
|
||||||
flutter_staggered_grid_view: ^0.7.0
|
flutter_staggered_grid_view: ^0.7.0
|
||||||
image_crop_plus: ^1.0.0
|
image_crop_plus:
|
||||||
|
git:
|
||||||
|
url: https://github.com/wrbl606/image_crop
|
||||||
maps_launcher: ^3.0.0+1
|
maps_launcher: ^3.0.0+1
|
||||||
google_fonts: ^6.2.1
|
google_fonts: ^6.2.1
|
||||||
get_it: ^7.7.0
|
get_it: ^7.7.0
|
||||||
xml: ^6.5.0
|
xml: ^6.5.0
|
||||||
carousel_slider: ^5.0.0
|
carousel_slider: ^5.0.0
|
||||||
flutter_portal: ^1.1.4
|
flutter_portal: ^1.1.4
|
||||||
shake_flutter: ^17.1.0
|
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
webview_flutter_wkwebview: 3.17.0
|
intl: 0.20.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_launcher_icons: ^0.14.3
|
flutter_launcher_icons: ^0.14.3
|
||||||
@@ -127,4 +128,4 @@ flutter_native_splash:
|
|||||||
ios: true
|
ios: true
|
||||||
ios_content_mode: center
|
ios_content_mode: center
|
||||||
web: false
|
web: false
|
||||||
compress: true
|
compress: true
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
BSD 3-Clause License
|
|
||||||
|
|
||||||
Copyright (c) 2023, reFilc
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# refilc - Kréta library
|
||||||
|
|
||||||
|
### A következőket tartalmazza:
|
||||||
|
- endpointok elérési útvonalai
|
||||||
|
- refresh logika
|
||||||
|
- logika az endpointokhoz
|
||||||
|
|||||||
@@ -42,14 +42,17 @@ class TimetableController extends ChangeNotifier {
|
|||||||
|
|
||||||
static DateTime _getYearStart(int year) {
|
static DateTime _getYearStart(int year) {
|
||||||
var s1 = DateTime(year, DateTime.september, 1);
|
var s1 = DateTime(year, DateTime.september, 1);
|
||||||
if (s1.weekday == 6) {
|
if (s1.weekday == DateTime.saturday) {
|
||||||
s1.add(const Duration(days: 2));
|
s1 = s1.add(const Duration(days: 2, hours: 2));
|
||||||
} else if (s1.weekday == 7) {
|
} else if (s1.weekday == DateTime.sunday) {
|
||||||
s1.add(const Duration(days: 1));
|
s1 = s1.add(const Duration(days: 1, hours: 2));
|
||||||
|
} else {
|
||||||
|
s1 = s1.add(const Duration(hours: 2));
|
||||||
}
|
}
|
||||||
return s1;
|
return s1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Jump shortcuts
|
// Jump shortcuts
|
||||||
Future<void> next(BuildContext context) =>
|
Future<void> next(BuildContext context) =>
|
||||||
jump(Week.fromId(currentWeekId + 1), context: context);
|
jump(Week.fromId(currentWeekId + 1), context: context);
|
||||||
|
|||||||
394
refilc_kreta_api/lib/demo/demo_data.dart
Normal file
394
refilc_kreta_api/lib/demo/demo_data.dart
Normal file
@@ -0,0 +1,394 @@
|
|||||||
|
import 'package:refilc/models/user.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/absence.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/category.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/exam.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/grade.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/group_average.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/homework.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/lesson.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/message.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/recipient.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/subject.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/teacher.dart';
|
||||||
|
import 'package:refilc_kreta_api/models/week.dart';
|
||||||
|
|
||||||
|
class DemoData {
|
||||||
|
static final _subjectMath = GradeSubject(
|
||||||
|
id: 'demo-subject-math',
|
||||||
|
category: Category(id: 'matematika', name: 'matematika'),
|
||||||
|
name: 'Matematika',
|
||||||
|
);
|
||||||
|
static final _subjectHun = GradeSubject(
|
||||||
|
id: 'demo-subject-hun',
|
||||||
|
category: Category(id: 'magyar_nyelv_es_irodalom', name: 'magyar_nyelv_es_irodalom'),
|
||||||
|
name: 'Magyar nyelv és irodalom',
|
||||||
|
);
|
||||||
|
static final _subjectHist = GradeSubject(
|
||||||
|
id: 'demo-subject-hist',
|
||||||
|
category: Category(id: 'tortenelem_es_allampolgari_ismeretek', name: 'tortenelem_es_allampolgari_ismeretek'),
|
||||||
|
name: 'Történelem',
|
||||||
|
);
|
||||||
|
static final _subjectEng = GradeSubject(
|
||||||
|
id: 'demo-subject-eng',
|
||||||
|
category: Category(id: 'angol_nyelv', name: 'angol_nyelv'),
|
||||||
|
name: 'Angol nyelv',
|
||||||
|
);
|
||||||
|
static final _subjectPhy = GradeSubject(
|
||||||
|
id: 'demo-subject-phy',
|
||||||
|
category: Category(id: 'fizika', name: 'fizika'),
|
||||||
|
name: 'Fizika',
|
||||||
|
);
|
||||||
|
static final _subjectBio = GradeSubject(
|
||||||
|
id: 'demo-subject-bio',
|
||||||
|
category: Category(id: 'biologia_egeszsegtan', name: 'biologia_egeszsegtan'),
|
||||||
|
name: 'Biológia',
|
||||||
|
);
|
||||||
|
static final _subjectChem = GradeSubject(
|
||||||
|
id: 'demo-subject-chem',
|
||||||
|
category: Category(id: 'kemia', name: 'kemia'),
|
||||||
|
name: 'Kémia',
|
||||||
|
);
|
||||||
|
static final _subjectPE = GradeSubject(
|
||||||
|
id: 'demo-subject-pe',
|
||||||
|
category: Category(id: 'testnevelés_és_sport', name: 'testnevelés_és_sport'),
|
||||||
|
name: 'Testnevelés',
|
||||||
|
);
|
||||||
|
static final _subjectIT = GradeSubject(
|
||||||
|
id: 'demo-subject-it',
|
||||||
|
category: Category(id: 'informatika', name: 'informatika'),
|
||||||
|
name: 'Informatika',
|
||||||
|
);
|
||||||
|
|
||||||
|
static final _teacherNagy = Teacher.fromString('Nagy Katalin');
|
||||||
|
static final _teacherSzabo = Teacher.fromString('Szabó Péter');
|
||||||
|
static final _teacherKovacs = Teacher.fromString('Kovács Mária');
|
||||||
|
static final _teacherToth = Teacher.fromString('Tóth László');
|
||||||
|
static final _teacherVarga = Teacher.fromString('Varga Erzsébet');
|
||||||
|
static final _teacherFekete = Teacher.fromString('Fekete Gábor');
|
||||||
|
|
||||||
|
static final _modeOral = Category(id: '1,SzobaliVizsga', name: 'Szóbeli vizsga', description: 'Szóbeli vizsga');
|
||||||
|
static final _modeWritten = Category(id: '2,IrasbaliVizsga', name: 'Írásbeli vizsga', description: 'Írásbeli vizsga');
|
||||||
|
static final _modePractical = Category(id: '3,Gyakorlati', name: 'Gyakorlati', description: 'Gyakorlati');
|
||||||
|
|
||||||
|
static List<Grade> get grades {
|
||||||
|
final now = DateTime.now();
|
||||||
|
return [
|
||||||
|
_makeGrade('demo-g-1', 5, 'Jeles', 'Ötös', 100, _subjectMath, _teacherNagy, 'Függvények', now.subtract(const Duration(days: 3)), _modeWritten, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-2', 4, 'Jó', 'Négyes', 100, _subjectMath, _teacherNagy, 'Egyenletek', now.subtract(const Duration(days: 14)), _modeWritten, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-3', 5, 'Jeles', 'Ötös', 100, _subjectHun, _teacherKovacs, 'Arany János költészete', now.subtract(const Duration(days: 5)), _modeOral, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-4', 4, 'Jó', 'Négyes', 100, _subjectHun, _teacherKovacs, 'Fogalmazás', now.subtract(const Duration(days: 20)), _modeWritten, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-5', 5, 'Jeles', 'Ötös', 100, _subjectEng, _teacherSzabo, 'Grammar test', now.subtract(const Duration(days: 7)), _modeWritten, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-6', 5, 'Jeles', 'Ötös', 100, _subjectEng, _teacherSzabo, 'Speaking', now.subtract(const Duration(days: 18)), _modeOral, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-7', 4, 'Jó', 'Négyes', 100, _subjectHist, _teacherToth, 'Az első világháború', now.subtract(const Duration(days: 10)), _modeOral, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-8', 3, 'Közepes', 'Hármas', 100, _subjectHist, _teacherToth, 'Témazáró', now.subtract(const Duration(days: 25)), _modeWritten, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-9', 5, 'Jeles', 'Ötös', 100, _subjectPhy, _teacherVarga, 'Mechanika', now.subtract(const Duration(days: 8)), _modeWritten, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-10', 4, 'Jó', 'Négyes', 100, _subjectBio, _teacherFekete, 'Sejtbiológia', now.subtract(const Duration(days: 12)), _modeOral, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-11', 5, 'Jeles', 'Ötös', 100, _subjectChem, _teacherVarga, 'Kémiai kötések', now.subtract(const Duration(days: 6)), _modeWritten, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-12', 5, 'Jeles', 'Ötös', 100, _subjectIT, _teacherSzabo, 'Programozás alapjai', now.subtract(const Duration(days: 4)), _modePractical, GradeType.midYear),
|
||||||
|
_makeGrade('demo-g-13', 4, 'Jó', 'Négyes', 100, _subjectMath, _teacherNagy, 'Statisztika', now.subtract(const Duration(days: 30)), _modeWritten, GradeType.halfYear),
|
||||||
|
_makeGrade('demo-g-14', 5, 'Jeles', 'Ötös', 100, _subjectHun, _teacherKovacs, 'Félévzáró', now.subtract(const Duration(days: 60)), _modeWritten, GradeType.halfYear),
|
||||||
|
_makeGrade('demo-g-15', 4, 'Jó', 'Négyes', 100, _subjectEng, _teacherSzabo, 'Mid-year exam', now.subtract(const Duration(days: 60)), _modeWritten, GradeType.halfYear),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
static Grade _makeGrade(
|
||||||
|
String id,
|
||||||
|
int value,
|
||||||
|
String valueName,
|
||||||
|
String shortName,
|
||||||
|
int weight,
|
||||||
|
GradeSubject subject,
|
||||||
|
Teacher teacher,
|
||||||
|
String description,
|
||||||
|
DateTime date,
|
||||||
|
Category mode,
|
||||||
|
GradeType type,
|
||||||
|
) {
|
||||||
|
return Grade(
|
||||||
|
id: id,
|
||||||
|
date: date,
|
||||||
|
value: GradeValue(value, valueName, shortName, weight),
|
||||||
|
teacher: teacher,
|
||||||
|
description: description,
|
||||||
|
type: type,
|
||||||
|
groupId: 'demo-group',
|
||||||
|
subject: subject,
|
||||||
|
mode: mode,
|
||||||
|
writeDate: date,
|
||||||
|
seenDate: date,
|
||||||
|
form: '',
|
||||||
|
json: {
|
||||||
|
'SzamErtek': value,
|
||||||
|
'SzovegesErtek': valueName,
|
||||||
|
'SzovegesErtekelesRovidNev': shortName,
|
||||||
|
'SulySzazalekErteke': weight,
|
||||||
|
'ErtekFajta': null,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<Week, List<Lesson>> get timetable {
|
||||||
|
final week = Week.current();
|
||||||
|
return {week: _lessonsForWeek(week)};
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Lesson> _lessonsForWeek(Week week) {
|
||||||
|
final monday = week.start;
|
||||||
|
List<Lesson> lessons = [];
|
||||||
|
|
||||||
|
// Monday
|
||||||
|
lessons.addAll(_dayLessons(monday, [
|
||||||
|
_LessonDef('Matematika', _subjectMath, _teacherNagy, '101', '9A'),
|
||||||
|
_LessonDef('Magyar nyelv és irodalom', _subjectHun, _teacherKovacs, '203', '9A'),
|
||||||
|
_LessonDef('Történelem', _subjectHist, _teacherToth, '105', '9A'),
|
||||||
|
_LessonDef('Angol nyelv', _subjectEng, _teacherSzabo, '102', '9A'),
|
||||||
|
_LessonDef('Testnevelés', _subjectPE, _teacherFekete, 'Tornaterem', '9A'),
|
||||||
|
]));
|
||||||
|
|
||||||
|
// Tuesday
|
||||||
|
lessons.addAll(_dayLessons(monday.add(const Duration(days: 1)), [
|
||||||
|
_LessonDef('Fizika', _subjectPhy, _teacherVarga, '204', '9A'),
|
||||||
|
_LessonDef('Biológia', _subjectBio, _teacherFekete, '205', '9A'),
|
||||||
|
_LessonDef('Matematika', _subjectMath, _teacherNagy, '101', '9A'),
|
||||||
|
_LessonDef('Informatika', _subjectIT, _teacherSzabo, 'Számítóterem', '9A'),
|
||||||
|
]));
|
||||||
|
|
||||||
|
// Wednesday
|
||||||
|
lessons.addAll(_dayLessons(monday.add(const Duration(days: 2)), [
|
||||||
|
_LessonDef('Magyar nyelv és irodalom', _subjectHun, _teacherKovacs, '203', '9A'),
|
||||||
|
_LessonDef('Kémia', _subjectChem, _teacherVarga, '206', '9A'),
|
||||||
|
_LessonDef('Angol nyelv', _subjectEng, _teacherSzabo, '102', '9A'),
|
||||||
|
_LessonDef('Történelem', _subjectHist, _teacherToth, '105', '9A'),
|
||||||
|
_LessonDef('Testnevelés', _subjectPE, _teacherFekete, 'Tornaterem', '9A'),
|
||||||
|
]));
|
||||||
|
|
||||||
|
// Thursday
|
||||||
|
lessons.addAll(_dayLessons(monday.add(const Duration(days: 3)), [
|
||||||
|
_LessonDef('Matematika', _subjectMath, _teacherNagy, '101', '9A'),
|
||||||
|
_LessonDef('Biológia', _subjectBio, _teacherFekete, '205', '9A'),
|
||||||
|
_LessonDef('Fizika', _subjectPhy, _teacherVarga, '204', '9A'),
|
||||||
|
_LessonDef('Informatika', _subjectIT, _teacherSzabo, 'Számítóterem', '9A'),
|
||||||
|
]));
|
||||||
|
|
||||||
|
// Friday
|
||||||
|
lessons.addAll(_dayLessons(monday.add(const Duration(days: 4)), [
|
||||||
|
_LessonDef('Magyar nyelv és irodalom', _subjectHun, _teacherKovacs, '203', '9A'),
|
||||||
|
_LessonDef('Kémia', _subjectChem, _teacherVarga, '206', '9A'),
|
||||||
|
_LessonDef('Matematika', _subjectMath, _teacherNagy, '101', '9A'),
|
||||||
|
_LessonDef('Angol nyelv', _subjectEng, _teacherSzabo, '102', '9A'),
|
||||||
|
]));
|
||||||
|
|
||||||
|
return lessons;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Lesson> _dayLessons(DateTime day, List<_LessonDef> defs) {
|
||||||
|
final List<Lesson> result = [];
|
||||||
|
// School starts at 8:00, each lesson is 45 min, 15 min break
|
||||||
|
DateTime time = DateTime(day.year, day.month, day.day, 8, 0);
|
||||||
|
for (int i = 0; i < defs.length; i++) {
|
||||||
|
final def = defs[i];
|
||||||
|
final start = time;
|
||||||
|
final end = time.add(const Duration(minutes: 45));
|
||||||
|
result.add(Lesson(
|
||||||
|
id: 'demo-lesson-${day.weekday}-$i',
|
||||||
|
date: day,
|
||||||
|
subject: def.subject,
|
||||||
|
lessonIndex: '${i + 1}',
|
||||||
|
teacher: def.teacher,
|
||||||
|
start: start,
|
||||||
|
end: end,
|
||||||
|
homeworkId: '',
|
||||||
|
description: '',
|
||||||
|
room: def.room,
|
||||||
|
groupName: def.group,
|
||||||
|
name: def.name,
|
||||||
|
));
|
||||||
|
time = end.add(const Duration(minutes: 15));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Absence> get absences {
|
||||||
|
final now = DateTime.now();
|
||||||
|
return [
|
||||||
|
_makeAbsence('demo-abs-1', _subjectMath, _teacherNagy, now.subtract(const Duration(days: 15)), Justification.excused),
|
||||||
|
_makeAbsence('demo-abs-2', _subjectMath, _teacherNagy, now.subtract(const Duration(days: 15)), Justification.excused),
|
||||||
|
_makeAbsence('demo-abs-3', _subjectHun, _teacherKovacs, now.subtract(const Duration(days: 15)), Justification.excused),
|
||||||
|
_makeAbsence('demo-abs-4', _subjectEng, _teacherSzabo, now.subtract(const Duration(days: 8)), Justification.pending),
|
||||||
|
_makeAbsence('demo-abs-5', _subjectHist, _teacherToth, now.subtract(const Duration(days: 8)), Justification.pending),
|
||||||
|
_makeAbsence('demo-abs-6', _subjectPhy, _teacherVarga, now.subtract(const Duration(days: 2)), Justification.unexcused),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
static Absence _makeAbsence(
|
||||||
|
String id,
|
||||||
|
GradeSubject subject,
|
||||||
|
Teacher teacher,
|
||||||
|
DateTime date,
|
||||||
|
Justification state,
|
||||||
|
) {
|
||||||
|
final start = DateTime(date.year, date.month, date.day, 8, 0);
|
||||||
|
final end = start.add(const Duration(minutes: 45));
|
||||||
|
return Absence(
|
||||||
|
id: id,
|
||||||
|
date: date,
|
||||||
|
delay: 0,
|
||||||
|
submitDate: date,
|
||||||
|
teacher: teacher,
|
||||||
|
state: state,
|
||||||
|
subject: subject,
|
||||||
|
lessonStart: start,
|
||||||
|
lessonEnd: end,
|
||||||
|
group: 'demo-group',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Exam> get exams {
|
||||||
|
final now = DateTime.now();
|
||||||
|
return [
|
||||||
|
Exam(
|
||||||
|
id: 'demo-exam-1',
|
||||||
|
date: now.subtract(const Duration(days: 3)),
|
||||||
|
writeDate: now.add(const Duration(days: 7)),
|
||||||
|
subject: _subjectMath,
|
||||||
|
teacher: _teacherNagy,
|
||||||
|
description: 'Trigonometria témazáró',
|
||||||
|
group: 'demo-group',
|
||||||
|
),
|
||||||
|
Exam(
|
||||||
|
id: 'demo-exam-2',
|
||||||
|
date: now.subtract(const Duration(days: 5)),
|
||||||
|
writeDate: now.add(const Duration(days: 12)),
|
||||||
|
subject: _subjectHun,
|
||||||
|
teacher: _teacherKovacs,
|
||||||
|
description: 'Petőfi Sándor életmű dolgozat',
|
||||||
|
group: 'demo-group',
|
||||||
|
),
|
||||||
|
Exam(
|
||||||
|
id: 'demo-exam-3',
|
||||||
|
date: now.subtract(const Duration(days: 1)),
|
||||||
|
writeDate: now.add(const Duration(days: 5)),
|
||||||
|
subject: _subjectPhy,
|
||||||
|
teacher: _teacherVarga,
|
||||||
|
description: 'Elektromosságtan',
|
||||||
|
group: 'demo-group',
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Homework> get homework {
|
||||||
|
final now = DateTime.now();
|
||||||
|
return [
|
||||||
|
Homework(
|
||||||
|
id: 'demo-hw-1',
|
||||||
|
date: now.subtract(const Duration(days: 2)),
|
||||||
|
lessonDate: now.subtract(const Duration(days: 2)),
|
||||||
|
deadline: now.add(const Duration(days: 5)),
|
||||||
|
byTeacher: true,
|
||||||
|
homeworkEnabled: true,
|
||||||
|
teacher: _teacherNagy,
|
||||||
|
content: 'Oldjátok meg a tankönyv 84-85. oldalán lévő feladatokat (1-15).',
|
||||||
|
subject: _subjectMath,
|
||||||
|
group: 'demo-group',
|
||||||
|
attachments: [],
|
||||||
|
),
|
||||||
|
Homework(
|
||||||
|
id: 'demo-hw-2',
|
||||||
|
date: now.subtract(const Duration(days: 4)),
|
||||||
|
lessonDate: now.subtract(const Duration(days: 4)),
|
||||||
|
deadline: now.add(const Duration(days: 3)),
|
||||||
|
byTeacher: true,
|
||||||
|
homeworkEnabled: true,
|
||||||
|
teacher: _teacherKovacs,
|
||||||
|
content: 'Írjatok egy 1-2 oldalas elemzést Petőfi Sándor "Szeptember végén" c. verséről.',
|
||||||
|
subject: _subjectHun,
|
||||||
|
group: 'demo-group',
|
||||||
|
attachments: [],
|
||||||
|
),
|
||||||
|
Homework(
|
||||||
|
id: 'demo-hw-3',
|
||||||
|
date: now.subtract(const Duration(days: 1)),
|
||||||
|
lessonDate: now.subtract(const Duration(days: 1)),
|
||||||
|
deadline: now.add(const Duration(days: 6)),
|
||||||
|
byTeacher: true,
|
||||||
|
homeworkEnabled: true,
|
||||||
|
teacher: _teacherSzabo,
|
||||||
|
content: 'Complete exercises 3-7 on page 42 of the workbook.',
|
||||||
|
subject: _subjectEng,
|
||||||
|
group: 'demo-group',
|
||||||
|
attachments: [],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Message> get messages {
|
||||||
|
final now = DateTime.now();
|
||||||
|
return [
|
||||||
|
Message(
|
||||||
|
id: 10001,
|
||||||
|
messageId: 10001,
|
||||||
|
seen: true,
|
||||||
|
deleted: false,
|
||||||
|
date: now.subtract(const Duration(days: 1)),
|
||||||
|
author: 'Nagy Katalin',
|
||||||
|
content: 'Kedves Szülők!\n\nTájékoztatjuk Önöket, hogy jövő héten pótdolgozatot írunk matematikából. Kérem, segítsenek gyermeküknek a felkészülésben.\n\nÜdvözlettel,\nNagy Katalin',
|
||||||
|
subject: 'Pótdolgozat - Matematika',
|
||||||
|
type: MessageType.inbox,
|
||||||
|
recipients: [Recipient(id: 1, name: 'Demo Diák', kretaId: 1)],
|
||||||
|
attachments: [],
|
||||||
|
isSeen: true,
|
||||||
|
),
|
||||||
|
Message(
|
||||||
|
id: 10002,
|
||||||
|
messageId: 10002,
|
||||||
|
seen: false,
|
||||||
|
deleted: false,
|
||||||
|
date: now.subtract(const Duration(days: 3)),
|
||||||
|
author: 'Kovács Mária',
|
||||||
|
content: 'Kedves Diákok!\n\nEmlékeztetem Önöket, hogy a fogalmazást péntekig be kell adni. Kérem, ne felejtsék el!\n\nÜdvözlettel,\nKovács Mária',
|
||||||
|
subject: 'Fogalmazás határideje',
|
||||||
|
type: MessageType.inbox,
|
||||||
|
recipients: [Recipient(id: 1, name: 'Demo Diák', kretaId: 1)],
|
||||||
|
attachments: [],
|
||||||
|
isSeen: false,
|
||||||
|
),
|
||||||
|
Message(
|
||||||
|
id: 10003,
|
||||||
|
messageId: 10003,
|
||||||
|
seen: true,
|
||||||
|
deleted: false,
|
||||||
|
date: now.subtract(const Duration(days: 7)),
|
||||||
|
author: 'Tóth László',
|
||||||
|
content: 'Kedves Szülők!\n\nAz osztálykirándulás időpontja: március 20. Kérem, hogy a beleegyező nyilatkozatot hozzák vissza aláírva.\n\nÜdvözlettel,\nTóth László\nosztályfőnök',
|
||||||
|
subject: 'Osztálykirándulás',
|
||||||
|
type: MessageType.inbox,
|
||||||
|
recipients: [Recipient(id: 1, name: 'Demo Diák', kretaId: 1)],
|
||||||
|
attachments: [],
|
||||||
|
isSeen: true,
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<GroupAverage> get groupAverages => [
|
||||||
|
GroupAverage(uid: 'demo-avg-math', average: 4.2, subject: _subjectMath),
|
||||||
|
GroupAverage(uid: 'demo-avg-hun', average: 3.8, subject: _subjectHun),
|
||||||
|
GroupAverage(uid: 'demo-avg-hist', average: 3.9, subject: _subjectHist),
|
||||||
|
GroupAverage(uid: 'demo-avg-eng', average: 4.5, subject: _subjectEng),
|
||||||
|
GroupAverage(uid: 'demo-avg-phy', average: 3.6, subject: _subjectPhy),
|
||||||
|
GroupAverage(uid: 'demo-avg-bio', average: 4.1, subject: _subjectBio),
|
||||||
|
GroupAverage(uid: 'demo-avg-chem', average: 3.7, subject: _subjectChem),
|
||||||
|
GroupAverage(uid: 'demo-avg-pe', average: 4.8, subject: _subjectPE),
|
||||||
|
GroupAverage(uid: 'demo-avg-it', average: 4.3, subject: _subjectIT),
|
||||||
|
];
|
||||||
|
|
||||||
|
static bool isDemo(String? userId) => userId == demoUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LessonDef {
|
||||||
|
final String name;
|
||||||
|
final GradeSubject subject;
|
||||||
|
final Teacher teacher;
|
||||||
|
final String room;
|
||||||
|
final String group;
|
||||||
|
const _LessonDef(this.name, this.subject, this.teacher, this.room, this.group);
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import 'package:refilc/api/providers/database_provider.dart';
|
|||||||
import 'package:refilc/models/user.dart';
|
import 'package:refilc/models/user.dart';
|
||||||
import 'package:refilc_kreta_api/client/api.dart';
|
import 'package:refilc_kreta_api/client/api.dart';
|
||||||
import 'package:refilc_kreta_api/client/client.dart';
|
import 'package:refilc_kreta_api/client/client.dart';
|
||||||
|
import 'package:refilc_kreta_api/demo/demo_data.dart';
|
||||||
import 'package:refilc_kreta_api/models/absence.dart';
|
import 'package:refilc_kreta_api/models/absence.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
@@ -81,6 +82,12 @@ class AbsenceProvider with ChangeNotifier {
|
|||||||
Future<void> fetch() async {
|
Future<void> fetch() async {
|
||||||
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
||||||
if (user == null) throw "Cannot fetch Absences for User null";
|
if (user == null) throw "Cannot fetch Absences for User null";
|
||||||
|
|
||||||
|
if (DemoData.isDemo(user.id)) {
|
||||||
|
await store(DemoData.absences);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String iss = user.instituteCode;
|
String iss = user.instituteCode;
|
||||||
|
|
||||||
List? absencesJson = await Provider.of<KretaClient>(_context, listen: false)
|
List? absencesJson = await Provider.of<KretaClient>(_context, listen: false)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:refilc/api/providers/database_provider.dart';
|
|||||||
import 'package:refilc/models/user.dart';
|
import 'package:refilc/models/user.dart';
|
||||||
import 'package:refilc_kreta_api/client/api.dart';
|
import 'package:refilc_kreta_api/client/api.dart';
|
||||||
import 'package:refilc_kreta_api/client/client.dart';
|
import 'package:refilc_kreta_api/client/client.dart';
|
||||||
|
import 'package:refilc_kreta_api/demo/demo_data.dart';
|
||||||
import 'package:refilc_kreta_api/models/event.dart';
|
import 'package:refilc_kreta_api/models/event.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
@@ -40,6 +41,7 @@ class EventProvider with ChangeNotifier {
|
|||||||
Future<void> fetch() async {
|
Future<void> fetch() async {
|
||||||
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
||||||
if (user == null) throw "Cannot fetch Events for User null";
|
if (user == null) throw "Cannot fetch Events for User null";
|
||||||
|
if (DemoData.isDemo(user.id)) return;
|
||||||
String iss = user.instituteCode;
|
String iss = user.instituteCode;
|
||||||
|
|
||||||
List? eventsJson = await Provider.of<KretaClient>(_context, listen: false)
|
List? eventsJson = await Provider.of<KretaClient>(_context, listen: false)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:refilc/api/providers/database_provider.dart';
|
|||||||
import 'package:refilc/models/user.dart';
|
import 'package:refilc/models/user.dart';
|
||||||
import 'package:refilc_kreta_api/client/api.dart';
|
import 'package:refilc_kreta_api/client/api.dart';
|
||||||
import 'package:refilc_kreta_api/client/client.dart';
|
import 'package:refilc_kreta_api/client/client.dart';
|
||||||
|
import 'package:refilc_kreta_api/demo/demo_data.dart';
|
||||||
import 'package:refilc_kreta_api/models/exam.dart';
|
import 'package:refilc_kreta_api/models/exam.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
@@ -68,6 +69,12 @@ class ExamProvider with ChangeNotifier {
|
|||||||
Future<void> fetch() async {
|
Future<void> fetch() async {
|
||||||
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
||||||
if (user == null) throw "Cannot fetch Exams for User null";
|
if (user == null) throw "Cannot fetch Exams for User null";
|
||||||
|
|
||||||
|
if (DemoData.isDemo(user.id)) {
|
||||||
|
await store(DemoData.exams);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String iss = user.instituteCode;
|
String iss = user.instituteCode;
|
||||||
|
|
||||||
List? examsJson = await Provider.of<KretaClient>(_context, listen: false)
|
List? examsJson = await Provider.of<KretaClient>(_context, listen: false)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:refilc/models/settings.dart';
|
|||||||
import 'package:refilc/models/user.dart';
|
import 'package:refilc/models/user.dart';
|
||||||
import 'package:refilc_kreta_api/client/api.dart';
|
import 'package:refilc_kreta_api/client/api.dart';
|
||||||
import 'package:refilc_kreta_api/client/client.dart';
|
import 'package:refilc_kreta_api/client/client.dart';
|
||||||
|
import 'package:refilc_kreta_api/demo/demo_data.dart';
|
||||||
import 'package:refilc_kreta_api/models/grade.dart';
|
import 'package:refilc_kreta_api/models/grade.dart';
|
||||||
import 'package:refilc_kreta_api/models/group_average.dart';
|
import 'package:refilc_kreta_api/models/group_average.dart';
|
||||||
import 'package:refilc_kreta_api/providers/grade_provider.i18n.dart';
|
import 'package:refilc_kreta_api/providers/grade_provider.i18n.dart';
|
||||||
@@ -164,11 +165,15 @@ Future<void> unseenAll() async {
|
|||||||
|
|
||||||
// Fetches Grades from the Kreta API then stores them in the database
|
// Fetches Grades from the Kreta API then stores them in the database
|
||||||
Future<void> fetch() async {
|
Future<void> fetch() async {
|
||||||
// test cucc
|
|
||||||
// unseenAll();
|
|
||||||
|
|
||||||
User? user = _user.user;
|
User? user = _user.user;
|
||||||
if (user == null) throw "Cannot fetch Grades for User null";
|
if (user == null) throw "Cannot fetch Grades for User null";
|
||||||
|
|
||||||
|
if (DemoData.isDemo(user.id)) {
|
||||||
|
await store(DemoData.grades);
|
||||||
|
await storeGroupAvg(DemoData.groupAverages);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String iss = user.instituteCode;
|
String iss = user.instituteCode;
|
||||||
|
|
||||||
List? gradesJson = await _kreta.getAPI(KretaAPI.grades(iss));
|
List? gradesJson = await _kreta.getAPI(KretaAPI.grades(iss));
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:refilc/api/providers/database_provider.dart';
|
|||||||
import 'package:refilc/models/user.dart';
|
import 'package:refilc/models/user.dart';
|
||||||
import 'package:refilc_kreta_api/client/api.dart';
|
import 'package:refilc_kreta_api/client/api.dart';
|
||||||
import 'package:refilc_kreta_api/client/client.dart';
|
import 'package:refilc_kreta_api/client/client.dart';
|
||||||
|
import 'package:refilc_kreta_api/demo/demo_data.dart';
|
||||||
import 'package:refilc_kreta_api/models/homework.dart';
|
import 'package:refilc_kreta_api/models/homework.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -75,6 +76,12 @@ class HomeworkProvider with ChangeNotifier {
|
|||||||
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
||||||
if (user == null) throw "Cannot fetch Homework for User null";
|
if (user == null) throw "Cannot fetch Homework for User null";
|
||||||
|
|
||||||
|
if (DemoData.isDemo(user.id)) {
|
||||||
|
_homework = DemoData.homework;
|
||||||
|
notifyListeners();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String iss = user.instituteCode;
|
String iss = user.instituteCode;
|
||||||
|
|
||||||
List? homeworkJson = [];
|
List? homeworkJson = [];
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:refilc/api/providers/database_provider.dart';
|
|||||||
import 'package:refilc/models/user.dart';
|
import 'package:refilc/models/user.dart';
|
||||||
import 'package:refilc_kreta_api/client/api.dart';
|
import 'package:refilc_kreta_api/client/api.dart';
|
||||||
import 'package:refilc_kreta_api/client/client.dart';
|
import 'package:refilc_kreta_api/client/client.dart';
|
||||||
|
import 'package:refilc_kreta_api/demo/demo_data.dart';
|
||||||
import 'package:refilc_kreta_api/models/message.dart';
|
import 'package:refilc_kreta_api/models/message.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
@@ -53,13 +54,21 @@ class MessageProvider with ChangeNotifier {
|
|||||||
Future<void> fetch({MessageType type = MessageType.inbox}) async {
|
Future<void> fetch({MessageType type = MessageType.inbox}) async {
|
||||||
// Check Message Type
|
// Check Message Type
|
||||||
if (type == MessageType.draft) return;
|
if (type == MessageType.draft) return;
|
||||||
String messageType =
|
|
||||||
["beerkezett", "elkuldott", "torolt"].elementAt(type.index);
|
|
||||||
|
|
||||||
// Check User
|
// Check User
|
||||||
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
||||||
if (user == null) throw "Cannot fetch Messages for User null";
|
if (user == null) throw "Cannot fetch Messages for User null";
|
||||||
|
|
||||||
|
if (DemoData.isDemo(user.id)) {
|
||||||
|
if (type == MessageType.inbox) {
|
||||||
|
await store(DemoData.messages, type);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String messageType =
|
||||||
|
["beerkezett", "elkuldott", "torolt"].elementAt(type.index);
|
||||||
|
|
||||||
// Get messages
|
// Get messages
|
||||||
List? messagesJson = await Provider.of<KretaClient>(_context, listen: false)
|
List? messagesJson = await Provider.of<KretaClient>(_context, listen: false)
|
||||||
.getAPI(KretaAPI.messages(messageType));
|
.getAPI(KretaAPI.messages(messageType));
|
||||||
@@ -127,6 +136,8 @@ class MessageProvider with ChangeNotifier {
|
|||||||
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
||||||
if (user == null) throw "Cannot fetch Messages for User null";
|
if (user == null) throw "Cannot fetch Messages for User null";
|
||||||
|
|
||||||
|
if (DemoData.isDemo(user.id)) return;
|
||||||
|
|
||||||
// get categories
|
// get categories
|
||||||
List? availableCategoriesJson =
|
List? availableCategoriesJson =
|
||||||
await Provider.of<KretaClient>(_context, listen: false)
|
await Provider.of<KretaClient>(_context, listen: false)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:refilc/api/providers/database_provider.dart';
|
|||||||
import 'package:refilc/models/user.dart';
|
import 'package:refilc/models/user.dart';
|
||||||
import 'package:refilc_kreta_api/client/api.dart';
|
import 'package:refilc_kreta_api/client/api.dart';
|
||||||
import 'package:refilc_kreta_api/client/client.dart';
|
import 'package:refilc_kreta_api/client/client.dart';
|
||||||
|
import 'package:refilc_kreta_api/demo/demo_data.dart';
|
||||||
import 'package:refilc_kreta_api/models/note.dart';
|
import 'package:refilc_kreta_api/models/note.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
@@ -39,6 +40,7 @@ class NoteProvider with ChangeNotifier {
|
|||||||
Future<void> fetch() async {
|
Future<void> fetch() async {
|
||||||
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
||||||
if (user == null) throw "Cannot fetch Notes for User null";
|
if (user == null) throw "Cannot fetch Notes for User null";
|
||||||
|
if (DemoData.isDemo(user.id)) return;
|
||||||
String iss = user.instituteCode;
|
String iss = user.instituteCode;
|
||||||
|
|
||||||
List? notesJson = await Provider.of<KretaClient>(_context, listen: false)
|
List? notesJson = await Provider.of<KretaClient>(_context, listen: false)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import 'package:refilc/models/shared_theme.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
import 'package:refilc/models/user.dart';
|
|
||||||
|
|
||||||
List? _cachedThemesJson;
|
List? _cachedThemesJson;
|
||||||
|
|
||||||
@@ -113,9 +112,7 @@ class ShareProvider extends ChangeNotifier {
|
|||||||
Future<List<SharedTheme>> getAllPublicThemes(BuildContext context,
|
Future<List<SharedTheme>> getAllPublicThemes(BuildContext context,
|
||||||
{int offset = 0, int limit = 10}) async {
|
{int offset = 0, int limit = 10}) async {
|
||||||
// Fetch all themes only once if not already fetched
|
// Fetch all themes only once if not already fetched
|
||||||
if (_cachedThemesJson == null) {
|
_cachedThemesJson ??= await FilcAPI.getAllSharedThemes(0);
|
||||||
_cachedThemesJson = await FilcAPI.getAllSharedThemes(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<SharedTheme> themes = [];
|
List<SharedTheme> themes = [];
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ import 'package:refilc/api/providers/database_provider.dart';
|
|||||||
import 'package:refilc/models/user.dart';
|
import 'package:refilc/models/user.dart';
|
||||||
import 'package:refilc_kreta_api/client/api.dart';
|
import 'package:refilc_kreta_api/client/api.dart';
|
||||||
import 'package:refilc_kreta_api/client/client.dart';
|
import 'package:refilc_kreta_api/client/client.dart';
|
||||||
|
import 'package:refilc_kreta_api/demo/demo_data.dart';
|
||||||
import 'package:refilc_kreta_api/models/lesson.dart';
|
import 'package:refilc_kreta_api/models/lesson.dart';
|
||||||
import 'package:refilc_kreta_api/models/week.dart';
|
import 'package:refilc_kreta_api/models/week.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
class TimetableProvider with ChangeNotifier {
|
class TimetableProvider with ChangeNotifier {
|
||||||
Map<Week, List<Lesson>> lessons = {};
|
Map<Week, List<Lesson>> lessons = {};
|
||||||
|
String? _activeUserId;
|
||||||
late final UserProvider _user;
|
late final UserProvider _user;
|
||||||
late final DatabaseProvider _database;
|
late final DatabaseProvider _database;
|
||||||
late final KretaClient _kreta;
|
late final KretaClient _kreta;
|
||||||
@@ -20,17 +22,38 @@ class TimetableProvider with ChangeNotifier {
|
|||||||
}) : _user = user,
|
}) : _user = user,
|
||||||
_database = database,
|
_database = database,
|
||||||
_kreta = kreta {
|
_kreta = kreta {
|
||||||
|
_user.addListener(_onUserChanged);
|
||||||
|
restoreUser();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_user.removeListener(_onUserChanged);
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onUserChanged() {
|
||||||
|
final userId = _user.id;
|
||||||
|
if (userId == _activeUserId) return;
|
||||||
|
|
||||||
|
_activeUserId = userId;
|
||||||
|
lessons = {};
|
||||||
|
notifyListeners();
|
||||||
restoreUser();
|
restoreUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> restoreUser() async {
|
Future<void> restoreUser() async {
|
||||||
String? userId = _user.id;
|
String? userId = _user.id;
|
||||||
|
_activeUserId = userId;
|
||||||
|
|
||||||
// Load lessons from the database
|
// Load lessons from the database
|
||||||
if (userId != null) {
|
if (userId != null) {
|
||||||
var dbLessons = await _database.userQuery.getLessons(userId: userId);
|
var dbLessons = await _database.userQuery.getLessons(userId: userId);
|
||||||
lessons = dbLessons;
|
lessons = dbLessons;
|
||||||
await convertBySettings();
|
await convertBySettings();
|
||||||
|
} else {
|
||||||
|
lessons = {};
|
||||||
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,8 +94,21 @@ class TimetableProvider with ChangeNotifier {
|
|||||||
// Fetches Lessons from the Kreta API then stores them in the database
|
// Fetches Lessons from the Kreta API then stores them in the database
|
||||||
Future<void> fetch({Week? week}) async {
|
Future<void> fetch({Week? week}) async {
|
||||||
if (week == null) return;
|
if (week == null) return;
|
||||||
|
|
||||||
|
if (_activeUserId != _user.id) {
|
||||||
|
_activeUserId = _user.id;
|
||||||
|
await restoreUser();
|
||||||
|
}
|
||||||
|
|
||||||
User? user = _user.user;
|
User? user = _user.user;
|
||||||
if (user == null) throw "Cannot fetch Lessons for User null";
|
if (user == null) throw "Cannot fetch Lessons for User null";
|
||||||
|
|
||||||
|
if (DemoData.isDemo(user.id)) {
|
||||||
|
lessons = DemoData.timetable;
|
||||||
|
notifyListeners();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String iss = user.instituteCode;
|
String iss = user.instituteCode;
|
||||||
|
|
||||||
List? lessonsJson;
|
List? lessonsJson;
|
||||||
|
|||||||
@@ -12,12 +12,13 @@ dependencies:
|
|||||||
http: ^1.3.0
|
http: ^1.3.0
|
||||||
provider: ^6.1.2
|
provider: ^6.1.2
|
||||||
file_picker: ^8.3.7
|
file_picker: ^8.3.7
|
||||||
intl: ^0.19.0
|
intl: ^0.20.2
|
||||||
i18n_extension: ^12.0.1
|
i18n_extension: ^12.0.1
|
||||||
uuid: ^4.5.1
|
uuid: ^4.5.1
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
webview_flutter_wkwebview: 3.17.0
|
webview_flutter_wkwebview: 3.17.0
|
||||||
|
intl: 0.20.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_lints: ^5.0.0
|
flutter_lints: ^5.0.0
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
BSD 3-Clause License
|
|
||||||
|
|
||||||
Copyright (c) 2023, reFilc
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# refilc - felület library
|
||||||
|
|
||||||
|
### A következőket tartalmazza:
|
||||||
|
- oldalak elrendezése
|
||||||
|
- oldalakon használt elemek logikája
|
||||||
|
- kréta bejelentkezés logikája
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:refilc/theme/colors/colors.dart';
|
import 'package:refilc/theme/colors/colors.dart';
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ extension Localization on String {
|
|||||||
"Messages": "Üzenetek",
|
"Messages": "Üzenetek",
|
||||||
"Absences": "Hiányok",
|
"Absences": "Hiányok",
|
||||||
"update_available": "Frissítés elérhető",
|
"update_available": "Frissítés elérhető",
|
||||||
"missed_exams": "Ezen a héten hiányoztál %s dolgozatról.",
|
"missed_exams": "Ezen a héten hiányoztál %s számonkérésről.",
|
||||||
"missed_exam_contact": "Keresd %s-t, ha pótolni szeretnéd!",
|
"missed_exam_contact": "Keresd %s-t, ha pótolni szeretnéd!",
|
||||||
},
|
},
|
||||||
"de_de": {
|
"de_de": {
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
import 'package:refilc/models/release.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:refilc_mobile_ui/common/panel/panel_button.dart';
|
|
||||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
|
||||||
import 'update_tile.i18n.dart';
|
|
||||||
|
|
||||||
class UpdateTile extends StatelessWidget {
|
|
||||||
const UpdateTile(this.release, {super.key, this.onTap, this.padding});
|
|
||||||
|
|
||||||
final Release release;
|
|
||||||
final Function()? onTap;
|
|
||||||
final EdgeInsetsGeometry? padding;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Padding(
|
|
||||||
padding: padding ?? const EdgeInsets.symmetric(horizontal: 8.0),
|
|
||||||
child: PanelButton(
|
|
||||||
onPressed: onTap,
|
|
||||||
title: Text("update_available".i18n),
|
|
||||||
leading: const Icon(FeatherIcons.download),
|
|
||||||
trailing: Text(
|
|
||||||
release.tag,
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
import 'package:i18n_extension/i18n_extension.dart';
|
|
||||||
|
|
||||||
extension Localization on String {
|
|
||||||
static final _t = Translations.byLocale("hu_hu") +
|
|
||||||
{
|
|
||||||
"en_en": {
|
|
||||||
"update_available": "Update Available",
|
|
||||||
},
|
|
||||||
"hu_hu": {
|
|
||||||
"update_available": "Frissítés elérhető",
|
|
||||||
},
|
|
||||||
"de_de": {
|
|
||||||
"update_available": "Update verfügbar",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
String get i18n => localize(this, _t);
|
|
||||||
String fill(List<Object> params) => localizeFill(this, params);
|
|
||||||
String plural(int value) => localizePlural(value, this, _t);
|
|
||||||
String version(Object modifier) => localizeVersion(modifier, this, _t);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import 'package:refilc/models/release.dart';
|
|
||||||
import 'package:refilc_mobile_ui/common/widgets/update/update_tile.dart';
|
|
||||||
import 'package:refilc_mobile_ui/common/widgets/update/updates_view.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class UpdateViewable extends StatelessWidget {
|
|
||||||
const UpdateViewable(this.release, {super.key});
|
|
||||||
|
|
||||||
final Release release;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return UpdateTile(
|
|
||||||
release,
|
|
||||||
onTap: () => UpdateView.show(release, context: context),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,185 +0,0 @@
|
|||||||
import 'package:refilc/api/providers/status_provider.dart';
|
|
||||||
import 'package:refilc/models/release.dart';
|
|
||||||
import 'package:refilc/theme/colors/colors.dart';
|
|
||||||
import 'package:refilc/utils/color.dart';
|
|
||||||
import 'package:refilc_mobile_ui/common/bottom_card.dart';
|
|
||||||
import 'package:refilc_mobile_ui/common/custom_snack_bar.dart';
|
|
||||||
import 'package:refilc_mobile_ui/common/material_action_button.dart';
|
|
||||||
import 'package:refilc/helpers/update_helper.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_custom_tabs/flutter_custom_tabs.dart';
|
|
||||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
|
||||||
import 'updates_view.i18n.dart';
|
|
||||||
|
|
||||||
class UpdateView extends StatefulWidget {
|
|
||||||
const UpdateView(this.release, {super.key});
|
|
||||||
|
|
||||||
final Release release;
|
|
||||||
|
|
||||||
static void show(Release release, {required BuildContext context}) =>
|
|
||||||
showBottomCard(context: context, child: UpdateView(release));
|
|
||||||
|
|
||||||
@override
|
|
||||||
UpdateViewState createState() => UpdateViewState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class UpdateViewState extends State<UpdateView> {
|
|
||||||
double progress = 0.0;
|
|
||||||
UpdateState state = UpdateState.none;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.all(12.0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"new_update".i18n,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontWeight: FontWeight.w700, fontSize: 18.0),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"${widget.release.version}",
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
fontSize: 16.0,
|
|
||||||
color:
|
|
||||||
AppColors.of(context).text.withValues(alpha: 0.6),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
ClipRRect(
|
|
||||||
borderRadius: BorderRadius.circular(18.0),
|
|
||||||
child: Image.asset(
|
|
||||||
"assets/images/pixel.png",
|
|
||||||
width: 64.0,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
// Description
|
|
||||||
Container(
|
|
||||||
margin: const EdgeInsets.only(top: 8.0),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
|
||||||
),
|
|
||||||
child: SizedBox(
|
|
||||||
height: 200.0,
|
|
||||||
child: Markdown(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
|
||||||
physics: const BouncingScrollPhysics(),
|
|
||||||
data: widget.release.body,
|
|
||||||
onTapLink: (text, href, title) =>
|
|
||||||
launchUrl(Uri.parse(href ?? "")),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
// Download button
|
|
||||||
Center(
|
|
||||||
child: MaterialActionButton(
|
|
||||||
backgroundColor: AppColors.of(context).filc,
|
|
||||||
onPressed:
|
|
||||||
state == UpdateState.none ? () => downloadPrecheck() : null,
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
if (state == UpdateState.downloading ||
|
|
||||||
state == UpdateState.preparing)
|
|
||||||
Container(
|
|
||||||
height: 18.0,
|
|
||||||
width: 18.0,
|
|
||||||
margin: const EdgeInsets.only(right: 8.0),
|
|
||||||
child: CircularProgressIndicator(
|
|
||||||
value: progress > 0.05 ? progress : null,
|
|
||||||
color: ColorUtils.foregroundColor(
|
|
||||||
AppColors.of(context).filc),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text([
|
|
||||||
"download".i18n,
|
|
||||||
"downloading".i18n,
|
|
||||||
"downloading".i18n,
|
|
||||||
"installing".i18n
|
|
||||||
][state.index]
|
|
||||||
.toUpperCase()),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
String fmtSize() =>
|
|
||||||
"${(widget.release.downloads.first.size / 1024 / 1024).toStringAsFixed(1)} MB";
|
|
||||||
|
|
||||||
void downloadPrecheck() {
|
|
||||||
final status = Provider.of<StatusProvider>(context, listen: false);
|
|
||||||
if (status.networkType == ConnectivityResult.mobile) {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) => AlertDialog(
|
|
||||||
title: Text("mobileAlertTitle".i18n),
|
|
||||||
content: Text("mobileAlertDesc".i18n.fill([fmtSize()])),
|
|
||||||
actions: [
|
|
||||||
TextButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.of(context).pop(false);
|
|
||||||
},
|
|
||||||
child: Text("no".i18n),
|
|
||||||
),
|
|
||||||
TextButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.of(context).pop(true);
|
|
||||||
},
|
|
||||||
child: Text("yes".i18n),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
).then((value) => value ? download() : null);
|
|
||||||
} else {
|
|
||||||
download();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void download() {
|
|
||||||
widget.release
|
|
||||||
.install(updateCallback: (p, s) {
|
|
||||||
if (mounted) {
|
|
||||||
setState(() {
|
|
||||||
progress = p;
|
|
||||||
state = s;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.then((_) => Navigator.of(context).maybePop())
|
|
||||||
.catchError((error, stackTrace) {
|
|
||||||
if (mounted) {
|
|
||||||
Navigator.of(context).maybePop();
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
|
||||||
context: context,
|
|
||||||
content: Text("error".i18n),
|
|
||||||
backgroundColor: AppColors.of(context).red,
|
|
||||||
));
|
|
||||||
setState(() => state = UpdateState.none);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
import 'package:i18n_extension/i18n_extension.dart';
|
|
||||||
|
|
||||||
extension Localization on String {
|
|
||||||
static final _t = Translations.byLocale("hu_hu") +
|
|
||||||
{
|
|
||||||
"en_en": {
|
|
||||||
"new_update": "New Update",
|
|
||||||
"download": "download",
|
|
||||||
"downloading": "downloading",
|
|
||||||
"installing": "installing",
|
|
||||||
"error": "Failed to install update!",
|
|
||||||
"no": "No",
|
|
||||||
"yes": "Yes",
|
|
||||||
"mobileAlertTitle": "Hold up!",
|
|
||||||
"mobileAlertDesc": "You're on mobile network trying to download a %s update. Are you sure you want to continue?"
|
|
||||||
},
|
|
||||||
"hu_hu": {
|
|
||||||
"new_update": "Új frissítés",
|
|
||||||
"download": "Letöltés",
|
|
||||||
"downloading": "Letöltés",
|
|
||||||
"installing": "Telepítés",
|
|
||||||
"error": "Nem sikerült telepíteni a frissítést!",
|
|
||||||
"no": "Nem",
|
|
||||||
"yes": "Igen",
|
|
||||||
"mobileAlertTitle": "Figyelem!",
|
|
||||||
"mobileAlertDesc": "Jelenleg mobil interneten vagy, és egy %s méretű frissítést próbálsz letölteni. Biztosan folytatod?"
|
|
||||||
},
|
|
||||||
"de_de": {
|
|
||||||
"new_update": "Neues Update",
|
|
||||||
"download": "herunterladen",
|
|
||||||
"downloading": "Herunterladen",
|
|
||||||
"installing": "Installation",
|
|
||||||
"error": "Update konnte nicht installiert werden!",
|
|
||||||
"no": "Nein",
|
|
||||||
"yes": "Ja",
|
|
||||||
"mobileAlertTitle": "Achtung!",
|
|
||||||
"mobileAlertDesc":
|
|
||||||
"Sie befinden sich gerade im mobilen Internet und versuchen, ein %s Update herunterzuladen. Sind Sie sicher, dass Sie weitermachen wollen?"
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
String get i18n => localize(this, _t);
|
|
||||||
String fill(List<Object> params) => localizeFill(this, params);
|
|
||||||
String plural(int value) => localizePlural(value, this, _t);
|
|
||||||
String version(Object modifier) => localizeVersion(modifier, this, _t);
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,6 @@ import 'dart:math';
|
|||||||
import 'package:animations/animations.dart';
|
import 'package:animations/animations.dart';
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:refilc/api/providers/update_provider.dart';
|
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
import 'package:refilc/theme/colors/utils.dart';
|
import 'package:refilc/theme/colors/utils.dart';
|
||||||
import 'package:refilc/ui/date_widget.dart';
|
import 'package:refilc/ui/date_widget.dart';
|
||||||
@@ -59,7 +58,6 @@ class AbsencesPageState extends State<AbsencesPage>
|
|||||||
late AbsenceProvider absenceProvider;
|
late AbsenceProvider absenceProvider;
|
||||||
late TimetableProvider timetableProvider;
|
late TimetableProvider timetableProvider;
|
||||||
late NoteProvider noteProvider;
|
late NoteProvider noteProvider;
|
||||||
late UpdateProvider updateProvider;
|
|
||||||
late String firstName;
|
late String firstName;
|
||||||
late TabController _tabController;
|
late TabController _tabController;
|
||||||
late List<SubjectAbsence> absences = [];
|
late List<SubjectAbsence> absences = [];
|
||||||
@@ -136,7 +134,6 @@ class AbsencesPageState extends State<AbsencesPage>
|
|||||||
user = Provider.of<UserProvider>(context);
|
user = Provider.of<UserProvider>(context);
|
||||||
absenceProvider = Provider.of<AbsenceProvider>(context);
|
absenceProvider = Provider.of<AbsenceProvider>(context);
|
||||||
noteProvider = Provider.of<NoteProvider>(context);
|
noteProvider = Provider.of<NoteProvider>(context);
|
||||||
updateProvider = Provider.of<UpdateProvider>(context);
|
|
||||||
timetableProvider = Provider.of<TimetableProvider>(context);
|
timetableProvider = Provider.of<TimetableProvider>(context);
|
||||||
|
|
||||||
List<String> nameParts = user.displayName?.split(" ") ?? ["?"];
|
List<String> nameParts = user.displayName?.split(" ") ?? ["?"];
|
||||||
@@ -168,7 +165,7 @@ class AbsencesPageState extends State<AbsencesPage>
|
|||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: false,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
||||||
|
|||||||
@@ -305,6 +305,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
|||||||
if (DateTime.now().day > 5) {
|
if (DateTime.now().day > 5) {
|
||||||
_timetableController.next(context);
|
_timetableController.next(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fetchGoalPlans();
|
||||||
}
|
}
|
||||||
|
|
||||||
void fetchGoalPlans() async {
|
void fetchGoalPlans() async {
|
||||||
@@ -370,8 +372,6 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
|||||||
buildTiles(ghostGrades);
|
buildTiles(ghostGrades);
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchGoalPlans();
|
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
key: _scaffoldKey,
|
key: _scaffoldKey,
|
||||||
floatingActionButtonLocation: ExpandableFab.location,
|
floatingActionButtonLocation: ExpandableFab.location,
|
||||||
|
|||||||
@@ -67,12 +67,15 @@ class GradesCountItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 22.0,
|
width: 22.0,
|
||||||
child: Text(
|
child: FittedBox(
|
||||||
count.toString(),
|
fit: BoxFit.scaleDown,
|
||||||
textAlign: TextAlign.center,
|
child: Text(
|
||||||
style: const TextStyle(
|
count.toString(),
|
||||||
fontWeight: FontWeight.w500,
|
textAlign: TextAlign.center,
|
||||||
fontSize: 14.0,
|
style: const TextStyle(
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 14.0,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import 'package:collection/collection.dart';
|
|||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:refilc/api/providers/update_provider.dart';
|
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
import 'package:refilc/ui/widgets/grade/grade_tile.dart';
|
import 'package:refilc/ui/widgets/grade/grade_tile.dart';
|
||||||
import 'package:refilc_kreta_api/models/exam.dart';
|
import 'package:refilc_kreta_api/models/exam.dart';
|
||||||
@@ -79,7 +78,6 @@ class GradesPageState extends State<GradesPage> {
|
|||||||
|
|
||||||
late UserProvider user;
|
late UserProvider user;
|
||||||
late GradeProvider gradeProvider;
|
late GradeProvider gradeProvider;
|
||||||
late UpdateProvider updateProvider;
|
|
||||||
late GradeCalculatorProvider calculatorProvider;
|
late GradeCalculatorProvider calculatorProvider;
|
||||||
late HomeworkProvider homeworkProvider;
|
late HomeworkProvider homeworkProvider;
|
||||||
late ExamProvider examProvider;
|
late ExamProvider examProvider;
|
||||||
@@ -450,7 +448,6 @@ class GradesPageState extends State<GradesPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
user = Provider.of<UserProvider>(context);
|
user = Provider.of<UserProvider>(context);
|
||||||
gradeProvider = Provider.of<GradeProvider>(context);
|
gradeProvider = Provider.of<GradeProvider>(context);
|
||||||
updateProvider = Provider.of<UpdateProvider>(context);
|
|
||||||
calculatorProvider = Provider.of<GradeCalculatorProvider>(context);
|
calculatorProvider = Provider.of<GradeCalculatorProvider>(context);
|
||||||
homeworkProvider = Provider.of<HomeworkProvider>(context);
|
homeworkProvider = Provider.of<HomeworkProvider>(context);
|
||||||
examProvider = Provider.of<ExamProvider>(context);
|
examProvider = Provider.of<ExamProvider>(context);
|
||||||
@@ -587,7 +584,7 @@ class GradesPageState extends State<GradesPage> {
|
|||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: false,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import 'package:intl/intl.dart';
|
|||||||
import 'package:refilc_mobile_ui/pages/messages/messages_page.dart';
|
import 'package:refilc_mobile_ui/pages/messages/messages_page.dart';
|
||||||
import 'package:refilc_plus/providers/plus_provider.dart';
|
import 'package:refilc_plus/providers/plus_provider.dart';
|
||||||
import 'package:animated_list_plus/animated_list_plus.dart';
|
import 'package:animated_list_plus/animated_list_plus.dart';
|
||||||
import 'package:refilc/api/providers/update_provider.dart';
|
|
||||||
import 'package:refilc/api/providers/sync.dart';
|
import 'package:refilc/api/providers/sync.dart';
|
||||||
import 'package:confetti/confetti.dart';
|
import 'package:confetti/confetti.dart';
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
@@ -51,7 +50,6 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
late TabController _tabController;
|
late TabController _tabController;
|
||||||
late UserProvider user;
|
late UserProvider user;
|
||||||
late SettingsProvider settings;
|
late SettingsProvider settings;
|
||||||
late UpdateProvider updateProvider;
|
|
||||||
late StatusProvider statusProvider;
|
late StatusProvider statusProvider;
|
||||||
late GradeProvider gradeProvider;
|
late GradeProvider gradeProvider;
|
||||||
late TimetableProvider timetableProvider;
|
late TimetableProvider timetableProvider;
|
||||||
@@ -174,7 +172,6 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
user = Provider.of<UserProvider>(context);
|
user = Provider.of<UserProvider>(context);
|
||||||
settings = Provider.of<SettingsProvider>(context);
|
settings = Provider.of<SettingsProvider>(context);
|
||||||
statusProvider = Provider.of<StatusProvider>(context, listen: false);
|
statusProvider = Provider.of<StatusProvider>(context, listen: false);
|
||||||
updateProvider = Provider.of<UpdateProvider>(context);
|
|
||||||
_liveCard = Provider.of<LiveCardProvider>(context);
|
_liveCard = Provider.of<LiveCardProvider>(context);
|
||||||
gradeProvider = Provider.of<GradeProvider>(context);
|
gradeProvider = Provider.of<GradeProvider>(context);
|
||||||
context.watch<PlusProvider>();
|
context.watch<PlusProvider>();
|
||||||
@@ -335,7 +332,7 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
.tertiary, //!settings.presentationMode
|
.tertiary, //!settings.presentationMode
|
||||||
//? ColorUtils.stringToColor(user.displayName ?? "?")
|
//? ColorUtils.stringToColor(user.displayName ?? "?")
|
||||||
//: Theme.of(context).colorScheme.secondary,
|
//: Theme.of(context).colorScheme.secondary,
|
||||||
badge: updateProvider.available,
|
badge: false,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extension Localization on String {
|
|||||||
"Messages": "Üzenetek",
|
"Messages": "Üzenetek",
|
||||||
"Absences": "Hiányzások",
|
"Absences": "Hiányzások",
|
||||||
"update_available": "Frissítés elérhető",
|
"update_available": "Frissítés elérhető",
|
||||||
"missed_exams": "Ezen a héten hiányoztál %s dolgozatról.",
|
"missed_exams": "Ezen a héten hiányoztál %s számonkérésről.",
|
||||||
"missed_exam_contact": "Keresd %s tanár urat/hölgyet, hogy pótold!",
|
"missed_exam_contact": "Keresd %s tanár urat/hölgyet, hogy pótold!",
|
||||||
},
|
},
|
||||||
"de_de": {
|
"de_de": {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:refilc/api/providers/update_provider.dart';
|
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
import 'package:refilc/ui/date_widget.dart';
|
import 'package:refilc/ui/date_widget.dart';
|
||||||
import 'package:refilc_kreta_api/providers/message_provider.dart';
|
import 'package:refilc_kreta_api/providers/message_provider.dart';
|
||||||
@@ -35,7 +34,6 @@ class MessagesPageState extends State<MessagesPage>
|
|||||||
|
|
||||||
late UserProvider user;
|
late UserProvider user;
|
||||||
late MessageProvider messageProvider;
|
late MessageProvider messageProvider;
|
||||||
late UpdateProvider updateProvider;
|
|
||||||
late String firstName;
|
late String firstName;
|
||||||
late TabController tabController;
|
late TabController tabController;
|
||||||
|
|
||||||
@@ -50,7 +48,6 @@ class MessagesPageState extends State<MessagesPage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
user = Provider.of<UserProvider>(context);
|
user = Provider.of<UserProvider>(context);
|
||||||
messageProvider = Provider.of<MessageProvider>(context);
|
messageProvider = Provider.of<MessageProvider>(context);
|
||||||
updateProvider = Provider.of<UpdateProvider>(context);
|
|
||||||
|
|
||||||
List<String> nameParts = user.displayName?.split(" ") ?? ["?"];
|
List<String> nameParts = user.displayName?.split(" ") ?? ["?"];
|
||||||
firstName = nameParts.length > 1 ? nameParts[1] : nameParts[0];
|
firstName = nameParts.length > 1 ? nameParts[1] : nameParts[0];
|
||||||
@@ -108,7 +105,7 @@ class MessagesPageState extends State<MessagesPage>
|
|||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: false,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_local_identifiers, use_build_context_synchronously
|
// ignore_for_file: no_leading_underscores_for_local_identifiers, use_build_context_synchronously
|
||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
@@ -8,7 +26,6 @@ import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
|||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:refilc/api/providers/database_provider.dart';
|
import 'package:refilc/api/providers/database_provider.dart';
|
||||||
import 'package:refilc/api/providers/self_note_provider.dart';
|
import 'package:refilc/api/providers/self_note_provider.dart';
|
||||||
import 'package:refilc/api/providers/update_provider.dart';
|
|
||||||
import 'package:refilc/models/self_note.dart';
|
import 'package:refilc/models/self_note.dart';
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
import 'package:refilc/utils/format.dart';
|
import 'package:refilc/utils/format.dart';
|
||||||
@@ -58,7 +75,6 @@ class NotesPage extends StatefulWidget {
|
|||||||
|
|
||||||
class NotesPageState extends State<NotesPage> with TickerProviderStateMixin {
|
class NotesPageState extends State<NotesPage> with TickerProviderStateMixin {
|
||||||
late UserProvider user;
|
late UserProvider user;
|
||||||
late UpdateProvider updateProvider;
|
|
||||||
late DatabaseProvider databaseProvider;
|
late DatabaseProvider databaseProvider;
|
||||||
late SelfNoteProvider selfNoteProvider;
|
late SelfNoteProvider selfNoteProvider;
|
||||||
|
|
||||||
@@ -94,7 +110,6 @@ Future<void> deleteTodoItem(TodoItem item) async {
|
|||||||
|
|
||||||
user = Provider.of<UserProvider>(context, listen: false);
|
user = Provider.of<UserProvider>(context, listen: false);
|
||||||
databaseProvider = Provider.of<DatabaseProvider>(context, listen: false);
|
databaseProvider = Provider.of<DatabaseProvider>(context, listen: false);
|
||||||
updateProvider = Provider.of<UpdateProvider>(context, listen: false);
|
|
||||||
selfNoteProvider = Provider.of<SelfNoteProvider>(context, listen: false);
|
selfNoteProvider = Provider.of<SelfNoteProvider>(context, listen: false);
|
||||||
|
|
||||||
doneItems = await databaseProvider.userQuery.toDoItems(userId: user.id!);
|
doneItems = await databaseProvider.userQuery.toDoItems(userId: user.id!);
|
||||||
@@ -269,7 +284,6 @@ if (selfNoteProvider.todos.isNotEmpty) {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
user = Provider.of<UserProvider>(context);
|
user = Provider.of<UserProvider>(context);
|
||||||
databaseProvider = Provider.of<DatabaseProvider>(context);
|
databaseProvider = Provider.of<DatabaseProvider>(context);
|
||||||
updateProvider = Provider.of<UpdateProvider>(context);
|
|
||||||
selfNoteProvider = Provider.of<SelfNoteProvider>(context);
|
selfNoteProvider = Provider.of<SelfNoteProvider>(context);
|
||||||
|
|
||||||
List<String> nameParts = user.displayName?.split(" ") ?? ["?"];
|
List<String> nameParts = user.displayName?.split(" ") ?? ["?"];
|
||||||
@@ -339,7 +353,7 @@ if (selfNoteProvider.todos.isNotEmpty) {
|
|||||||
name: firstName,
|
name: firstName,
|
||||||
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||||
//ColorUtils.stringToColor(user.displayName ?? "?"),
|
//ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: false,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
||||||
|
|||||||
@@ -38,7 +38,10 @@ class _ImageNoteEditorState extends State<ImageNoteEditor> {
|
|||||||
File? image;
|
File? image;
|
||||||
Future pickImage() async {
|
Future pickImage() async {
|
||||||
try {
|
try {
|
||||||
final image = await ImagePicker().pickImage(source: ImageSource.gallery);
|
final image = await ImagePicker().pickImage(
|
||||||
|
source: ImageSource.gallery,
|
||||||
|
requestFullMetadata: false,
|
||||||
|
);
|
||||||
if (image == null) return;
|
if (image == null) return;
|
||||||
File imageFile = File(image.path);
|
File imageFile = File(image.path);
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import 'package:animations/animations.dart';
|
|||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:i18n_extension/i18n_extension.dart';
|
import 'package:i18n_extension/i18n_extension.dart';
|
||||||
import 'package:refilc/api/providers/database_provider.dart';
|
import 'package:refilc/api/providers/database_provider.dart';
|
||||||
import 'package:refilc/api/providers/update_provider.dart';
|
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
import 'package:refilc/utils/format.dart';
|
import 'package:refilc/utils/format.dart';
|
||||||
import 'package:refilc_kreta_api/client/client.dart';
|
import 'package:refilc_kreta_api/client/client.dart';
|
||||||
@@ -77,7 +76,6 @@ class TimetablePageState extends State<TimetablePage>
|
|||||||
|
|
||||||
late UserProvider user;
|
late UserProvider user;
|
||||||
late TimetableProvider timetableProvider;
|
late TimetableProvider timetableProvider;
|
||||||
late UpdateProvider updateProvider;
|
|
||||||
late SettingsProvider settingsProvider;
|
late SettingsProvider settingsProvider;
|
||||||
late DatabaseProvider db;
|
late DatabaseProvider db;
|
||||||
|
|
||||||
@@ -105,6 +103,7 @@ class TimetablePageState extends State<TimetablePage>
|
|||||||
|
|
||||||
// Update timetable on user change
|
// Update timetable on user change
|
||||||
Future<void> _userListener() async {
|
Future<void> _userListener() async {
|
||||||
|
await Provider.of<TimetableProvider>(context, listen: false).restoreUser();
|
||||||
await Provider.of<KretaClient>(context, listen: false).refreshLogin();
|
await Provider.of<KretaClient>(context, listen: false).refreshLogin();
|
||||||
if (mounted) _controller.jump(_controller.currentWeek, context: context);
|
if (mounted) _controller.jump(_controller.currentWeek, context: context);
|
||||||
}
|
}
|
||||||
@@ -208,7 +207,6 @@ class TimetablePageState extends State<TimetablePage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
user = Provider.of<UserProvider>(context);
|
user = Provider.of<UserProvider>(context);
|
||||||
timetableProvider = Provider.of<TimetableProvider>(context);
|
timetableProvider = Provider.of<TimetableProvider>(context);
|
||||||
updateProvider = Provider.of<UpdateProvider>(context);
|
|
||||||
settingsProvider = Provider.of<SettingsProvider>(context);
|
settingsProvider = Provider.of<SettingsProvider>(context);
|
||||||
|
|
||||||
getCustom();
|
getCustom();
|
||||||
@@ -314,7 +312,7 @@ class TimetablePageState extends State<TimetablePage>
|
|||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: false,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
gradeStreak: (user.gradeStreak ?? 0) > 1,
|
||||||
|
|||||||
@@ -1,13 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
class KretenLoginWidget extends StatefulWidget {
|
class KretenLoginWidget extends StatefulWidget {
|
||||||
const KretenLoginWidget({super.key, required this.onLogin});
|
const KretenLoginWidget({super.key, required this.onLogin, this.onDemoMode});
|
||||||
|
|
||||||
// final String selectedSchool;
|
// final String selectedSchool;
|
||||||
final void Function(String code) onLogin;
|
final void Function(String code) onLogin;
|
||||||
|
final VoidCallback? onDemoMode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<KretenLoginWidget> createState() => _KretenLoginWidgetState();
|
State<KretenLoginWidget> createState() => _KretenLoginWidgetState();
|
||||||
@@ -19,7 +40,39 @@ class _KretenLoginWidgetState extends State<KretenLoginWidget>
|
|||||||
late AnimationController _animationController;
|
late AnimationController _animationController;
|
||||||
var loadingPercentage = 0;
|
var loadingPercentage = 0;
|
||||||
var currentUrl = '';
|
var currentUrl = '';
|
||||||
|
bool _initialPageLoaded = false;
|
||||||
bool _hasFadedIn = false;
|
bool _hasFadedIn = false;
|
||||||
|
bool _hasError = false;
|
||||||
|
bool _hasTimedOut = false;
|
||||||
|
Timer? _timeoutTimer;
|
||||||
|
int _autoRetryCount = 0;
|
||||||
|
static const int _maxAutoRetries = 3;
|
||||||
|
bool _hasLoadedOnce = false;
|
||||||
|
|
||||||
|
static const _loginUrl =
|
||||||
|
'https://idp.e-kreta.hu/connect/authorize?prompt=login&nonce=wylCrqT4oN6PPgQn2yQB0euKei9nJeZ6_ffJ-VpSKZU&response_type=code&code_challenge_method=S256&scope=openid%20email%20offline_access%20kreta-ellenorzo-webapi.public%20kreta-eugyintezes-webapi.public%20kreta-fileservice-webapi.public%20kreta-mobile-global-webapi.public%20kreta-dkt-webapi.public%20kreta-ier-webapi.public&code_challenge=HByZRRnPGb-Ko_wTI7ibIba1HQ6lor0ws4bcgReuYSQ&redirect_uri=https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect&client_id=kreta-ellenorzo-student-mobile-ios&state=refilc_student_mobile';
|
||||||
|
|
||||||
|
static final Uri _redirectUri = Uri.parse(
|
||||||
|
'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect',
|
||||||
|
);
|
||||||
|
|
||||||
|
bool _isRedirectUri(Uri uri) {
|
||||||
|
return uri.scheme == _redirectUri.scheme &&
|
||||||
|
uri.host == _redirectUri.host &&
|
||||||
|
uri.path == _redirectUri.path;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool _shouldIgnoreError(WebResourceError error) {
|
||||||
|
if (error.isForMainFrame == false) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
final String description = error.description.toLowerCase();
|
||||||
|
return error.errorCode == -999 ||
|
||||||
|
description.contains('cancelled') ||
|
||||||
|
description.contains('canceled') ||
|
||||||
|
description.contains('frame load interrupted');
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -32,88 +85,134 @@ class _KretenLoginWidgetState extends State<KretenLoginWidget>
|
|||||||
|
|
||||||
controller = WebViewController()
|
controller = WebViewController()
|
||||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||||
|
..setUserAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1')
|
||||||
..setNavigationDelegate(NavigationDelegate(
|
..setNavigationDelegate(NavigationDelegate(
|
||||||
onNavigationRequest: (n) async {
|
onNavigationRequest: (n) async {
|
||||||
if (n.url.startsWith('https://mobil.e-kreta.hu')) {
|
final Uri? uri = Uri.tryParse(n.url);
|
||||||
setState(() {
|
if (uri != null && _isRedirectUri(uri)) {
|
||||||
loadingPercentage = 0;
|
final String? code = uri.queryParameters['code'];
|
||||||
currentUrl = n.url;
|
if (code != null && code.isNotEmpty) {
|
||||||
});
|
_timeoutTimer?.cancel();
|
||||||
|
widget.onLogin(code);
|
||||||
// final String instituteCode = widget.selectedSchool;
|
return NavigationDecision.prevent;
|
||||||
// if (!n.url.startsWith(
|
}
|
||||||
// 'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=')) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
List<String> requiredThings = n.url
|
|
||||||
.replaceAll(
|
|
||||||
'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=',
|
|
||||||
'')
|
|
||||||
.replaceAll(
|
|
||||||
'&scope=openid%20email%20offline_access%20kreta-ellenorzo-webapi.public%20kreta-eugyintezes-webapi.public%20kreta-fileservice-webapi.public%20kreta-mobile-global-webapi.public%20kreta-dkt-webapi.public%20kreta-ier-webapi.public&state=refilc_student_mobile&session_state=',
|
|
||||||
':')
|
|
||||||
.split(':');
|
|
||||||
|
|
||||||
String code = requiredThings[0];
|
|
||||||
// String sessionState = requiredThings[1];
|
|
||||||
|
|
||||||
widget.onLogin(code);
|
|
||||||
// Future.delayed(const Duration(milliseconds: 500), () {
|
|
||||||
// Navigator.of(context).pop();
|
|
||||||
// });
|
|
||||||
// Navigator.of(context).pop();
|
|
||||||
|
|
||||||
return NavigationDecision.prevent;
|
|
||||||
} else {
|
|
||||||
return NavigationDecision.navigate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NavigationDecision.navigate;
|
||||||
},
|
},
|
||||||
onPageStarted: (url) async {
|
onPageStarted: (url) async {
|
||||||
// setState(() {
|
if (!mounted) return;
|
||||||
// loadingPercentage = 0;
|
|
||||||
// currentUrl = url;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// // final String instituteCode = widget.selectedSchool;
|
setState(() {
|
||||||
// if (!url.startsWith(
|
currentUrl = url;
|
||||||
// 'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=')) {
|
_hasError = false;
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// List<String> requiredThings = url
|
_hasTimedOut = false;
|
||||||
// .replaceAll(
|
|
||||||
// 'https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect?code=',
|
|
||||||
// '')
|
|
||||||
// .replaceAll(
|
|
||||||
// '&scope=openid%20email%20offline_access%20kreta-ellenorzo-webapi.public%20kreta-eugyintezes-webapi.public%20kreta-fileservice-webapi.public%20kreta-mobile-global-webapi.public%20kreta-dkt-webapi.public%20kreta-ier-webapi.public&state=refilc_student_mobile&session_state=',
|
|
||||||
// ':')
|
|
||||||
// .split(':');
|
|
||||||
|
|
||||||
// String code = requiredThings[0];
|
if (!_initialPageLoaded) {
|
||||||
// // String sessionState = requiredThings[1];
|
loadingPercentage = 0;
|
||||||
|
}
|
||||||
// widget.onLogin(code);
|
});
|
||||||
// // Future.delayed(const Duration(milliseconds: 500), () {
|
|
||||||
// // Navigator.of(context).pop();
|
|
||||||
// // });
|
|
||||||
// // Navigator.of(context).pop();
|
|
||||||
},
|
},
|
||||||
onProgress: (progress) {
|
onProgress: (progress) {
|
||||||
|
if (!mounted) return;
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
loadingPercentage = progress;
|
loadingPercentage = progress;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onPageFinished: (url) {
|
onPageFinished: (url) {
|
||||||
|
_timeoutTimer?.cancel();
|
||||||
|
|
||||||
|
if (!mounted) return;
|
||||||
|
|
||||||
|
_autoRetryCount = 0;
|
||||||
|
_hasLoadedOnce = true;
|
||||||
setState(() {
|
setState(() {
|
||||||
|
currentUrl = url;
|
||||||
|
_initialPageLoaded = true;
|
||||||
|
_hasError = false;
|
||||||
|
_hasTimedOut = false;
|
||||||
loadingPercentage = 100;
|
loadingPercentage = 100;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
onWebResourceError: (error) {
|
||||||
|
if (_shouldIgnoreError(error)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_timeoutTimer?.cancel();
|
||||||
|
|
||||||
|
if (!mounted) return;
|
||||||
|
|
||||||
|
// Auto-retry on first errors before showing the error UI,
|
||||||
|
// to handle transient network issues on initial load.
|
||||||
|
if (!_hasLoadedOnce && _autoRetryCount < _maxAutoRetries) {
|
||||||
|
_autoRetryCount++;
|
||||||
|
Future.delayed(Duration(seconds: _autoRetryCount), () {
|
||||||
|
if (mounted) _retryLoad();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If demo mode is available, auto-launch it instead of
|
||||||
|
// showing an error UI (e.g. when outside Hungary).
|
||||||
|
if (widget.onDemoMode != null) {
|
||||||
|
widget.onDemoMode!();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_hasError = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
))
|
))
|
||||||
..loadRequest(
|
..loadRequest(
|
||||||
Uri.parse(
|
Uri.parse(_loginUrl), // &institute_code=${widget.selectedSchool}
|
||||||
'https://idp.e-kreta.hu/connect/authorize?prompt=login&nonce=wylCrqT4oN6PPgQn2yQB0euKei9nJeZ6_ffJ-VpSKZU&response_type=code&code_challenge_method=S256&scope=openid%20email%20offline_access%20kreta-ellenorzo-webapi.public%20kreta-eugyintezes-webapi.public%20kreta-fileservice-webapi.public%20kreta-mobile-global-webapi.public%20kreta-dkt-webapi.public%20kreta-ier-webapi.public&code_challenge=HByZRRnPGb-Ko_wTI7ibIba1HQ6lor0ws4bcgReuYSQ&redirect_uri=https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect&client_id=kreta-ellenorzo-student-mobile-ios&state=refilc_student_mobile'), // &institute_code=${widget.selectedSchool}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_startTimeoutTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _startTimeoutTimer() {
|
||||||
|
_timeoutTimer?.cancel();
|
||||||
|
_timeoutTimer = Timer(const Duration(seconds: 15), () {
|
||||||
|
if (mounted && !_initialPageLoaded && !_hasError) {
|
||||||
|
if (widget.onDemoMode != null) {
|
||||||
|
widget.onDemoMode!();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setState(() {
|
||||||
|
_hasTimedOut = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void _retryLoad() {
|
||||||
|
setState(() {
|
||||||
|
_hasError = false;
|
||||||
|
_hasTimedOut = false;
|
||||||
|
_initialPageLoaded = false;
|
||||||
|
loadingPercentage = 0;
|
||||||
|
});
|
||||||
|
controller.loadRequest(Uri.parse(_loginUrl));
|
||||||
|
_startTimeoutTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _retry() {
|
||||||
|
setState(() {
|
||||||
|
_hasError = false;
|
||||||
|
_hasTimedOut = false;
|
||||||
|
_initialPageLoaded = false;
|
||||||
|
loadingPercentage = 0;
|
||||||
|
_hasFadedIn = false;
|
||||||
|
});
|
||||||
|
_autoRetryCount = 0;
|
||||||
|
_hasLoadedOnce = false;
|
||||||
|
_animationController.reset();
|
||||||
|
controller.loadRequest(Uri.parse(_loginUrl));
|
||||||
|
_startTimeoutTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Future<void> loadLoginUrl() async {
|
// Future<void> loadLoginUrl() async {
|
||||||
@@ -125,6 +224,7 @@ class _KretenLoginWidgetState extends State<KretenLoginWidget>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
_timeoutTimer?.cancel();
|
||||||
// Step 3: Dispose of the animation controller
|
// Step 3: Dispose of the animation controller
|
||||||
_animationController.dispose();
|
_animationController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@@ -132,8 +232,64 @@ class _KretenLoginWidgetState extends State<KretenLoginWidget>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
// Show error UI if there was a web resource error or a timeout
|
||||||
|
if (_hasError || _hasTimedOut) {
|
||||||
|
return Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 32.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.wifi_off_rounded,
|
||||||
|
size: 48,
|
||||||
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
Text(
|
||||||
|
'A bejelentkezési oldal nem érhető el',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
'Az e-KRÉTA bejelentkezés csak magyarországi hálózatról érhető el. Kérjük, ellenőrizd az internetkapcsolatod.',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
FilledButton.icon(
|
||||||
|
onPressed: _retry,
|
||||||
|
icon: const Icon(Icons.refresh),
|
||||||
|
label: const Text('Próbáld újra'),
|
||||||
|
),
|
||||||
|
if (widget.onDemoMode != null) ...[
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
OutlinedButton(
|
||||||
|
onPressed: widget.onDemoMode,
|
||||||
|
child: const Text('Kipróbálom fiók nélkül'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
|
child: const Text('Vissza'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Trigger the fade-in animation only once when loading reaches 100%
|
// Trigger the fade-in animation only once when loading reaches 100%
|
||||||
if (loadingPercentage == 100 && !_hasFadedIn) {
|
if (_initialPageLoaded && !_hasFadedIn) {
|
||||||
_animationController.forward(); // Play the animation
|
_animationController.forward(); // Play the animation
|
||||||
_hasFadedIn =
|
_hasFadedIn =
|
||||||
true; // Set the flag to true, so the animation is not replayed
|
true; // Set the flag to true, so the animation is not replayed
|
||||||
@@ -141,9 +297,8 @@ class _KretenLoginWidgetState extends State<KretenLoginWidget>
|
|||||||
|
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
// Webview that will be displayed only when the loading is 100%
|
Positioned.fill(
|
||||||
if (loadingPercentage == 100)
|
child: FadeTransition(
|
||||||
FadeTransition(
|
|
||||||
opacity: Tween<double>(begin: 0, end: 1).animate(
|
opacity: Tween<double>(begin: 0, end: 1).animate(
|
||||||
CurvedAnimation(
|
CurvedAnimation(
|
||||||
parent: _animationController,
|
parent: _animationController,
|
||||||
@@ -154,23 +309,28 @@ class _KretenLoginWidgetState extends State<KretenLoginWidget>
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
// Show the CircularProgressIndicator while loading is not 100%
|
if (!_initialPageLoaded)
|
||||||
if (loadingPercentage < 100)
|
Positioned.fill(
|
||||||
Center(
|
child: ColoredBox(
|
||||||
child: TweenAnimationBuilder(
|
color: Theme.of(context).colorScheme.surface,
|
||||||
tween: Tween<double>(begin: 0, end: loadingPercentage / 100.0),
|
child: Center(
|
||||||
duration: const Duration(milliseconds: 300),
|
child: TweenAnimationBuilder(
|
||||||
builder: (context, double value, child) {
|
tween:
|
||||||
return Column(
|
Tween<double>(begin: 0, end: loadingPercentage / 100.0),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
duration: const Duration(milliseconds: 300),
|
||||||
children: [
|
builder: (context, double value, child) {
|
||||||
CircularProgressIndicator(
|
return Column(
|
||||||
value: value, // Smoothly animates the progress
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
),
|
children: [
|
||||||
],
|
CircularProgressIndicator(
|
||||||
);
|
value: value == 0 ? null : value,
|
||||||
},
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,7 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Firka legacy (formely "refilc"), the unofficial client for e-Kréta
|
||||||
|
Copyright (C) 2025 Firka team (QwIT development)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
// import 'dart:async';
|
// import 'dart:async';
|
||||||
|
|
||||||
import 'dart:io' show Platform;
|
import 'dart:io' show Platform;
|
||||||
import 'package:refilc/api/login.dart';
|
import 'package:refilc/api/login.dart';
|
||||||
|
import 'package:refilc/api/providers/user_provider.dart';
|
||||||
|
import 'package:refilc/models/user.dart';
|
||||||
import 'package:refilc/theme/colors/colors.dart';
|
import 'package:refilc/theme/colors/colors.dart';
|
||||||
import 'package:refilc_mobile_ui/common/custom_snack_bar.dart';
|
import 'package:refilc_mobile_ui/common/custom_snack_bar.dart';
|
||||||
import 'package:refilc_mobile_ui/common/system_chrome.dart';
|
import 'package:refilc_mobile_ui/common/system_chrome.dart';
|
||||||
@@ -12,6 +32,7 @@ import 'package:flutter/services.dart';
|
|||||||
import 'login_screen.i18n.dart';
|
import 'login_screen.i18n.dart';
|
||||||
import 'package:carousel_slider/carousel_slider.dart';
|
import 'package:carousel_slider/carousel_slider.dart';
|
||||||
import 'package:refilc_mobile_ui/screens/login/kreten_login.dart'; //new library for new web login
|
import 'package:refilc_mobile_ui/screens/login/kreten_login.dart'; //new library for new web login
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class LoginScreen extends StatefulWidget {
|
class LoginScreen extends StatefulWidget {
|
||||||
const LoginScreen({super.key, this.back = false});
|
const LoginScreen({super.key, this.back = false});
|
||||||
@@ -31,6 +52,7 @@ class LoginScreenState extends State<LoginScreen> {
|
|||||||
|
|
||||||
LoginState _loginState = LoginState.normal;
|
LoginState _loginState = LoginState.normal;
|
||||||
bool showBack = false;
|
bool showBack = false;
|
||||||
|
int _demoTapCount = 0;
|
||||||
|
|
||||||
// Scaffold Gradient background
|
// Scaffold Gradient background
|
||||||
// final LinearGradient _backgroundGradient = const LinearGradient(
|
// final LinearGradient _backgroundGradient = const LinearGradient(
|
||||||
@@ -50,6 +72,11 @@ class LoginScreenState extends State<LoginScreen> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
showBack = widget.back;
|
showBack = widget.back;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
|
||||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||||
statusBarColor: Colors.transparent,
|
statusBarColor: Colors.transparent,
|
||||||
@@ -106,9 +133,23 @@ class LoginScreenState extends State<LoginScreen> {
|
|||||||
padding: EdgeInsets.only(left: 24, top: paddingTop),
|
padding: EdgeInsets.only(left: 24, top: paddingTop),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
GestureDetector(
|
||||||
'assets/icons/ic_rounded.png',
|
onTap: () {
|
||||||
width: 30.0,
|
setState(() => _demoTapCount++);
|
||||||
|
if (_demoTapCount >= 10) {
|
||||||
|
_demoTapCount = 0;
|
||||||
|
final userProvider = Provider.of<UserProvider>(context, listen: false);
|
||||||
|
final demoUser = User.demo();
|
||||||
|
userProvider.addUser(demoUser);
|
||||||
|
userProvider.setUser(demoUser.id);
|
||||||
|
setSystemChrome(context);
|
||||||
|
Navigator.of(context).pushReplacementNamed('login_to_navigation');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/icons/ic_rounded.png',
|
||||||
|
width: 30.0,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
@@ -238,7 +279,7 @@ class LoginScreenState extends State<LoginScreen> {
|
|||||||
context: context,
|
context: context,
|
||||||
isScrollControlled:
|
isScrollControlled:
|
||||||
true, // This ensures the modal accommodates input fields properly
|
true, // This ensures the modal accommodates input fields properly
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext sheetContext) {
|
||||||
return Container(
|
return Container(
|
||||||
height: MediaQuery.of(context)
|
height: MediaQuery.of(context)
|
||||||
.size
|
.size
|
||||||
@@ -314,6 +355,15 @@ class LoginScreenState extends State<LoginScreen> {
|
|||||||
context)
|
context)
|
||||||
.pop();
|
.pop();
|
||||||
},
|
},
|
||||||
|
onDemoMode: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
final userProvider = Provider.of<UserProvider>(context, listen: false);
|
||||||
|
final demoUser = User.demo();
|
||||||
|
userProvider.addUser(demoUser);
|
||||||
|
userProvider.setUser(demoUser.id);
|
||||||
|
setSystemChrome(context);
|
||||||
|
Navigator.of(context).pushReplacementNamed('login_to_navigation');
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -341,7 +391,7 @@ class LoginScreenState extends State<LoginScreen> {
|
|||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 19),
|
const SizedBox(height: 12),
|
||||||
// privacy policy
|
// privacy policy
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => PrivacyView.show(context),
|
onTap: () => PrivacyView.show(context),
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user