Compare commits
310 Commits
Author | SHA1 | Date | |
---|---|---|---|
007e4404c1 | |||
![]() |
4bc578ef06 | ||
8a3002ade1 | |||
ca06073f37 | |||
52dd14d10b | |||
dd787effbc | |||
![]() |
7eac57b94d | ||
![]() |
ee0ba71c8f | ||
![]() |
ab64faeadb | ||
![]() |
1460f2aa4e | ||
![]() |
8925b3a5f8 | ||
eb0308cbed | |||
c90e01737c | |||
05c406657a | |||
fc402eef16 | |||
![]() |
e9cfc7bbfc | ||
![]() |
7e711d64e8 | ||
![]() |
80008d8f00 | ||
81267d54e3 | |||
![]() |
0dc921c603 | ||
![]() |
4e23b745f3 | ||
![]() |
ce91b47ad1 | ||
![]() |
250ed2f105 | ||
![]() |
4cde28cd72 | ||
![]() |
df63c258b3 | ||
![]() |
1b6992132e | ||
![]() |
55350b0e5d | ||
![]() |
8d532a442d | ||
![]() |
cc4091e165 | ||
![]() |
1f05f1d091 | ||
![]() |
cc04293ead | ||
e1cae2f698 | |||
84a3e46ff7 | |||
a9360c6dc8 | |||
5d9c975b98 | |||
0b47155862 | |||
8662775e21 | |||
![]() |
2ac948539c | ||
b93ea7193d | |||
b6b5c71cef | |||
![]() |
0cf62aea86 | ||
![]() |
f2f3366e2c | ||
4b7845c31e | |||
08519ebf27 | |||
![]() |
894b3ac5b5 | ||
![]() |
4135503a30 | ||
![]() |
7f9bd34a82 | ||
![]() |
64dfe4a814 | ||
![]() |
6568e3c588 | ||
![]() |
1109c08cf5 | ||
![]() |
9cfbcc932b | ||
![]() |
843224f348 | ||
![]() |
b5ee1afe05 | ||
![]() |
67649cc5fd | ||
![]() |
ee0e724b8a | ||
![]() |
d6e783f375 | ||
![]() |
1e89359333 | ||
![]() |
24f8804f60 | ||
![]() |
300b951014 | ||
![]() |
8b49007cca | ||
![]() |
4101dc7c17 | ||
![]() |
939cc6bbe2 | ||
![]() |
13e00f8462 | ||
![]() |
7d89ea0f5d | ||
![]() |
fe4d7b318e | ||
![]() |
0464624648 | ||
![]() |
d09f3772a3 | ||
![]() |
a7ff9e7825 | ||
![]() |
bc3f8cfff9 | ||
![]() |
063cc99d1a | ||
![]() |
739e75160d | ||
![]() |
889d0d6057 | ||
![]() |
f5a7820991 | ||
![]() |
580f93fa6f | ||
![]() |
654c12e9fb | ||
![]() |
7ab14756a6 | ||
![]() |
0a02d4e831 | ||
![]() |
ac3429f30f | ||
![]() |
6388650c77 | ||
![]() |
728534170c | ||
![]() |
f4d840462e | ||
![]() |
b08b127895 | ||
![]() |
d41872e6e2 | ||
![]() |
0602c2ea3f | ||
![]() |
afcff10862 | ||
![]() |
9e187fc04c | ||
![]() |
7d5b97fe00 | ||
![]() |
fd3b21b8e6 | ||
![]() |
071f682f77 | ||
![]() |
8723f75889 | ||
![]() |
c9666f5333 | ||
![]() |
a218b62742 | ||
![]() |
41b1d899d0 | ||
![]() |
ad18efd340 | ||
![]() |
cf0dc50df5 | ||
![]() |
994d3085bb | ||
![]() |
6292708ba0 | ||
![]() |
a26ca67892 | ||
![]() |
f2d6b6079e | ||
![]() |
4faee05823 | ||
![]() |
864701fd1e | ||
![]() |
80d50cd82b | ||
![]() |
521f609707 | ||
![]() |
96ff70d7d5 | ||
![]() |
658bfe38a3 | ||
![]() |
a74b2cd3d7 | ||
![]() |
414755c777 | ||
![]() |
3708b917c4 | ||
![]() |
986b13de68 | ||
![]() |
d391448870 | ||
![]() |
38d9b5f3b2 | ||
![]() |
2dafe5ed02 | ||
![]() |
939761695f | ||
![]() |
f1ba5230fc | ||
![]() |
a50f449f7c | ||
![]() |
fe3ed31830 | ||
![]() |
0ec33f8631 | ||
![]() |
6634010b97 | ||
![]() |
816ddf58a2 | ||
![]() |
d7741ca1c4 | ||
![]() |
a2cbe5d90b | ||
![]() |
7919d0e284 | ||
![]() |
92fe3b7dcd | ||
![]() |
63fd37c31f | ||
![]() |
aa10f0672e | ||
![]() |
a3694b59ec | ||
![]() |
9ecee0bb01 | ||
![]() |
b9e9bef182 | ||
51297ddc09 | |||
4d64705e59 | |||
![]() |
d642f19834 | ||
![]() |
51b25395c1 | ||
![]() |
4474562538 | ||
d93dce7857 | |||
d6fe2812c7 | |||
ed0f69d155 | |||
c4a17633f8 | |||
d426d4866a | |||
89adf5a26f | |||
117ee63b18 | |||
d27b5f8a51 | |||
![]() |
9671c250b9 | ||
2d5c270641 | |||
eda093a9b5 | |||
![]() |
544e9c214a | ||
![]() |
5c3dbcbd52 | ||
![]() |
cd5f86db00 | ||
![]() |
9adfe636d6 | ||
210e8ce0d4 | |||
b1a7deca4a | |||
fa96770c9c | |||
5be67693c2 | |||
9ee5e8a35e | |||
3372c1ffde | |||
94989687fa | |||
![]() |
52b9b4f5db | ||
![]() |
75a2fa3726 | ||
![]() |
2c1bde9398 | ||
![]() |
fd9794f3bf | ||
![]() |
a673d3f1b3 | ||
![]() |
f2c8e869b5 | ||
![]() |
b4f2d38e99 | ||
![]() |
d842b2d588 | ||
f4fd9a3c2f | |||
a215bd7313 | |||
3211279a53 | |||
2d4e281682 | |||
148f945f3b | |||
![]() |
aaa783ac45 | ||
![]() |
d70f92d4e5 | ||
![]() |
0f08400d63 | ||
![]() |
140a8f8e78 | ||
17c9d1c447 | |||
d8e23d8fa9 | |||
c4491eb0c6 | |||
4945468e02 | |||
![]() |
9845ae9539 | ||
![]() |
3a2fc67cb2 | ||
![]() |
148a43663c | ||
![]() |
4a45131359 | ||
![]() |
4128018a59 | ||
![]() |
0d509c90b1 | ||
![]() |
3ef58974c9 | ||
![]() |
df75fadfea | ||
![]() |
4254a7998a | ||
![]() |
17faa545e5 | ||
![]() |
506fb82dd0 | ||
![]() |
bc8eb1910e | ||
![]() |
fd1b15df77 | ||
![]() |
dd86c7436a | ||
![]() |
8860a0269c | ||
![]() |
ce02dda46c | ||
![]() |
f16a52d0fb | ||
![]() |
cc8ce40222 | ||
![]() |
b6a933fe85 | ||
![]() |
767eba3776 | ||
![]() |
320499a466 | ||
![]() |
52c2f3090d | ||
![]() |
d4df0170a3 | ||
![]() |
796b35e27c | ||
![]() |
051cdc895e | ||
![]() |
e23bdac995 | ||
![]() |
de0e8e1317 | ||
![]() |
b5b0046ef5 | ||
![]() |
92f16e054d | ||
![]() |
9470c848bf | ||
![]() |
c40026e594 | ||
![]() |
93eaa5a74b | ||
![]() |
5503b41be3 | ||
![]() |
bd716e1717 | ||
![]() |
7f8b716712 | ||
![]() |
1a7b59f2fc | ||
![]() |
9f62e44b52 | ||
![]() |
7c34552aa5 | ||
![]() |
57d784443a | ||
![]() |
e73ee5a1f2 | ||
![]() |
4277f0662a | ||
![]() |
604e9dcaad | ||
![]() |
c0dd84c665 | ||
7dc33d3b87 | |||
9bee0daeb5 | |||
![]() |
dd8a4430a9 | ||
47934620ea | |||
9e815aff2f | |||
d8393b24e1 | |||
1abe990847 | |||
3a92716019 | |||
9b947256c8 | |||
0586da3742 | |||
9d863e1ec0 | |||
![]() |
e080800aa8 | ||
e6f7728e42 | |||
ac11da1744 | |||
cad7bd19dc | |||
e1870b08e5 | |||
![]() |
7842aa447f | ||
![]() |
a23b2d63e5 | ||
![]() |
58faeb4fa2 | ||
![]() |
48e64d7761 | ||
![]() |
aef8f78d16 | ||
![]() |
2b36528327 | ||
![]() |
918252ae4b | ||
![]() |
63c650b68d | ||
![]() |
090b0ccc85 | ||
![]() |
0768dc9404 | ||
![]() |
d36351d76b | ||
![]() |
45a8e0dd71 | ||
![]() |
94da2a9756 | ||
![]() |
37aa1858a8 | ||
![]() |
82f8a489dd | ||
![]() |
96b69b89ae | ||
![]() |
d9da7625ed | ||
![]() |
c016258fb9 | ||
![]() |
855e48aea8 | ||
![]() |
b7e83d10dc | ||
![]() |
45ffdff324 | ||
![]() |
cd0729fa5e | ||
![]() |
30cfdfe784 | ||
16f2593d22 | |||
14ab0c4ce3 | |||
9eb1317143 | |||
910a38650d | |||
a1f166980d | |||
0598b94ab9 | |||
1310ad4f2e | |||
![]() |
4d32500d90 | ||
![]() |
67558b76a3 | ||
![]() |
7ab8914076 | ||
![]() |
b0eb819afa | ||
![]() |
416f42f42d | ||
![]() |
a319b26d82 | ||
![]() |
84537fdcef | ||
![]() |
30f24d5d33 | ||
![]() |
8c118eedc1 | ||
![]() |
4dbe3d07a3 | ||
![]() |
f1b1b23234 | ||
![]() |
540e4d2812 | ||
![]() |
93dd275969 | ||
![]() |
c79c45705d | ||
![]() |
ce31182a5c | ||
![]() |
174046f954 | ||
![]() |
3fc14ffbb8 | ||
![]() |
f579270886 | ||
![]() |
365bd7957e | ||
![]() |
d24c4ec187 | ||
![]() |
75ba5405bb | ||
![]() |
e0bf8ac5e5 | ||
![]() |
1a3d78a5bc | ||
![]() |
c205bc592c | ||
![]() |
308c8f966f | ||
![]() |
139ac28be6 | ||
![]() |
bbe53b8c01 | ||
![]() |
56a0c2c02e | ||
![]() |
122a5ea210 | ||
![]() |
aaa3d79b30 | ||
![]() |
cacf566794 | ||
![]() |
9b29ede6eb | ||
![]() |
9e9e46d0f8 | ||
![]() |
9901251cfc | ||
![]() |
e7ec93132d | ||
![]() |
7cec2ff525 | ||
![]() |
2ca8f4b8fe | ||
![]() |
ae66a462e7 | ||
![]() |
c85f15eb49 | ||
![]() |
e04cc5ea2b | ||
![]() |
3ed456c01f | ||
![]() |
f64b1360d9 | ||
![]() |
c9db496e59 | ||
![]() |
d915200faa | ||
![]() |
32abfe7037 |
9
.gitignore
vendored
@ -12,10 +12,10 @@ refilc/build/
|
|||||||
refilc/android/key.properties
|
refilc/android/key.properties
|
||||||
refilc/android/debug.keystore
|
refilc/android/debug.keystore
|
||||||
|
|
||||||
refilc_desktop_ui/.flutter-plugins
|
# refilc_desktop_ui/.flutter-plugins
|
||||||
refilc_desktop_ui/.flutter-plugins-dependencies
|
# refilc_desktop_ui/.flutter-plugins-dependencies
|
||||||
refilc_desktop_ui/pubspec.lock
|
# refilc_desktop_ui/pubspec.lock
|
||||||
refilc_desktop_ui/.dart_tool/
|
# refilc_desktop_ui/.dart_tool/
|
||||||
|
|
||||||
refilc_kreta_api/.flutter-plugins
|
refilc_kreta_api/.flutter-plugins
|
||||||
refilc_kreta_api/.flutter-plugins-dependencies
|
refilc_kreta_api/.flutter-plugins-dependencies
|
||||||
@ -37,6 +37,7 @@ refilc_mobile_ui/.dart_tool/
|
|||||||
.idea
|
.idea
|
||||||
.gitmodules
|
.gitmodules
|
||||||
.gradle
|
.gradle
|
||||||
|
.kotlin
|
||||||
|
|
||||||
refilc/.DS_Store
|
refilc/.DS_Store
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "naplo-plus"]
|
|
||||||
path = refilc_plus
|
|
||||||
url = git@github.com:refilc/naplo-plus.git
|
|
1286
.idea/libraries/Dart_Packages.xml
generated
41
.idea/libraries/Dart_SDK.xml
generated
@ -1,25 +1,28 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="Dart SDK">
|
<library name="Dart SDK">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/async" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/async" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/cli" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/cli" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/collection" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/collection" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/convert" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/concurrent" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/core" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/convert" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/developer" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/core" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/ffi" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/developer" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/html" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/ffi" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/html" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/io" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/isolate" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/io" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/js" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/isolate" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/js_util" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/math" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_interop" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_interop_unsafe" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/svg" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_util" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/math" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/svg" />
|
||||||
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
||||||
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
||||||
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES />
|
<SOURCES />
|
||||||
|
1
.idea/misc.xml
generated
@ -1,4 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 33, extension level 3 Platform" project-jdk-type="Android SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 33, extension level 3 Platform" project-jdk-type="Android SDK" />
|
||||||
</project>
|
</project>
|
13
.idea/naplo.iml
generated
@ -60,8 +60,21 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/build" />
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/build" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.pub" />
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.pub" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.dart_tool" />
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc_kreta_api/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc_kreta_api/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc_kreta_api/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc_mobile_ui/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc_mobile_ui/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc_mobile_ui/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc_plus/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc_plus/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/refilc_plus/build" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="Dart SDK" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
5
.idea/vcs.xml
generated
@ -2,9 +2,6 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/filcnaplo_desktop_ui" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$/refilc_plus" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/filcnaplo_kreta_api" vcs="Git" />
|
|
||||||
<mapping directory="$PROJECT_DIR$/filcnaplo_mobile_ui" vcs="Git" />
|
|
||||||
<mapping directory="$PROJECT_DIR$/filcnaplo_premium" vcs="Git" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
47
README.md
@ -1,34 +1,43 @@
|
|||||||
<p align=center>
|
<p align=center>
|
||||||
<img src="https://refilc.hu/image/brand/logo.png" width=150>
|
<img src="https://raw.githubusercontent.com/Laky2k8/Refilc-2-Episode-1/refs/heads/master/refilc-2-real.png" width=150>
|
||||||
<h1 align=center><b>reFilc</b></h1>
|
<h1 align=center><b>reFilc</b></h1>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
#### Nem hivatalos e-napló alkalmazás az e-KRÉTA rendszerhez - tanulóktól, tanulóknak.
|
#### Nem hivatalos e-napló alkalmazás az e-KRÉTA rendszerhez - tanulóktól, tanulóknak.
|
||||||
|
|
||||||
[](https://github.com/refilc/naplo/releases) [](https://dc.refilc.hu)
|
[](https://github.com/refilc/naplo/releases) [](https://discord.gg/refilc-1111649116020285532)
|
||||||
|
|
||||||
## Setup
|
## Környezet felállítása
|
||||||
|
|
||||||
### Clone the project
|
### Source code letöltése
|
||||||
|
|
||||||
<em>A teljes source eléréséhez szükséged lesz a naplo-plus repo-ra is, mely biztonsági okokból privát. Írj Discord szerverünkön, hogy kaphass hozzáférést.</em>
|
*Az építhéshez szükséged lesz a refilc_plus repora is, amit itt találsz: [student-plus](https://git.qwit.cloud/refilc/student-plus)*
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone --branch dev https://github.com/refilc/naplo --recursive
|
git clone https://git.qwit.cloud/refilc/student-legacy.git --recursive
|
||||||
cd naplo
|
cd naplo
|
||||||
|
# ha ez nem töltött le refilc plus repoba értelmes dolgokat futtasd a többi parancsot is
|
||||||
|
rm -rf refilc_plus
|
||||||
|
git clone https://git.qwit.cloud/refilc/student-plus.git refilc_plus
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install packages
|
### Csomagok telepítése
|
||||||
|
|
||||||
Run `fix-pub.sh`
|
Menj be minden mappába és futtasd a következő parancsokat:
|
||||||
|
```sh
|
||||||
|
flutter clean
|
||||||
|
flutter pub get
|
||||||
|
```
|
||||||
|
|
||||||
### Run the app
|
### Alkalmazás építése
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd refilc
|
cd refilc
|
||||||
flutter run (--release)
|
flutter build apk --release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
*Ez egy apk fájlt fog építeni*
|
||||||
|
|
||||||
### Contribution
|
### Contribution
|
||||||
|
|
||||||
**Nézd meg a [Contribution guide](CONTRIBUTING.md)-ot!**
|
**Nézd meg a [Contribution guide](CONTRIBUTING.md)-ot!**
|
||||||
@ -37,16 +46,22 @@ Az összes (ugyan azon verzióhoz tartozó) contribution meg fog jelenni a relea
|
|||||||
|
|
||||||
-------
|
-------
|
||||||
|
|
||||||
# Team
|
# Csapatunk
|
||||||
|
|
||||||
**kima:** head developer / project manager
|
**Management**
|
||||||
|
- Zypherift
|
||||||
|
- hayn
|
||||||
|
- Pearoo
|
||||||
|
- Zizi
|
||||||
|
- mnus
|
||||||
|
- xou
|
||||||
|
|
||||||
**Reiner, pdf, Pearoo, Zizi:** community- and project manager / developer
|
**Designerek**
|
||||||
|
- dwe
|
||||||
|
- xou
|
||||||
|
|
||||||
**vrolandd, TMarccci:** head developer
|
**vrolandd, TMarccci:** head developer
|
||||||
|
|
||||||
**dwe., xou:** designer
|
|
||||||
|
|
||||||
**Péter:** video editor
|
**Péter:** video editor
|
||||||
|
|
||||||
<em>**annon:** a régi Filc Napló fejlesztője (ez az app, ha bár sokban változott, alapjaiban a Filc-re épül)</em>
|
***annon:** a régi Filc Napló fejlesztője (ez az app, ha bár sokban változott, alapjaiban a Filc-re épül)*
|
||||||
|
7
check-outdated.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
cd refilc && flutter pub outdated && cd ..
|
||||||
|
cd refilc_kreta_api && flutter pub outdated && cd ..
|
||||||
|
cd refilc_mobile_ui && flutter pub outdated && cd ..
|
||||||
|
# cd refilc_desktop_ui && flutter pub upgrade && cd ..
|
||||||
|
cd refilc_plus && flutter pub outdated && cd ..
|
||||||
|
|
||||||
|
echo Outdated version list above.
|
7
major-upgrade-pub.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
cd refilc && flutter pub upgrade --major-versions && cd ..
|
||||||
|
cd refilc_kreta_api && flutter pub upgrade --major-versions && cd ..
|
||||||
|
cd refilc_mobile_ui && flutter pub upgrade --major-versions && cd ..
|
||||||
|
# cd refilc_desktop_ui && flutter pub upgrade && cd ..
|
||||||
|
cd refilc_plus && flutter pub upgrade --major-versions && cd ..
|
||||||
|
|
||||||
|
echo "Upgraded pub (major)."
|
2
refilc/.gitignore
vendored
@ -5,9 +5,11 @@
|
|||||||
*.swp
|
*.swp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.atom/
|
.atom/
|
||||||
|
.build/
|
||||||
.buildlog/
|
.buildlog/
|
||||||
.history
|
.history
|
||||||
.svn/
|
.svn/
|
||||||
|
.swiftpm/
|
||||||
migrate_working_dir/
|
migrate_working_dir/
|
||||||
|
|
||||||
# IntelliJ related
|
# IntelliJ related
|
||||||
|
1
refilc/android/app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.jks
|
@ -39,8 +39,23 @@ def debugKeystoreProperties = new Properties()
|
|||||||
def debugKeystorePropertiesFile = rootProject.file("debugkey.properties")
|
def debugKeystorePropertiesFile = rootProject.file("debugkey.properties")
|
||||||
debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile))
|
debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile))
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
afterEvaluate { project ->
|
||||||
|
if (project.hasProperty('android')) {
|
||||||
|
project.android {
|
||||||
|
if (!hasProperty('namespace') || namespace == null || namespace.isEmpty()) {
|
||||||
|
// Assign a default namespace based on the project name or group
|
||||||
|
namespace = project.group.toString() ?: "com.example.${project.name}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
ndkVersion "25.1.8937393"
|
namespace = "hu.refilc.naplo"
|
||||||
|
|
||||||
|
ndkVersion "27.2.12479018"
|
||||||
|
|
||||||
// compileSdkVersion rootProject.ext.compileSdkVersion
|
// compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
compileSdkVersion 34
|
compileSdkVersion 34
|
||||||
@ -58,7 +73,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "hu.refilc.naplo"
|
applicationId "hu.refilc.naplo"
|
||||||
minSdkVersion 21
|
minSdkVersion 24
|
||||||
targetSdkVersion 34
|
targetSdkVersion 34
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
@ -70,8 +85,16 @@ android {
|
|||||||
// Flag to enable support for the new language APIs
|
// Flag to enable support for the new language APIs
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
// Sets Java compatibility to Java 8
|
// Sets Java compatibility to Java 8
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
// sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
// targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
// sourceCompatibility JavaVersion.VERSION_21
|
||||||
|
// targetCompatibility JavaVersion.VERSION_21
|
||||||
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@ -97,7 +120,13 @@ android {
|
|||||||
|
|
||||||
release {
|
release {
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
shrinkResources false
|
shrinkResources true
|
||||||
|
minifyEnabled true
|
||||||
|
debuggable false
|
||||||
|
jniDebuggable false
|
||||||
|
renderscriptDebuggable false
|
||||||
|
pseudoLocalesEnabled false
|
||||||
|
zipAlignEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,7 +146,7 @@ dependencies {
|
|||||||
implementation 'joda-time:joda-time:2.9.4'
|
implementation 'joda-time:joda-time:2.9.4'
|
||||||
androidTestImplementation 'androidx.test:runner:1.1.1'
|
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
||||||
implementation 'androidx.window:window:1.0.0'
|
implementation 'androidx.window:window:1.0.0'
|
||||||
implementation 'androidx.window:window-java:1.0.0'
|
implementation 'androidx.window:window-java:1.0.0'
|
||||||
}
|
}
|
||||||
|
5
refilc/android/app/proguard-rules.pro
vendored
@ -9,3 +9,8 @@
|
|||||||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error
|
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error
|
||||||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter
|
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter
|
||||||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider
|
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider
|
||||||
|
|
||||||
|
-dontwarn org.joda.convert.FromString
|
||||||
|
-dontwarn org.joda.convert.ToString
|
||||||
|
|
||||||
|
#-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
|
@ -2,9 +2,6 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools" package="hu.refilc.naplo">
|
xmlns:tools="http://schemas.android.com/tools" package="hu.refilc.naplo">
|
||||||
<application android:name="${applicationName}" android:label="reFilc" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
|
<application android:name="${applicationName}" android:label="reFilc" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
|
||||||
android:requestLegacyExternalStorage="true" android:enableOnBackInvokedCallback="false">
|
android:requestLegacyExternalStorage="true" android:enableOnBackInvokedCallback="false">
|
||||||
<service
|
|
||||||
android:name="com.solusibejo.flutter_dynamic_icon_plus.FlutterDynamicIconPlusService"
|
|
||||||
android:stopWithTask="false"/>
|
|
||||||
|
|
||||||
<activity android:exported="true" android:name="hu.refilc.naplo.MainActivity"
|
<activity android:exported="true" android:name="hu.refilc.naplo.MainActivity"
|
||||||
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
|
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
|
||||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
@ -20,7 +20,7 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="1."
|
android:text="1."
|
||||||
android:textColor="@color/filc"
|
android:textColor="@color/filc"
|
||||||
android:textColorLink="#ff3D7BF4"
|
android:textColorLink="#ff052460"
|
||||||
android:textSize="30sp"
|
android:textSize="30sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
<foreground>
|
||||||
|
<inset
|
||||||
|
android:drawable="@drawable/ic_launcher_foreground"
|
||||||
|
android:inset="16%" />
|
||||||
|
</foreground>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 9.1 KiB |
@ -6,7 +6,7 @@
|
|||||||
<item name="android:windowFullscreen">false</item>
|
<item name="android:windowFullscreen">false</item>
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||||
<item name="android:windowSplashScreenBackground">#03112D</item>
|
<item name="android:windowSplashScreenBackground">#7CA021</item>
|
||||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
||||||
</style>
|
</style>
|
||||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<item name="android:windowFullscreen">false</item>
|
<item name="android:windowFullscreen">false</item>
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||||
<item name="android:windowSplashScreenBackground">#03112D</item>
|
<item name="android:windowSplashScreenBackground">#7CA021</item>
|
||||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
||||||
</style>
|
</style>
|
||||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="ic_launcher_background">#03112D</color>
|
<color name="ic_launcher_background">#7CA021</color>
|
||||||
|
|
||||||
<color name="purple_200">#FFBB86FC</color>
|
<color name="purple_200">#FFBB86FC</color>
|
||||||
<color name="purple_500">#FF6200EE</color>
|
<color name="purple_500">#FF6200EE</color>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<color name="yellow_light">#ffFFCC00</color>
|
<color name="yellow_light">#ffFFCC00</color>
|
||||||
<color name="light_yellow_light">#40FFD60A</color>
|
<color name="light_yellow_light">#40FFD60A</color>
|
||||||
<color name="green_light">#ff34C759</color>
|
<color name="green_light">#ff34C759</color>
|
||||||
<color name="filc_light">#ff3D7BF4</color>
|
<color name="filc_light">#ff052460</color>
|
||||||
<color name="teal_light">#ff5AC8FA</color>
|
<color name="teal_light">#ff5AC8FA</color>
|
||||||
<color name="blue_light">#ff007AFF</color>
|
<color name="blue_light">#ff007AFF</color>
|
||||||
<color name="indigo_light">#ff5856D6</color>
|
<color name="indigo_light">#ff5856D6</color>
|
||||||
@ -49,8 +49,8 @@
|
|||||||
<color name="yellow">#ffFFD60A</color>
|
<color name="yellow">#ffFFD60A</color>
|
||||||
<color name="light_yellow">#40FFD60A</color>
|
<color name="light_yellow">#40FFD60A</color>
|
||||||
<color name="green">#ff32D74B</color>
|
<color name="green">#ff32D74B</color>
|
||||||
<color name="filc">#ff3D7BF4</color>
|
<color name="filc">#ff052460</color>
|
||||||
<color name="filc_gradient">#ff3D93F5</color>
|
<color name="filc_gradient">#ff06348f</color>
|
||||||
<color name="teal">#ff64D2FF</color>
|
<color name="teal">#ff64D2FF</color>
|
||||||
<color name="blue">#ff0A84FF</color>
|
<color name="blue">#ff0A84FF</color>
|
||||||
<color name="indigo">#ff5E5CE6</color>
|
<color name="indigo">#ff5E5CE6</color>
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
org.gradle.jvmargs=-Xmx1536M \
|
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
|
||||||
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
|
|
||||||
--add-opens=java.base/java.lang=ALL-UNNAMED \
|
|
||||||
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
|
|
||||||
--add-opens=java.base/java.io=ALL-UNNAMED \
|
|
||||||
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
|
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
# kotlin.jvm.target.validation.mode=IGNORE
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||||
|
@ -24,8 +24,8 @@ pluginManagement {
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
id "com.android.application" version "7.1.1" apply false
|
id "com.android.application" version "8.7.3" apply false
|
||||||
id "org.jetbrains.kotlin.android" version "1.8.21" apply false
|
id "org.jetbrains.kotlin.android" version "2.0.21" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
include ":app"
|
include ":app"
|
||||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 87 KiB |
BIN
refilc/assets/images/apple_fire_emoji.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
refilc/assets/images/btn_kreten_login.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 696 KiB |
Before Width: | Height: | Size: 581 KiB After Width: | Height: | Size: 616 KiB |
Before Width: | Height: | Size: 982 KiB After Width: | Height: | Size: 1009 KiB |
Before Width: | Height: | Size: 330 KiB After Width: | Height: | Size: 549 KiB |
43
refilc/assets/svg/cover_arts/grid.svg
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<svg width="375" height="174" viewBox="0 0 375 174" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_1575_5258)">
|
||||||
|
<g style="mix-blend-mode:color-burn">
|
||||||
|
<rect x="187.881" y="36.8047" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="238.186" y="36.8047" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="187.881" y="-13.5" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="238.186" y="-13.5" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="288.49" y="36.8047" width="49.3049" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="337.652" y="36.8047" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="288.49" y="-13.5" width="49.3049" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="337.652" y="-13.5" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="187.881" y="136.271" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="238.186" y="136.271" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="187.881" y="87.1099" width="50.4482" height="49.3049" stroke="#858585"/>
|
||||||
|
<rect x="238.186" y="87.1099" width="50.4482" height="49.3049" stroke="#858585"/>
|
||||||
|
<rect x="288.49" y="136.271" width="49.3049" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="337.652" y="136.271" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="288.49" y="87.1099" width="49.3049" height="49.3049" stroke="#858585"/>
|
||||||
|
<rect x="337.652" y="87.1099" width="50.4482" height="49.3049" stroke="#858585"/>
|
||||||
|
<rect x="-12.1953" y="36.8047" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="-12.1953" y="-13.5" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="38.1094" y="36.8047" width="49.3049" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="87.2705" y="36.8047" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="38.1094" y="-13.5" width="49.3049" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="87.2705" y="-13.5" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="-12.1953" y="136.271" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="-12.1953" y="87.1099" width="50.4482" height="49.3049" stroke="#858585"/>
|
||||||
|
<rect x="38.1094" y="136.271" width="49.3049" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="87.2705" y="136.271" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="38.1094" y="87.1099" width="49.3049" height="49.3049" stroke="#858585"/>
|
||||||
|
<rect x="87.2705" y="87.1099" width="50.4482" height="49.3049" stroke="#858585"/>
|
||||||
|
<rect x="137.576" y="36.8047" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="137.576" y="-13.5" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="137.576" y="136.271" width="50.4482" height="50.4482" stroke="#858585"/>
|
||||||
|
<rect x="137.576" y="87.1099" width="50.4482" height="49.3049" stroke="#858585"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_1575_5258">
|
||||||
|
<rect width="375" height="173.78" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
27
refilc/assets/svg/cover_arts/line.svg
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<svg width="375" height="175" viewBox="0 0 375 175" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_1575_5259)">
|
||||||
|
<g style="mix-blend-mode:color-burn">
|
||||||
|
<mask id="path-1-inside-1_1575_5259" fill="white">
|
||||||
|
<path d="M0 37H375V89H0V37Z"/>
|
||||||
|
</mask>
|
||||||
|
<path d="M0 38H375V36H0V38Z" fill="#858585" mask="url(#path-1-inside-1_1575_5259)"/>
|
||||||
|
<mask id="path-3-inside-2_1575_5259" fill="white">
|
||||||
|
<path d="M0 -13H375V38H0V-13Z"/>
|
||||||
|
</mask>
|
||||||
|
<path d="M0 -12H375V-14H0V-12Z" fill="#858585" mask="url(#path-3-inside-2_1575_5259)"/>
|
||||||
|
<mask id="path-5-inside-3_1575_5259" fill="white">
|
||||||
|
<path d="M0 137H375V188H0V137Z"/>
|
||||||
|
</mask>
|
||||||
|
<path d="M0 138H375V136H0V138Z" fill="#858585" mask="url(#path-5-inside-3_1575_5259)"/>
|
||||||
|
<mask id="path-7-inside-4_1575_5259" fill="white">
|
||||||
|
<path d="M0 87H375V138H0V87Z"/>
|
||||||
|
</mask>
|
||||||
|
<path d="M0 88H375V86H0V88Z" fill="#858585" mask="url(#path-7-inside-4_1575_5259)"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_1575_5259">
|
||||||
|
<rect width="375" height="173.78" fill="white" transform="translate(0 0.780518)"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
47
refilc/assets/svg/cover_arts/plain.svg
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<svg width="375" height="175" viewBox="0 0 375 175" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_1575_5260)">
|
||||||
|
<g style="mix-blend-mode:color-burn">
|
||||||
|
<circle cx="17" cy="19.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="59" cy="19.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="101" cy="19.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="143" cy="19.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="185" cy="19.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="227" cy="19.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="269" cy="19.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="311" cy="19.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="353" cy="19.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="17" cy="61.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="59" cy="61.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="101" cy="61.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="143" cy="61.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="185" cy="61.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="227" cy="61.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="269" cy="61.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="311" cy="61.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="353" cy="61.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="17" cy="103.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="59" cy="103.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="101" cy="103.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="143" cy="103.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="185" cy="103.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="227" cy="103.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="269" cy="103.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="311" cy="103.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="353" cy="103.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="17" cy="145.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="59" cy="145.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="101" cy="145.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="143" cy="145.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="185" cy="145.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="227" cy="145.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="269" cy="145.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="311" cy="145.561" r="1" fill="#858585"/>
|
||||||
|
<circle cx="353" cy="145.561" r="1" fill="#858585"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_1575_5260">
|
||||||
|
<rect width="375" height="173.78" fill="white" transform="translate(0 0.561035)"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
28
refilc/assets/svg/cover_arts/vocal.svg
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<svg width="375" height="175" viewBox="0 0 375 175" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_1575_5261)">
|
||||||
|
<g style="mix-blend-mode:color-burn">
|
||||||
|
<path d="M0 63.0001H375" stroke="#858585"/>
|
||||||
|
<path d="M0 75.0001H375" stroke="#858585"/>
|
||||||
|
<path d="M0 87.0001H375" stroke="#858585"/>
|
||||||
|
<path d="M0 99.0001H375" stroke="#858585"/>
|
||||||
|
<path d="M0 111H375" stroke="#858585"/>
|
||||||
|
</g>
|
||||||
|
<g style="mix-blend-mode:color-burn">
|
||||||
|
<path d="M0 135H375" stroke="#858585"/>
|
||||||
|
<path d="M0 147H375" stroke="#858585"/>
|
||||||
|
<path d="M0 159H375" stroke="#858585"/>
|
||||||
|
<path d="M0 171H375" stroke="#858585"/>
|
||||||
|
</g>
|
||||||
|
<g style="mix-blend-mode:color-burn">
|
||||||
|
<path d="M0 3.00012H375" stroke="#858585"/>
|
||||||
|
<path d="M0 15.0001H375" stroke="#858585"/>
|
||||||
|
<path d="M0 27.0001H375" stroke="#858585"/>
|
||||||
|
<path d="M0 39.0001H375" stroke="#858585"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_1575_5261">
|
||||||
|
<rect width="375" height="173.78" fill="white" transform="translate(0 0.341431)"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 973 B |
@ -1,43 +0,0 @@
|
|||||||
<svg width="375" height="174" viewBox="0 0 375 174" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g clip-path="url(#clip0_581_2504)">
|
|
||||||
<g style="mix-blend-mode:color-burn">
|
|
||||||
<rect x="138.881" y="36.8047" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="189.186" y="36.8047" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="138.881" y="-13.5" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="189.186" y="-13.5" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="239.49" y="36.8047" width="49.3049" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="288.652" y="36.8047" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="239.49" y="-13.5" width="49.3049" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="288.652" y="-13.5" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="138.881" y="136.271" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="189.186" y="136.271" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="138.881" y="87.1099" width="50.4482" height="49.3049" stroke="black"/>
|
|
||||||
<rect x="189.186" y="87.1099" width="50.4482" height="49.3049" stroke="black"/>
|
|
||||||
<rect x="239.49" y="136.271" width="49.3049" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="288.652" y="136.271" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="239.49" y="87.1099" width="49.3049" height="49.3049" stroke="black"/>
|
|
||||||
<rect x="288.652" y="87.1099" width="50.4482" height="49.3049" stroke="black"/>
|
|
||||||
<rect x="338.957" y="36.8047" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="338.957" y="-13.5" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="338.957" y="136.271" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="338.957" y="87.1099" width="50.4482" height="49.3049" stroke="black"/>
|
|
||||||
<rect x="-10.8906" y="36.8047" width="49.3049" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="38.2705" y="36.8047" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="-10.8906" y="-13.5" width="49.3049" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="38.2705" y="-13.5" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="-10.8906" y="136.271" width="49.3049" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="38.2705" y="136.271" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="-10.8906" y="87.1099" width="49.3049" height="49.3049" stroke="black"/>
|
|
||||||
<rect x="38.2705" y="87.1099" width="50.4482" height="49.3049" stroke="black"/>
|
|
||||||
<rect x="88.5762" y="36.8047" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="88.5762" y="-13.5" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="88.5762" y="136.271" width="50.4482" height="50.4482" stroke="black"/>
|
|
||||||
<rect x="88.5762" y="87.1099" width="50.4482" height="49.3049" stroke="black"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<defs>
|
|
||||||
<clipPath id="clip0_581_2504">
|
|
||||||
<rect width="375" height="173.78" fill="white"/>
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 2.8 KiB |
2
refilc/build.sh
Normal file → Executable file
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
flutter build apk --release --dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1) --no-tree-shake-icons
|
flutter build apk --release --tree-shake-icons --split-debug-info=debug-info --split-per-abi --target-platform android-arm,android-arm64 --obfuscate
|
||||||
|
@ -43,4 +43,21 @@ post_install do |installer|
|
|||||||
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
|
||||||
|
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
||||||
|
framework_path = File.join(Dir.pwd, framework_relative_path)
|
||||||
|
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
|
||||||
|
puts "Stripping bitcode: #{command}"
|
||||||
|
system(command)
|
||||||
|
end
|
||||||
|
|
||||||
|
framework_paths = [
|
||||||
|
"Pods/Shake/Sources/Shake.xcframework/ios-arm64/Shake.framework/Shake",
|
||||||
|
"Pods/Shake/Sources/Shake.xcframework/ios-arm64_x86_64-simulator/Shake.framework/Shake"
|
||||||
|
]
|
||||||
|
|
||||||
|
framework_paths.each do |framework_relative_path|
|
||||||
|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -517,9 +517,11 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 255;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
FLUTTER_BUILD_NAME = 5.1.1;
|
||||||
|
FLUTTER_BUILD_NUMBER = 283;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
||||||
@ -527,8 +529,8 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -549,8 +551,8 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
|
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 255;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@ -563,10 +565,10 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo.livecardpro;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@ -591,8 +593,8 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
|
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 255;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@ -605,9 +607,9 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo.livecardpro;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@ -631,8 +633,8 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
|
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 255;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@ -645,9 +647,9 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo.livecardpro;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@ -775,9 +777,11 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 255;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
FLUTTER_BUILD_NAME = 5.1.1;
|
||||||
|
FLUTTER_BUILD_NUMBER = 283;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
||||||
@ -785,8 +789,8 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@ -803,9 +807,11 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 255;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
FLUTTER_BUILD_NAME = 5.1.1;
|
||||||
|
FLUTTER_BUILD_NUMBER = 283;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
||||||
@ -813,8 +819,8 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<key>livecard.xcscheme_^#shared#^_</key>
|
<key>livecard.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>83</integer>
|
<integer>86</integer>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
@ -3,7 +3,7 @@ import background_fetch
|
|||||||
import ActivityKit
|
import ActivityKit
|
||||||
import Flutter
|
import Flutter
|
||||||
|
|
||||||
@UIApplicationMain
|
@main
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
private var methodChannel: FlutterMethodChannel?
|
private var methodChannel: FlutterMethodChannel?
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"filename" : "reFilc_Logo.png",
|
"filename" : "rf_1024.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"platform" : "ios",
|
"platform" : "ios",
|
||||||
"size" : "1024x1024"
|
"size" : "1024x1024"
|
||||||
|
Before Width: | Height: | Size: 577 KiB |
BIN
refilc/ios/Runner/Assets.xcassets/AppIcon.appiconset/rf_1024.png
Normal file
After Width: | Height: | Size: 180 KiB |
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 84 KiB |
@ -38,7 +38,7 @@
|
|||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
<resources>
|
<resources>
|
||||||
<image name="LaunchImage" width="1700" height="1700"/>
|
<image name="LaunchImage" width="2700" height="2700"/>
|
||||||
<image name="LaunchBackground" width="1" height="1"/>
|
<image name="LaunchBackground" width="1" height="1"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
||||||
<array>
|
<array>
|
||||||
<string>com.transistorsoft.refilcnotification</string>
|
<string>com.transistorsoft.refilcnotification</string>
|
||||||
@ -134,5 +134,5 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import ActivityKit
|
|
||||||
|
|
||||||
public struct LessonData {
|
public struct LessonData {
|
||||||
var color: String
|
var color: String
|
||||||
@ -33,8 +32,13 @@ public struct LessonData {
|
|||||||
if let endDateStr = dictionary["endDate"] as? String, let endDateInt = Int(endDateStr) {
|
if let endDateStr = dictionary["endDate"] as? String, let endDateInt = Int(endDateStr) {
|
||||||
self.endDate = Date(timeIntervalSince1970: TimeInterval(endDateInt) / 1000)
|
self.endDate = Date(timeIntervalSince1970: TimeInterval(endDateInt) / 1000)
|
||||||
} else {
|
} else {
|
||||||
self.endDate = Date()
|
self.endDate = self.startDate
|
||||||
|
}
|
||||||
|
|
||||||
|
if self.startDate <= self.endDate {
|
||||||
|
self.date = self.startDate...self.endDate
|
||||||
|
} else {
|
||||||
|
self.date = self.endDate...self.endDate
|
||||||
}
|
}
|
||||||
date = self.startDate...self.endDate
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,17 @@ struct Widgets: WidgetBundle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// text contrast background
|
||||||
|
extension Text {
|
||||||
|
func getContrastText(backgroundColor: Color) -> some View {
|
||||||
|
var r, g, b, a: CGFloat
|
||||||
|
(r, g, b, a) = (0, 0, 0, 0)
|
||||||
|
UIColor(backgroundColor).getRed(&r, green: &g, blue: &b, alpha: &a)
|
||||||
|
let luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b
|
||||||
|
return luminance < 0.6 ? self.foregroundColor(.white) : self.foregroundColor(.black)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Color Converter
|
// Color Converter
|
||||||
extension Color {
|
extension Color {
|
||||||
init(hex: String, alpha: Double = 1.0) {
|
init(hex: String, alpha: Double = 1.0) {
|
||||||
@ -52,14 +63,22 @@ struct LockScreenLiveActivityView: View {
|
|||||||
VStack(alignment: .center) {
|
VStack(alignment: .center) {
|
||||||
// Jelenlegi óra
|
// Jelenlegi óra
|
||||||
VStack {
|
VStack {
|
||||||
Text(context.state.index + " " + context.state.title)
|
if(context.state.title.contains("Az első órádig")) {
|
||||||
|
Text(context.state.title)
|
||||||
|
.font(.system(size: 15))
|
||||||
|
.bold()
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
} else if(context.state.title == "Szünet") {
|
||||||
|
Text(context.state.title)
|
||||||
|
.font(.body)
|
||||||
|
.bold()
|
||||||
|
.padding(.trailing, 90)
|
||||||
|
} else {
|
||||||
|
MultilineTextView(text: "\(context.state.index) \(context.state.title) - \(context.state.subtitle)", limit: 25)
|
||||||
.font(.body)
|
.font(.body)
|
||||||
.bold()
|
.bold()
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
|
}
|
||||||
Text("Terem: \(context.state.subtitle)")
|
|
||||||
.italic()
|
|
||||||
.font(.caption)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Leírás
|
// Leírás
|
||||||
@ -69,17 +88,23 @@ struct LockScreenLiveActivityView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Következő óra
|
// Következő óra
|
||||||
|
if(context.state.nextSubject != "" && context.state.nextRoom != "") {
|
||||||
HStack {
|
HStack {
|
||||||
Image(systemName: "arrow.right")
|
Image(systemName: "arrow.right")
|
||||||
.resizable()
|
.resizable()
|
||||||
.aspectRatio(contentMode: .fit)
|
.aspectRatio(contentMode: .fit)
|
||||||
.frame(width: CGFloat(8), height: CGFloat(8))
|
.frame(width: CGFloat(8), height: CGFloat(8))
|
||||||
Text(context.state.nextSubject)
|
.foregroundStyle(.secondary)
|
||||||
|
Text("\(context.state.nextSubject) - \(context.state.nextRoom)")
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
Text(context.state.nextRoom)
|
|
||||||
.font(.caption2)
|
|
||||||
}
|
}
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
|
} else {
|
||||||
|
Spacer(minLength: 5)
|
||||||
|
Text("Ez az utolsó óra! Kitartást!")
|
||||||
|
.font(.system(size: 15))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.padding(15)
|
.padding(15)
|
||||||
|
|
||||||
@ -91,13 +116,17 @@ struct LockScreenLiveActivityView: View {
|
|||||||
.frame(width: 85)
|
.frame(width: 85)
|
||||||
.font(.title2)
|
.font(.title2)
|
||||||
.monospacedDigit()
|
.monospacedDigit()
|
||||||
.padding(.trailing, CGFloat(24))
|
.padding(.trailing)
|
||||||
}
|
}
|
||||||
|
// .activityBackgroundTint(
|
||||||
|
// context.state.color != "#676767"
|
||||||
|
// ? Color(hex: context.state.color)
|
||||||
|
// : Color.clear
|
||||||
|
// )
|
||||||
.activityBackgroundTint(
|
.activityBackgroundTint(
|
||||||
context.state.color != "#676767"
|
Color.clear
|
||||||
? Color(hex: context.state.color)
|
|
||||||
: Color.clear
|
|
||||||
)
|
)
|
||||||
|
.foregroundStyle(Color(hex: context.state.color))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,31 +164,77 @@ struct LiveCardWidget: Widget {
|
|||||||
}
|
}
|
||||||
DynamicIslandExpandedRegion(.center) {
|
DynamicIslandExpandedRegion(.center) {
|
||||||
VStack(alignment: .center) {
|
VStack(alignment: .center) {
|
||||||
Text(context.state.index + context.state.title)
|
// Első óra előtti expanded DynamicIsland
|
||||||
|
if(context.state.title.contains("Az első órádig")) {
|
||||||
|
Text("Az első órád:")
|
||||||
|
.font(.body)
|
||||||
|
.bold()
|
||||||
|
.padding(.trailing, -15)
|
||||||
|
MultilineTextView(text: "\(context.state.nextSubject)", limit: 25)
|
||||||
|
.font(.body)
|
||||||
|
.padding(.trailing, -25)
|
||||||
|
|
||||||
|
Text("Ebben a teremben:")
|
||||||
|
.font(.body)
|
||||||
|
.bold()
|
||||||
|
.padding(.leading, 15)
|
||||||
|
Text(context.state.nextRoom)
|
||||||
|
.font(.body)
|
||||||
|
.padding(.leading, 15)
|
||||||
|
} else if(context.state.title == "Szünet") {
|
||||||
|
// Amikor szünet van, expanded DynamicIsland
|
||||||
|
Text(context.state.title)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.font(.body)
|
.font(.body)
|
||||||
.bold()
|
.bold()
|
||||||
|
.padding(.leading, 15)
|
||||||
|
|
||||||
Text(context.state.subtitle)
|
Spacer(minLength: 5)
|
||||||
.lineLimit(1)
|
Text("Következő óra és terem:")
|
||||||
.font(.subheadline)
|
.font(.system(size: 13))
|
||||||
Spacer()
|
.padding(.leading, 25)
|
||||||
|
Text(context.state.nextSubject)
|
||||||
Text(context.state.description)
|
|
||||||
.lineLimit(2)
|
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
|
.padding(.leading, 15)
|
||||||
|
Text(context.state.nextRoom)
|
||||||
|
.font(.caption2)
|
||||||
|
.padding(.leading, 15)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Amikor óra van, expanded DynamicIsland
|
||||||
|
MultilineTextView(text: "\(context.state.index) \(context.state.title) - \(context.state.subtitle)", limit: 25)
|
||||||
|
.lineLimit(1)
|
||||||
|
.font(.body)
|
||||||
|
.bold()
|
||||||
|
.padding(.trailing, -35)
|
||||||
|
|
||||||
|
Spacer(minLength: 2)
|
||||||
|
|
||||||
|
if(context.state.nextRoom != "" && context.state.nextSubject != "") {
|
||||||
|
Text("Következő óra és terem:")
|
||||||
|
.font(.system(size: 14))
|
||||||
|
.padding(.trailing, -45)
|
||||||
|
Spacer(minLength: 2)
|
||||||
|
|
||||||
|
Text("\(context.state.nextSubject) - \(context.state.nextRoom)")
|
||||||
|
.modifier(DynamicFontSizeModifier(text: "\(context.state.nextSubject) - \(context.state.nextRoom)"))
|
||||||
|
.padding(.trailing, 35)
|
||||||
|
} else {
|
||||||
|
Text("Ez az utolsó óra! Kitartást!")
|
||||||
|
.font(.system(size: 14))
|
||||||
|
.padding(.trailing, -30)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}.padding(EdgeInsets(top: 0.0, leading: 5.0, bottom: 0.0, trailing: 0.0))
|
}.padding(EdgeInsets(top: 0.0, leading: 5.0, bottom: 0.0, trailing: 0.0))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compact
|
/// Compact
|
||||||
} compactLeading: {
|
} compactLeading: {
|
||||||
Label {
|
|
||||||
Text(context.state.title)
|
|
||||||
} icon: {
|
|
||||||
Image(systemName: context.state.icon)
|
Image(systemName: context.state.icon)
|
||||||
}
|
}
|
||||||
.font(.caption2)
|
|
||||||
}
|
|
||||||
compactTrailing: {
|
compactTrailing: {
|
||||||
Text(timerInterval: context.state.date, countsDown: true)
|
Text(timerInterval: context.state.date, countsDown: true)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
@ -195,3 +270,118 @@ struct LiveCardWidget: Widget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct MultilineTextView: View {
|
||||||
|
var text: String
|
||||||
|
var limit: Int = 20 // default is 20 character
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
let words = text.split(separator: " ")
|
||||||
|
var currentLine = ""
|
||||||
|
var lines: [String] = []
|
||||||
|
|
||||||
|
for word in words {
|
||||||
|
if (currentLine.count + word.count + 1) > limit {
|
||||||
|
lines.append(currentLine)
|
||||||
|
currentLine = ""
|
||||||
|
}
|
||||||
|
if !currentLine.isEmpty {
|
||||||
|
currentLine += " "
|
||||||
|
}
|
||||||
|
currentLine += word
|
||||||
|
}
|
||||||
|
if !currentLine.isEmpty {
|
||||||
|
lines.append(currentLine)
|
||||||
|
}
|
||||||
|
|
||||||
|
return VStack(alignment: .center) {
|
||||||
|
ForEach(lines, id: \.self) { line in
|
||||||
|
Text(line)
|
||||||
|
}
|
||||||
|
Spacer(minLength: 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct DynamicFontSizeModifier: ViewModifier {
|
||||||
|
var text: String
|
||||||
|
|
||||||
|
func body(content: Content) -> some View {
|
||||||
|
content
|
||||||
|
.font(.system(size: fontSize(for: text)))
|
||||||
|
}
|
||||||
|
|
||||||
|
private func fontSize(for text: String) -> CGFloat {
|
||||||
|
let length = text.count
|
||||||
|
if length < 10 {
|
||||||
|
return 12
|
||||||
|
} else if length < 20 {
|
||||||
|
return 12
|
||||||
|
} else {
|
||||||
|
return 11
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct LiveCardWidget_Previews: PreviewProvider {
|
||||||
|
|
||||||
|
static let attributes = LiveActivitiesAppAttributes()
|
||||||
|
|
||||||
|
static let duringLessonExmaple = LiveActivitiesAppAttributes.ContentState(
|
||||||
|
color: "#FF5733",
|
||||||
|
icon: "bell",
|
||||||
|
index: "1.",
|
||||||
|
title: "Math Class",
|
||||||
|
subtitle: "101",
|
||||||
|
description: "Algebra lesson",
|
||||||
|
startDate: Date(),
|
||||||
|
endDate: Date().addingTimeInterval(3000),
|
||||||
|
date: Date()...Date().addingTimeInterval(3000), // 50 minutes later
|
||||||
|
nextSubject: "Physics",
|
||||||
|
nextRoom: "102"
|
||||||
|
)
|
||||||
|
|
||||||
|
static let inBreak = LiveActivitiesAppAttributes.ContentState(
|
||||||
|
color: "#FF5733",
|
||||||
|
icon: "house",
|
||||||
|
index: "",
|
||||||
|
title: "Szünet",
|
||||||
|
subtitle: "Menj a(z) 122 terembe.",
|
||||||
|
description: "",
|
||||||
|
startDate: Date(),
|
||||||
|
endDate: Date().addingTimeInterval(3000),
|
||||||
|
date: Date()...Date().addingTimeInterval(3000), // 50 minutes later
|
||||||
|
nextSubject: "Physics",
|
||||||
|
nextRoom: "122"
|
||||||
|
)
|
||||||
|
|
||||||
|
static let lastLesson = LiveActivitiesAppAttributes.ContentState(
|
||||||
|
color: "#00ff00",
|
||||||
|
icon: "bell",
|
||||||
|
index: "6.",
|
||||||
|
title: "Math Class",
|
||||||
|
subtitle: "",
|
||||||
|
description: "Lorem Ipsum",
|
||||||
|
startDate: Date(),
|
||||||
|
endDate: Date().addingTimeInterval(3000),
|
||||||
|
date: Date()...Date().addingTimeInterval(3000), // 50 minutes later
|
||||||
|
nextSubject: "",
|
||||||
|
nextRoom: ""
|
||||||
|
)
|
||||||
|
|
||||||
|
static var previews: some View {
|
||||||
|
// Dynamic Island Compact
|
||||||
|
Group {
|
||||||
|
attributes
|
||||||
|
.previewContext(duringLessonExmaple, viewKind: .dynamicIsland(.compact))
|
||||||
|
.previewDisplayName("During Lesson")
|
||||||
|
attributes
|
||||||
|
.previewContext(inBreak, viewKind: .dynamicIsland(.compact))
|
||||||
|
.previewDisplayName("In Break")
|
||||||
|
attributes
|
||||||
|
.previewContext(lastLesson, viewKind: .dynamicIsland(.compact))
|
||||||
|
.previewDisplayName("During Last Lesson")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -18,45 +18,51 @@ import 'package:connectivity_plus/connectivity_plus.dart';
|
|||||||
|
|
||||||
class FilcAPI {
|
class FilcAPI {
|
||||||
// API base
|
// API base
|
||||||
static const baseUrl = "https://api.refilc.hu";
|
static const baseUrl = "https://api.refilcapp.hu";
|
||||||
|
|
||||||
// Public API
|
// Public API
|
||||||
static const schoolList = "$baseUrl/v3/public/school-list";
|
static const schoolList = "https://api.refilcapp.hu/v3/public/school-list";
|
||||||
static const news = "$baseUrl/v3/public/news";
|
static const news = "https://staticrf-api.pages.dev/news/index.json";
|
||||||
static const supporters = "$baseUrl/v3/public/supporters";
|
static const supporters = "0.0.0.0";
|
||||||
|
|
||||||
// Private API
|
// Private API
|
||||||
static const ads = "$baseUrl/v3/private/ads";
|
static const ads = "0.0.0.0";
|
||||||
static const config = "$baseUrl/v3/private/config";
|
static const config = "$baseUrl/v3/private/config";
|
||||||
static const reportApi = "$baseUrl/v3/private/crash-report";
|
static const reportApi = "$baseUrl/v3/private/crash-report";
|
||||||
static const rfPlus = "$baseUrl/v3/rf-plus";
|
static const rfPlus = "0.0.0.0";
|
||||||
static const plusAuthLogin = "$rfPlus/auth/login";
|
static const plusAuthLogin = "0.0.0.0";
|
||||||
static const plusAuthCallback = "$rfPlus/auth/callback";
|
static const plusAuthCallback = "0.0.0.0";
|
||||||
static const plusActivation = "$rfPlus/activate";
|
static const plusActivation = "0.0.0.0";
|
||||||
static const plusScopes = "$rfPlus/scopes";
|
static const plusScopes = "0.0.0.0/";
|
||||||
|
|
||||||
// Updates
|
// Updates
|
||||||
static const repo = "refilc/naplo";
|
static const repo = "refilc/naplo";
|
||||||
static const releases = "https://api.github.com/repos/$repo/releases";
|
static const releases = "https://api.github.com/repos/$repo/releases";
|
||||||
|
|
||||||
// Share API
|
// Share API
|
||||||
static const themeShare = "$baseUrl/v3/shared/theme/add";
|
static const themeShare = "https://api.refilcapp.hu/v3/shared/theme/add";
|
||||||
static const themeGet = "$baseUrl/v3/shared/theme/get";
|
static const themeGet = "https://api.refilcapp.hu/v3/shared/theme/get";
|
||||||
static const allThemes = "$themeGet/all";
|
static const allThemes = "$themeGet/all";
|
||||||
static const themeByID = "$themeGet/";
|
static const themeByID = "$themeGet/";
|
||||||
|
|
||||||
static const gradeColorsShare = "$baseUrl/v3/shared/grade-colors/add";
|
static const gradeColorsShare = "https://api.refilcapp.hu/v3/shared/grade-colors/add";
|
||||||
static const gradeColorsGet = "$baseUrl/v3/shared/grade-colors/get";
|
static const gradeColorsGet = "https://api.refilcapp.hu/v3/shared/grade-colors/get";
|
||||||
static const allGradeColors = "$gradeColorsGet/all";
|
static const allGradeColors = "$gradeColorsGet/all";
|
||||||
static const gradeColorsByID = "$gradeColorsGet/";
|
static const gradeColorsByID = "$gradeColorsGet/";
|
||||||
|
|
||||||
// Payment API
|
// Payment API
|
||||||
static const payment = "$baseUrl/v3/payment";
|
static const payment = "0.0.0.0";
|
||||||
static const stripeSheet = "$payment/stripe-sheet";
|
static const stripeSheet = "0.0.0.0";
|
||||||
|
|
||||||
|
// Cloud Sync
|
||||||
|
// cloud sync? for what reason
|
||||||
|
static const cloudSyncApi = "0.0.0.0";
|
||||||
|
|
||||||
static Future<bool> checkConnectivity() async =>
|
static Future<bool> checkConnectivity() async =>
|
||||||
(await Connectivity().checkConnectivity()) != ConnectivityResult.none;
|
(await Connectivity().checkConnectivity())[0] != ConnectivityResult.none;
|
||||||
|
|
||||||
|
|
||||||
|
// nem tudom nem vazar-e senkit se, de mar ertelmetlen ez
|
||||||
static Future<List<School>?> getSchools() async {
|
static Future<List<School>?> getSchools() async {
|
||||||
try {
|
try {
|
||||||
http.Response res = await http.get(Uri.parse(schoolList));
|
http.Response res = await http.get(Uri.parse(schoolList));
|
||||||
@ -66,16 +72,6 @@ class FilcAPI {
|
|||||||
.cast<Map>()
|
.cast<Map>()
|
||||||
.map((json) => School.fromJson(json))
|
.map((json) => School.fromJson(json))
|
||||||
.toList();
|
.toList();
|
||||||
schools.add(School(
|
|
||||||
city: "Stockholm",
|
|
||||||
instituteCode: "refilc-test-sweden",
|
|
||||||
name: "reFilc Test SE - Leo Ekström High School",
|
|
||||||
));
|
|
||||||
schools.add(School(
|
|
||||||
city: "Madrid",
|
|
||||||
instituteCode: "refilc-test-spain",
|
|
||||||
name: "reFilc Test ES - Emilio Obrero University",
|
|
||||||
));
|
|
||||||
return schools;
|
return schools;
|
||||||
} else {
|
} else {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
@ -93,10 +89,12 @@ class FilcAPI {
|
|||||||
"x-filc-id": settings.xFilcId,
|
"x-filc-id": settings.xFilcId,
|
||||||
"user-agent": userAgent,
|
"user-agent": userAgent,
|
||||||
// platform things
|
// platform things
|
||||||
"rf-platform": Platform.operatingSystem,
|
"rf-platform":
|
||||||
"rf-platform-version": Platform.operatingSystemVersion,
|
settings.analyticsEnabled ? Platform.operatingSystem : "unknown",
|
||||||
"rf-app-version":
|
"rf-platform-version": settings.analyticsEnabled
|
||||||
const String.fromEnvironment("APPVER", defaultValue: "?"),
|
? Platform.operatingSystemVersion
|
||||||
|
: "unknown",
|
||||||
|
"rf-app-version": const String.fromEnvironment("APPVER", defaultValue: "?"),
|
||||||
"rf-uinid": settings.xFilcId,
|
"rf-uinid": settings.xFilcId,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -127,7 +125,8 @@ class FilcAPI {
|
|||||||
http.Response res = await http.get(Uri.parse(news));
|
http.Response res = await http.get(Uri.parse(news));
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
return (jsonDecode(res.body) as List)
|
String utf8Body = utf8.decode(res.bodyBytes);
|
||||||
|
return (jsonDecode(utf8Body) as List)
|
||||||
.cast<Map>()
|
.cast<Map>()
|
||||||
.map((e) => News.fromJson(e))
|
.map((e) => News.fromJson(e))
|
||||||
.toList();
|
.toList();
|
||||||
@ -231,7 +230,7 @@ class FilcAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sharing
|
// sharing
|
||||||
static Future<void> addSharedTheme(SharedTheme theme) async {
|
static Future<int> addSharedTheme(SharedTheme theme) async {
|
||||||
try {
|
try {
|
||||||
theme.json.remove('json');
|
theme.json.remove('json');
|
||||||
theme.json['is_public'] = theme.isPublic.toString();
|
theme.json['is_public'] = theme.isPublic.toString();
|
||||||
@ -263,13 +262,19 @@ class FilcAPI {
|
|||||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (res.statusCode != 201) {
|
// if (res.statusCode != 201) {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
// throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (res.statusCode == 201) {
|
||||||
|
log('Shared theme successfully with ID: ${theme.id}');
|
||||||
}
|
}
|
||||||
|
|
||||||
log('Shared theme successfully with ID: ${theme.id}');
|
return res.statusCode;
|
||||||
} on Exception catch (error, stacktrace) {
|
} on Exception catch (error, stacktrace) {
|
||||||
log("ERROR: FilcAPI.addSharedTheme: $error $stacktrace");
|
log("ERROR: FilcAPI.addSharedTheme: $error $stacktrace");
|
||||||
|
|
||||||
|
return 696;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,8 +308,7 @@ class FilcAPI {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> addSharedGradeColors(
|
static Future<int> addSharedGradeColors(SharedGradeColors gradeColors) async {
|
||||||
SharedGradeColors gradeColors) async {
|
|
||||||
try {
|
try {
|
||||||
gradeColors.json.remove('json');
|
gradeColors.json.remove('json');
|
||||||
gradeColors.json['is_public'] = gradeColors.isPublic.toString();
|
gradeColors.json['is_public'] = gradeColors.isPublic.toString();
|
||||||
@ -320,13 +324,19 @@ class FilcAPI {
|
|||||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (res.statusCode != 201) {
|
// if (res.statusCode != 201) {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
// throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (res.statusCode == 201) {
|
||||||
|
log('Shared grade colors successfully with ID: ${gradeColors.id}');
|
||||||
}
|
}
|
||||||
|
|
||||||
log('Shared grade colors successfully with ID: ${gradeColors.id}');
|
return res.statusCode;
|
||||||
} on Exception catch (error, stacktrace) {
|
} on Exception catch (error, stacktrace) {
|
||||||
log("ERROR: FilcAPI.addSharedGradeColors: $error $stacktrace");
|
log("ERROR: FilcAPI.addSharedGradeColors: $error $stacktrace");
|
||||||
|
|
||||||
|
return 696;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,6 +346,8 @@ class FilcAPI {
|
|||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
return (jsonDecode(res.body) as Map);
|
return (jsonDecode(res.body) as Map);
|
||||||
|
} else if (res.statusCode == 404) {
|
||||||
|
return {"public_id": ""};
|
||||||
} else {
|
} else {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
}
|
}
|
||||||
@ -373,6 +385,11 @@ class FilcAPI {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cloud sync
|
||||||
|
static Future<Map?> cloudSync(Map<String, String> data, String token) async {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ErrorReport {
|
class ErrorReport {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// ignore_for_file: avoid_print, use_build_context_synchronously
|
// ignore_for_file: avoid_print, use_build_context_synchronously
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:refilc/utils/jwt.dart';
|
import 'package:refilc/utils/jwt.dart';
|
||||||
import 'package:refilc_kreta_api/models/school.dart';
|
import 'package:refilc_kreta_api/models/school.dart';
|
||||||
import 'package:refilc_kreta_api/providers/absence_provider.dart';
|
import 'package:refilc_kreta_api/providers/absence_provider.dart';
|
||||||
@ -64,8 +65,12 @@ Future loginAPI({
|
|||||||
parents: ['Teszt András', 'Teszt Linda'],
|
parents: ['Teszt András', 'Teszt Linda'],
|
||||||
json: {"a": "b"},
|
json: {"a": "b"},
|
||||||
address: '1117 Budapest, Gábor Dénes utca 4.',
|
address: '1117 Budapest, Gábor Dénes utca 4.',
|
||||||
|
gradeDelay: 0,
|
||||||
),
|
),
|
||||||
role: Role.parent,
|
role: Role.parent,
|
||||||
|
accessToken: '',
|
||||||
|
accessTokenExpire: DateTime.now(),
|
||||||
|
refreshToken: '',
|
||||||
);
|
);
|
||||||
|
|
||||||
if (onLogin != null) onLogin(user);
|
if (onLogin != null) onLogin(user);
|
||||||
@ -107,7 +112,9 @@ Future loginAPI({
|
|||||||
default:
|
default:
|
||||||
// normal login from here
|
// normal login from here
|
||||||
Provider.of<KretaClient>(context, listen: false).userAgent =
|
Provider.of<KretaClient>(context, listen: false).userAgent =
|
||||||
Provider.of<SettingsProvider>(context, listen: false).config.userAgent;
|
Provider.of<SettingsProvider>(context, listen: false)
|
||||||
|
.config
|
||||||
|
.userAgent;
|
||||||
|
|
||||||
Map<String, String> headers = {
|
Map<String, String> headers = {
|
||||||
"content-type": "application/x-www-form-urlencoded",
|
"content-type": "application/x-www-form-urlencoded",
|
||||||
@ -127,6 +134,7 @@ Future loginAPI({
|
|||||||
password: password,
|
password: password,
|
||||||
instituteCode: instituteCode,
|
instituteCode: instituteCode,
|
||||||
));
|
));
|
||||||
|
|
||||||
if (res != null) {
|
if (res != null) {
|
||||||
if (res.containsKey("error")) {
|
if (res.containsKey("error")) {
|
||||||
if (res["error"] == "invalid_grant") {
|
if (res["error"] == "invalid_grant") {
|
||||||
@ -148,6 +156,134 @@ Future loginAPI({
|
|||||||
name: student.name,
|
name: student.name,
|
||||||
student: student,
|
student: student,
|
||||||
role: JwtUtils.getRoleFromJWT(res["access_token"])!,
|
role: JwtUtils.getRoleFromJWT(res["access_token"])!,
|
||||||
|
accessToken: res["access_token"],
|
||||||
|
accessTokenExpire: DateTime.now(),
|
||||||
|
refreshToken: '',
|
||||||
|
);
|
||||||
|
|
||||||
|
if (onLogin != null) onLogin(user);
|
||||||
|
|
||||||
|
// Store User in the database
|
||||||
|
await Provider.of<DatabaseProvider>(context, listen: false)
|
||||||
|
.store
|
||||||
|
.storeUser(user);
|
||||||
|
Provider.of<UserProvider>(context, listen: false).addUser(user);
|
||||||
|
Provider.of<UserProvider>(context, listen: false)
|
||||||
|
.setUser(user.id);
|
||||||
|
|
||||||
|
// Get user data
|
||||||
|
try {
|
||||||
|
await Future.wait([
|
||||||
|
Provider.of<GradeProvider>(context, listen: false).fetch(),
|
||||||
|
Provider.of<TimetableProvider>(context, listen: false)
|
||||||
|
.fetch(week: Week.current()),
|
||||||
|
Provider.of<ExamProvider>(context, listen: false).fetch(),
|
||||||
|
Provider.of<HomeworkProvider>(context, listen: false).fetch(),
|
||||||
|
Provider.of<MessageProvider>(context, listen: false)
|
||||||
|
.fetchAll(),
|
||||||
|
Provider.of<MessageProvider>(context, listen: false)
|
||||||
|
.fetchAllRecipients(),
|
||||||
|
Provider.of<NoteProvider>(context, listen: false).fetch(),
|
||||||
|
Provider.of<EventProvider>(context, listen: false).fetch(),
|
||||||
|
Provider.of<AbsenceProvider>(context, listen: false).fetch(),
|
||||||
|
]);
|
||||||
|
} catch (error) {
|
||||||
|
print("WARNING: failed to fetch user data: $error");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (onSuccess != null) onSuccess();
|
||||||
|
|
||||||
|
return LoginState.success;
|
||||||
|
} catch (error) {
|
||||||
|
print("ERROR: loginAPI: $error");
|
||||||
|
// maybe check debug mode
|
||||||
|
// ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("ERROR: $error")));
|
||||||
|
return LoginState.failed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return LoginState.failed;
|
||||||
|
}
|
||||||
|
|
||||||
|
// new login api
|
||||||
|
Future newLoginAPI({
|
||||||
|
required String code,
|
||||||
|
required BuildContext context,
|
||||||
|
void Function(User)? onLogin,
|
||||||
|
void Function()? onSuccess,
|
||||||
|
}) async {
|
||||||
|
// actual login (token grant) logic
|
||||||
|
Provider.of<KretaClient>(context, listen: false).userAgent =
|
||||||
|
Provider.of<SettingsProvider>(context, listen: false).config.userAgent;
|
||||||
|
|
||||||
|
Map<String, String> headers = {
|
||||||
|
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
|
"accept": "*/*",
|
||||||
|
"user-agent": "eKretaStudent/264745 CFNetwork/1494.0.7 Darwin/23.4.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
Map? res = await Provider.of<KretaClient>(context, listen: false)
|
||||||
|
.postAPI(KretaAPI.login, headers: headers, body: {
|
||||||
|
"code": code,
|
||||||
|
"code_verifier": "DSpuqj_HhDX4wzQIbtn8lr8NLE5wEi1iVLMtMK0jY6c",
|
||||||
|
"redirect_uri":
|
||||||
|
"https://mobil.e-kreta.hu/ellenorzo-student/prod/oauthredirect",
|
||||||
|
"client_id": KretaAPI.clientId,
|
||||||
|
"grant_type": "authorization_code",
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res != null) {
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(res);
|
||||||
|
|
||||||
|
// const splitSize = 1000;
|
||||||
|
// RegExp exp = RegExp(r"\w{" "$splitSize" "}");
|
||||||
|
// // String str = "0102031522";
|
||||||
|
// Iterable<Match> matches = exp.allMatches(res.toString());
|
||||||
|
// var list = matches.map((m) => m.group(0));
|
||||||
|
// list.forEach((e) {
|
||||||
|
// print(e);
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res.containsKey("error")) {
|
||||||
|
if (res["error"] == "invalid_grant") {
|
||||||
|
print("ERROR: invalid_grant");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (res.containsKey("access_token")) {
|
||||||
|
try {
|
||||||
|
Provider.of<KretaClient>(context, listen: false).accessToken =
|
||||||
|
res["access_token"];
|
||||||
|
Provider.of<KretaClient>(context, listen: false).refreshToken =
|
||||||
|
res["refresh_token"];
|
||||||
|
|
||||||
|
String instituteCode =
|
||||||
|
JwtUtils.getInstituteFromJWT(res["access_token"])!;
|
||||||
|
String username = JwtUtils.getUsernameFromJWT(res["access_token"])!;
|
||||||
|
Role role = JwtUtils.getRoleFromJWT(res["access_token"])!;
|
||||||
|
|
||||||
|
Map? studentJson =
|
||||||
|
await Provider.of<KretaClient>(context, listen: false)
|
||||||
|
.getAPI(KretaAPI.student(instituteCode));
|
||||||
|
Student student = Student.fromJson(studentJson!);
|
||||||
|
|
||||||
|
var user = User(
|
||||||
|
username: username,
|
||||||
|
password: '',
|
||||||
|
instituteCode: instituteCode,
|
||||||
|
name: student.name,
|
||||||
|
student: student,
|
||||||
|
role: role,
|
||||||
|
accessToken: res["access_token"],
|
||||||
|
accessTokenExpire:
|
||||||
|
DateTime.now().add(Duration(seconds: (res["expires_in"] - 30))),
|
||||||
|
refreshToken: res["refresh_token"],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (onLogin != null) onLogin(user);
|
if (onLogin != null) onLogin(user);
|
||||||
@ -190,8 +326,6 @@ Future loginAPI({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return LoginState.failed;
|
return LoginState.failed;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ class AdProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> fetch() async {
|
Future<void> fetch() async {
|
||||||
_ads = await FilcAPI.getAds() ?? [];
|
_ads = [];
|
||||||
_ads.sort((a, b) => -a.date.compareTo(b.date));
|
_ads.sort((a, b) => -a.date.compareTo(b.date));
|
||||||
|
|
||||||
// check for new ads
|
// check for new ads
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:refilc/database/query.dart';
|
import 'package:refilc/database/query.dart';
|
||||||
import 'package:refilc/database/store.dart';
|
import 'package:refilc/database/store.dart';
|
||||||
// ignore: depend_on_referenced_packages
|
// ignore: depend_on_referenced_packages
|
||||||
@ -15,11 +13,7 @@ class DatabaseProvider {
|
|||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
Database db;
|
Database db;
|
||||||
|
|
||||||
if (Platform.isLinux || Platform.isWindows) {
|
|
||||||
db = await databaseFactoryFfi.openDatabase("app.db");
|
|
||||||
} else {
|
|
||||||
db = await openDatabase("app.db");
|
db = await openDatabase("app.db");
|
||||||
}
|
|
||||||
|
|
||||||
query = DatabaseQuery(db: db);
|
query = DatabaseQuery(db: db);
|
||||||
store = DatabaseStore(db: db);
|
store = DatabaseStore(db: db);
|
||||||
|
@ -5,6 +5,7 @@ import 'dart:async';
|
|||||||
import 'package:refilc/api/providers/liveactivity/platform_channel.dart';
|
import 'package:refilc/api/providers/liveactivity/platform_channel.dart';
|
||||||
import 'package:refilc/helpers/subject.dart';
|
import 'package:refilc/helpers/subject.dart';
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
|
import 'package:refilc/ui/flutter_colorpicker/utils.dart';
|
||||||
import 'package:refilc_kreta_api/models/lesson.dart';
|
import 'package:refilc_kreta_api/models/lesson.dart';
|
||||||
import 'package:refilc_kreta_api/models/week.dart';
|
import 'package:refilc_kreta_api/models/week.dart';
|
||||||
import 'package:refilc/utils/format.dart';
|
import 'package:refilc/utils/format.dart';
|
||||||
@ -84,15 +85,18 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> toMap() {
|
Map<String, String> toMap() {
|
||||||
|
// print("LIVE ACTIVITY COLOR BELOW:");
|
||||||
|
// print(_settings.liveActivityColor.toHexString().substring(2));
|
||||||
|
String color = '#${_settings.liveActivityColor.toHexString().substring(2)}';
|
||||||
|
|
||||||
switch (currentState) {
|
switch (currentState) {
|
||||||
case LiveCardState.morning:
|
case LiveCardState.morning:
|
||||||
return {
|
return {
|
||||||
"color":
|
"color": color,
|
||||||
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
|
|
||||||
"icon": nextLesson != null
|
"icon": nextLesson != null
|
||||||
? SubjectIcon.resolveName(subject: nextLesson?.subject)
|
? SubjectIcon.resolveName(subject: nextLesson?.subject)
|
||||||
: "book",
|
: "book",
|
||||||
"title": "Első órádig:",
|
"title": "Jó reggelt! Az első órádig:",
|
||||||
"subtitle": "",
|
"subtitle": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"startDate": storeFirstRunDate != null
|
"startDate": storeFirstRunDate != null
|
||||||
@ -112,12 +116,11 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
case LiveCardState.afternoon:
|
case LiveCardState.afternoon:
|
||||||
return {
|
return {
|
||||||
"color":
|
"color": color,
|
||||||
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
|
|
||||||
"icon": nextLesson != null
|
"icon": nextLesson != null
|
||||||
? SubjectIcon.resolveName(subject: nextLesson?.subject)
|
? SubjectIcon.resolveName(subject: nextLesson?.subject)
|
||||||
: "book",
|
: "book",
|
||||||
"title": "Első órádig:",
|
"title": "Jó napot! Az első órádig:",
|
||||||
"subtitle": "",
|
"subtitle": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"startDate": storeFirstRunDate != null
|
"startDate": storeFirstRunDate != null
|
||||||
@ -137,12 +140,11 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
case LiveCardState.night:
|
case LiveCardState.night:
|
||||||
return {
|
return {
|
||||||
"color":
|
"color": color,
|
||||||
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
|
|
||||||
"icon": nextLesson != null
|
"icon": nextLesson != null
|
||||||
? SubjectIcon.resolveName(subject: nextLesson?.subject)
|
? SubjectIcon.resolveName(subject: nextLesson?.subject)
|
||||||
: "book",
|
: "book",
|
||||||
"title": "Első órádig:",
|
"title": "Jó estét! Az első órádig:",
|
||||||
"subtitle": "",
|
"subtitle": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"startDate": storeFirstRunDate != null
|
"startDate": storeFirstRunDate != null
|
||||||
@ -162,8 +164,7 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
case LiveCardState.duringLesson:
|
case LiveCardState.duringLesson:
|
||||||
return {
|
return {
|
||||||
"color":
|
"color": color,
|
||||||
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
|
|
||||||
"icon": currentLesson != null
|
"icon": currentLesson != null
|
||||||
? SubjectIcon.resolveName(subject: currentLesson?.subject)
|
? SubjectIcon.resolveName(subject: currentLesson?.subject)
|
||||||
: "book",
|
: "book",
|
||||||
@ -174,7 +175,8 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
ShortSubject.resolve(subject: currentLesson?.subject)
|
ShortSubject.resolve(subject: currentLesson?.subject)
|
||||||
.capital()
|
.capital()
|
||||||
: "",
|
: "",
|
||||||
"subtitle": currentLesson?.room.replaceAll("_", " ") ?? "",
|
"subtitle":
|
||||||
|
"Terem: ${currentLesson?.room.replaceAll("_", " ") ?? ""}",
|
||||||
"description": currentLesson?.description ?? "",
|
"description": currentLesson?.description ?? "",
|
||||||
"startDate": ((currentLesson?.start.millisecondsSinceEpoch ?? 0) -
|
"startDate": ((currentLesson?.start.millisecondsSinceEpoch ?? 0) -
|
||||||
_delay.inMilliseconds)
|
_delay.inMilliseconds)
|
||||||
@ -199,8 +201,7 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
final diff = getFloorDifference();
|
final diff = getFloorDifference();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"color":
|
"color": color,
|
||||||
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
|
|
||||||
"icon": iconFloorMap[diff] ?? "cup.and.saucer",
|
"icon": iconFloorMap[diff] ?? "cup.and.saucer",
|
||||||
"title": "Szünet",
|
"title": "Szünet",
|
||||||
"description": "go $diff".i18n.fill([
|
"description": "go $diff".i18n.fill([
|
||||||
@ -362,7 +363,16 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//END
|
//END
|
||||||
if (hasActivityStarted &&
|
if ((currentState == LiveCardState.afternoon ||
|
||||||
|
currentState == LiveCardState.morning ||
|
||||||
|
currentState == LiveCardState.night) &&
|
||||||
|
hasActivityStarted &&
|
||||||
|
nextLesson != null &&
|
||||||
|
nextLesson!.start.difference(now).inMinutes > 60) {
|
||||||
|
debugPrint("Több, mint 1 óra van az első óráig. Befejezés...");
|
||||||
|
PlatformChannel.endLiveActivity();
|
||||||
|
hasActivityStarted = false;
|
||||||
|
} else if (hasActivityStarted &&
|
||||||
!hasDayEnd &&
|
!hasDayEnd &&
|
||||||
nextLesson == null &&
|
nextLesson == null &&
|
||||||
now.isAfter(prevLesson!.end)) {
|
now.isAfter(prevLesson!.end)) {
|
||||||
|
@ -7,17 +7,23 @@ import 'package:provider/provider.dart';
|
|||||||
|
|
||||||
class SelfNoteProvider with ChangeNotifier {
|
class SelfNoteProvider with ChangeNotifier {
|
||||||
late List<SelfNote> _notes;
|
late List<SelfNote> _notes;
|
||||||
|
late List<TodoItem> _todoItems;
|
||||||
late BuildContext _context;
|
late BuildContext _context;
|
||||||
|
|
||||||
List<SelfNote> get notes => _notes;
|
List<SelfNote> get notes => _notes;
|
||||||
|
List<TodoItem> get todos => _todoItems;
|
||||||
|
|
||||||
SelfNoteProvider({
|
SelfNoteProvider({
|
||||||
List<SelfNote> initialNotes = const [],
|
List<SelfNote> initialNotes = const [],
|
||||||
|
List<TodoItem> initialTodoItems = const [],
|
||||||
required BuildContext context,
|
required BuildContext context,
|
||||||
}) {
|
}) {
|
||||||
_notes = List.castFrom(initialNotes);
|
_notes = List.castFrom(initialNotes);
|
||||||
|
_todoItems = List.castFrom(initialTodoItems);
|
||||||
_context = context;
|
_context = context;
|
||||||
|
|
||||||
if (_notes.isEmpty) restore();
|
if (_notes.isEmpty) restore();
|
||||||
|
if (_todoItems.isEmpty) restoreTodo();
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore self notes from db
|
// restore self notes from db
|
||||||
@ -38,6 +44,24 @@ class SelfNoteProvider with ChangeNotifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// restore todo items from db
|
||||||
|
Future<void> restoreTodo() async {
|
||||||
|
String? userId = Provider.of<UserProvider>(_context, listen: false).id;
|
||||||
|
|
||||||
|
// await Provider.of<DatabaseProvider>(_context, listen: false)
|
||||||
|
// .userStore
|
||||||
|
// .storeSelfNotes([], userId: userId!);
|
||||||
|
|
||||||
|
// load self notes from db
|
||||||
|
if (userId != null) {
|
||||||
|
var dbTodo = await Provider.of<DatabaseProvider>(_context, listen: false)
|
||||||
|
.userQuery
|
||||||
|
.getTodoItems(userId: userId);
|
||||||
|
_todoItems = dbTodo;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fetches fresh data from api (not needed, cuz no api for that)
|
// fetches fresh data from api (not needed, cuz no api for that)
|
||||||
// Future<void> fetch() async {
|
// Future<void> fetch() async {
|
||||||
// }
|
// }
|
||||||
@ -54,4 +78,17 @@ class SelfNoteProvider with ChangeNotifier {
|
|||||||
_notes = notes;
|
_notes = notes;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// store todo items in db
|
||||||
|
Future<void> storeTodo(List<TodoItem> todos) async {
|
||||||
|
User? user = Provider.of<UserProvider>(_context, listen: false).user;
|
||||||
|
if (user == null) throw "Cannot store Self Notes for User null";
|
||||||
|
String userId = user.id;
|
||||||
|
|
||||||
|
await Provider.of<DatabaseProvider>(_context, listen: false)
|
||||||
|
.userStore
|
||||||
|
.storeSelfTodoItems(todos, userId: userId);
|
||||||
|
_todoItems = todos;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ class StatusProvider extends ChangeNotifier {
|
|||||||
StatusProvider() {
|
StatusProvider() {
|
||||||
_handleNetworkChanges();
|
_handleNetworkChanges();
|
||||||
_handleDNSFailure();
|
_handleDNSFailure();
|
||||||
Connectivity().checkConnectivity().then((value) => _networkType = value);
|
Connectivity().checkConnectivity().then((value) => _networkType = value[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status? getStatus() => _stack.isNotEmpty ? _stack[0] : null;
|
Status? getStatus() => _stack.isNotEmpty ? _stack[0] : null;
|
||||||
@ -24,8 +24,8 @@ class StatusProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
void _handleNetworkChanges() {
|
void _handleNetworkChanges() {
|
||||||
Connectivity().onConnectivityChanged.listen((event) {
|
Connectivity().onConnectivityChanged.listen((event) {
|
||||||
_networkType = event;
|
_networkType = event[0];
|
||||||
if (event == ConnectivityResult.none) {
|
if (event[0] == ConnectivityResult.none) {
|
||||||
if (!_stack.contains(Status.network)) {
|
if (!_stack.contains(Status.network)) {
|
||||||
_stack.remove(Status.apiError);
|
_stack.remove(Status.apiError);
|
||||||
_stack.insert(0, Status.network);
|
_stack.insert(0, Status.network);
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:refilc/api/providers/database_provider.dart';
|
import 'package:refilc/api/providers/database_provider.dart';
|
||||||
import 'package:refilc/api/providers/status_provider.dart';
|
import 'package:refilc/api/providers/status_provider.dart';
|
||||||
import 'package:refilc/api/providers/user_provider.dart';
|
import 'package:refilc/api/providers/user_provider.dart';
|
||||||
@ -28,7 +29,7 @@ import 'liveactivity/platform_channel.dart';
|
|||||||
// Mutex
|
// Mutex
|
||||||
bool lock = false;
|
bool lock = false;
|
||||||
|
|
||||||
Future<void> syncAll(BuildContext context) {
|
Future<void> syncAll(BuildContext context) async {
|
||||||
if (lock) return Future.value();
|
if (lock) return Future.value();
|
||||||
// Lock
|
// Lock
|
||||||
lock = true;
|
lock = true;
|
||||||
@ -40,6 +41,12 @@ Future<void> syncAll(BuildContext context) {
|
|||||||
StatusProvider statusProvider =
|
StatusProvider statusProvider =
|
||||||
Provider.of<StatusProvider>(context, listen: false);
|
Provider.of<StatusProvider>(context, listen: false);
|
||||||
|
|
||||||
|
// check if access token isn't expired
|
||||||
|
// if (user.user?.accessToken == null) {
|
||||||
|
// lock = false;
|
||||||
|
// return Future.value();
|
||||||
|
// }
|
||||||
|
|
||||||
List<Future<void>> tasks = [];
|
List<Future<void>> tasks = [];
|
||||||
int taski = 0;
|
int taski = 0;
|
||||||
|
|
||||||
@ -50,6 +57,49 @@ Future<void> syncAll(BuildContext context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks = [
|
tasks = [
|
||||||
|
// refresh login
|
||||||
|
syncStatus(() async {
|
||||||
|
// print(user.user?.accessTokenExpire);
|
||||||
|
// print('${user.user?.accessToken ?? "no token"} - ACCESS TOKEN');
|
||||||
|
|
||||||
|
// user.user!.accessToken = "";
|
||||||
|
if (user.user == null) {
|
||||||
|
Navigator.of(context).pushNamedAndRemoveUntil("login", (_) => false);
|
||||||
|
|
||||||
|
lock = false;
|
||||||
|
return Future.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.user!.accessToken.replaceAll(" ", "") == "") {
|
||||||
|
String uid = user.user!.id;
|
||||||
|
|
||||||
|
user.removeUser(uid);
|
||||||
|
await Provider.of<DatabaseProvider>(context, listen: false)
|
||||||
|
.store
|
||||||
|
.removeUser(uid);
|
||||||
|
|
||||||
|
Navigator.of(context).pushNamedAndRemoveUntil("login", (_) => false);
|
||||||
|
|
||||||
|
lock = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.user!.accessTokenExpire.isBefore(DateTime.now())) {
|
||||||
|
String authRes = await Provider.of<KretaClient>(context, listen: false)
|
||||||
|
.refreshLogin() ??
|
||||||
|
'';
|
||||||
|
if (authRes != 'success') {
|
||||||
|
if (kDebugMode) print('ERROR: failed to refresh login');
|
||||||
|
lock = false;
|
||||||
|
return Future.value();
|
||||||
|
} else {
|
||||||
|
if (kDebugMode) print('INFO: access token refreshed');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (kDebugMode) print('INFO: access token is not expired');
|
||||||
|
}
|
||||||
|
}()),
|
||||||
|
|
||||||
syncStatus(Provider.of<GradeProvider>(context, listen: false).fetch()),
|
syncStatus(Provider.of<GradeProvider>(context, listen: false).fetch()),
|
||||||
syncStatus(Provider.of<TimetableProvider>(context, listen: false)
|
syncStatus(Provider.of<TimetableProvider>(context, listen: false)
|
||||||
.fetch(week: Week.current())),
|
.fetch(week: Week.current())),
|
||||||
@ -71,6 +121,8 @@ Future<void> syncAll(BuildContext context) {
|
|||||||
if (studentJson == null) return;
|
if (studentJson == null) return;
|
||||||
Student student = Student.fromJson(studentJson);
|
Student student = Student.fromJson(studentJson);
|
||||||
|
|
||||||
|
// print(studentJson);
|
||||||
|
|
||||||
user.user?.name = student.name;
|
user.user?.name = student.name;
|
||||||
|
|
||||||
// Store user
|
// Store user
|
||||||
@ -89,13 +141,11 @@ Future<void> syncAll(BuildContext context) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return Future.wait(tasks).then((value) {
|
return Future.wait(tasks).then((value) {
|
||||||
// Unlock
|
// Unlock
|
||||||
lock = false;
|
lock = false;
|
||||||
|
|
||||||
if(Platform.isIOS && LiveCardProvider.hasActivityStarted == true){
|
if (Platform.isIOS && LiveCardProvider.hasActivityStarted == true) {
|
||||||
PlatformChannel.endLiveActivity();
|
PlatformChannel.endLiveActivity();
|
||||||
LiveCardProvider.hasActivityStarted = false;
|
LiveCardProvider.hasActivityStarted = false;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ class UserProvider with ChangeNotifier {
|
|||||||
String? get nickname => user?.nickname;
|
String? get nickname => user?.nickname;
|
||||||
String get picture => user?.picture ?? "";
|
String get picture => user?.picture ?? "";
|
||||||
String? get displayName => user?.displayName;
|
String? get displayName => user?.displayName;
|
||||||
|
int? get gradeStreak => user?.gradeStreak;
|
||||||
|
|
||||||
final SettingsProvider _settings;
|
final SettingsProvider _settings;
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ import 'package:provider/provider.dart';
|
|||||||
import 'package:refilc_mobile_ui/common/system_chrome.dart' as mobile;
|
import 'package:refilc_mobile_ui/common/system_chrome.dart' as mobile;
|
||||||
import 'package:refilc_mobile_ui/screens/login/login_route.dart' as mobile;
|
import 'package:refilc_mobile_ui/screens/login/login_route.dart' as mobile;
|
||||||
import 'package:refilc_mobile_ui/screens/login/login_screen.dart' as mobile;
|
import 'package:refilc_mobile_ui/screens/login/login_screen.dart' as mobile;
|
||||||
|
// import 'package:refilc_mobile_ui/screens/login/kreten_login.dart' as mobileTest;
|
||||||
import 'package:refilc_mobile_ui/screens/navigation/navigation_screen.dart'
|
import 'package:refilc_mobile_ui/screens/navigation/navigation_screen.dart'
|
||||||
as mobile;
|
as mobile;
|
||||||
import 'package:refilc_mobile_ui/screens/settings/settings_route.dart'
|
import 'package:refilc_mobile_ui/screens/settings/settings_route.dart'
|
||||||
@ -38,11 +39,11 @@ import 'package:refilc_mobile_ui/screens/settings/settings_route.dart'
|
|||||||
import 'package:refilc_mobile_ui/screens/settings/settings_screen.dart'
|
import 'package:refilc_mobile_ui/screens/settings/settings_screen.dart'
|
||||||
as mobile;
|
as mobile;
|
||||||
|
|
||||||
// Desktop UI
|
// Desktop UI (no more desktop ui)
|
||||||
import 'package:refilc_desktop_ui/screens/navigation/navigation_screen.dart'
|
// import 'package:refilc_desktop_ui/screens/navigation/navigation_screen.dart'
|
||||||
as desktop;
|
// as desktop;
|
||||||
import 'package:refilc_desktop_ui/screens/login/login_screen.dart' as desktop;
|
// import 'package:refilc_desktop_ui/screens/login/login_screen.dart' as desktop;
|
||||||
import 'package:refilc_desktop_ui/screens/login/login_route.dart' as desktop;
|
// import 'package:refilc_desktop_ui/screens/login/login_route.dart' as desktop;
|
||||||
|
|
||||||
// Providers
|
// Providers
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
@ -80,7 +81,8 @@ class App extends StatelessWidget {
|
|||||||
CorePalette? corePalette;
|
CorePalette? corePalette;
|
||||||
|
|
||||||
final status = StatusProvider();
|
final status = StatusProvider();
|
||||||
final kreta = KretaClient(user: user, settings: settings, status: status);
|
final kreta = KretaClient(
|
||||||
|
user: user, settings: settings, database: database, status: status);
|
||||||
final timetable =
|
final timetable =
|
||||||
TimetableProvider(user: user, database: database, kreta: kreta);
|
TimetableProvider(user: user, database: database, kreta: kreta);
|
||||||
final premium = PlusProvider(settings: settings);
|
final premium = PlusProvider(settings: settings);
|
||||||
@ -235,7 +237,7 @@ class App extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
onGenerateRoute: (settings) => rootNavigator(settings),
|
onGenerateRoute: (settings) => rootNavigator(settings),
|
||||||
initialRoute:
|
initialRoute:
|
||||||
user.getUsers().isNotEmpty ? "navigation" : "login",
|
(user.getUsers().isNotEmpty) ? "navigation" : "login",
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -246,17 +248,18 @@ class App extends StatelessWidget {
|
|||||||
|
|
||||||
Route? rootNavigator(RouteSettings route) {
|
Route? rootNavigator(RouteSettings route) {
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
switch (route.name) {
|
return null;
|
||||||
case "login_back":
|
// switch (route.name) {
|
||||||
return CupertinoPageRoute(
|
// case "login_back":
|
||||||
builder: (context) => const desktop.LoginScreen(back: true));
|
// return CupertinoPageRoute(
|
||||||
case "login":
|
// builder: (context) => const desktop.LoginScreen(back: true));
|
||||||
return _rootRoute(const desktop.LoginScreen());
|
// case "login":
|
||||||
case "navigation":
|
// return _rootRoute(const desktop.LoginScreen());
|
||||||
return _rootRoute(const desktop.NavigationScreen());
|
// case "navigation":
|
||||||
case "login_to_navigation":
|
// return _rootRoute(const desktop.NavigationScreen());
|
||||||
return desktop.loginRoute(const desktop.NavigationScreen());
|
// case "login_to_navigation":
|
||||||
}
|
// return desktop.loginRoute(const desktop.NavigationScreen());
|
||||||
|
// }
|
||||||
} else if (Platform.isAndroid || Platform.isIOS) {
|
} else if (Platform.isAndroid || Platform.isIOS) {
|
||||||
switch (route.name) {
|
switch (route.name) {
|
||||||
case "login_back":
|
case "login_back":
|
||||||
@ -272,17 +275,18 @@ class App extends StatelessWidget {
|
|||||||
return mobile.settingsRoute(const mobile.SettingsScreen());
|
return mobile.settingsRoute(const mobile.SettingsScreen());
|
||||||
}
|
}
|
||||||
} else if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
|
} else if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
|
||||||
switch (route.name) {
|
return null;
|
||||||
case "login_back":
|
// switch (route.name) {
|
||||||
return CupertinoPageRoute(
|
// case "login_back":
|
||||||
builder: (context) => const desktop.LoginScreen(back: true));
|
// return CupertinoPageRoute(
|
||||||
case "login":
|
// builder: (context) => const desktop.LoginScreen(back: true));
|
||||||
return _rootRoute(const desktop.LoginScreen());
|
// case "login":
|
||||||
case "navigation":
|
// return _rootRoute(const desktop.LoginScreen());
|
||||||
return _rootRoute(const desktop.NavigationScreen());
|
// case "navigation":
|
||||||
case "login_to_navigation":
|
// return _rootRoute(const desktop.NavigationScreen());
|
||||||
return desktop.loginRoute(const desktop.NavigationScreen());
|
// case "login_to_navigation":
|
||||||
}
|
// return desktop.loginRoute(const desktop.NavigationScreen());
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import 'package:refilc/models/settings.dart';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
// ignore: depend_on_referenced_packages
|
// ignore: depend_on_referenced_packages
|
||||||
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
||||||
import 'package:sqflite_common_ffi_web/sqflite_ffi_web.dart';
|
// import 'package:sqflite_common_ffi_web/sqflite_ffi_web.dart';
|
||||||
|
|
||||||
const settingsDB = DatabaseStruct("settings", {
|
const settingsDB = DatabaseStruct("settings", {
|
||||||
"language": String, "start_page": int, "rounding": int, "theme": int,
|
"language": String, "start_page": int, "rounding": int, "theme": int,
|
||||||
@ -27,7 +27,8 @@ const settingsDB = DatabaseStruct("settings", {
|
|||||||
"notifications_absences": int,
|
"notifications_absences": int,
|
||||||
"notifications_messages": int,
|
"notifications_messages": int,
|
||||||
"notifications_lessons": int, // notifications
|
"notifications_lessons": int, // notifications
|
||||||
"x_filc_id": String, "graph_class_avg": int, "presentation_mode": int,
|
"x_filc_id": String, "graph_class_avg": int,
|
||||||
|
"analytics_enabled": int, "presentation_mode": int,
|
||||||
"bell_delay": int, "bell_delay_enabled": int,
|
"bell_delay": int, "bell_delay_enabled": int,
|
||||||
"grade_opening_fun": int, "icon_pack": String, "premium_scopes": String,
|
"grade_opening_fun": int, "icon_pack": String, "premium_scopes": String,
|
||||||
"premium_token": String, "premium_login": String,
|
"premium_token": String, "premium_login": String,
|
||||||
@ -45,6 +46,7 @@ const settingsDB = DatabaseStruct("settings", {
|
|||||||
// more
|
// more
|
||||||
"show_breaks": int,
|
"show_breaks": int,
|
||||||
"font_family": String,
|
"font_family": String,
|
||||||
|
"title_only_font": int,
|
||||||
"plus_session_id": String,
|
"plus_session_id": String,
|
||||||
"cal_sync_room_location": String, "cal_sync_show_exams": int,
|
"cal_sync_room_location": String, "cal_sync_show_exams": int,
|
||||||
"cal_sync_show_teacher": int, "cal_sync_renamed": int,
|
"cal_sync_show_teacher": int, "cal_sync_renamed": int,
|
||||||
@ -52,6 +54,11 @@ const settingsDB = DatabaseStruct("settings", {
|
|||||||
"nav_shadow": int,
|
"nav_shadow": int,
|
||||||
"new_colors": int,
|
"new_colors": int,
|
||||||
"uwu_mode": int,
|
"uwu_mode": int,
|
||||||
|
"new_popups": int,
|
||||||
|
"unseen_new_features": String,
|
||||||
|
"cloud_sync_enabled": int,
|
||||||
|
"cloud_sync_token": String,
|
||||||
|
"local_updated_at": String,
|
||||||
// quick settings
|
// quick settings
|
||||||
"q_timetable_lesson_num": int, "q_timetable_sub_tiles": int,
|
"q_timetable_lesson_num": int, "q_timetable_sub_tiles": int,
|
||||||
"q_subjects_sub_tiles": int,
|
"q_subjects_sub_tiles": int,
|
||||||
@ -61,7 +68,10 @@ const settingsDB = DatabaseStruct("settings", {
|
|||||||
const usersDB = DatabaseStruct("users", {
|
const usersDB = DatabaseStruct("users", {
|
||||||
"id": String, "name": String, "username": String, "password": String,
|
"id": String, "name": String, "username": String, "password": String,
|
||||||
"institute_code": String, "student": String, "role": int,
|
"institute_code": String, "student": String, "role": int,
|
||||||
"nickname": String, "picture": String // premium only
|
"nickname": String, "picture": String, // premium only (it's now plus btw)
|
||||||
|
"grade_streak": int,
|
||||||
|
"access_token": String, "access_token_expire": String,
|
||||||
|
"refresh_token": String,
|
||||||
});
|
});
|
||||||
const userDataDB = DatabaseStruct("user_data", {
|
const userDataDB = DatabaseStruct("user_data", {
|
||||||
"id": String, "grades": String, "timetable": String, "exams": String,
|
"id": String, "grades": String, "timetable": String, "exams": String,
|
||||||
@ -84,12 +94,13 @@ const userDataDB = DatabaseStruct("user_data", {
|
|||||||
"goal_befores": String,
|
"goal_befores": String,
|
||||||
"goal_pin_dates": String,
|
"goal_pin_dates": String,
|
||||||
// todo and notes
|
// todo and notes
|
||||||
"todo_items": String, "self_notes": String,
|
"todo_items": String, "self_notes": String, "self_todo": String,
|
||||||
// v5 shit
|
// v5 shit
|
||||||
"roundings": String,
|
"roundings": String,
|
||||||
"grade_rarities": String,
|
"grade_rarities": String,
|
||||||
"linked_accounts": String,
|
"linked_accounts": String,
|
||||||
"custom_lesson_desc": String,
|
"custom_lesson_desc": String,
|
||||||
|
"watch_data": String,
|
||||||
});
|
});
|
||||||
|
|
||||||
Future<void> createTable(Database db, DatabaseStruct struct) =>
|
Future<void> createTable(Database db, DatabaseStruct struct) =>
|
||||||
@ -99,7 +110,8 @@ Future<Database> initDB(DatabaseProvider database) async {
|
|||||||
Database db;
|
Database db;
|
||||||
|
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
db = await databaseFactoryFfiWeb.openDatabase("app.db");
|
// db = await databaseFactoryFfiWeb.openDatabase("app.db");
|
||||||
|
throw "web is not supported";
|
||||||
} else if (Platform.isLinux || Platform.isWindows) {
|
} else if (Platform.isLinux || Platform.isWindows) {
|
||||||
sqfliteFfiInit();
|
sqfliteFfiInit();
|
||||||
db = await databaseFactoryFfi.openDatabase("app.db");
|
db = await databaseFactoryFfi.openDatabase("app.db");
|
||||||
@ -129,7 +141,15 @@ Future<Database> initDB(DatabaseProvider database) async {
|
|||||||
await migrateDB(
|
await migrateDB(
|
||||||
db,
|
db,
|
||||||
struct: usersDB,
|
struct: usersDB,
|
||||||
defaultValues: {"role": 0, "nickname": "", "picture": ""},
|
defaultValues: {
|
||||||
|
"role": 0,
|
||||||
|
"nickname": "",
|
||||||
|
"picture": "",
|
||||||
|
"grade_streak": 0,
|
||||||
|
"access_token": "",
|
||||||
|
"access_token_expire": "",
|
||||||
|
"refresh_token": "",
|
||||||
|
},
|
||||||
);
|
);
|
||||||
await migrateDB(db, struct: userDataDB, defaultValues: {
|
await migrateDB(db, struct: userDataDB, defaultValues: {
|
||||||
"grades": "[]", "timetable": "[]", "exams": "[]", "homework": "[]",
|
"grades": "[]", "timetable": "[]", "exams": "[]", "homework": "[]",
|
||||||
@ -152,12 +172,13 @@ Future<Database> initDB(DatabaseProvider database) async {
|
|||||||
"goal_befores": "{}",
|
"goal_befores": "{}",
|
||||||
"goal_pin_dates": "{}",
|
"goal_pin_dates": "{}",
|
||||||
// todo and notes
|
// todo and notes
|
||||||
"todo_items": "{}", "self_notes": "[]",
|
"todo_items": "{}", "self_notes": "[]", "self_todo": "[]",
|
||||||
// v5 shit
|
// v5 shit
|
||||||
"roundings": "{}",
|
"roundings": "{}",
|
||||||
"grade_rarities": "{}",
|
"grade_rarities": "{}",
|
||||||
"linked_accounts": "[]",
|
"linked_accounts": "[]",
|
||||||
"custom_lesson_desc": "{}",
|
"custom_lesson_desc": "{}",
|
||||||
|
"watch_data": "{}",
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
print("ERROR: migrateDB: $error");
|
print("ERROR: migrateDB: $error");
|
||||||
|
@ -317,6 +317,18 @@ class UserDatabaseQuery {
|
|||||||
return selfNotes;
|
return selfNotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<List<TodoItem>> getTodoItems({required String userId}) async {
|
||||||
|
List<Map> userData =
|
||||||
|
await db.query("user_data", where: "id = ?", whereArgs: [userId]);
|
||||||
|
if (userData.isEmpty) return [];
|
||||||
|
String? todoItemsJson = userData.elementAt(0)["self_todo"] as String?;
|
||||||
|
if (todoItemsJson == null) return [];
|
||||||
|
List<TodoItem> todoItems = (jsonDecode(todoItemsJson) as List)
|
||||||
|
.map((e) => TodoItem.fromJson(e))
|
||||||
|
.toList();
|
||||||
|
return todoItems;
|
||||||
|
}
|
||||||
|
|
||||||
// v5
|
// v5
|
||||||
Future<Map<String, String>> getRoundings({required String userId}) async {
|
Future<Map<String, String>> getRoundings({required String userId}) async {
|
||||||
List<Map> userData =
|
List<Map> userData =
|
||||||
|
@ -196,6 +196,13 @@ class UserDatabaseStore {
|
|||||||
where: "id = ?", whereArgs: [userId]);
|
where: "id = ?", whereArgs: [userId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> storeSelfTodoItems(List<TodoItem> todoItems,
|
||||||
|
{required String userId}) async {
|
||||||
|
String todoItemsJson = jsonEncode(todoItems.map((e) => e.json).toList());
|
||||||
|
await db.update("user_data", {"self_todo": todoItemsJson},
|
||||||
|
where: "id = ?", whereArgs: [userId]);
|
||||||
|
}
|
||||||
|
|
||||||
// v5
|
// v5
|
||||||
Future<void> storeRoundings(Map<String, String> roundings,
|
Future<void> storeRoundings(Map<String, String> roundings,
|
||||||
{required String userId}) async {
|
{required String userId}) async {
|
||||||
|
@ -8,10 +8,10 @@ class DatabaseStruct {
|
|||||||
String typeName = "";
|
String typeName = "";
|
||||||
|
|
||||||
switch (type.runtimeType) {
|
switch (type.runtimeType) {
|
||||||
case int:
|
case const (int):
|
||||||
typeName = "integer";
|
typeName = "integer";
|
||||||
break;
|
break;
|
||||||
case String:
|
case const (String):
|
||||||
typeName = "text";
|
typeName = "text";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,9 @@ import 'package:share_plus/share_plus.dart';
|
|||||||
class ShareHelper {
|
class ShareHelper {
|
||||||
static Future<void> shareText(String text, {String? subject}) =>
|
static Future<void> shareText(String text, {String? subject}) =>
|
||||||
Share.share(text, subject: subject);
|
Share.share(text, subject: subject);
|
||||||
// ignore: deprecated_member_use
|
|
||||||
static Future<void> shareFile(String path, {String? text, String? subject}) =>
|
static Future<void> shareFile(String path, {String? text, String? subject}) =>
|
||||||
// ignore: deprecated_member_use
|
Share.shareXFiles([XFile(path)], text: text, subject: subject);
|
||||||
Share.shareFiles([path], text: text, subject: subject);
|
|
||||||
|
|
||||||
static Future<void> shareAttachment(Attachment attachment,
|
static Future<void> shareAttachment(Attachment attachment,
|
||||||
{required BuildContext context}) async {
|
{required BuildContext context}) async {
|
||||||
|
@ -292,3 +292,105 @@ class ShortSubject {
|
|||||||
return subject?.name.capital() ?? subjectName?.capital() ?? "?";
|
return subject?.name.capital() ?? subjectName?.capital() ?? "?";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// new v5 thingie
|
||||||
|
class SubjectBooklet {
|
||||||
|
// static String resolveName({GradeSubject? subject, String? subjectName}) =>
|
||||||
|
// _resolve(subject: subject, subjectName: subjectName).name;
|
||||||
|
static String resolveVariant(
|
||||||
|
{GradeSubject? subject,
|
||||||
|
String? subjectName,
|
||||||
|
required BuildContext context}) =>
|
||||||
|
_resolve(subject: subject, subjectName: subjectName);
|
||||||
|
|
||||||
|
static String _resolve({GradeSubject? subject, String? subjectName}) {
|
||||||
|
assert(!(subject == null && subjectName == null));
|
||||||
|
|
||||||
|
String name = (subject?.name ?? subjectName ?? "")
|
||||||
|
.toLowerCase()
|
||||||
|
.specialChars()
|
||||||
|
.trim();
|
||||||
|
String category =
|
||||||
|
subject?.category.description.toLowerCase().specialChars() ?? "";
|
||||||
|
|
||||||
|
String basePath = "assets/svg/cover_arts";
|
||||||
|
|
||||||
|
// todo: check for categories
|
||||||
|
if (RegExp("mate(k|matika)").hasMatch(name) || category == "matematika") {
|
||||||
|
return "$basePath/grid.svg";
|
||||||
|
} else if (RegExp("magyar nyelv|nyelvtan").hasMatch(name)) {
|
||||||
|
return "$basePath/line.svg";
|
||||||
|
} else if (RegExp("irodalom").hasMatch(name)) {
|
||||||
|
return "$basePath/line.svg";
|
||||||
|
} else if (RegExp("tor(i|tenelem)").hasMatch(name)) {
|
||||||
|
return "$basePath/line.svg";
|
||||||
|
} else if (RegExp("foldrajz").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("rajz|muvtori|muveszet|vizualis").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("fizika").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("^enek|zene|szolfezs|zongora|korus").hasMatch(name)) {
|
||||||
|
return "$basePath/vocal.svg";
|
||||||
|
} else if (RegExp("^tes(i|tneveles)|sport|edzeselmelet").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("kemia").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("biologia").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp(
|
||||||
|
"kornyezet|termeszet ?(tudomany|ismeret)|hon( es nep)?ismeret")
|
||||||
|
.hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("(hit|erkolcs)tan|vallas|etika|bibliaismeret")
|
||||||
|
.hasMatch(name)) {
|
||||||
|
return "$basePath/line.svg";
|
||||||
|
} else if (RegExp("penzugy").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("informatika|szoftver|iroda|digitalis").hasMatch(name)) {
|
||||||
|
return "$basePath/grid.svg";
|
||||||
|
} else if (RegExp("prog").hasMatch(name)) {
|
||||||
|
return "$basePath/grid.svg";
|
||||||
|
} else if (RegExp("halozat").hasMatch(name)) {
|
||||||
|
return "$basePath/grid.svg";
|
||||||
|
} else if (RegExp("szinhaz").hasMatch(name)) {
|
||||||
|
return "$basePath/vocal.svg";
|
||||||
|
} else if (RegExp("film|media").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("elektro(tech)?nika").hasMatch(name)) {
|
||||||
|
return "$basePath/grid.svg";
|
||||||
|
} else if (RegExp("gepesz|mernok|ipar").hasMatch(name)) {
|
||||||
|
return "$basePath/grid.svg";
|
||||||
|
} else if (RegExp("technika").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("tanc").hasMatch(name)) {
|
||||||
|
return "$basePath/vocal.svg";
|
||||||
|
} else if (RegExp("filozofia").hasMatch(name)) {
|
||||||
|
return "$basePath/line.svg";
|
||||||
|
} else if (RegExp("osztaly(fonoki|kozosseg)|kozossegi|neveles")
|
||||||
|
.hasMatch(name) ||
|
||||||
|
name == "ofo") {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("gazdasag").hasMatch(name)) {
|
||||||
|
return "$basePath/line.svg";
|
||||||
|
} else if (RegExp("szorgalom").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("magatartas").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp(
|
||||||
|
"angol|nemet|francia|olasz|orosz|spanyol|latin|kinai|nyelv")
|
||||||
|
.hasMatch(name)) {
|
||||||
|
return "$basePath/line.svg";
|
||||||
|
} else if (RegExp("linux").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
} else if (RegExp("adatbazis").hasMatch(name)) {
|
||||||
|
return "$basePath/grid.svg";
|
||||||
|
} else if (RegExp("asztali alkalmazasok").hasMatch(name)) {
|
||||||
|
return "$basePath/grid.svg";
|
||||||
|
} else if (RegExp("projekt").hasMatch(name)) {
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "$basePath/plain.svg";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
130
refilc/lib/helpers/uwu_helper.dart
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
class Uwuifier {
|
||||||
|
final Map<String, double> _spacesModifier;
|
||||||
|
final double _wordsModifier;
|
||||||
|
|
||||||
|
final List<String> faces = [
|
||||||
|
"OwO",
|
||||||
|
"UwU",
|
||||||
|
">w<",
|
||||||
|
"^w^",
|
||||||
|
"^-^",
|
||||||
|
":3",
|
||||||
|
];
|
||||||
|
|
||||||
|
final List<List<String>> uwuMap = [
|
||||||
|
['(?:r|l)', 'w'],
|
||||||
|
['(?:R|L)', 'W'],
|
||||||
|
['na', 'nya'],
|
||||||
|
['ne', 'nye'],
|
||||||
|
['NA', 'NYA'],
|
||||||
|
['NE', 'NYE'],
|
||||||
|
['Na', 'Nya'],
|
||||||
|
['Ne', 'Nye'],
|
||||||
|
['no', 'nyo'],
|
||||||
|
['NO', 'NYO'],
|
||||||
|
['No', 'Nyo'],
|
||||||
|
['nO', 'NYo'],
|
||||||
|
['ove', 'uv'],
|
||||||
|
['no', 'nwo'],
|
||||||
|
];
|
||||||
|
|
||||||
|
final Map<String, String> _uwuCache = {};
|
||||||
|
|
||||||
|
Uwuifier({
|
||||||
|
Map<String, double>? spaces,
|
||||||
|
double? words,
|
||||||
|
}) : _spacesModifier = spaces ?? {
|
||||||
|
'faces': 0.05,
|
||||||
|
'actions': 0.0,
|
||||||
|
'stutters': 0.1,
|
||||||
|
},
|
||||||
|
_wordsModifier = words ?? 1.0;
|
||||||
|
|
||||||
|
String uwuifyWords(String sentence) {
|
||||||
|
final words = sentence.split(' ');
|
||||||
|
|
||||||
|
final uwuifiedSentence = words.map((word) {
|
||||||
|
if (isAt(word) || isUri(word)) return word;
|
||||||
|
|
||||||
|
var seed = Random().nextDouble();
|
||||||
|
for (final uwuMapEntry in uwuMap) {
|
||||||
|
final oldWord = RegExp(uwuMapEntry[0], caseSensitive: false);
|
||||||
|
final newWord = uwuMapEntry[1];
|
||||||
|
if (seed > _wordsModifier) continue;
|
||||||
|
word = word.replaceAll(oldWord, newWord);
|
||||||
|
}
|
||||||
|
|
||||||
|
return word;
|
||||||
|
}).join(' ');
|
||||||
|
|
||||||
|
return uwuifiedSentence;
|
||||||
|
}
|
||||||
|
|
||||||
|
String uwuifySpaces(String sentence) {
|
||||||
|
final words = sentence.split(' ');
|
||||||
|
|
||||||
|
final faceThreshold = _spacesModifier['faces']!;
|
||||||
|
final actionThreshold = _spacesModifier['actions']! + faceThreshold;
|
||||||
|
final stutterThreshold = _spacesModifier['stutters']! + actionThreshold;
|
||||||
|
|
||||||
|
final uwuifiedSentence = words.map((word) {
|
||||||
|
final seed = Random().nextDouble();
|
||||||
|
final firstCharacter = word[0];
|
||||||
|
|
||||||
|
if (seed <= faceThreshold && faces.isNotEmpty) {
|
||||||
|
word += ' ${faces[Random().nextInt(faces.length)]}';
|
||||||
|
} else if (seed <= actionThreshold) {
|
||||||
|
// Skip actions
|
||||||
|
} else if (seed <= stutterThreshold && !isUri(word)) {
|
||||||
|
if (Random().nextInt(10) == 0) {
|
||||||
|
final stutter = Random().nextInt(3);
|
||||||
|
return '${firstCharacter * (stutter + 1)}-$word';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return word;
|
||||||
|
}).join(' ');
|
||||||
|
|
||||||
|
return uwuifiedSentence;
|
||||||
|
}
|
||||||
|
|
||||||
|
String uwuifySentence(String sentence) {
|
||||||
|
if (_uwuCache.containsKey(sentence)) {
|
||||||
|
return _uwuCache[sentence]!;
|
||||||
|
}
|
||||||
|
|
||||||
|
var uwuifiedSentence = uwuifyWords(sentence);
|
||||||
|
uwuifiedSentence = uwuifySpaces(uwuifiedSentence);
|
||||||
|
|
||||||
|
_uwuCache[sentence] = uwuifiedSentence;
|
||||||
|
return uwuifiedSentence;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isAt(String value) {
|
||||||
|
return value.startsWith('@');
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isUri(String? value) {
|
||||||
|
if (value == null) return false;
|
||||||
|
final split = RegExp(
|
||||||
|
r'''(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?''')
|
||||||
|
.firstMatch(value);
|
||||||
|
if (split == null) return false;
|
||||||
|
final scheme = split.group(1);
|
||||||
|
final authority = split.group(2);
|
||||||
|
final path = split.group(3);
|
||||||
|
if (!(scheme?.isNotEmpty == true && path?.isNotEmpty == true)) return false;
|
||||||
|
if (authority != null && authority.isNotEmpty) {
|
||||||
|
if (!(path?.isEmpty == true || path!.startsWith('/'))) return false;
|
||||||
|
} else if (path?.startsWith('//') == true) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!RegExp(r'''^[a-z][a-z0-9+\-\.]*$''', caseSensitive: false)
|
||||||
|
.hasMatch(scheme!.toLowerCase())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|