Compare commits
62 Commits
3.0.0-beta
...
3.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0471843919 | ||
|
|
bb83dd2137 | ||
|
|
d9b07525a4 | ||
|
|
92334406c5 | ||
|
|
506af7fa71 | ||
|
|
f5be03e5ce | ||
|
|
2047784d8f | ||
|
|
037cf1df48 | ||
|
|
8238cc0678 | ||
|
|
f52a747268 | ||
|
|
c37bdc7aff | ||
|
|
9015ff2d6b | ||
|
|
a801503838 | ||
|
|
b0565ddcd9 | ||
|
|
d8b6ba9a64 | ||
|
|
549570a48c | ||
|
|
930e8d86b8 | ||
|
|
4aff7df96f | ||
|
|
c839ac178a | ||
|
|
2c7efc0a18 | ||
|
|
5252813721 | ||
|
|
15d3daefed | ||
|
|
0729c13362 | ||
|
|
4bb978ba63 | ||
|
|
d9c071b5ae | ||
|
|
6ffe4b6c33 | ||
|
|
7bd5d8bd5a | ||
|
|
c0ffa5d726 | ||
|
|
befb107183 | ||
|
|
e56488094e | ||
|
|
74831c3e56 | ||
|
|
9d3347d680 | ||
|
|
25100ab7d9 | ||
|
|
b509adcbc9 | ||
|
|
d421ae9031 | ||
|
|
c3b79fcb3f | ||
|
|
3cf57ac6d4 | ||
|
|
d72bf84a36 | ||
|
|
638b8c9413 | ||
|
|
d5bdca698b | ||
|
|
ea6b2ec73d | ||
|
|
7ffb58c9ac | ||
|
|
eaf2e2a6c4 | ||
|
|
8cf642fb72 | ||
|
|
47245b4551 | ||
|
|
2b25abaf4d | ||
|
|
adef77b5ed | ||
|
|
8cc3107faf | ||
|
|
3284c5ba5a | ||
|
|
942a92f1f4 | ||
|
|
ae3272e6da | ||
|
|
67768b9de9 | ||
|
|
aba24c0c2a | ||
|
|
c55a5b9fe7 | ||
|
|
fee63a2205 | ||
|
|
9bcf9eb391 | ||
|
|
fa9a61657b | ||
|
|
33e4595e09 | ||
|
|
91582c3b37 | ||
|
|
61de95970e | ||
|
|
e36347510f | ||
|
|
e1429dedae |
39
CONTRIBUTING.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
# Contributing Guide
|
||||||
|
Köszönjük, ha programozással segíted a munkánkat!
|
||||||
|
A folytatáshoz szükséged lesz egy Linuxot vagy Windowst futtató számítógépre, minimális programozási tapasztalatra és egy kis angoltudásra.
|
||||||
|
Segít, ha nem csak kicsit tudsz programozni, és ha ismered a Gitet és a GitHubot ;)
|
||||||
|
|
||||||
|
## Miben segítsek?
|
||||||
|
Kérünk, **olyan dologgal járulj hozzá** a Filchez, ami valószínűleg **sok embernek hasznos lesz** majd. Szeretnénk egy minél teljeskörűbb iskolai asszisztenst létrehozni, de az iskolaspecifikus, vagy külön neked hasznos funkciók helye inkább legyen a saját forkod.
|
||||||
|
|
||||||
|
Fontos, hogy **mielőtt egy nagy volumenű projektbe belekezdesz, futtasd meg ötletedet a [Discord szerverünkön](https://filcnaplo.hu/discord),** ahol még azelőtt tudunk tanácsot adni, mielőtt sok-sok órát beleöltél volna egy esetleg felesleges dologba.
|
||||||
|
|
||||||
|
A legjobban annak örülünk, ha az [Issues](https://github.com/filcnaplo/filcnaplo/issues) oldalról szemezgetsz, **ha lehet, a [priority taggel megjelöltekkel kezdd](https://github.com/filcnaplo/filcnaplo/issues?q=is%3Aissue+is%3Aopen+label%3Apriority),** vagy ha új vagy a Flutterhez, ajánljuk figyelmedbe [ezeket a viszonylag könnyen javítható hibákat](https://github.com/filcnaplo/filcnaplo/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) (ha épp van ilyen).
|
||||||
|
|
||||||
|
## Hogyan segítsek?
|
||||||
|
|
||||||
|
Nem ígérhetünk itt sem programozás-, sem git-kurzust, de a projektspecifikus dolgokat leírjuk, és segítünk a Flutter feltelepítésében.
|
||||||
|
|
||||||
|
A Filc a Google által pár éve létrehozott **[Fluttert](https://flutter.dev/)** használja, aminek nyelve a **[Dart](https://dart.dev/)**. Ha ismered a C#-ot, Javát, C++t, vagy egyéb hasonló nyelvet, **nem fog gondot okozni a használata.** A felhasználói felület létrehozásában az is segíthet, ha foglalkoztál már korábban weboldalakkal.
|
||||||
|
Ha még nem használtál Fluttert, mindenképp böngészd át a [YouTube csatornájukat](https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw).
|
||||||
|
Könnyen tudsz kódot, vagy akár UI-t is tesztelni a [DartPad](https://dartpad.dev/) oldalon.
|
||||||
|
|
||||||
|
#### [Segítség a Flutter telepítéséhez és a forráskód futtatásához](/.github/SETUP.md)
|
||||||
|
Fontos: **Legyél a flutter beta verzióján!** Írd be: `flutter channel beta`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Ha nem értesz a Githez, ajánljuk figyelmedbe [ezt a cikket](https://medium.com/envienta-magyarorsz%C3%A1g/git-%C3%A9s-github-gyorstalpal%C3%B3-f2d78a732deb). Viszont arra kérünk, a Git használatát ne a Filcen próbáld ki először, hozz létre előbb egy saját Repót, és abba tesztelgess. Ha már nagyjából kitapasztaltad, várjuk hozzájárulásodat.
|
||||||
|
|
||||||
|
Készíts egy forkot a saját fiókod alá.
|
||||||
|
A Filc legfrissebb, épp fejlesztés alatt álló verzióját a [dev brancen](https://github.com/filcnaplo/filcnaplo/tree/dev) találod, kérjük ide commitolj, és ide célozd a forkodból a Pull Requested. Írd le benne, mit változtattál, és ha lehet, csatolj képernyőképet is.
|
||||||
|
Minél gyakrabban készíts minél részletesebben elnevezett commitokat, hogy el tudjunk tájékozódni az általad beküldött kódon.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Az általad fejlesztett funkciók mellé a changelogban odakerül GitHub felhasználóneved.
|
||||||
|
Ha jelentős és rendszeres hozzájáruló vagy, Discordon megkapod a `DEV` rangot.
|
||||||
|
|
||||||
|
Ha bárhol elakadtál, keress minket Discordon.
|
||||||
|
Jó fejlesztést kívánunk!
|
||||||
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
#### Nem hivatalos e-napló alkalmazás az eKRÉTA rendszerhez
|
#### Nem hivatalos e-napló alkalmazás az eKRÉTA rendszerhez
|
||||||
|
|
||||||
[](http://filcnaplo.hu/discord) [](https://codemagic.io/apps/612cc79b35b443d1b2c638ec/612cc79b35b443d1b2c638eb/latest_build)
|
[](https://github.com/filc/naplo/releases) [](http://filcnaplo.hu/discord) [](https://codemagic.io/apps/612cc79b35b443d1b2c638ec/612cc79b35b443d1b2c638eb/latest_build)
|
||||||
|
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
|
|||||||
1
filcnaplo/android/.gitignore
vendored
@@ -9,3 +9,4 @@ GeneratedPluginRegistrant.java
|
|||||||
# Remember to never publicly share your keystore.
|
# Remember to never publicly share your keystore.
|
||||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||||
key.properties
|
key.properties
|
||||||
|
.project
|
||||||
@@ -52,6 +52,7 @@ android {
|
|||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@@ -77,6 +78,7 @@ flutter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation 'com.android.support:multidex:2.0.1'
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
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'
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<application android:label="Filc Napló" android:icon="@mipmap/ic_launcher" android:requestLegacyExternalStorage="true">
|
<application android:label="Filc Napló" android:icon="@mipmap/ic_launcher" android:requestLegacyExternalStorage="true">
|
||||||
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
|
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
|
||||||
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
|
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
|
||||||
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" />
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.6.3'
|
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,6 @@
|
|||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0</string>
|
<string>1.0</string>
|
||||||
<key>MinimumOSVersion</key>
|
<key>MinimumOSVersion</key>
|
||||||
<string>8.0</string>
|
<string>9.0</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|||||||
41
filcnaplo/ios/Podfile
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Uncomment this line to define a global platform for your project
|
||||||
|
# platform :ios, '9.0'
|
||||||
|
|
||||||
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
||||||
|
project 'Runner', {
|
||||||
|
'Debug' => :debug,
|
||||||
|
'Profile' => :release,
|
||||||
|
'Release' => :release,
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutter_root
|
||||||
|
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||||
|
unless File.exist?(generated_xcode_build_settings_path)
|
||||||
|
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||||
|
end
|
||||||
|
|
||||||
|
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||||
|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||||
|
return matches[1].strip if matches
|
||||||
|
end
|
||||||
|
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||||
|
end
|
||||||
|
|
||||||
|
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||||
|
|
||||||
|
flutter_ios_podfile_setup
|
||||||
|
|
||||||
|
target 'Runner' do
|
||||||
|
use_frameworks!
|
||||||
|
use_modular_headers!
|
||||||
|
|
||||||
|
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||||
|
end
|
||||||
|
|
||||||
|
post_install do |installer|
|
||||||
|
installer.pods_project.targets.each do |target|
|
||||||
|
flutter_additional_ios_build_settings(target)
|
||||||
|
end
|
||||||
|
end
|
||||||
129
filcnaplo/ios/Podfile.lock
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
PODS:
|
||||||
|
- DKImagePickerController/Core (4.3.2):
|
||||||
|
- DKImagePickerController/ImageDataManager
|
||||||
|
- DKImagePickerController/Resource
|
||||||
|
- DKImagePickerController/ImageDataManager (4.3.2)
|
||||||
|
- DKImagePickerController/PhotoGallery (4.3.2):
|
||||||
|
- DKImagePickerController/Core
|
||||||
|
- DKPhotoGallery
|
||||||
|
- DKImagePickerController/Resource (4.3.2)
|
||||||
|
- DKPhotoGallery (0.0.17):
|
||||||
|
- DKPhotoGallery/Core (= 0.0.17)
|
||||||
|
- DKPhotoGallery/Model (= 0.0.17)
|
||||||
|
- DKPhotoGallery/Preview (= 0.0.17)
|
||||||
|
- DKPhotoGallery/Resource (= 0.0.17)
|
||||||
|
- SDWebImage
|
||||||
|
- SwiftyGif
|
||||||
|
- DKPhotoGallery/Core (0.0.17):
|
||||||
|
- DKPhotoGallery/Model
|
||||||
|
- DKPhotoGallery/Preview
|
||||||
|
- SDWebImage
|
||||||
|
- SwiftyGif
|
||||||
|
- DKPhotoGallery/Model (0.0.17):
|
||||||
|
- SDWebImage
|
||||||
|
- SwiftyGif
|
||||||
|
- DKPhotoGallery/Preview (0.0.17):
|
||||||
|
- DKPhotoGallery/Model
|
||||||
|
- DKPhotoGallery/Resource
|
||||||
|
- SDWebImage
|
||||||
|
- SwiftyGif
|
||||||
|
- DKPhotoGallery/Resource (0.0.17):
|
||||||
|
- SDWebImage
|
||||||
|
- SwiftyGif
|
||||||
|
- file_picker (0.0.1):
|
||||||
|
- DKImagePickerController/PhotoGallery
|
||||||
|
- Flutter
|
||||||
|
- Flutter (1.0.0)
|
||||||
|
- flutter_custom_tabs (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- FMDB (2.7.5):
|
||||||
|
- FMDB/standard (= 2.7.5)
|
||||||
|
- FMDB/standard (2.7.5)
|
||||||
|
- open_file (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- package_info_plus (0.4.5):
|
||||||
|
- Flutter
|
||||||
|
- path_provider (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- "permission_handler (5.1.0+2)":
|
||||||
|
- Flutter
|
||||||
|
- SDWebImage (5.11.1):
|
||||||
|
- SDWebImage/Core (= 5.11.1)
|
||||||
|
- SDWebImage/Core (5.11.1)
|
||||||
|
- share_plus (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- sqflite (0.0.2):
|
||||||
|
- Flutter
|
||||||
|
- FMDB (>= 2.7.5)
|
||||||
|
- SwiftyGif (5.4.0)
|
||||||
|
- url_launcher (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- vibration (1.7.4-nullsafety.0):
|
||||||
|
- Flutter
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||||
|
- Flutter (from `Flutter`)
|
||||||
|
- flutter_custom_tabs (from `.symlinks/plugins/flutter_custom_tabs/ios`)
|
||||||
|
- open_file (from `.symlinks/plugins/open_file/ios`)
|
||||||
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
|
- path_provider (from `.symlinks/plugins/path_provider/ios`)
|
||||||
|
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
|
||||||
|
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||||
|
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
||||||
|
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
|
||||||
|
- vibration (from `.symlinks/plugins/vibration/ios`)
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
trunk:
|
||||||
|
- DKImagePickerController
|
||||||
|
- DKPhotoGallery
|
||||||
|
- FMDB
|
||||||
|
- SDWebImage
|
||||||
|
- SwiftyGif
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
file_picker:
|
||||||
|
:path: ".symlinks/plugins/file_picker/ios"
|
||||||
|
Flutter:
|
||||||
|
:path: Flutter
|
||||||
|
flutter_custom_tabs:
|
||||||
|
:path: ".symlinks/plugins/flutter_custom_tabs/ios"
|
||||||
|
open_file:
|
||||||
|
:path: ".symlinks/plugins/open_file/ios"
|
||||||
|
package_info_plus:
|
||||||
|
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||||
|
path_provider:
|
||||||
|
:path: ".symlinks/plugins/path_provider/ios"
|
||||||
|
permission_handler:
|
||||||
|
:path: ".symlinks/plugins/permission_handler/ios"
|
||||||
|
share_plus:
|
||||||
|
:path: ".symlinks/plugins/share_plus/ios"
|
||||||
|
sqflite:
|
||||||
|
:path: ".symlinks/plugins/sqflite/ios"
|
||||||
|
url_launcher:
|
||||||
|
:path: ".symlinks/plugins/url_launcher/ios"
|
||||||
|
vibration:
|
||||||
|
:path: ".symlinks/plugins/vibration/ios"
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d
|
||||||
|
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||||
|
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
|
||||||
|
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
||||||
|
flutter_custom_tabs: 7a10a08686955cb748e5d26e0ae586d30689bf89
|
||||||
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
|
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
|
||||||
|
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||||
|
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
|
||||||
|
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
|
||||||
|
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
|
||||||
|
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
|
||||||
|
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
||||||
|
SwiftyGif: 5d4af95df24caf1c570dbbcb32a3b8a0763bc6d7
|
||||||
|
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
||||||
|
vibration: 1ec279c4a1a7a646627b54039d812334b3f1114a
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
||||||
|
|
||||||
|
COCOAPODS: 1.11.0
|
||||||
@@ -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 */; };
|
||||||
|
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 */; };
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
@@ -31,10 +32,13 @@
|
|||||||
/* 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; };
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; 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>"; };
|
||||||
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; };
|
||||||
@@ -42,6 +46,7 @@
|
|||||||
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>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -49,12 +54,32 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
373A6ECB5FC71FE9D8AF2EDB /* Pods_Runner.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
|
6640A963014A9D4F31026053 /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
1F0ADD56276103500A3016C8 /* Pods_Runner.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
91FEB6212755D596FFFFEC73 /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
80777CF254888CE770D5F909 /* Pods-Runner.debug.xcconfig */,
|
||||||
|
98578F0EBCC6D3FF8391AAEB /* Pods-Runner.release.xcconfig */,
|
||||||
|
707F8089D970F81C480F73C4 /* Pods-Runner.profile.xcconfig */,
|
||||||
|
);
|
||||||
|
name = Pods;
|
||||||
|
path = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -72,6 +97,8 @@
|
|||||||
9740EEB11CF90186004384FC /* Flutter */,
|
9740EEB11CF90186004384FC /* Flutter */,
|
||||||
97C146F01CF9000F007C117D /* Runner */,
|
97C146F01CF9000F007C117D /* Runner */,
|
||||||
97C146EF1CF9000F007C117D /* Products */,
|
97C146EF1CF9000F007C117D /* Products */,
|
||||||
|
91FEB6212755D596FFFFEC73 /* Pods */,
|
||||||
|
6640A963014A9D4F31026053 /* Frameworks */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@@ -105,12 +132,14 @@
|
|||||||
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 */,
|
||||||
9740EEB61CF901F6004384FC /* Run Script */,
|
9740EEB61CF901F6004384FC /* Run Script */,
|
||||||
97C146EA1CF9000F007C117D /* Sources */,
|
97C146EA1CF9000F007C117D /* Sources */,
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||||
97C146EC1CF9000F007C117D /* Resources */,
|
97C146EC1CF9000F007C117D /* Resources */,
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
|
71459C0EB905E05018E3D78F /* [CP] Embed Pods Frameworks */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -183,6 +212,45 @@
|
|||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||||
};
|
};
|
||||||
|
71459C0EB905E05018E3D78F /* [CP] Embed Pods Frameworks */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Embed Pods Frameworks";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
779338C8D92BCBC36F75F791 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
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;
|
||||||
|
};
|
||||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
|||||||
@@ -4,4 +4,7 @@
|
|||||||
<FileRef
|
<FileRef
|
||||||
location = "group:Runner.xcodeproj">
|
location = "group:Runner.xcodeproj">
|
||||||
</FileRef>
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
</Workspace>
|
</Workspace>
|
||||||
|
|||||||
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png
Normal file
|
After Width: | Height: | Size: 620 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
filcnaplo/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
@@ -1,118 +1,204 @@
|
|||||||
{
|
{
|
||||||
"images": [
|
"images": [
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "60x60",
|
||||||
|
"expected-size": "180",
|
||||||
|
"filename": "180.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
"idiom": "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-20x20@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@3x.png",
|
|
||||||
"scale": "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size": "40x40",
|
"size": "40x40",
|
||||||
|
"expected-size": "80",
|
||||||
|
"filename": "80.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
"idiom": "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale": "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size": "40x40",
|
"size": "40x40",
|
||||||
|
"expected-size": "120",
|
||||||
|
"filename": "120.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
"idiom": "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "Icon-App-40x40@3x.png",
|
|
||||||
"scale": "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size": "60x60",
|
"size": "60x60",
|
||||||
|
"expected-size": "120",
|
||||||
|
"filename": "120.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
"idiom": "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "Icon-App-60x60@2x.png",
|
|
||||||
"scale": "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
"size": "57x57",
|
||||||
|
"expected-size": "57",
|
||||||
|
"filename": "57.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"expected-size": "58",
|
||||||
|
"filename": "58.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"expected-size": "29",
|
||||||
|
"filename": "29.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"expected-size": "87",
|
||||||
|
"filename": "87.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
"idiom": "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "Icon-App-60x60@3x.png",
|
|
||||||
"scale": "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "57x57",
|
||||||
"idiom" : "ipad",
|
"expected-size": "114",
|
||||||
"filename" : "Icon-App-20x20@1x.png",
|
"filename": "114.png",
|
||||||
"scale" : "1x"
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size": "20x20",
|
"size": "20x20",
|
||||||
"idiom" : "ipad",
|
"expected-size": "40",
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
"filename": "40.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "iphone",
|
||||||
"scale": "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size": "20x20",
|
||||||
"idiom" : "ipad",
|
"expected-size": "60",
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
"filename": "60.png",
|
||||||
"scale" : "1x"
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
},
|
"idiom": "iphone",
|
||||||
{
|
"scale": "3x"
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "83.5x83.5",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size": "1024x1024",
|
"size": "1024x1024",
|
||||||
|
"filename": "1024.png",
|
||||||
|
"expected-size": "1024",
|
||||||
"idiom": "ios-marketing",
|
"idiom": "ios-marketing",
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
"scale": "1x"
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "40x40",
|
||||||
|
"expected-size": "80",
|
||||||
|
"filename": "80.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "72x72",
|
||||||
|
"expected-size": "72",
|
||||||
|
"filename": "72.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "76x76",
|
||||||
|
"expected-size": "152",
|
||||||
|
"filename": "152.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "50x50",
|
||||||
|
"expected-size": "100",
|
||||||
|
"filename": "100.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"expected-size": "58",
|
||||||
|
"filename": "58.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "76x76",
|
||||||
|
"expected-size": "76",
|
||||||
|
"filename": "76.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "29x29",
|
||||||
|
"expected-size": "29",
|
||||||
|
"filename": "29.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "50x50",
|
||||||
|
"expected-size": "50",
|
||||||
|
"filename": "50.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "72x72",
|
||||||
|
"expected-size": "144",
|
||||||
|
"filename": "144.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "40x40",
|
||||||
|
"expected-size": "40",
|
||||||
|
"filename": "40.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "83.5x83.5",
|
||||||
|
"expected-size": "167",
|
||||||
|
"filename": "167.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "20x20",
|
||||||
|
"expected-size": "20",
|
||||||
|
"filename": "20.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size": "20x20",
|
||||||
|
"expected-size": "40",
|
||||||
|
"filename": "40.png",
|
||||||
|
"folder": "Assets.xcassets/AppIcon.appiconset/",
|
||||||
|
"idiom": "ipad",
|
||||||
|
"scale": "2x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info": {
|
"info": {
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 512 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 852 B |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 70 B After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 25 KiB |
@@ -39,6 +39,6 @@
|
|||||||
</scenes>
|
</scenes>
|
||||||
<resources>
|
<resources>
|
||||||
<image name="LaunchImage" width="512" height="512"/>
|
<image name="LaunchImage" width="512" height="512"/>
|
||||||
<image name="LaunchBackground" width="1" height="1"/>
|
<image name="LaunchBackground" width="1080" height="1920"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>filcnaplo</string>
|
<string>Filc Napló</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
@@ -48,5 +48,7 @@
|
|||||||
<string>https</string>
|
<string>https</string>
|
||||||
<string>http</string>
|
<string>http</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
|
<string>The app requires the photo library to set a custom profile picture.</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
8
filcnaplo/ios/Runner/Runner.entitlements
Normal file
@@ -0,0 +1,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">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>aps-environment</key>
|
||||||
|
<string>production</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -3,6 +3,7 @@ import 'dart:convert';
|
|||||||
import 'package:filcnaplo/models/config.dart';
|
import 'package:filcnaplo/models/config.dart';
|
||||||
import 'package:filcnaplo/models/news.dart';
|
import 'package:filcnaplo/models/news.dart';
|
||||||
import 'package:filcnaplo/models/release.dart';
|
import 'package:filcnaplo/models/release.dart';
|
||||||
|
import 'package:filcnaplo/models/supporter.dart';
|
||||||
import 'package:filcnaplo_kreta_api/models/school.dart';
|
import 'package:filcnaplo_kreta_api/models/school.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
@@ -10,6 +11,7 @@ class FilcAPI {
|
|||||||
static const SCHOOL_LIST = "https://filcnaplo.hu/v2/school_list.json";
|
static const SCHOOL_LIST = "https://filcnaplo.hu/v2/school_list.json";
|
||||||
static const CONFIG = "https://filcnaplo.hu/v2/config.json";
|
static const CONFIG = "https://filcnaplo.hu/v2/config.json";
|
||||||
static const NEWS = "https://filcnaplo.hu/v2/news.json";
|
static const NEWS = "https://filcnaplo.hu/v2/news.json";
|
||||||
|
static const SUPPORTERS = "https://filcnaplo.hu/v2/supporters.json";
|
||||||
static const REPO = "filc/naplo";
|
static const REPO = "filc/naplo";
|
||||||
static const RELEASES = "https://api.github.com/repos/$REPO/releases";
|
static const RELEASES = "https://api.github.com/repos/$REPO/releases";
|
||||||
|
|
||||||
@@ -18,7 +20,13 @@ class FilcAPI {
|
|||||||
http.Response res = await http.get(Uri.parse(SCHOOL_LIST));
|
http.Response res = await http.get(Uri.parse(SCHOOL_LIST));
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
return (jsonDecode(res.body) as List).cast<Map>().map((json) => School.fromJson(json)).toList();
|
List<School> schools = (jsonDecode(res.body) as List).cast<Map>().map((json) => School.fromJson(json)).toList();
|
||||||
|
schools.add(School(
|
||||||
|
city: "Tiszabura",
|
||||||
|
instituteCode: "supporttest-reni-tiszabura-teszt01",
|
||||||
|
name: "FILC Éles Reni tiszabura-teszt",
|
||||||
|
));
|
||||||
|
return schools;
|
||||||
} else {
|
} else {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
}
|
}
|
||||||
@@ -55,6 +63,20 @@ class FilcAPI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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}";
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
print("ERROR: FilcAPI.getSupporters: $error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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));
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:filcnaplo/utils/jwt.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/absence_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/absence_provider.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/event_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/event_provider.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/exam_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/exam_provider.dart';
|
||||||
@@ -10,10 +11,8 @@ import 'package:filcnaplo/api/providers/user_provider.dart';
|
|||||||
import 'package:filcnaplo/api/providers/database_provider.dart';
|
import 'package:filcnaplo/api/providers/database_provider.dart';
|
||||||
import 'package:filcnaplo/models/settings.dart';
|
import 'package:filcnaplo/models/settings.dart';
|
||||||
import 'package:filcnaplo/models/user.dart';
|
import 'package:filcnaplo/models/user.dart';
|
||||||
import 'package:filcnaplo/utils/jwt.dart';
|
|
||||||
import 'package:filcnaplo_kreta_api/client/api.dart';
|
import 'package:filcnaplo_kreta_api/client/api.dart';
|
||||||
import 'package:filcnaplo_kreta_api/client/client.dart';
|
import 'package:filcnaplo_kreta_api/client/client.dart';
|
||||||
import 'package:filcnaplo_kreta_api/models/message.dart';
|
|
||||||
import 'package:filcnaplo_kreta_api/models/student.dart';
|
import 'package:filcnaplo_kreta_api/models/student.dart';
|
||||||
import 'package:filcnaplo_kreta_api/models/week.dart';
|
import 'package:filcnaplo_kreta_api/models/week.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -65,12 +64,14 @@ Future loginApi({
|
|||||||
try {
|
try {
|
||||||
Provider.of<KretaClient>(context, listen: false).accessToken = res["access_token"];
|
Provider.of<KretaClient>(context, listen: false).accessToken = res["access_token"];
|
||||||
Map? studentJson = await Provider.of<KretaClient>(context, listen: false).getAPI(KretaAPI.student(instituteCode));
|
Map? studentJson = await Provider.of<KretaClient>(context, listen: false).getAPI(KretaAPI.student(instituteCode));
|
||||||
|
Student student = Student.fromJson(studentJson!);
|
||||||
var user = User(
|
var user = User(
|
||||||
username: username,
|
username: username,
|
||||||
password: password,
|
password: password,
|
||||||
instituteCode: instituteCode,
|
instituteCode: instituteCode,
|
||||||
name: JwtUtils.getNameFromJWT(res["access_token"]) ?? "?",
|
name: student.name,
|
||||||
student: Student.fromJson(studentJson!),
|
student: student,
|
||||||
|
role: JwtUtils.getRoleFromJWT(res["access_token"])!,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (onLogin != null) onLogin(user);
|
if (onLogin != null) onLogin(user);
|
||||||
@@ -82,14 +83,16 @@ Future loginApi({
|
|||||||
|
|
||||||
// Get user data
|
// Get user data
|
||||||
try {
|
try {
|
||||||
await Provider.of<GradeProvider>(context, listen: false).fetch();
|
await Future.wait([
|
||||||
await Provider.of<TimetableProvider>(context, listen: false).fetch(week: Week.current());
|
Provider.of<GradeProvider>(context, listen: false).fetch(),
|
||||||
await Provider.of<ExamProvider>(context, listen: false).fetch();
|
Provider.of<TimetableProvider>(context, listen: false).fetch(week: Week.current()),
|
||||||
await Provider.of<HomeworkProvider>(context, listen: false).fetch();
|
Provider.of<ExamProvider>(context, listen: false).fetch(),
|
||||||
await Provider.of<MessageProvider>(context, listen: false).fetch(type: MessageType.inbox);
|
Provider.of<HomeworkProvider>(context, listen: false).fetch(),
|
||||||
await Provider.of<NoteProvider>(context, listen: false).fetch();
|
Provider.of<MessageProvider>(context, listen: false).fetchAll(),
|
||||||
await Provider.of<EventProvider>(context, listen: false).fetch();
|
Provider.of<NoteProvider>(context, listen: false).fetch(),
|
||||||
await Provider.of<AbsenceProvider>(context, listen: false).fetch();
|
Provider.of<EventProvider>(context, listen: false).fetch(),
|
||||||
|
Provider.of<AbsenceProvider>(context, listen: false).fetch(),
|
||||||
|
]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
print("WARNING: failed to fetch user data: $error");
|
print("WARNING: failed to fetch user data: $error");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ class UpdateProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
// Check for new releases
|
// Check for new releases
|
||||||
if (_releases.length > 0) {
|
if (_releases.length > 0) {
|
||||||
print("INFO: New update: ${releases.first.version}");
|
|
||||||
_available = _packageInfo != null && _releases.first.version.compareTo(Version.fromString(_packageInfo?.version ?? "")) == 1;
|
_available = _packageInfo != null && _releases.first.version.compareTo(Version.fromString(_packageInfo?.version ?? "")) == 1;
|
||||||
|
if (_available) print("INFO: New update: ${releases.first.version}");
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class UserProvider with ChangeNotifier {
|
|||||||
String? get name => user?.name;
|
String? get name => user?.name;
|
||||||
String? get username => user?.username;
|
String? get username => user?.username;
|
||||||
String? get password => user?.password;
|
String? get password => user?.password;
|
||||||
|
Role? get role => user?.role;
|
||||||
Student? get student => user?.student;
|
Student? get student => user?.student;
|
||||||
|
|
||||||
void setUser(String userId) {
|
void setUser(String userId) {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:filcnaplo/api/client.dart';
|
import 'package:filcnaplo/api/client.dart';
|
||||||
import 'package:filcnaplo/api/providers/news_provider.dart';
|
import 'package:filcnaplo/api/providers/news_provider.dart';
|
||||||
import 'package:filcnaplo/api/providers/database_provider.dart';
|
import 'package:filcnaplo/api/providers/database_provider.dart';
|
||||||
@@ -50,7 +52,7 @@ class App extends StatelessWidget {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return I18n(
|
return I18n(
|
||||||
initialLocale: Locale(settings.language, settings.language),
|
initialLocale: Locale(settings.language, settings.language.toUpperCase()),
|
||||||
child: MultiProvider(
|
child: MultiProvider(
|
||||||
providers: [
|
providers: [
|
||||||
ChangeNotifierProvider<SettingsProvider>(create: (_) => settings),
|
ChangeNotifierProvider<SettingsProvider>(create: (_) => settings),
|
||||||
@@ -74,7 +76,17 @@ class App extends StatelessWidget {
|
|||||||
ChangeNotifierProvider<GradeCalculatorProvider>(create: (context) => GradeCalculatorProvider(context)),
|
ChangeNotifierProvider<GradeCalculatorProvider>(create: (context) => GradeCalculatorProvider(context)),
|
||||||
],
|
],
|
||||||
child: Consumer<ThemeModeObserver>(
|
child: Consumer<ThemeModeObserver>(
|
||||||
builder: (context, themeMode, child) => MaterialApp(
|
builder: (context, themeMode, child) {
|
||||||
|
return MaterialApp(
|
||||||
|
builder: (context, child) {
|
||||||
|
// Limit font size scaling to 1.0
|
||||||
|
double textScaleFactor = min(MediaQuery.of(context).textScaleFactor, 1.0);
|
||||||
|
|
||||||
|
return MediaQuery(
|
||||||
|
data: MediaQuery.of(context).copyWith(textScaleFactor: textScaleFactor),
|
||||||
|
child: child ?? Container(),
|
||||||
|
);
|
||||||
|
},
|
||||||
title: "Filc Napló",
|
title: "Filc Napló",
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
theme: AppTheme.lightTheme(context),
|
theme: AppTheme.lightTheme(context),
|
||||||
@@ -86,12 +98,25 @@ class App extends StatelessWidget {
|
|||||||
GlobalCupertinoLocalizations.delegate,
|
GlobalCupertinoLocalizations.delegate,
|
||||||
],
|
],
|
||||||
supportedLocales: [
|
supportedLocales: [
|
||||||
const Locale('en'),
|
const Locale('en', 'EN'),
|
||||||
const Locale('hu'),
|
const Locale('hu', 'HU'),
|
||||||
const Locale('de'),
|
const Locale('de', 'DE'),
|
||||||
],
|
],
|
||||||
|
localeListResolutionCallback: (locales, supported) {
|
||||||
|
Locale locale = Locale('hu', 'HU');
|
||||||
|
|
||||||
|
for (var loc in locales ?? []) {
|
||||||
|
if (supported.contains(loc)) {
|
||||||
|
locale = loc;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return locale;
|
||||||
|
},
|
||||||
onGenerateRoute: (settings) => rootNavigator(settings),
|
onGenerateRoute: (settings) => rootNavigator(settings),
|
||||||
initialRoute: user.getUsers().length > 0 ? "navigation" : "login"),
|
initialRoute: user.getUsers().length > 0 ? "navigation" : "login");
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Future<DatabaseStruct> createSettingsTable(Database db) async {
|
|||||||
"language": String, "start_page": int, "rounding": int, "theme": int, "accent_color": int, "news": int, "news_state": int, "developer_mode": int,
|
"language": String, "start_page": int, "rounding": int, "theme": int, "accent_color": int, "news": int, "news_state": int, "developer_mode": int,
|
||||||
"update_channel": int, "config": String, // general
|
"update_channel": int, "config": String, // general
|
||||||
"grade_color1": int, "grade_color2": int, "grade_color3": int, "grade_color4": int, "grade_color5": int, // grade colors
|
"grade_color1": int, "grade_color2": int, "grade_color3": int, "grade_color4": int, "grade_color5": int, // grade colors
|
||||||
"vibrate": int, "vibration_strength": int, "ab_weeks": int, "swap_ab_weeks": int,
|
"vibration_strength": int, "ab_weeks": int, "swap_ab_weeks": int,
|
||||||
"notifications": int, "notifications_bitfield": int, "notification_poll_interval": int, // notifications
|
"notifications": int, "notifications_bitfield": int, "notification_poll_interval": int, // notifications
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -7,16 +7,16 @@ class SubjectIcon {
|
|||||||
static IconData? lookup({Subject? subject, String? subjectName}) {
|
static IconData? lookup({Subject? subject, String? subjectName}) {
|
||||||
assert(!(subject == null && subjectName == null));
|
assert(!(subject == null && subjectName == null));
|
||||||
|
|
||||||
String name = subject?.name.toLowerCase().specialChars() ?? subjectName ?? "";
|
String name = subject?.name.toLowerCase().specialChars().trim() ?? subjectName ?? "";
|
||||||
String category = subject?.category.description.toLowerCase().specialChars() ?? "";
|
String category = subject?.category.description.toLowerCase().specialChars() ?? "";
|
||||||
|
|
||||||
// todo: check for categories
|
// todo: check for categories
|
||||||
if (RegExp("mate(k|matika)").hasMatch(name) || category == "matematika") return Icons.calculate_outlined;
|
if (RegExp("mate(k|matika)").hasMatch(name) || category == "matematika") return Icons.calculate_outlined;
|
||||||
if (RegExp("magyar nyelv|nyelvtan").hasMatch(name)) return Icons.spellcheck_outlined;
|
if (RegExp("magyar nyelv|nyelvtan").hasMatch(name)) return Icons.spellcheck_outlined;
|
||||||
if (RegExp("irodalom").hasMatch(name)) return Icons.menu_book_outlined;
|
if (RegExp("irodalom").hasMatch(name)) return Icons.menu_book_outlined;
|
||||||
if (RegExp("rajz|muvtori|muveszet|kultura").hasMatch(name)) return Icons.palette_outlined;
|
|
||||||
if (RegExp("tor(i|tenelem)").hasMatch(name)) return Icons.hourglass_empty_outlined;
|
if (RegExp("tor(i|tenelem)").hasMatch(name)) return Icons.hourglass_empty_outlined;
|
||||||
if (RegExp("foldrajz").hasMatch(name)) return Icons.public_outlined;
|
if (RegExp("foldrajz").hasMatch(name)) return Icons.public_outlined;
|
||||||
|
if (RegExp("rajz|muvtori|muveszet|kultura").hasMatch(name)) return Icons.palette_outlined;
|
||||||
if (RegExp("fizika").hasMatch(name)) return Icons.emoji_objects_outlined;
|
if (RegExp("fizika").hasMatch(name)) return Icons.emoji_objects_outlined;
|
||||||
if (RegExp("^enek|zene|szolfezs|zongora|korus").hasMatch(name)) return Icons.music_note_outlined;
|
if (RegExp("^enek|zene|szolfezs|zongora|korus").hasMatch(name)) return Icons.music_note_outlined;
|
||||||
if (RegExp("^tes(i|tneveles)|sport").hasMatch(name)) return Icons.sports_soccer_outlined;
|
if (RegExp("^tes(i|tneveles)|sport").hasMatch(name)) return Icons.sports_soccer_outlined;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import 'package:provider/provider.dart';
|
|||||||
|
|
||||||
enum Pages { home, grades, timetable, messages, absences }
|
enum Pages { home, grades, timetable, messages, absences }
|
||||||
enum UpdateChannel { stable, beta, dev }
|
enum UpdateChannel { stable, beta, dev }
|
||||||
enum VibrationStrength { light, medium, strong }
|
enum VibrationStrength { off, light, medium, strong }
|
||||||
|
|
||||||
class SettingsProvider extends ChangeNotifier {
|
class SettingsProvider extends ChangeNotifier {
|
||||||
PackageInfo? _packageInfo;
|
PackageInfo? _packageInfo;
|
||||||
@@ -42,8 +42,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
// minutes: times 15
|
// minutes: times 15
|
||||||
int _notificationPollInterval;
|
int _notificationPollInterval;
|
||||||
bool _developerMode;
|
bool _developerMode;
|
||||||
bool _vibrate;
|
VibrationStrength _vibrate;
|
||||||
VibrationStrength _vibrationStrength;
|
|
||||||
bool _ABweeks;
|
bool _ABweeks;
|
||||||
bool _swapABweeks;
|
bool _swapABweeks;
|
||||||
UpdateChannel _updateChannel;
|
UpdateChannel _updateChannel;
|
||||||
@@ -62,8 +61,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
required int notificationsBitfield,
|
required int notificationsBitfield,
|
||||||
required bool developerMode,
|
required bool developerMode,
|
||||||
required int notificationPollInterval,
|
required int notificationPollInterval,
|
||||||
required bool vibrate,
|
required VibrationStrength vibrate,
|
||||||
required VibrationStrength vibrationStrength,
|
|
||||||
required bool ABweeks,
|
required bool ABweeks,
|
||||||
required bool swapABweeks,
|
required bool swapABweeks,
|
||||||
required UpdateChannel updateChannel,
|
required UpdateChannel updateChannel,
|
||||||
@@ -81,7 +79,6 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
_developerMode = developerMode,
|
_developerMode = developerMode,
|
||||||
_notificationPollInterval = notificationPollInterval,
|
_notificationPollInterval = notificationPollInterval,
|
||||||
_vibrate = vibrate,
|
_vibrate = vibrate,
|
||||||
_vibrationStrength = vibrationStrength,
|
|
||||||
_ABweeks = ABweeks,
|
_ABweeks = ABweeks,
|
||||||
_swapABweeks = swapABweeks,
|
_swapABweeks = swapABweeks,
|
||||||
_updateChannel = updateChannel,
|
_updateChannel = updateChannel,
|
||||||
@@ -111,8 +108,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 ? true : false,
|
developerMode: map["developer_mode"] == 1 ? true : false,
|
||||||
vibrate: map["vibrate"] == 1 ? true : false,
|
vibrate: VibrationStrength.values[map["vibration_strength"]],
|
||||||
vibrationStrength: VibrationStrength.values[map["vibration_strength"]],
|
|
||||||
ABweeks: map["ab_weeks"] == 1 ? true : false,
|
ABweeks: map["ab_weeks"] == 1 ? true : false,
|
||||||
swapABweeks: map["swap_ab_weeks"] == 1 ? true : false,
|
swapABweeks: map["swap_ab_weeks"] == 1 ? true : false,
|
||||||
updateChannel: UpdateChannel.values[map["update_channel"]],
|
updateChannel: UpdateChannel.values[map["update_channel"]],
|
||||||
@@ -138,8 +134,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
"grade_color4": _gradeColors[3].value,
|
"grade_color4": _gradeColors[3].value,
|
||||||
"grade_color5": _gradeColors[4].value,
|
"grade_color5": _gradeColors[4].value,
|
||||||
"update_channel": _updateChannel.index,
|
"update_channel": _updateChannel.index,
|
||||||
"vibrate": _vibrate ? 1 : 0,
|
"vibration_strength": _vibrate.index,
|
||||||
"vibration_strength": _vibrationStrength.index,
|
|
||||||
"ab_weeks": _ABweeks ? 1 : 0,
|
"ab_weeks": _ABweeks ? 1 : 0,
|
||||||
"swap_ab_weeks": _swapABweeks ? 1 : 0,
|
"swap_ab_weeks": _swapABweeks ? 1 : 0,
|
||||||
"notification_poll_interval": _notificationPollInterval,
|
"notification_poll_interval": _notificationPollInterval,
|
||||||
@@ -167,8 +162,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
notificationsBitfield: 255,
|
notificationsBitfield: 255,
|
||||||
developerMode: false,
|
developerMode: false,
|
||||||
notificationPollInterval: 1,
|
notificationPollInterval: 1,
|
||||||
vibrate: true,
|
vibrate: VibrationStrength.medium,
|
||||||
vibrationStrength: VibrationStrength.medium,
|
|
||||||
ABweeks: false,
|
ABweeks: false,
|
||||||
swapABweeks: false,
|
swapABweeks: false,
|
||||||
updateChannel: UpdateChannel.stable,
|
updateChannel: UpdateChannel.stable,
|
||||||
@@ -189,8 +183,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
int get notificationsBitfield => _notificationsBitfield;
|
int get notificationsBitfield => _notificationsBitfield;
|
||||||
bool get developerMode => _developerMode;
|
bool get developerMode => _developerMode;
|
||||||
int get notificationPollInterval => _notificationPollInterval;
|
int get notificationPollInterval => _notificationPollInterval;
|
||||||
bool get vibrate => _vibrate;
|
VibrationStrength get vibrate => _vibrate;
|
||||||
VibrationStrength get vibrationStrength => _vibrationStrength;
|
|
||||||
bool get ABweeks => _ABweeks;
|
bool get ABweeks => _ABweeks;
|
||||||
bool get swapABweeks => _swapABweeks;
|
bool get swapABweeks => _swapABweeks;
|
||||||
UpdateChannel get updateChannel => _updateChannel;
|
UpdateChannel get updateChannel => _updateChannel;
|
||||||
@@ -212,8 +205,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
int? notificationsBitfield,
|
int? notificationsBitfield,
|
||||||
bool? developerMode,
|
bool? developerMode,
|
||||||
int? notificationPollInterval,
|
int? notificationPollInterval,
|
||||||
bool? vibrate,
|
VibrationStrength? vibrate,
|
||||||
VibrationStrength? vibrationStrength,
|
|
||||||
bool? ABweeks,
|
bool? ABweeks,
|
||||||
bool? swapABweeks,
|
bool? swapABweeks,
|
||||||
UpdateChannel? updateChannel,
|
UpdateChannel? updateChannel,
|
||||||
@@ -233,7 +225,6 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
if (notificationPollInterval != null && notificationPollInterval != _notificationPollInterval)
|
if (notificationPollInterval != null && notificationPollInterval != _notificationPollInterval)
|
||||||
_notificationPollInterval = notificationPollInterval;
|
_notificationPollInterval = notificationPollInterval;
|
||||||
if (vibrate != null && vibrate != _vibrate) _vibrate = vibrate;
|
if (vibrate != null && vibrate != _vibrate) _vibrate = vibrate;
|
||||||
if (vibrationStrength != null && vibrationStrength != _vibrationStrength) _vibrationStrength = vibrationStrength;
|
|
||||||
if (ABweeks != null && ABweeks != _ABweeks) _ABweeks = ABweeks;
|
if (ABweeks != null && ABweeks != _ABweeks) _ABweeks = ABweeks;
|
||||||
if (swapABweeks != null && swapABweeks != _swapABweeks) _swapABweeks = swapABweeks;
|
if (swapABweeks != null && swapABweeks != _swapABweeks) _swapABweeks = swapABweeks;
|
||||||
if (updateChannel != null && updateChannel != _updateChannel) _updateChannel = updateChannel;
|
if (updateChannel != null && updateChannel != _updateChannel) _updateChannel = updateChannel;
|
||||||
|
|||||||
38
filcnaplo/lib/models/supporter.dart
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
class Supporter {
|
||||||
|
String name;
|
||||||
|
String amount;
|
||||||
|
String platform;
|
||||||
|
|
||||||
|
Supporter(this.name, this.amount, this.platform);
|
||||||
|
|
||||||
|
factory Supporter.fromJson(Map json) {
|
||||||
|
return Supporter(
|
||||||
|
(json["name"] ?? "").trim(),
|
||||||
|
json["amount"] ?? "",
|
||||||
|
json["platform"] ?? "",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Supporters {
|
||||||
|
List<Supporter> top;
|
||||||
|
List<Supporter> all;
|
||||||
|
int progress;
|
||||||
|
int max;
|
||||||
|
|
||||||
|
Supporters({
|
||||||
|
required this.top,
|
||||||
|
required this.all,
|
||||||
|
required this.progress,
|
||||||
|
required this.max,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Supporters.fromJson(Map json) {
|
||||||
|
return Supporters(
|
||||||
|
max: (json["progress"] ?? {})["max"] ?? 1,
|
||||||
|
progress: (json["progress"] ?? {})["value"] ?? 0,
|
||||||
|
all: ((json["all"] ?? []) as List).cast<Map>().map((e) => Supporter.fromJson(e)).toList(),
|
||||||
|
top: ((json["top"] ?? []) as List).cast<Map>().map((e) => Supporter.fromJson(e)).toList(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,8 @@ import 'package:filcnaplo_kreta_api/client/api.dart';
|
|||||||
import 'package:filcnaplo_kreta_api/models/student.dart';
|
import 'package:filcnaplo_kreta_api/models/student.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
|
enum Role { student, parent }
|
||||||
|
|
||||||
class User {
|
class User {
|
||||||
late String id;
|
late String id;
|
||||||
String username;
|
String username;
|
||||||
@@ -10,6 +12,7 @@ class User {
|
|||||||
String instituteCode;
|
String instituteCode;
|
||||||
String name;
|
String name;
|
||||||
Student student;
|
Student student;
|
||||||
|
Role role;
|
||||||
|
|
||||||
User({
|
User({
|
||||||
String? id,
|
String? id,
|
||||||
@@ -18,6 +21,7 @@ class User {
|
|||||||
required this.password,
|
required this.password,
|
||||||
required this.instituteCode,
|
required this.instituteCode,
|
||||||
required this.student,
|
required this.student,
|
||||||
|
required this.role,
|
||||||
}) {
|
}) {
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
@@ -32,8 +36,9 @@ class User {
|
|||||||
instituteCode: map["institute_code"],
|
instituteCode: map["institute_code"],
|
||||||
username: map["username"],
|
username: map["username"],
|
||||||
password: map["password"],
|
password: map["password"],
|
||||||
name: map["name"],
|
name: map["name"].trim(),
|
||||||
student: Student.fromJson(jsonDecode(map["student"])),
|
student: Student.fromJson(jsonDecode(map["student"])),
|
||||||
|
role: Role.values[map["role"] ?? 0],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,9 +50,13 @@ class User {
|
|||||||
"institute_code": instituteCode,
|
"institute_code": instituteCode,
|
||||||
"name": name,
|
"name": name,
|
||||||
"student": jsonEncode(student.json),
|
"student": jsonEncode(student.json),
|
||||||
|
"role": role.index,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => jsonEncode(toMap());
|
||||||
|
|
||||||
static Map<String, Object?> loginBody({
|
static Map<String, Object?> loginBody({
|
||||||
required String username,
|
required String username,
|
||||||
required String password,
|
required String password,
|
||||||
|
|||||||
@@ -1,376 +0,0 @@
|
|||||||
// import 'dart:io';
|
|
||||||
// import 'dart:typed_data';
|
|
||||||
|
|
||||||
// import 'package:feather_icons_flutter/feather_icons_flutter.dart';
|
|
||||||
// import 'package:filcnaplo/data/context/app.dart';
|
|
||||||
// import 'package:filcnaplo/ui/common/bottom_card.dart';
|
|
||||||
// import 'package:filcnaplo/utils/colors.dart';
|
|
||||||
// import 'package:flutter/cupertino.dart';
|
|
||||||
// import 'package:flutter/material.dart';
|
|
||||||
// import 'package:filcnaplo/generated/i18n.dart';
|
|
||||||
// import 'package:flutter_markdown/flutter_markdown.dart';
|
|
||||||
// import 'package:http/http.dart' as http;
|
|
||||||
// import 'package:path_provider/path_provider.dart';
|
|
||||||
// import 'package:open_file/open_file.dart';
|
|
||||||
// import 'package:filcnaplo/data/context/theme.dart';
|
|
||||||
|
|
||||||
// import '../../ui/common/custom_snackbar.dart';
|
|
||||||
|
|
||||||
// enum InstallState { update, downloading, saving, installing }
|
|
||||||
|
|
||||||
// class AutoUpdater extends StatefulWidget {
|
|
||||||
// @override
|
|
||||||
// _AutoUpdaterState createState() => _AutoUpdaterState();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// class _AutoUpdaterState extends State<AutoUpdater> {
|
|
||||||
// bool buttonPressed = false;
|
|
||||||
// double progress;
|
|
||||||
// bool displayProgress = false;
|
|
||||||
// InstallState installState;
|
|
||||||
|
|
||||||
// void downloadCallback(
|
|
||||||
// double progress, bool displayProgress, InstallState installState) {
|
|
||||||
// if (mounted) {
|
|
||||||
// setState(() {
|
|
||||||
// this.progress = progress;
|
|
||||||
// this.displayProgress = displayProgress;
|
|
||||||
// this.installState = installState;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// if (!buttonPressed) installState = InstallState.update;
|
|
||||||
|
|
||||||
// String buttonText;
|
|
||||||
|
|
||||||
// switch (installState) {
|
|
||||||
// case InstallState.update:
|
|
||||||
// buttonText = I18n.of(context).update;
|
|
||||||
// break;
|
|
||||||
// case InstallState.downloading:
|
|
||||||
// buttonText = I18n.of(context).updateDownloading;
|
|
||||||
// break;
|
|
||||||
// case InstallState.saving:
|
|
||||||
// buttonText = I18n.of(context).updateSaving;
|
|
||||||
// break;
|
|
||||||
// case InstallState.installing:
|
|
||||||
// buttonText = I18n.of(context).updateInstalling;
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// buttonText = I18n.of(context).error;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return BottomCard(
|
|
||||||
// child: Padding(
|
|
||||||
// padding: EdgeInsets.only(top: 13),
|
|
||||||
// child: Column(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
// children: [
|
|
||||||
// Expanded(
|
|
||||||
// child: Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// Row(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// Expanded(
|
|
||||||
// child: ListTile(
|
|
||||||
// contentPadding: EdgeInsets.only(left: 8.0),
|
|
||||||
// title: Text(
|
|
||||||
// I18n.of(context).updateNewVersion,
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 23,
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// subtitle: Text(
|
|
||||||
// app.user.sync.release.latestRelease.version,
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// fontSize: 18,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ClipRRect(
|
|
||||||
// borderRadius: BorderRadius.circular(12.0),
|
|
||||||
// child: Image.asset(
|
|
||||||
// "assets/logo.png",
|
|
||||||
// width: 60,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// Padding(
|
|
||||||
// padding: EdgeInsets.all(8),
|
|
||||||
// child: Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
// children: [
|
|
||||||
// Text(
|
|
||||||
// I18n.of(context).updateChanges + ":",
|
|
||||||
// style: TextStyle(fontSize: 18),
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// I18n.of(context).updateCurrentVersion +
|
|
||||||
// ": " +
|
|
||||||
// app.currentAppVersion,
|
|
||||||
// style:
|
|
||||||
// TextStyle(color: Colors.white.withAlpha(180)),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// child: Padding(
|
|
||||||
// padding: EdgeInsets.all(8.0),
|
|
||||||
// child: Builder(builder: (context) {
|
|
||||||
// try {
|
|
||||||
// return Markdown(
|
|
||||||
// shrinkWrap: true,
|
|
||||||
// data: app.user.sync.release.latestRelease.notes,
|
|
||||||
// padding: EdgeInsets.all(0),
|
|
||||||
// physics: BouncingScrollPhysics(),
|
|
||||||
// styleSheet: MarkdownStyleSheet(
|
|
||||||
// p: TextStyle(
|
|
||||||
// fontSize: 15,
|
|
||||||
// color: app.settings.theme.textTheme
|
|
||||||
// .bodyText1.color,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// } catch (e) {
|
|
||||||
// print(
|
|
||||||
// "ERROR: autoUpdater.dart failed to show markdown release notes: " +
|
|
||||||
// e.toString());
|
|
||||||
// return Text(
|
|
||||||
// app.user.sync.release.latestRelease.notes);
|
|
||||||
// }
|
|
||||||
// })),
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Stack(
|
|
||||||
// children: [
|
|
||||||
// Row(
|
|
||||||
// mainAxisSize: MainAxisSize.max,
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
// children: [
|
|
||||||
// IconButton(
|
|
||||||
// icon: Icon(FeatherIcons.helpCircle),
|
|
||||||
// onPressed: () {
|
|
||||||
// showDialog(
|
|
||||||
// context: context,
|
|
||||||
// builder: (context) => HelpDialog());
|
|
||||||
// })
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// Center(
|
|
||||||
// child: MaterialButton(
|
|
||||||
// color: ThemeContext.filcGreen,
|
|
||||||
// elevation: 0,
|
|
||||||
// highlightElevation: 0,
|
|
||||||
// shape: RoundedRectangleBorder(
|
|
||||||
// borderRadius: BorderRadius.circular(45.0)),
|
|
||||||
// child: Padding(
|
|
||||||
// padding: EdgeInsets.symmetric(vertical: 9),
|
|
||||||
// child: Row(
|
|
||||||
// mainAxisSize: MainAxisSize.min,
|
|
||||||
// children: [
|
|
||||||
// if (displayProgress)
|
|
||||||
// Container(
|
|
||||||
// margin: EdgeInsets.only(right: 10),
|
|
||||||
// height: 19,
|
|
||||||
// width: 19,
|
|
||||||
// child: CircularProgressIndicator(
|
|
||||||
// value: progress,
|
|
||||||
// valueColor: AlwaysStoppedAnimation<Color>(
|
|
||||||
// Colors.white),
|
|
||||||
// strokeWidth: 3.2,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// buttonText.toUpperCase(),
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 17,
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// color: Colors.white),
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// onPressed: () {
|
|
||||||
// if (!buttonPressed)
|
|
||||||
// installUpdate(context, downloadCallback);
|
|
||||||
// buttonPressed = true;
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ]),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Future installUpdate(BuildContext context, Function updateDisplay) async {
|
|
||||||
// updateDisplay(null, true, InstallState.downloading);
|
|
||||||
|
|
||||||
// String dir = (await getApplicationDocumentsDirectory()).path;
|
|
||||||
// String latestVersion = app.user.sync.release.latestRelease.version;
|
|
||||||
// String filename = "filcnaplo-$latestVersion.apk";
|
|
||||||
// File apk = File("$dir/$filename");
|
|
||||||
|
|
||||||
// var httpClient = http.Client();
|
|
||||||
// var request = new http.Request(
|
|
||||||
// 'GET', Uri.parse(app.user.sync.release.latestRelease.url));
|
|
||||||
// var response = httpClient.send(request);
|
|
||||||
|
|
||||||
// List<List<int>> chunks = [];
|
|
||||||
// int downloaded = 0;
|
|
||||||
|
|
||||||
// response.asStream().listen((http.StreamedResponse r) {
|
|
||||||
// r.stream.listen((List<int> chunk) {
|
|
||||||
// // Display percentage of completion
|
|
||||||
// updateDisplay(
|
|
||||||
// downloaded / r.contentLength, true, InstallState.downloading);
|
|
||||||
|
|
||||||
// chunks.add(chunk);
|
|
||||||
// downloaded += chunk.length;
|
|
||||||
// }, onDone: () async {
|
|
||||||
// // Display percentage of completion
|
|
||||||
// updateDisplay(null, true, InstallState.saving);
|
|
||||||
|
|
||||||
// // Save the file
|
|
||||||
// final Uint8List bytes = Uint8List(r.contentLength);
|
|
||||||
// int offset = 0;
|
|
||||||
// for (List<int> chunk in chunks) {
|
|
||||||
// bytes.setRange(offset, offset + chunk.length, chunk);
|
|
||||||
// offset += chunk.length;
|
|
||||||
// }
|
|
||||||
// await apk.writeAsBytes(bytes);
|
|
||||||
|
|
||||||
// updateDisplay(null, true, InstallState.installing);
|
|
||||||
// if (mounted) {
|
|
||||||
// OpenFile.open(apk.path).then((result) {
|
|
||||||
// if (result.type != ResultType.done) {
|
|
||||||
// print("ERROR: installUpdate.openFile: " + result.message);
|
|
||||||
// ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
|
||||||
// message: I18n.of(context).error,
|
|
||||||
// color: Colors.red,
|
|
||||||
// ));
|
|
||||||
// }
|
|
||||||
// Navigator.pop(context);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// class HelpDialog extends StatelessWidget {
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return Scaffold(
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// body: Container(
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// color: app.settings.theme.backgroundColor,
|
|
||||||
// borderRadius: BorderRadius.circular(4.0),
|
|
||||||
// ),
|
|
||||||
// padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
|
|
||||||
// margin: EdgeInsets.all(32.0),
|
|
||||||
// child: Column(children: [
|
|
||||||
// Padding(
|
|
||||||
// padding: EdgeInsets.all(8.0),
|
|
||||||
// child: Center(
|
|
||||||
// child: Icon(FeatherIcons.helpCircle),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// child: Markdown(
|
|
||||||
// shrinkWrap: true,
|
|
||||||
// data: helpText,
|
|
||||||
// padding: EdgeInsets.all(0),
|
|
||||||
// physics: BouncingScrollPhysics(),
|
|
||||||
// styleSheet: MarkdownStyleSheet(
|
|
||||||
// p: TextStyle(
|
|
||||||
// fontSize: 15,
|
|
||||||
// color: Colors.white,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// MaterialButton(
|
|
||||||
// child: Text(I18n.of(context).dialogDone),
|
|
||||||
// onPressed: () {
|
|
||||||
// Navigator.of(context).pop();
|
|
||||||
// })
|
|
||||||
// ])));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const String helpText =
|
|
||||||
// """A **FRISSÍTÉS** gombot megnyomva az app automatikusan letölti a GitHubról a legfrissebb Filc telepítőt.\\
|
|
||||||
// Ez kb. 50 MB adatforgalommal jár.\\
|
|
||||||
// A letöltött telepítőt ezután megnyitja az app.
|
|
||||||
|
|
||||||
// Telefonmárkától és Android verziótól függően nagyon különböző a telepítés folyamata, de ezekre figyelj:
|
|
||||||
// - Ha kérdezi a telefon, **engedélyezd a Filctől származó appok telepítését**, majd nyomd meg a vissza gombot.\\
|
|
||||||
// _(Újabb Android verziók)_
|
|
||||||
// - Ha szól a telefon hogy a külső appok telepítése biztonsági okokból tiltott, a megjelenő gombbal **ugorj a beállításokba és kapcsold be az Ismeretlen források lehetőséget.**\\
|
|
||||||
// _(Régi Android verziók)_
|
|
||||||
|
|
||||||
// A telepítés után újra megnyílik az app, immár a legfrissebb verzióval. Az indítás során törli a telepítéshez használt .apk fájlokat, így a tárhelyed miatt nem kell aggódnod.
|
|
||||||
// """;
|
|
||||||
|
|
||||||
// class AutoUpdateButton extends StatelessWidget {
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return Padding(
|
|
||||||
// padding: EdgeInsets.only(bottom: 5.0),
|
|
||||||
// child: Container(
|
|
||||||
// margin: EdgeInsets.symmetric(horizontal: 14.0),
|
|
||||||
// child: MaterialButton(
|
|
||||||
// color: textColor(Theme.of(context).backgroundColor).withAlpha(25),
|
|
||||||
// elevation: 0,
|
|
||||||
// highlightElevation: 0,
|
|
||||||
// shape:
|
|
||||||
// RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
|
|
||||||
// child: ListTile(
|
|
||||||
// contentPadding: EdgeInsets.zero,
|
|
||||||
// leading: Icon(FeatherIcons.download, color: app.settings.appColor),
|
|
||||||
// title: Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
// children: [
|
|
||||||
// Flexible(
|
|
||||||
// child: Text(
|
|
||||||
// I18n.of(context).updateAvailable,
|
|
||||||
// softWrap: false,
|
|
||||||
// overflow: TextOverflow.fade,
|
|
||||||
// )),
|
|
||||||
// Text(
|
|
||||||
// app.user.sync.release.latestRelease.version,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: app.settings.appColor,
|
|
||||||
// fontWeight: FontWeight.bold),
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// onPressed: () {
|
|
||||||
// showModalBottomSheet(
|
|
||||||
// context: context,
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// builder: (BuildContext context) => AutoUpdater(),
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
// import 'dart:io';
|
|
||||||
// import 'package:filcnaplo/data/context/app.dart';
|
|
||||||
|
|
||||||
// class ReleaseSync {
|
|
||||||
// Release latestRelease;
|
|
||||||
// bool isNew = false;
|
|
||||||
|
|
||||||
// Future sync() async {
|
|
||||||
// if (!Platform.isAndroid) return;
|
|
||||||
|
|
||||||
// var releasesJson = await app.user.kreta.getReleases();
|
|
||||||
// if (!app.settings.preUpdates) {
|
|
||||||
// for (Map r in releasesJson) {
|
|
||||||
// if (!r["prerelease"]) {
|
|
||||||
// latestRelease = Release.fromJson(r);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// // List<Map> releases = [];
|
|
||||||
// latestRelease = Release.fromJson(releasesJson.first);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// isNew = compareVersions(latestRelease.version, app.currentAppVersion);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// bool compareVersions(String gitHub, String existing) {
|
|
||||||
// try {
|
|
||||||
// bool stableGitHub = false;
|
|
||||||
// List<String> gitHubPartsStrings = gitHub.split(RegExp(r"[.-]"));
|
|
||||||
// List<int> gitHubParts = [];
|
|
||||||
|
|
||||||
// for (String s in gitHubPartsStrings) {
|
|
||||||
// if (s.startsWith("beta")) {
|
|
||||||
// s = s.replaceAll("beta", "");
|
|
||||||
// } else if (s.startsWith("pre")) {
|
|
||||||
// //! pre versions have lower priority than beta
|
|
||||||
// s = s.replaceAll("pre", "");
|
|
||||||
// gitHubParts.add(0);
|
|
||||||
// } else {
|
|
||||||
// stableGitHub = true;
|
|
||||||
// }
|
|
||||||
// try {
|
|
||||||
// gitHubParts.add(int.parse(s));
|
|
||||||
// } catch (e) {
|
|
||||||
// print("ERROR: ReleaseSync.compareVersions: " + e.toString());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (stableGitHub) gitHubParts.add(1000);
|
|
||||||
|
|
||||||
// bool stableExisting = false;
|
|
||||||
// List<String> existingPartsStrings = existing.split(RegExp(r"[.-]"));
|
|
||||||
// List<int> existingParts = [];
|
|
||||||
|
|
||||||
// for (String s in existingPartsStrings) {
|
|
||||||
// if (s.startsWith("beta")) {
|
|
||||||
// s = s.replaceAll("beta", "");
|
|
||||||
// } else if (s.startsWith("pre")) {
|
|
||||||
// //! pre versions have lower priority than beta
|
|
||||||
// s = s.replaceAll("pre", "");
|
|
||||||
// existingParts.add(0);
|
|
||||||
// } else {
|
|
||||||
// stableExisting = true;
|
|
||||||
// }
|
|
||||||
// try {
|
|
||||||
// existingParts.add(int.parse(s));
|
|
||||||
// } catch (e) {
|
|
||||||
// print("ERROR: ReleaseSync.compareVersions: " + e.toString());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// // what even
|
|
||||||
// if (stableExisting) existingParts.add(1000);
|
|
||||||
|
|
||||||
// int i = 0;
|
|
||||||
// for (var gitHubPart in gitHubParts) {
|
|
||||||
// if (gitHubPart > existingParts[i])
|
|
||||||
// return true;
|
|
||||||
// else if (existingParts[i] > gitHubPart) return false;
|
|
||||||
// i++;
|
|
||||||
// }
|
|
||||||
// return false;
|
|
||||||
// } catch (e) {
|
|
||||||
// print("ERROR: ReleaseSync.compareVersions: " + e.toString());
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// class Release {
|
|
||||||
// String version;
|
|
||||||
// String notes;
|
|
||||||
// String url;
|
|
||||||
// bool isExperimental;
|
|
||||||
|
|
||||||
// Release(this.version, this.notes, this.url, this.isExperimental);
|
|
||||||
|
|
||||||
// factory Release.fromJson(Map json) {
|
|
||||||
// List<Map> assets = [];
|
|
||||||
// json["assets"].forEach((json) {
|
|
||||||
// assets.add(json);
|
|
||||||
// });
|
|
||||||
// String url = assets[0]["browser_download_url"];
|
|
||||||
|
|
||||||
// return Release(json["tag_name"], json["body"], url, json["prerelease"]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@@ -1,148 +0,0 @@
|
|||||||
// import 'package:filcnaplo/data/context/app.dart';
|
|
||||||
// import 'package:filcnaplo/data/models/lesson.dart';
|
|
||||||
// import 'package:filcnaplo/generated/i18n.dart';
|
|
||||||
// import 'package:filcnaplo/ui/common/custom_snackbar.dart';
|
|
||||||
// import 'package:filcnaplo/ui/pages/planner/timetable/day.dart';
|
|
||||||
// import 'package:filcnaplo/utils/format.dart';
|
|
||||||
// import 'package:filcnaplo/modules/printing/printerDebugScreen.dart';
|
|
||||||
// import 'package:flutter/material.dart';
|
|
||||||
// import 'package:flutter/services.dart' show rootBundle;
|
|
||||||
// import 'package:pdf/pdf.dart';
|
|
||||||
// import 'package:pdf/widgets.dart' as pw;
|
|
||||||
// import 'package:printing/printing.dart';
|
|
||||||
// import 'package:filcnaplo/ui/pages/planner/timetable/builder.dart';
|
|
||||||
// import 'package:flutter/foundation.dart';
|
|
||||||
|
|
||||||
// /*
|
|
||||||
// Author: daaniiieel
|
|
||||||
// Name: Timetable Printer (Experimental)
|
|
||||||
// Description: This module prints out the timetable for the selected user on the
|
|
||||||
// current week.
|
|
||||||
// */
|
|
||||||
|
|
||||||
// class TimetablePrinter {
|
|
||||||
// pw.Document build(
|
|
||||||
// BuildContext context, pw.Document pdf, List<Day> days, int min, int max) {
|
|
||||||
// List rows = <pw.TableRow>[];
|
|
||||||
|
|
||||||
// // build header row
|
|
||||||
// List<pw.Widget> headerChildren = <pw.Widget>[pw.Container()];
|
|
||||||
// days.forEach((day) => headerChildren.add(pw.Padding(
|
|
||||||
// padding: pw.EdgeInsets.all(5),
|
|
||||||
// child:
|
|
||||||
// pw.Center(child: pw.Text(weekdayStringShort(context, day.date.weekday))))));
|
|
||||||
// pw.TableRow headerRow = pw.TableRow(
|
|
||||||
// children: headerChildren,
|
|
||||||
// verticalAlignment: pw.TableCellVerticalAlignment.middle);
|
|
||||||
// rows.add(headerRow);
|
|
||||||
|
|
||||||
// // for each row
|
|
||||||
// for (int i = min; i < max; i++) {
|
|
||||||
// var children = <pw.Widget>[];
|
|
||||||
// var row = pw.TableRow(children: children);
|
|
||||||
|
|
||||||
// children.add(pw.Padding(
|
|
||||||
// padding: pw.EdgeInsets.all(5),
|
|
||||||
// child: pw.Center(child: pw.Text('$i. '))));
|
|
||||||
// days.forEach((Day day) {
|
|
||||||
// var lesson = day.lessons.firstWhere(
|
|
||||||
// (element) => element.lessonIndex != '+'
|
|
||||||
// ? int.parse(element.lessonIndex) == i
|
|
||||||
// : false,
|
|
||||||
// orElse: () => null);
|
|
||||||
|
|
||||||
// children.add(lesson != null
|
|
||||||
// ? pw.Padding(
|
|
||||||
// padding: pw.EdgeInsets.fromLTRB(5, 10, 5, 5),
|
|
||||||
// child: pw.Column(children: [
|
|
||||||
// pw.Text(lesson.name ?? lesson.subject.name),
|
|
||||||
// pw.Footer(
|
|
||||||
// leading: pw.Text(lesson.room),
|
|
||||||
// trailing: pw.Text(monogram(lesson.teacher))),
|
|
||||||
// ]))
|
|
||||||
// : pw.Padding(padding: pw.EdgeInsets.all(5)));
|
|
||||||
// });
|
|
||||||
// rows.add(row);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // add timetable to pdf
|
|
||||||
// pw.Table table = pw.Table(
|
|
||||||
// children: rows,
|
|
||||||
// border: pw.TableBorder.all(),
|
|
||||||
// defaultVerticalAlignment: pw.TableCellVerticalAlignment.middle,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// // header and footer
|
|
||||||
// pw.Footer footer = pw.Footer(
|
|
||||||
// trailing: pw.Text('filcnaplo.hu'),
|
|
||||||
// margin: pw.EdgeInsets.only(top: 12.0),
|
|
||||||
// );
|
|
||||||
// String className = app.user.sync.student.student.className;
|
|
||||||
|
|
||||||
// pw.Footer header = pw.Footer(
|
|
||||||
// margin: pw.EdgeInsets.all(5),
|
|
||||||
// title: pw.Text(className, style: pw.TextStyle(fontSize: 30)),
|
|
||||||
// );
|
|
||||||
|
|
||||||
// pdf.addPage(pw.Page(
|
|
||||||
// pageFormat: PdfPageFormat.a4
|
|
||||||
// .landscape, // so the page looks normal both in portrait and landscape
|
|
||||||
// orientation: pw.PageOrientation.landscape,
|
|
||||||
// build: (pw.Context context) =>
|
|
||||||
// pw.Column(children: <pw.Widget>[header, table, footer])));
|
|
||||||
|
|
||||||
// return pdf;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void printPDF(final _scaffoldKey, BuildContext context) {
|
|
||||||
// // pdf theme (for unicode support)
|
|
||||||
// rootBundle.load("assets/Roboto-Regular.ttf").then((font) {
|
|
||||||
// pw.ThemeData myTheme = pw.ThemeData.withFont(base: pw.Font.ttf(font));
|
|
||||||
// pw.Document pdf = pw.Document(theme: myTheme);
|
|
||||||
|
|
||||||
// // sync indicator
|
|
||||||
// ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
|
||||||
// message: I18n.of(context).syncTimetable,
|
|
||||||
// ));
|
|
||||||
|
|
||||||
// // get a builder and build current week
|
|
||||||
// final timetableBuilder = TimetableBuilder();
|
|
||||||
// timetableBuilder.build(timetableBuilder.getCurrentWeek());
|
|
||||||
|
|
||||||
// int minLessonIndex = 1;
|
|
||||||
// int maxLessonIndex = 1;
|
|
||||||
// List<Day> weekDays = timetableBuilder.week.days;
|
|
||||||
// for (Day day in weekDays) {
|
|
||||||
// for (Lesson lesson in day.lessons) {
|
|
||||||
// if (lesson.lessonIndex == '+') {
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
// if (int.parse(lesson.lessonIndex) < minLessonIndex) {
|
|
||||||
// minLessonIndex = int.parse(lesson.lessonIndex);
|
|
||||||
// }
|
|
||||||
// if (int.parse(lesson.lessonIndex) > maxLessonIndex) {
|
|
||||||
// maxLessonIndex = int.parse(lesson.lessonIndex);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// pdf = build(context, pdf, weekDays, minLessonIndex, maxLessonIndex);
|
|
||||||
|
|
||||||
// // print pdf
|
|
||||||
// if (kReleaseMode) {
|
|
||||||
// Printing.layoutPdf(onLayout: (format) => pdf.save()).then((success) {
|
|
||||||
// if (success)
|
|
||||||
// ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
|
||||||
// message: I18n.of(context).settingsExportExportTimetableSuccess,
|
|
||||||
// ));
|
|
||||||
// });
|
|
||||||
// } else {
|
|
||||||
// Navigator.push(
|
|
||||||
// context,
|
|
||||||
// MaterialPageRoute(
|
|
||||||
// builder: (c) =>
|
|
||||||
// PrintingDebugScreen((format) => Future.value(pdf.save()))));
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
// import 'dart:typed_data';
|
|
||||||
|
|
||||||
// import 'package:flutter/material.dart';
|
|
||||||
// import 'package:printing/printing.dart';
|
|
||||||
// import 'package:pdf/pdf.dart';
|
|
||||||
|
|
||||||
// class PrintingDebugScreen extends StatelessWidget {
|
|
||||||
// final Future<Uint8List> Function(PdfPageFormat) builder;
|
|
||||||
|
|
||||||
// PrintingDebugScreen(
|
|
||||||
// this.builder,
|
|
||||||
// );
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return Scaffold(body: Center(child: PdfPreview(build: this.builder)));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@@ -18,7 +18,7 @@ extension StringFormatUtils on String {
|
|||||||
|
|
||||||
String capital() => this.length > 0 ? this[0].toUpperCase() + this.substring(1) : "";
|
String capital() => this.length > 0 ? this[0].toUpperCase() + this.substring(1) : "";
|
||||||
|
|
||||||
String capitalize() => this.split(" ").map((w) => this.capital()).join(" ");
|
String capitalize() => this.split(" ").map((w) => w.capital()).join(" ");
|
||||||
|
|
||||||
String escapeHtml() {
|
String escapeHtml() {
|
||||||
String htmlString = this;
|
String htmlString = this;
|
||||||
@@ -37,11 +37,11 @@ extension DateFormatUtils on DateTime {
|
|||||||
if (timeOnly) return DateFormat("HH:mm").format(this);
|
if (timeOnly) return DateFormat("HH:mm").format(this);
|
||||||
|
|
||||||
DateTime now = DateTime.now();
|
DateTime now = DateTime.now();
|
||||||
if (this.difference(now).inDays == 0) {
|
if (now.year == this.year && now.month == this.month && now.day == this.day) {
|
||||||
if (this.hour == 0 && this.minute == 0 && this.second == 0) return "Today".i18n;
|
if (this.hour == 0 && this.minute == 0 && this.second == 0) return "Today".i18n;
|
||||||
return DateFormat("HH:mm").format(this);
|
return DateFormat("HH:mm").format(this);
|
||||||
}
|
}
|
||||||
if (this.difference(now).inDays == 1) return "Yesterday".i18n;
|
if (now.year == this.year && now.month == this.month && now.subtract(Duration(days: 1)).day == this.day) return "Yesterday".i18n;
|
||||||
|
|
||||||
String formatString;
|
String formatString;
|
||||||
if (this.year == now.year)
|
if (this.year == now.year)
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:filcnaplo/models/user.dart';
|
||||||
|
|
||||||
class JwtUtils {
|
class JwtUtils {
|
||||||
static String? getNameFromJWT(String jwt) {
|
static Map? decodeJwt(String jwt) {
|
||||||
var parts = jwt.split(".");
|
var parts = jwt.split(".");
|
||||||
if (parts.length != 3) return null;
|
if (parts.length != 3) return null;
|
||||||
|
|
||||||
@@ -11,8 +13,27 @@ class JwtUtils {
|
|||||||
parts[1] += "=";
|
parts[1] += "=";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
var payload = utf8.decode(base64Url.decode(parts[1]));
|
var payload = utf8.decode(base64Url.decode(parts[1]));
|
||||||
var jwtData = jsonDecode(payload);
|
return jsonDecode(payload);
|
||||||
return jwtData["name"];
|
} catch (error) {
|
||||||
|
print("ERROR: JwtUtils.decodeJwt: $error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static String? getNameFromJWT(String jwt) {
|
||||||
|
var jwtData = decodeJwt(jwt);
|
||||||
|
return jwtData?["name"];
|
||||||
|
}
|
||||||
|
|
||||||
|
static Role? getRoleFromJWT(String jwt) {
|
||||||
|
var jwtData = decodeJwt(jwt);
|
||||||
|
|
||||||
|
switch (jwtData?["role"]) {
|
||||||
|
case "Tanulo":
|
||||||
|
return Role.student;
|
||||||
|
case "Gondviselo":
|
||||||
|
return Role.parent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ description: "Nem hivatalos e-napló alkalmazás az e-Kréta rendszerhez"
|
|||||||
homepage: https://filcnaplo.hu
|
homepage: https://filcnaplo.hu
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
|
|
||||||
version: 3.0.0-beta.2+121
|
version: 3.0.2+130
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0 <3.0.0"
|
sdk: ">=2.12.0 <3.0.0"
|
||||||
|
|||||||