Compare commits

...

766 Commits
4.4.0 ... 5.0.6

Author SHA1 Message Date
Márton Kiss
a74b2cd3d7 Merge pull request #137 from refilc/dev
dev to master
2024-11-13 21:08:13 +01:00
Kima
414755c777 okay that's it bye 2024-11-13 20:51:24 +01:00
Kima
3708b917c4 finished qr scanner (test) 2024-11-13 20:25:13 +01:00
Kima
986b13de68 changed version number 2024-11-13 19:12:09 +01:00
Kima
d391448870 remove prints 2024-11-13 19:11:08 +01:00
Kima
38d9b5f3b2 fixed login finally 2024-11-13 19:10:48 +01:00
Kima
2dafe5ed02 updated packages, did things and maybe finally fixed login issue 2024-11-12 23:27:14 +01:00
Kima
939761695f working error handling for theme sharing 2024-10-10 20:48:21 +02:00
Kima
f1ba5230fc added theme share error handling for ratelimit response 2024-10-10 18:11:41 +02:00
Kima
a50f449f7c added extra fields in news objects 2024-10-07 22:33:52 +02:00
Kima
fe3ed31830 added new analytics option to db 2024-10-06 23:56:56 +02:00
Kima
0ec33f8631 changed subscription document acceptance 2024-10-06 23:53:24 +02:00
Kima
6634010b97 made re-activation easier 2024-10-02 21:17:03 +02:00
Kima
816ddf58a2 changed how analytics work 2024-10-02 21:06:01 +02:00
Kima
d7741ca1c4 tried testing sync bug and fixed ads even more 2024-09-28 17:33:57 +02:00
Kima
a2cbe5d90b changed version number 2024-09-28 17:04:28 +02:00
Kima
7919d0e284 added grade delay to details and other small shit 2024-09-27 23:07:18 +02:00
Kima
92fe3b7dcd fixed yellow lines at profile image grade streak indicator 2024-09-27 22:02:31 +02:00
Kima
63fd37c31f the ads got more acceptable 2024-09-27 21:37:06 +02:00
Kima
aa10f0672e show ads only in even hours 2024-09-27 21:30:32 +02:00
Kima
a3694b59ec doing something with ads 2024-09-27 21:28:07 +02:00
Kima
9ecee0bb01 hide "ads" if user has plus 2024-09-27 20:51:01 +02:00
zypherift
51297ddc09 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-08-22 22:46:13 +02:00
zypherift
4d64705e59 fix for padding 2024-08-22 22:46:11 +02:00
Márton Kiss
d642f19834 Merge pull request #130 from refilc/dev
dev to master
2024-08-22 22:08:37 +02:00
Kima
51b25395c1 version change 2024-08-22 22:08:11 +02:00
Kima
4474562538 login fix 2024-08-22 22:04:05 +02:00
zypherift
d93dce7857 maybe fix 2024-08-22 21:57:42 +02:00
zypherift
d6fe2812c7 fine tune anim speed 2024-08-22 21:27:22 +02:00
zypherift
ed0f69d155 add animation to fade in (pain) 2024-08-22 21:23:20 +02:00
zypherift
c4a17633f8 fix that, and add new progress indicator 2024-08-22 20:58:12 +02:00
zypherift
d426d4866a fix this 2024-08-22 20:57:56 +02:00
zypherift
89adf5a26f change trans from E-kreta to e-KRETA 2024-08-22 20:47:07 +02:00
zypherift
117ee63b18 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-08-22 20:45:16 +02:00
zypherift
d27b5f8a51 re-revert new login 2024-08-22 20:45:14 +02:00
Kima
9671c250b9 Revert "change kretenlogin to widget"
This reverts commit 2d5c270641.
2024-08-21 23:33:15 +02:00
zypherift
2d5c270641 change kretenlogin to widget 2024-08-21 23:22:27 +02:00
zypherift
eda093a9b5 change trans 2024-08-21 21:54:49 +02:00
Kima
544e9c214a some modifications in login refresh 2024-08-18 13:27:52 +02:00
Kima
5c3dbcbd52 fixed privacy button and back button on new login screen 2024-08-18 13:00:40 +02:00
Kima
cd5f86db00 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-08-17 23:34:43 +02:00
Kima
9adfe636d6 maybe finally fixed ios login problem (i hope so) 2024-08-17 23:34:39 +02:00
zypherift
210e8ce0d4 change gradient start 2024-08-16 18:14:14 +02:00
zypherift
b1a7deca4a change height again, and make text proportional 2024-08-16 17:49:44 +02:00
zypherift
fa96770c9c fix padding :3 2024-08-16 17:46:14 +02:00
zypherift
5be67693c2 recolor navbar, and change padding on login btn part 2024-08-16 17:38:26 +02:00
zypherift
9ee5e8a35e image again 2024-08-16 16:58:53 +02:00
zypherift
3372c1ffde Merge branch 'dev' of github.com:refilc/naplo into dev 2024-08-16 16:42:13 +02:00
zypherift
94989687fa add higher kualiti images 2024-08-16 16:40:03 +02:00
Kima
52b9b4f5db maybe fixed ios login 2024-08-16 14:40:48 +02:00
Kima
75a2fa3726 changed location of privacy button 2024-08-16 11:48:41 +02:00
Márton Kiss
2c1bde9398 Merge pull request #128 from refilc/dev
dev to master
2024-08-16 01:06:26 +02:00
Kima
fd9794f3bf changed build number 2024-08-16 00:49:00 +02:00
Kima
a673d3f1b3 finally the new login is completely working with refresh token as well 2024-08-16 00:25:46 +02:00
Kima
f2c8e869b5 moved news 2024-08-14 23:42:26 +02:00
Kima
b4f2d38e99 changed launch mode to in-app 2024-08-14 23:28:57 +02:00
Kima
d842b2d588 sticker map shit 2024-08-14 23:27:30 +02:00
zypherift
f4fd9a3c2f forgot this icon 2024-08-14 23:20:25 +02:00
zypherift
a215bd7313 create trans(lation), and finish url opening 2024-08-14 23:17:30 +02:00
zypherift
3211279a53 added trans, changed icon 2024-08-14 23:05:22 +02:00
zypherift
2d4e281682 rename classes, and create new file for other 2024-08-14 23:01:15 +02:00
zypherift
148f945f3b replace images with new ones 2024-08-14 21:11:12 +02:00
Kima
aaa783ac45 updated build number 2024-08-14 13:22:51 +02:00
Kima
d70f92d4e5 changed login button 2024-08-14 12:32:32 +02:00
Kima
0f08400d63 shit 2024-08-14 11:32:38 +02:00
Kima
140a8f8e78 revert shit in rfplus 2024-08-14 11:30:59 +02:00
zypherift
17c9d1c447 what 2024-08-14 02:54:03 +02:00
zypherift
d8e23d8fa9 asd 2024-08-14 02:44:29 +02:00
zypherift
c4491eb0c6 merged new login screen with web login 2024-08-14 02:44:05 +02:00
zypherift
4945468e02 yes 2024-08-14 02:09:14 +02:00
Kima
9845ae9539 changed version number 2024-08-14 00:55:24 +02:00
Kima
3a2fc67cb2 new login system complete, that's it for today :3 2024-08-14 00:53:12 +02:00
Kima
148a43663c made kreten web login work hah 2024-08-13 01:08:05 +02:00
Márton Kiss
4a45131359 Merge pull request #126 from refilc/dev
dev to master (v5.0.3)
2024-06-21 22:54:49 +02:00
Kima
4128018a59 blah blah blah 2024-06-21 22:39:53 +02:00
Kima
0d509c90b1 finished everything shake 2024-06-21 22:30:17 +02:00
Kima
3ef58974c9 added shake to current error report screen as well 2024-06-21 21:47:15 +02:00
Kima
df75fadfea added shake 2024-06-21 21:16:24 +02:00
Kima
4254a7998a build number change 2024-06-20 14:17:31 +02:00
Kima
17faa545e5 changed some repos to custom forks because android sucks 2024-06-20 14:09:26 +02:00
Kima
506fb82dd0 changed lots of thing bc pub upgrade 2024-06-20 13:53:10 +02:00
Kima
bc8eb1910e upgraded pub things 2024-06-20 12:06:50 +02:00
Kima
fd1b15df77 just don't touch fl_chart 2024-06-19 23:34:45 +02:00
Kima
dd86c7436a fix in package versioning 2024-06-19 23:24:37 +02:00
Kima
8860a0269c fixed warnings after update 2024-06-19 22:34:56 +02:00
Kima
ce02dda46c updated flutter and pub packages 2024-06-19 22:23:16 +02:00
Kima
f16a52d0fb changed required sdk version and app version 2024-06-19 22:17:12 +02:00
Kima
cc8ce40222 fixed warnings 2024-06-19 22:10:28 +02:00
Kima
b6a933fe85 removed total average calculatro from refilcplus and added grade export viewing 2024-06-19 22:09:00 +02:00
Kima
767eba3776 well idgaf anymore, it should be good like this (subject average thing) 2024-06-19 22:02:12 +02:00
Kima
320499a466 prevent double taps on new weird exam popup 2024-06-19 21:35:49 +02:00
Kima
52c2f3090d fixed grade provider translation issues 2024-06-19 21:28:04 +02:00
Kima
d4df0170a3 fixed final grades ugly ui 2024-06-19 21:23:19 +02:00
Kima
796b35e27c made lesson countdown rotatable 2024-06-19 21:15:47 +02:00
Kima
051cdc895e fixed issues 2024-06-19 20:28:47 +02:00
Kima
e23bdac995 fixed sort issue 2024-06-19 16:43:56 +02:00
Kima
de0e8e1317 fixed good student mode percentage bug 2024-06-18 21:26:43 +02:00
Kima
b5b0046ef5 things™️ 2024-06-18 14:44:53 +02:00
Kima
92f16e054d finished new badge thingie 2024-06-17 22:47:30 +02:00
Kima
9470c848bf added new feature badge and unseen new feature list to settings 2024-06-17 22:19:43 +02:00
Kima
c40026e594 removed no import warning from grade exporting 2024-06-17 17:58:18 +02:00
Márton Kiss
93eaa5a74b Merge pull request #125 from refilc/dev
dev to master (v5.0.2 final)
2024-06-16 22:02:12 +02:00
Kima
5503b41be3 fix 2024-06-16 21:54:59 +02:00
Kima
bd716e1717 fixed shit 2024-06-16 21:48:32 +02:00
Márton Kiss
7f8b716712 Merge pull request #124 from refilc/master
master back to dev
2024-06-16 21:43:53 +02:00
Márton Kiss
1a7b59f2fc Merge pull request #123 from refilc/dev
dev to master (v5.0.2)
2024-06-16 21:43:07 +02:00
Kima
9f62e44b52 Revert "add wearos button"
This reverts commit 9d863e1ec0.
2024-06-16 21:42:37 +02:00
Kima
7c34552aa5 Revert "what"
This reverts commit 9b947256c8.
2024-06-16 21:40:35 +02:00
Kima
57d784443a changed version number 2024-06-16 21:36:22 +02:00
Kima
e73ee5a1f2 translation for grade importing 2024-06-16 21:36:00 +02:00
Kima
4277f0662a added back premium check 2024-06-16 21:33:33 +02:00
Kima
604e9dcaad Merge branch 'dev' of github.com:refilc/naplo into dev 2024-06-16 21:32:33 +02:00
Kima
c0dd84c665 finished grade importing and exporting totally 2024-06-16 21:32:27 +02:00
zypherift
7dc33d3b87 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-06-16 20:09:12 +02:00
zypherift
9bee0daeb5 kill me 2024-06-16 20:08:59 +02:00
Kima
dd8a4430a9 translation fixes 2024-06-16 20:01:22 +02:00
zypherift
47934620ea fix again 2024-06-14 15:16:03 +02:00
zypherift
9e815aff2f maybe fix token spam 2024-06-14 15:05:17 +02:00
zypherift
d8393b24e1 fix multiple schools appearing in personal details menu 2024-06-14 15:02:10 +02:00
zypherift
1abe990847 yes 2024-06-14 14:55:35 +02:00
zypherift
3a92716019 add ger/eng export translation 2024-06-14 14:54:34 +02:00
zypherift
9b947256c8 what 2024-06-14 14:09:34 +02:00
zypherift
0586da3742 Merge branch 'master' of github.com:refilc/naplo 2024-06-14 14:09:28 +02:00
zypherift
9d863e1ec0 add wearos button 2024-06-14 14:08:13 +02:00
zypherift
e080800aa8 Merge pull request #121 from balint1414/dev
Hiba ablak szövegének megváltoztatása.
2024-06-14 11:35:08 +02:00
balint1414
e6f7728e42 Hiba ablak szövegének megváltoztatása. (3) 2024-06-14 11:27:29 +02:00
balint1414
ac11da1744 Hiba ablak szövegének megváltoztatása. (2) 2024-06-14 10:58:26 +02:00
balint1414
cad7bd19dc Hiba ablak szövegének megváltoztatása. (2) 2024-06-14 10:56:15 +02:00
balint1414
e1870b08e5 Hiba ablak szövegének megváltoztatása. 2024-06-14 10:44:10 +02:00
Márton Kiss
7842aa447f Merge pull request #120 from refilc/dev
dev to master (beta v5.0.1)
2024-06-13 21:30:32 +02:00
Kima
a23b2d63e5 changed version number 2024-06-13 21:29:39 +02:00
Tihanyi Marcell
58faeb4fa2 Update Logo 2024-06-12 10:15:30 +02:00
Kima
48e64d7761 changed build number 2024-06-11 22:03:48 +02:00
Kima
aef8f78d16 fixed translations and added grade export to plus feature list 2024-06-11 22:02:12 +02:00
Kima
2b36528327 added grade exporting translation 2024-06-11 21:57:52 +02:00
Kima
918252ae4b finished grade exporting 2024-06-11 21:46:09 +02:00
Kima
63c650b68d fixed lesson number issue when it's null 2024-06-11 20:29:22 +02:00
Kima
090b0ccc85 fixed grades page translation 2024-06-11 20:22:53 +02:00
Kima
0768dc9404 fixed goal plan translation issues 2024-06-11 20:19:33 +02:00
Kima
d36351d76b updated version 2024-06-10 18:13:53 +02:00
Kima
45a8e0dd71 kinda finished new goal planner 2024-06-08 21:42:51 +02:00
Kima
94da2a9756 progress in new goal planner 2024-06-03 20:15:48 +02:00
Kima
37aa1858a8 added watch data to db 2024-06-03 17:06:11 +02:00
Kima
82f8a489dd updated version string 2024-06-02 12:23:33 +02:00
Kima
96b69b89ae started new login method in case kreten fucks up something 2024-05-29 19:58:43 +02:00
Kima
d9da7625ed added day to lesson tiles in subject page 2024-05-24 15:54:57 +02:00
Kima
c016258fb9 progress in new goal planner 2024-05-22 22:25:40 +02:00
Kima
855e48aea8 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-05-22 18:09:46 +02:00
Kima
b7e83d10dc toggle to change new popups and fix in plus 2024-05-22 18:09:40 +02:00
Kima
45ffdff324 added option to use old popups and some fixes 2024-05-22 17:47:57 +02:00
Kima
cd0729fa5e bugfix on notes page 2024-05-22 17:22:02 +02:00
Kima
30cfdfe784 live activity color reset for non-subscribers 2024-05-22 17:21:52 +02:00
zypherift
16f2593d22 todo, and fix cd path 2024-05-21 23:24:45 +02:00
zypherift
14ab0c4ce3 remove duplicate path 2024-05-21 23:19:52 +02:00
zypherift
9eb1317143 fix typo 2024-05-21 23:17:37 +02:00
zypherift
910a38650d add env 2024-05-21 23:15:11 +02:00
zypherift
a1f166980d fix path again:) 2024-05-21 22:44:30 +02:00
zypherift
0598b94ab9 fix cp path 2024-05-21 22:42:00 +02:00
zypherift
1310ad4f2e jenkins test 2024-05-21 22:36:28 +02:00
Kima
4d32500d90 åh, versionsnumret 2024-05-21 20:35:30 +02:00
Kima
67558b76a3 fixed notification null check issues 2024-05-21 20:29:08 +02:00
Kima
7ab8914076 changed svg path 2024-05-21 20:25:12 +02:00
Kima
b0eb819afa added all new booklet backgrounds 2024-05-21 20:25:02 +02:00
Kima
416f42f42d fixed little issues with lesson popups 2024-05-21 19:46:47 +02:00
Kima
a319b26d82 theme sharing improvements 2024-05-15 21:32:20 +02:00
Kima
84537fdcef added handling for 404 grade colors 2024-05-15 20:42:00 +02:00
Kima
30f24d5d33 custom font improvements 2024-05-15 20:21:07 +02:00
Kima
8c118eedc1 finished 5s streak thing 2024-05-15 19:31:48 +02:00
Kima
4dbe3d07a3 all sliders visible where it's needed 2024-05-14 22:26:40 +02:00
Kima
f1b1b23234 version bump 2024-05-13 23:19:33 +02:00
Kima
540e4d2812 started grade streak 2024-05-13 22:35:20 +02:00
Kima
93dd275969 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-05-13 20:06:32 +02:00
zypherift
c79c45705d Merge pull request #118 from geryyhu/dev
liveactivities bug fix
2024-05-13 19:52:37 +02:00
Kima
ce31182a5c crop fix 2024-05-13 19:50:53 +02:00
Kima
174046f954 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-05-13 19:23:59 +02:00
Kima
3fc14ffbb8 added room to livecard break 2024-05-13 19:23:55 +02:00
Geryy
f579270886 liveactivities bug fix
- Forget to add LiveCardState check to the end, so to avoid create-end activity loop, I added currentstate check.
2024-05-13 19:06:25 +02:00
Márton Kiss
365bd7957e Merge pull request #117 from geryyhu/dev
fixed liveactivity issue
2024-05-13 06:09:45 +02:00
Geryy
d24c4ec187 fixed liveactivity issue
- Fixed a bug where if it's less than one hour before the first class, the LiveActivity is created, but if the user rolls back the time to more than one hour before the first class, the LiveActivity does not end."
2024-05-13 03:01:18 +02:00
Kima
75ba5405bb made full new grade color picker 2024-05-12 22:05:21 +02:00
Kima
e0bf8ac5e5 fixed exam related popup things 2024-05-12 19:23:45 +02:00
Kima
1a3d78a5bc absence page and graph fixes 2024-05-12 19:02:56 +02:00
Kima
c205bc592c idk 2024-05-12 12:10:34 +02:00
Kima
308c8f966f Merge branch 'dev' of github.com:refilc/naplo into dev 2024-05-09 22:09:32 +02:00
Márton Kiss
139ac28be6 Merge pull request #116 from geryyhu/dev
LiveActivities design fix
2024-05-09 17:15:14 +02:00
Geryy
bbe53b8c01 LiveActivities design fix
- Fixed issue where long subject names did not fit. 
- Formatting improvements on DynamicIsland and LockScreen notifications. 
- Smarter wrapping for long subjects.
- *I forgot to add a line break when there is a break, so I added it.*
2024-05-09 16:11:43 +02:00
Geryy
56a0c2c02e LiveActivities design fix
- Fixed issue where long subject names did not fit. 
- Formatting improvements on DynamicIsland and LockScreen notifications. 
- Smarter wrapping for long subjects.
2024-05-09 14:46:01 +02:00
Márton Kiss
122a5ea210 Merge pull request #114 from pml68/dev
Volt még fennmaradó hibás színkód a régi primary-ből
2024-05-08 19:15:45 +02:00
pml68
aaa3d79b30 fix: change only the widget's "filc" color to the new primary 2024-05-08 18:00:33 +02:00
pml68
cacf566794 Revert "fix: change all remaining #3D7BF4 color codes to #052460 (new primary)"
This reverts commit 9b29ede6eb.
2024-05-08 17:58:31 +02:00
pml68
9b29ede6eb fix: change all remaining #3D7BF4 color codes to #052460 (new primary) 2024-05-08 16:12:09 +02:00
Márton Kiss
9e9e46d0f8 Merge pull request #111 from geryyhu/dev
LiveActivities design fix
2024-05-06 21:29:42 +02:00
Geryy
9901251cfc LiveActivities design fix 2.0 2024-05-06 15:25:54 +02:00
Kima
e7ec93132d live card padding fix 2024-05-06 11:10:33 +02:00
Geryy
7cec2ff525 Merge branch 'refilc:dev' into dev 2024-05-06 06:03:34 +02:00
Horváth Gergely
2ca8f4b8fe LiveActivities design fix
- Fixed if the user opens the app 1 hour before their first class, the Room section is empty in LiveActivity lock screen
- DynamicIsland reworked and improved
- The room section moved to Flutter side
2024-05-06 06:03:06 +02:00
Horváth Gergely
ae66a462e7 LiveActivities design fix
- Fixed if the user opens the app 1 hour before their first class, the Room section is empty in LiveActivity lock screen
- DynamicIsland reworked and improved
- The room section moved to Flutter side
2024-05-06 06:01:15 +02:00
Kima
c85f15eb49 updated build number 2024-05-05 22:21:40 +02:00
Kima
e04cc5ea2b added analytics warning 2024-05-05 22:20:24 +02:00
Kima
3ed456c01f fixed subject page padding 2024-05-05 21:55:05 +02:00
Kima
f64b1360d9 images are now removable 2024-05-05 21:53:39 +02:00
Kima
c9db496e59 fixed text overflow and teacher custom name 2024-05-05 21:39:22 +02:00
Kima
d915200faa made task creation flow 2024-05-05 21:11:13 +02:00
Tihanyi Marcell
32abfe7037 New Icon + iOS version bump + chmod 2024-05-05 20:37:12 +02:00
Márton Kiss
3db67b2288 Merge pull request #109 from refilc/dev
dev to master after half a year finally <3
2024-05-05 17:35:27 +02:00
Kima
7488c9abdd fixes 2024-05-05 17:23:01 +02:00
Kima
49ebb8b1c3 added back timer for live activity 2024-05-05 17:22:07 +02:00
Kima
55befca3aa last version bump before beta 2024-05-05 17:17:47 +02:00
Kima
0cc3aa07ad added room to lesson popup 2024-05-05 17:17:25 +02:00
Kima
0a1c5bbfd2 temp revert login screen 2024-05-05 16:52:42 +02:00
Kima
a17600c4ea fixed live card issue 2024-05-05 08:11:38 +02:00
Kima
6d0315e4e6 fix subject rename and added new exam popup 2024-05-05 00:56:42 +02:00
Kima
25a72da3a8 did everything, like really 2024-05-04 23:31:15 +02:00
Kima
6d8d11cd87 version bump 2024-05-04 23:31:07 +02:00
Kima
3b1e345f14 omfg really sok progress 2024-05-04 22:11:29 +02:00
Kima
6b8708e1e3 progress in quick settings 2024-05-04 18:18:57 +02:00
Kima
7edde06c11 wha? 2024-05-04 17:59:38 +02:00
kima
6803ac8642 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-05-04 11:45:00 +02:00
kima
6b99edca94 added settings for quick things 2024-05-04 11:44:06 +02:00
Tihanyi Marcell
24384e7488 Workspace 2024-05-03 23:40:31 +02:00
Tihanyi Marcell
14df196f34 Delete refilc/ios/Runner.xcworkspace directory 2024-05-03 23:26:28 +02:00
Tihanyi Marcell
597c50bbf6 Prepare for Production 2024-05-03 22:42:11 +02:00
Tihanyi Marcell
96ed4d0b46 Some iOS updates and Version Bump 2024-05-03 22:40:12 +02:00
Márton Kiss
39eb435817 Merge pull request #108 from geryyhu/dev
LiveActivities fix
2024-05-03 21:50:32 +02:00
Horváth Gergely
587c16fb1f - LiveActivities fix 2024-05-03 21:30:25 +02:00
Geryy
c4e7ebc020 Merge branch 'refilc:dev' into dev 2024-05-03 21:13:02 +02:00
zypherift
816b14e735 started bottommodalsheet, school selector is buggy need fix 2024-05-03 21:06:44 +02:00
zypherift
56c87b146b remove comment 2024-05-03 19:05:19 +02:00
zypherift
2e14d52c25 Merge branch 'dev' of https://github.com/refilc/naplo into dev 2024-05-03 18:43:07 +02:00
zypherift
d217265ae7 revert login screen 2024-05-03 18:41:19 +02:00
Geryy
5f27432518 Merge branch 'refilc:dev' into dev 2024-05-03 18:09:02 +02:00
Kima
5f6ad03335 some progress in lesson tile popup 2024-05-03 17:33:14 +02:00
Geryy
8f05dc4ed4 Merge branch 'refilc:dev' into dev 2024-05-03 17:25:59 +02:00
Kima
0b96cd9080 things things 2024-05-03 17:08:03 +02:00
Kima
f346d9b8ef made dark mode colors better and bugfix 2024-05-03 16:56:29 +02:00
Kima
d5f583a0d2 visual bug fixes 2024-05-03 16:51:43 +02:00
Kima
4abd16ab76 version bump to build 253 2024-05-02 21:55:35 +02:00
Kima
ae17e9f8b7 login screen temp fix 2024-05-02 21:55:06 +02:00
Kima
b9b43fe961 changed images to compressed ones (they are pretty, don't worry) 2024-05-02 21:54:58 +02:00
Kima
a4b04798f2 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-05-02 20:29:44 +02:00
Kima
703c5f8691 fixed translation (live card) 2024-05-02 20:29:40 +02:00
Kima
93d56fec28 finished the entire new live card thingie 2024-05-02 20:28:35 +02:00
Horváth Gergely
b7b3a37b52 - data backup
- I can't test it because I'm stuck on the login screen.
2024-05-02 01:41:04 +02:00
zypherift
b6fbfd5756 remove outline 2024-05-01 23:35:10 +02:00
zypherift
ca544082ba make login button 2024-05-01 23:34:17 +02:00
zypherift
bd30a77fc2 modify login text 2024-05-01 23:34:11 +02:00
zypherift
65fbfb3dca wait no lol, need button instead 2024-05-01 23:00:13 +02:00
zypherift
ab56de53eb Merge branch 'dev' of https://github.com/refilc/naplo into dev 2024-05-01 22:58:31 +02:00
zypherift
30a9a23b86 huge progess, start the login buttons and etc on the bottom 2024-05-01 22:58:30 +02:00
Kima
6ba105f08c finished new live card during lesson part 2024-05-01 22:24:19 +02:00
Kima
d84a9892c8 fix pfp color 2024-05-01 19:56:11 +02:00
Kima
d0599bed7d Revert "git things"
This reverts commit 1b95afdfc2.
2024-05-01 19:53:33 +02:00
Kima
ca177ad69f Merge branch 'dev' of github.com:refilc/naplo into dev 2024-05-01 18:26:13 +02:00
Kima
05ded4da52 dik smth was 2024-05-01 18:26:06 +02:00
zypherift
3cbfee7220 fix also here 2024-04-29 21:05:42 +02:00
zypherift
ee0c2d708c fix colors on showcase text 2024-04-29 21:05:05 +02:00
zypherift
8115d89bf5 remove tudu 2024-04-29 20:57:48 +02:00
zypherift
78e6408962 todo, gn 2024-04-29 00:25:23 +02:00
zypherift
bc61b61ae1 add dep bc flutter 2024-04-29 00:25:16 +02:00
zypherift
d746ebc143 add flutter_portal 2024-04-28 23:09:57 +02:00
zypherift
f2be0ee6d4 weird 2024-04-28 23:06:19 +02:00
zypherift
156466235d increase carousel time 2024-04-28 23:06:11 +02:00
zypherift
677303fa2c image cache, font etc 2024-04-28 23:05:11 +02:00
zypherift
1b95afdfc2 git things 2024-04-28 23:04:23 +02:00
Kima
57a4c65d2c made dark mode colors better kinda 2024-04-28 18:02:45 +02:00
Kima
3868e70b23 fixed thing on new subjects page 2024-04-28 17:20:03 +02:00
Kima
d204af42db Merge branch 'dev' of github.com:refilc/naplo into dev 2024-04-28 16:59:05 +02:00
zypherift
89604a8b4f fix width 2024-04-28 16:39:13 +02:00
Kima
cdde5c11ee Merge branch 'dev' of github.com:refilc/naplo into dev 2024-04-28 16:38:15 +02:00
Kima
10d1d1e0a0 fixed expandable fab 2024-04-28 16:38:07 +02:00
zypherift
96b84e2ddd fix padding 2024-04-28 16:29:31 +02:00
zypherift
3e20977195 ssshh 2024-04-28 16:23:31 +02:00
zypherift
cad186e00a Merge branch 'dev' of https://github.com/refilc/naplo into dev 2024-04-28 16:19:14 +02:00
zypherift
e1c409c621 start carousel 2024-04-28 16:18:48 +02:00
zypherift
8224976202 add translation for showcase text, german is still in progress 2024-04-28 16:18:42 +02:00
zypherift
9f26845cda add figtree font 2024-04-28 16:18:01 +02:00
zypherift
a08c9b221b change dep 2024-04-28 16:17:52 +02:00
zypherift
df2de39109 add and blur showcase before release, dont forget this 2024-04-28 16:17:40 +02:00
zypherift
1058608034 idk, git is weird 2024-04-28 16:17:07 +02:00
Kima
95cad1ed70 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-04-28 15:48:05 +02:00
Kima
ee0613d720 finished new grades page (subjects now actually) 2024-04-28 15:47:45 +02:00
zypherift
25a92f3714 add new text for showcase 2024-04-28 00:53:27 +02:00
zypherift
91cd263112 add carousel again 2024-04-28 00:29:26 +02:00
zypherift
58065575bf add carousel 2024-04-28 00:29:11 +02:00
zypherift
71f8970300 add new rounded logo 2024-04-28 00:28:56 +02:00
Kima
28ce83765a added key 2024-04-27 22:16:11 +02:00
zypherift
fe2215d7b7 hate regex, love regex, attach more classnames to icons 2024-04-27 20:23:17 +02:00
Kima
236c34dbe6 fixed live card bugs 2024-04-24 19:23:05 +02:00
Kima
02af238c1b changed version string 2024-04-23 20:32:05 +02:00
Kima
d3cd22ec7c fixed dark mode issue 2024-04-23 20:24:50 +02:00
Kima
7ac8c55b17 fixed some icons 2024-04-23 20:10:00 +02:00
Kima
d740dea1f7 removed unused import 2024-04-23 19:58:58 +02:00
Kima
cb4c551c47 fixed page icons in settings 2024-04-23 19:58:28 +02:00
Kima
c0589cba5c finished new absences page 2024-04-23 19:56:35 +02:00
Kima
f0b9dfa1e6 added new absences icon 2024-04-23 19:54:06 +02:00
Kima
8d90e81de7 fixed half year grade padding 2024-04-23 19:17:38 +02:00
Kima
ef8d216eff na gec 2024-04-23 18:59:01 +02:00
Kima
e33728a071 color thing 2024-04-23 18:58:33 +02:00
Kima
1388ba58c1 fancy bar chart thing on absences page 2024-04-23 18:57:12 +02:00
Kima
73db67c4e3 half done absences page 2024-04-22 22:01:13 +02:00
Kima
697ed43e5a finished markdown 2024-04-22 20:36:13 +02:00
Kima
38ee2d30f5 finished markdown editor and formatting on view note screen 2024-04-22 19:55:48 +02:00
Kima
a35c608a4c fixed icons in notes and moved files 2024-04-22 17:55:35 +02:00
Kima
3f537976e9 finished new morning live card 2024-04-22 17:44:15 +02:00
Kima
90debfa60c new live card things 2024-04-22 15:36:48 +02:00
Kima
51d8ef7707 some livecard progress 2024-04-21 23:18:37 +02:00
Kima
3f782e762a Merge branch 'dev' of github.com:refilc/naplo into dev 2024-04-21 22:44:15 +02:00
Kima
84717433df changed app icon to new and started new livecard 2024-04-21 22:36:37 +02:00
zypherift
b5ead56c4e git why 2024-04-21 22:18:21 +02:00
Kima
896d414032 shit 2024-04-21 15:32:06 +02:00
Kima
a5ecf67acd added warning text 2024-04-21 15:30:00 +02:00
Kima
c731c32001 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-04-21 14:07:41 +02:00
Kima
86a656e25d added warning to google calendar sync 2024-04-21 14:07:30 +02:00
Tihanyi Marcell
6f6473ceee Version Bumping 2024-04-16 21:20:41 +02:00
Tihanyi Marcell
cdde458fe7 ios gitignore 2024-04-16 21:06:02 +02:00
Tihanyi Marcell
fd58c3595e iOS Updates 2024-04-16 21:03:50 +02:00
Kima
02a078df2a fixed login screen overflow 2024-04-16 18:35:55 +02:00
Kima
ce8173891b removed beta chip from notifications menu 2024-04-12 22:05:21 +02:00
Kima
cb8db8670f fixed sorting issue 2024-04-12 21:46:14 +02:00
Kima
6dccd1f6eb only show relevant calendar sync options 2024-04-12 21:28:15 +02:00
Kima
044ce0705a version string update 2024-04-10 23:10:04 +02:00
Kima
5b053c645c fixed invisible toggle on plus screen 2024-04-09 22:57:56 +02:00
Kima
ee386d085c fixed notes ui bug 2024-04-09 22:53:18 +02:00
Kima
329ad57e36 fixed color bug on subject page 2024-04-09 22:46:24 +02:00
Kima
6f694e8abe fixed segmented control color issue 2024-04-09 22:34:35 +02:00
Kima
ee67cd5362 fixed segmented control ui issue on small screens 2024-04-09 22:28:24 +02:00
Kima
feaa3468d7 fixed warnings 2024-04-09 22:25:14 +02:00
Kima
4a8d42fe4b fixed plan prices 2024-04-09 22:17:07 +02:00
Kima
abc595357f fixed weird plus things and it's working really well :3 2024-04-09 21:59:54 +02:00
Kima
a51d65f7cc rfplus things again 2024-04-09 21:30:39 +02:00
Kima
5849775660 version changeeeee 2024-04-09 18:32:59 +02:00
Kima
146a31d561 added plus features to list :3 2024-04-09 18:31:24 +02:00
Kima
2e49c78ea0 fixed sliding option thing thumb color 2024-04-08 19:06:20 +02:00
Kima
3543aa40e6 german translation 2024-04-07 22:57:57 +02:00
Kima
fc52bda69c added button translation 2024-04-07 21:21:17 +02:00
Kima
8762aa467b english translation fix 2024-04-07 21:13:31 +02:00
Kima
feace62dcb added english translation 2024-04-07 20:31:34 +02:00
Kima
d5127e8a56 rename other shit 2024-04-07 20:06:56 +02:00
Kima
23563bc4f9 changed premium directories to plus 2024-04-07 19:59:38 +02:00
Kima
6a7087d4f5 added translation file for rfplus popup 2024-04-07 19:53:46 +02:00
Kima
c012cdff64 have no idea what i've done, but it works 2024-04-07 19:33:36 +02:00
Kima
ed556d2bd4 oopsie 2024-04-07 19:19:11 +02:00
Kima
6662d4a48f bottom sheet fixes 2024-04-07 19:18:38 +02:00
Kima
05f4215faf added premium button to settings 2024-04-06 19:46:27 +02:00
Kima
d685a64f78 added lifetime toggle to plus subscription screen 2024-04-06 19:22:36 +02:00
Kima
a024ac674d changed 0.00 class average to ? 2024-04-06 18:04:29 +02:00
Kima
6416af3928 fixed gradient on graph 2024-04-06 18:04:17 +02:00
Kima
7a79122b5a another version change 2024-04-04 22:17:11 +02:00
Kima
3ab43d84fe finished new grade counter 2024-04-02 22:35:10 +02:00
Kima
fdd4a9700c fix modal handle bug 2024-04-02 21:29:50 +02:00
Kima
3e140ce0ed almost done with new grades page 2024-04-02 21:24:28 +02:00
Kima
dfe8899b21 changed default grade colors 2024-04-02 21:24:17 +02:00
Kima
7f88c8c3e1 progress in new subject page 2024-04-02 00:04:05 +02:00
Kima
98efdfd8cf comment 2024-03-31 23:24:29 +02:00
Kima
a762cf70f6 app icon change progress but i'm tired bye 2024-03-29 00:01:47 +01:00
Kima
8f39fb267b started welcome/onboarding screen 2024-03-28 22:46:18 +01:00
Kima
498ba2d69e added paywall grr 2024-03-28 22:32:45 +01:00
Kima
4887826a36 lot of things done, like custom lesson things 2024-03-28 22:29:25 +01:00
Kima
1ed7661774 changed everything to v3 api 2024-03-28 21:57:34 +01:00
Kima
06163f0ef8 remove debug print 2024-03-27 22:07:47 +01:00
Kima
a6563f9a7e added settings option for custom text color 2024-03-27 22:03:13 +01:00
Kima
97049bae46 added db and settings for custom text color 2024-03-27 21:20:47 +01:00
Kima
5340fc2ed4 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-03-27 21:11:16 +01:00
Kima
d9ec195233 fix fix fix 2024-03-27 21:11:09 +01:00
zypherift
4a858de9da weird 2024-03-24 23:20:39 +01:00
Kima
81e57d2f38 cal sync fixes 2024-03-24 22:44:20 +01:00
Kima
114168c1c1 fixed font color bug 2024-03-24 21:27:17 +01:00
Kima
f6a096a322 updated outdated dart sdk dep 2024-03-24 20:46:01 +01:00
Kima
5bc51ec96b temp plus bypass 2024-03-24 20:29:51 +01:00
Kima
72208680ff comment unused shit 2024-03-24 20:29:29 +01:00
Kima
b5fc1b911b plus plus plus 2024-03-23 22:41:30 +01:00
Kima
161f61ea96 completed new plus popup when feature unavailable :3 2024-03-23 22:41:20 +01:00
Kima
1757e16dea error screen fix 2024-03-22 21:07:41 +01:00
Kima
9a7140744e added settings export 2024-03-21 23:00:00 +01:00
Kima
d984ee0a42 uwu toggle in settings 2024-03-21 22:49:47 +01:00
Kima
ffbcefacbd uwu mode in db 2024-03-21 22:47:00 +01:00
Kima
461338d99b uwu mode in settingsprovider 2024-03-21 22:46:32 +01:00
Kima
ee64468a8f hopefully final build? 2024-03-21 22:39:31 +01:00
Kima
5ae35fb06e some idiot fucked this up and i need to fix it AGAIN 2024-03-21 20:15:24 +01:00
Márton Kiss
2245fc368d ur mom has periods <3 2024-03-21 18:37:21 +01:00
Pearoo
a805d8292f Change if-elseif to case switch for test schools 2024-03-21 17:47:20 +01:00
Pearoo
14bcb62184 Start working on live notification 2024-03-21 15:34:36 +01:00
Pearoo
9ef0f1f1a2 periods* 2024-03-21 00:21:35 +01:00
Pearoo
b84b3e39d9 Revert "Revert "Add new notification for surprise grades""
This reverts commit 61bc1f4d72.
2024-03-21 00:19:49 +01:00
Pearoo
61bc1f4d72 Revert "Add new notification for surprise grades"
This reverts commit d8d93efb20.
2024-03-21 00:16:10 +01:00
Pearoo
c83f512382 Fix fail localization 2024-03-20 23:58:43 +01:00
Pearoo
d8d93efb20 Add new notification for surprise grades 2024-03-20 23:55:43 +01:00
Pearoo
778850d8ee Notification message rework 2024-03-20 23:46:24 +01:00
Pearoo
763b629ddd Fix "Nem írt" localization (untested)
túl sokáig tart lebuildelni ezt a szart szóval holnap tesztelem
2024-03-20 23:34:05 +01:00
Pearoo
1a25ebd1f2 Update summary screen locales 2024-03-20 21:38:53 +01:00
Pearoo
76083b679f Merge branch 'dev' of github.com:refilc/naplo into dev 2024-03-20 21:33:19 +01:00
Pearoo
7a43179b47 Update failing text for en_en locale 2024-03-20 21:31:09 +01:00
Pearoo
2a89b6dc58 Simplify missed_exam string 2024-03-20 21:21:39 +01:00
Kima
3e7f38666e fixed color things 2024-03-20 21:21:37 +01:00
Pearoo
acde0b6951 Gitignore ignores mobile_ui/android/local.properties 2024-03-20 21:19:49 +01:00
Kima
e188536d65 added svg pre-cache 2024-03-20 21:03:15 +01:00
ReinerRego
625ef9ce37 update gitignore 2024-03-18 21:37:14 +01:00
ReinerRego
52530197c3 delete old sh scripts (welcome to contribution windows users) 2024-03-18 21:35:09 +01:00
ReinerRego
bf1bb53c96 package name is not the same as in pip bugfix 2024-03-18 21:34:07 +01:00
ReinerRego
49b98e8b10 automagically install packages that are needed 2024-03-18 21:31:31 +01:00
ReinerRego
7d6d659933 change ascii char 2024-03-18 21:23:39 +01:00
ReinerRego
a762ac5fc2 add d8dx fix idk 2024-03-18 21:22:43 +01:00
ReinerRego
a2b2a7956b some functionalities 2024-03-18 21:04:17 +01:00
ReinerRego
5940eae3f6 new tools 2024-03-18 00:26:53 +01:00
Kima
9f8f888f91 changed version string (probably last time 👀) 2024-03-17 22:18:29 +01:00
Kima
be4f87184e i said bypass 2024-03-17 22:17:44 +01:00
Kima
18e557cc1b wha 2024-03-17 22:17:14 +01:00
Kima
be21eac230 fucked up the bypass 2024-03-17 22:15:49 +01:00
Kima
6b3372e41a Merge branch 'dev' of github.com:refilc/naplo into dev 2024-03-17 22:08:42 +01:00
Márton Kiss
daf45760ec Update README.md 2024-03-17 22:08:01 +01:00
Márton Kiss
423be26cb5 Merge pull request #104 from refilc/master
master to dev
2024-03-17 22:02:40 +01:00
Kima
941ed5e0d1 migrated to new gradle building shit 2024-03-17 21:59:32 +01:00
Kima
3a2b3fa568 removed unused fonts (made the app way smaller) 2024-03-17 21:36:54 +01:00
Kima
9d49ee0eae fix deprecation 2024-03-17 21:26:11 +01:00
Kima
9d49ec3972 temp plus bypass 2024-03-17 21:25:01 +01:00
Kima
4262a7a413 fix things 2024-03-17 21:24:52 +01:00
Kima
6a79e8b3db public theme setting 2024-03-17 21:24:44 +01:00
Kima
a5f924ae77 cry about margin 2024-03-17 21:10:55 +01:00
Kima
561b2e4b53 finished new status bar shit 2024-03-17 21:06:41 +01:00
Kima
2bdc26cb21 smth color 2024-03-17 19:53:00 +01:00
Kima
dc380a9777 message fix 2024-03-17 19:43:03 +01:00
Kima
d5ce47c82c commented stupid shit 2024-03-15 22:01:42 +01:00
Kima
22ff003125 sex 2024-03-15 21:57:57 +01:00
ReinerRego
eb50493cc5 started theme idk 2024-03-14 23:35:29 +01:00
ReinerRego
73d1215b23 change desc 2024-03-14 19:32:23 +01:00
ReinerRego
45f8cf2248 readd test button 2024-03-14 19:32:04 +01:00
ReinerRego
6242f7cc2e remove test button 2024-03-14 01:06:04 +01:00
ReinerRego
1bdb2934f5 asd 2024-03-14 01:02:09 +01:00
ReinerRego
115c35cec1 forgot this color 2024-03-14 01:01:56 +01:00
ReinerRego
7cd6d7da2d add todo 2024-03-14 01:00:15 +01:00
ReinerRego
fd8ebb98a5 add const thing, exception screen done, need theme colors maybe? 2024-03-14 00:59:20 +01:00
ReinerRego
f02bacc877 change font and color 2024-03-14 00:58:40 +01:00
ReinerRego
5d250a4c39 randomizer done 2024-03-14 00:56:00 +01:00
ReinerRego
7fdae2b25e add dirtywords_helper 2024-03-14 00:55:53 +01:00
ReinerRego
e08f5253ce add xml 2024-03-14 00:55:38 +01:00
ReinerRego
9fed6a0dda add new font 2024-03-14 00:55:27 +01:00
ReinerRego
d4f70ce67d thing 2024-03-13 23:34:01 +01:00
ReinerRego
6afd09945b add xml parser 2024-03-13 23:08:03 +01:00
ReinerRego
806355099e add dirtywords.xml 2024-03-13 23:07:06 +01:00
ReinerRego
fa6aa62e56 add debug keystore to gitignore 2024-03-13 23:03:23 +01:00
Kima
9d2bd1b37a new refilcplus page tier cards 2024-03-13 22:59:26 +01:00
Kima
dc250e449f error screen fixes 2024-03-13 21:25:14 +01:00
Kima
05c10df239 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-03-13 21:15:25 +01:00
Kima
2ae0d9aa37 added final rfp icons 2024-03-13 21:14:33 +01:00
Márton Kiss
b04c8509a7 Merge pull request #103 from pml68/dev
Kima rendelt egy fixet
2024-03-13 16:10:19 +01:00
pml68
9d4c99acc7 fix: empty misses string displayed on delays page (on some devices) 2024-03-13 14:32:27 +01:00
Kima
c5a564a4cd remove unused notes button 2024-03-12 22:59:51 +01:00
Kima
1b16e0ffd4 changed version string 2024-03-12 21:42:55 +01:00
Kima
39b892523b added toggle for new colors 2024-03-12 21:40:24 +01:00
Kima
649f10f5b8 ooopsiee <3 2024-03-12 21:17:05 +01:00
Kima
e06b92fde7 new color shit 2024-03-12 21:15:11 +01:00
Kima
f1429faf3f fix and added messages screen to new location 2024-03-12 21:01:20 +01:00
Kima
7f074c67e3 fix too big dates in navbar 2024-03-12 21:01:02 +01:00
Kima
917d6d01db fixed project problems (warnings) 2024-03-11 23:29:20 +01:00
Kima
9ea0085ddb fix shit 2024-03-11 23:15:27 +01:00
Márton Kiss
a199f919b6 Merge pull request #102 from Monke14/notifications
Értesítések fix
2024-03-10 20:34:08 +01:00
hiihhaha
5e63c73c3b Merge branch 'dev' into notifications 2024-03-10 18:33:17 +01:00
hihihaha
dfd3f42550 accidentally didn't include categories in settings 2024-03-10 17:56:43 +01:00
hihihaha
b8e4c4ea3a finished notification fix 2024-03-10 17:38:22 +01:00
Márton Kiss
5522856f47 Merge pull request #101 from pml68/dev
reFilc-es "jelentkezz be" widget
2024-03-08 23:25:56 +01:00
pml68
1933b84f68 refactor: out with the old, in with the new 2024-03-08 22:43:52 +01:00
Márton Kiss
203024b154 fix image in readme 2024-03-08 10:28:33 +01:00
pml68
8488921075 feat: auto-refresh widget colors when the theme is change by the user 2024-03-07 19:58:38 +01:00
pml68
5966594b44 feat: update colors for login widget 2024-03-07 19:15:33 +01:00
Márton Kiss
5d0b49b1c7 Merge pull request #100 from pml68/dev
Szemét kód
2024-03-07 08:32:35 +01:00
pml68
d4721a5b7a refactor: get rid of premium code, unused widget color list 2024-03-07 08:28:44 +01:00
Márton Kiss
a552158ed4 Merge pull request #99 from pml68/dev
Highlight helyett az órákhoz is background
2024-03-06 21:15:27 +01:00
pml68
de5f347339 feat: use "custom_background_color" for the lesson elements as well 2024-03-06 21:04:42 +01:00
Márton Kiss
9e8009fe06 Merge pull request #98 from pml68/dev
Éljen! Téma szerinti színek!
2024-03-06 20:56:35 +01:00
pml68
b2db424d20 feat: the Widget now gets it's colors from the app theme! 2024-03-06 20:34:36 +01:00
Kima
e2ac4303f3 color (theme) fixes, NOT FINISHED 2024-03-05 23:08:47 +01:00
Kima
0dc9a0640a Merge branch 'dev' of github.com:refilc/naplo into dev 2024-03-04 22:58:42 +01:00
Kima
7363fc81cb notes page finished, messing with theme and navbar things 2024-03-04 22:58:34 +01:00
ReinerRego
629e7e92a4 Merge pull request #97 from pml68/dev
Na most #64 issue fix
2024-03-04 21:47:52 +01:00
pml68
48f6a23a9b fix(actually this time): widget displaying wrong day at the top when there are no lessons 2024-03-04 21:46:24 +01:00
Kima
e6fc1fd656 nav shadow modif 2024-03-04 21:26:57 +01:00
Kima
e5c73e6dcd I SAID LESS 2024-03-04 21:26:47 +01:00
Kima
fd5d636930 only show padding if no back button but less padding 2024-03-04 21:26:16 +01:00
Kima
f226734468 removed unused imports 2024-03-04 20:47:20 +01:00
Márton Kiss
d72c6347a3 Merge pull request #95 from pml68/dev
Még egy kis Filc prémium Widget kód, nemsokára jön az issue fix is!
2024-03-04 19:49:37 +01:00
pml68
f099d3012e refactor: once again, "Filc prémium" code is useless to us, I just forgot about these 2024-03-04 19:13:59 +01:00
Márton Kiss
7e09fe7fff navbar updates 2024-03-04 12:04:52 +01:00
Márton Kiss
7c9b12301b removed login top padding 2024-03-04 11:57:56 +01:00
Kima
35d927f09e moved this shit to properties too 2024-03-03 23:39:39 +01:00
Kima
74df76e9b0 revert shit 2024-03-03 23:36:15 +01:00
Kima
8494e7a753 Revert "rename filcapi to refilcapi"
This reverts commit ed80d3fc62.
2024-03-03 23:33:37 +01:00
Kima
6eff27d4d8 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-03-03 23:33:11 +01:00
Márton Kiss
28d39375ba harmadjara torlom ezt a szart 2024-03-03 23:30:49 +01:00
Kima
c1965e2453 started new navigation bar 2024-03-03 23:26:11 +01:00
Kima
91b293d211 modified gitignore 2024-03-03 23:25:59 +01:00
ReinerRego
595b0ab211 done, todo left 2024-03-03 23:25:10 +01:00
ReinerRego
efa19c672a new exception screen almost done 2024-03-03 23:22:53 +01:00
ReinerRego
ed80d3fc62 rename filcapi to refilcapi 2024-03-03 23:22:20 +01:00
ReinerRego
7736c2d2ff add geistmono font 2024-03-03 23:21:49 +01:00
ReinerRego
3742f1f477 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-03-03 22:40:08 +01:00
ReinerRego
12278c350f translation and idk 2024-03-03 22:38:53 +01:00
Kima
28aa153414 update gitignore 2024-03-03 22:34:30 +01:00
Kima
21ebbf224b Merge branch 'dev' of github.com:refilc/naplo into dev 2024-03-03 22:33:05 +01:00
Márton Kiss
6dd2fa100a read debug keystore properties from file 2024-03-03 22:32:42 +01:00
Márton Kiss
b4df085936 Delete refilc/android/local.properties 2024-03-03 22:30:12 +01:00
Márton Kiss
1bdfd53753 Delete refilc/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java 2024-03-03 22:29:38 +01:00
ReinerRego
73d596c645 started exception screen 2024-03-03 22:14:40 +01:00
ReinerRego
8c46b941ae null safety 2024-03-03 22:05:31 +01:00
ReinerRego
c4d05fe91f temp fix 2024-03-03 22:00:50 +01:00
Kima
ac355ef586 added new icons 👀 2024-03-03 21:50:05 +01:00
Kima
346a64d3bc removed shit 2024-03-03 21:18:49 +01:00
Kima
b98e4c0347 rfplus thingies 2024-03-03 21:06:13 +01:00
Kima
9b232a4a97 added premium checks everywhere 2024-03-03 20:44:11 +01:00
Kima
1ec226511c refilcplus things 2024-03-03 20:14:41 +01:00
Kima
673f02cdd0 modifications and added translations 2024-03-03 18:28:05 +01:00
Kima
edd7ffce02 geci 2024-03-03 18:27:36 +01:00
ReinerRego
87c4416b50 Merge pull request #94 from pml68/dev
remove old filc premium
2024-03-03 01:00:08 +01:00
pml68
7efa770ed7 refactor: remove unused "Filc Prémium" code 2024-03-03 00:56:00 +01:00
ReinerRego
929d3727f8 fix again 2024-03-02 21:25:34 +01:00
ReinerRego
0e4c715211 fix gitignore 2024-03-02 20:50:52 +01:00
Kima
f9768170b3 removed required shit from gitignore 2024-03-02 19:40:16 +01:00
hihihaha
f6ff98c5ed forgot to add listen:false 2024-03-02 19:14:11 +01:00
hihihaha
0f97dddcd8 add logic to avoid notification spam 2024-03-02 19:11:43 +01:00
hihihaha
b73cc62c16 oops 2024-03-02 18:23:14 +01:00
hihihaha
51ececc34a fix notifications 2024-03-02 18:11:22 +01:00
Kima
88daf43c3a finished calendar sync huh 2024-03-01 23:14:45 +01:00
Kima
32c5e8ae91 finished calendar sync settings part 2024-03-01 22:38:46 +01:00
Kima
7ebc470a7b calendar sync fixes 2024-03-01 19:00:19 +01:00
Kima
010867260c rfplus improvements 2024-03-01 18:38:29 +01:00
Kima
0b4d14c223 changed some texts 2024-02-29 23:46:21 +01:00
Kima
31d5556142 lot of work in rfp again 2024-02-29 23:01:18 +01:00
Kima
b83689a20b refilc+ test subscription is completely working with stripe 2024-02-29 22:35:37 +01:00
Pearoo
0e0ab56bd6 Merge pull request #92 from pml68/dev
A maradék "filcnaplo"-val leszámoltam
2024-02-29 09:55:56 +01:00
pml68
d65b5de195 feat: every filcnaplo call should now be refilc 2024-02-28 23:39:35 +01:00
Márton Kiss
9a9749d986 Merge pull request #91 from pml68/dev
Translations for Rename Teachers widget, Absences page
2024-02-28 23:37:47 +01:00
pml68
299f037cce feat: update workflows to use refilc instead of filcnaplo 2024-02-28 23:36:32 +01:00
pml68
cc4c3851fb fix: german translations for abscences page 2024-02-28 23:15:42 +01:00
pml68
063729096a fix: teacher rename section had no german translation 2024-02-28 22:41:29 +01:00
Kima
f64b3c4135 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-02-28 22:37:30 +01:00
Kima
25464eff79 lot of work on rfplus 2024-02-28 22:37:21 +01:00
Márton Kiss
312c140f7d Merge pull request #90 from refilc/revert-89-dev
Revert "Németül nem használatos a hrs, helyette h vagy std."
2024-02-28 22:36:59 +01:00
Márton Kiss
c2df28c1c7 Revert "Németül nem használatos a hrs, helyette h vagy std." 2024-02-28 22:36:42 +01:00
ReinerRego
b33d6560d3 Merge pull request #89 from pml68/dev
Németül nem használatos a hrs, helyette h vagy std.
2024-02-28 22:36:30 +01:00
pml68
715fed2764 fix: hours in german should be std, not hrs 2024-02-28 22:29:54 +01:00
Kima
55a9a41722 ye ye 2024-02-27 22:47:47 +01:00
Kima
1b17e0d0ce oopsie 2024-02-27 22:42:45 +01:00
Kima
9c43de08db progress in calendar sync 2024-02-27 22:42:16 +01:00
Kima
c214705368 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-02-25 22:55:41 +01:00
Kima
c5456d442f added stripe 2024-02-25 22:55:25 +01:00
Márton Kiss
6105848d8e Merge pull request #88 from pml68/dev
12-től van délután
2024-02-25 21:35:17 +01:00
ReinerRego
cc9d83b4ae update logo in readme 2024-02-25 20:05:16 +01:00
Kima
25bec328fa upgraded pub packages 2024-02-24 23:19:37 +01:00
pml68
310636413e fix: separate the "misses" and "delays" empty case strings 2024-02-24 22:58:33 +01:00
Kima
ae1f3f9389 fixed room name overflow 2024-02-24 21:50:19 +01:00
pml68
c5526a41d3 fix: "hiányzásaid" instead of "hiányaid" 2024-02-24 21:32:18 +01:00
pml68
2ff2ae7d98 fix: afternoon hours start from 12 PM, not 10 AM 2024-02-24 21:22:33 +01:00
Márton Kiss
4b6ba27174 Update CONTRIBUTING.md 2024-02-24 21:01:47 +01:00
Márton Kiss
aac0ceb577 updated contrib guide 2024-02-24 20:56:12 +01:00
Kima
1171e3aaaf changed everything from filcnaplo to refilc finally 2024-02-24 20:12:25 +01:00
Kima
0d1c7b7143 added store everywhere 2024-02-18 21:15:06 +01:00
Kima
304e0ea877 finished font family changing and sharing on client-side 2024-02-18 21:12:03 +01:00
Kima
4a1aa75cb2 finished custom fonts menu 2024-02-18 21:02:14 +01:00
Kima
50bb647d8f Merge branch 'dev' of github.com:refilc/naplo into dev 2024-02-18 20:28:33 +01:00
Kima
0f4080c166 font changing progress 2024-02-18 20:27:55 +01:00
ReinerRego
38380462f1 remove to access app on lockscreen 2024-02-18 19:50:17 +01:00
ReinerRego
8b3358aa13 kima why 2024-02-18 19:10:20 +01:00
Kima
cbbf9b42b2 started pinnable settings 2024-02-18 18:12:04 +01:00
Kima
c9362dcb8b yas 2024-02-18 17:51:18 +01:00
Kima
9b0beff9de fixed appearing things if other things are thinging 2024-02-18 14:13:03 +01:00
Kima
5eec61a7a9 made live activity color only visible on ios 2024-02-18 14:11:22 +01:00
Kima
85f5c408c0 added teacher to tile 2024-02-18 14:10:51 +01:00
Kima
2c333d4cc2 fixed shit in a really shitty way uwu 2024-02-18 14:04:40 +01:00
Kima
449b1d63c5 fixed timetable break 12h time 2024-02-18 13:21:21 +01:00
Kima
a727059945 added gradient to graph 2024-02-17 23:56:45 +01:00
Kima
3b5bdad158 version string update 2024-02-15 20:02:56 +01:00
Kima
2560464f8d lot of things idk 2024-02-15 19:52:12 +01:00
Kima
a055de9046 lot of things idk 2024-02-15 19:52:04 +01:00
Kima
41a5f7c539 MAYBE fixed notification spam 2024-02-12 19:38:11 +01:00
Kima
c3d02928c1 commented test shit 2024-02-12 17:49:08 +01:00
Kima
0d18309583 maps launcher working 2024-02-11 22:26:01 +01:00
Kima
120215d3b8 added livecard map shit 2024-02-11 21:20:44 +01:00
Kima
a8a94f5f88 modified description 2024-02-11 21:18:44 +01:00
Kima
e3532c5787 changed premium path in fix pub 2024-02-11 21:18:30 +01:00
Kima
d647776d6c added trip plan to school when clicking livecard in the morning 2024-02-11 20:06:48 +01:00
Kima
35dc47fd62 first google calendar timetable sync demo done 2024-02-11 19:39:33 +01:00
Kima
404933168f fixed exam view description maxLines 2024-02-11 17:03:38 +01:00
Kima
a158b2418e added paywall :3 2024-02-11 14:38:53 +01:00
Kima
39bd08f1ea temp removed premium inline 2024-02-11 14:30:35 +01:00
Kima
06247a160d finished customizable grade rarities 2024-02-11 14:27:15 +01:00
Kima
4b2b90be8e rfp and v5 fixes 2024-02-09 23:37:35 +01:00
Kima
dee6a13b1c fixed warnings 2024-02-08 22:32:34 +01:00
Kima
63c21c087f fixed warnings 2024-02-08 22:32:22 +01:00
Kima
a7eda9faf9 changed share thingies 2024-02-08 22:19:38 +01:00
Kima
cccda1aadb added themeMode to shareable paints 2024-02-08 22:10:47 +01:00
Kima
076d6a12a2 fixed the entire SHIT fullscreen timetable they made 2024-02-08 21:55:46 +01:00
Kima
2ff8974cc9 made timetable rotate the other way on ios 2024-02-08 20:38:19 +01:00
Kima
161c9943c4 added round new icon to lesson popup 2024-02-08 20:36:09 +01:00
Kima
fc2347e707 made "Hét" lowercase 2024-02-08 20:28:31 +01:00
Kima
8c654beb05 added ui for show_breaks 2024-02-08 20:23:16 +01:00
Kima
23b6e1b8c7 added option to hide breaks in timetable (settings) 2024-02-08 20:15:51 +01:00
Kima
ea44f74cc4 timetable absence fix 2024-02-08 20:10:06 +01:00
Kima
67dbe64683 changed timetable navigator padding 2024-02-08 20:03:13 +01:00
Kima
25234801df exam fix 2024-02-07 21:30:55 +01:00
Kima
13a1ff4f7c tokenel (token-nel) kys 2024-02-07 21:25:23 +01:00
Kima
e31daef26b timetable fixes 2024-02-07 21:24:34 +01:00
Kima
f3f4f7915d teacher/subject rename translation fix 2024-02-07 21:24:27 +01:00
Kima
69819ed692 version string change 2024-02-07 21:22:24 +01:00
Kima
a93f1c2422 update in user changer 2024-02-06 22:02:16 +01:00
Kima
a0975d635d fix padding 2024-02-06 22:01:55 +01:00
Kima
f03c4d4e62 commiting tax fraud /s 2024-02-06 21:41:06 +01:00
Kima
1d92a5336e v5 settings almost finished (first half) 2024-02-06 21:40:48 +01:00
Kima
bf81680b56 progress in new theme sharing 2024-02-04 22:54:32 +01:00
Kima
18892c6156 own paints and public paints thingie 2024-02-02 22:53:59 +01:00
Kima
8b91e0e1d3 devmode and secret v5-ify 2024-02-02 21:06:15 +01:00
Kima
773a8f61e9 rounding shits 2024-02-02 20:46:57 +01:00
Kima
a435f56f2e ahhhhhhh 2024-02-01 23:46:36 +01:00
Kima
6e23397905 things in v5 personalize settings (rename thingie) 2024-02-01 22:02:46 +01:00
Kima
458971392e idk v5 2024-01-30 22:09:25 +01:00
Kima
6f17f69281 progress in v5 settings 2024-01-30 22:09:10 +01:00
Kima
5b9187d545 general settings updated 2024-01-29 21:28:39 +01:00
Márton Kiss
648fac6904 Merge pull request #87 from refilc/master
master back to v5 dev
2024-01-29 20:49:48 +01:00
Márton Kiss
33919fe155 Merge pull request #86 from Delta-Trolling-Technologies/master
Fixed card title being italic when renamedSubjectsItalics is false
2024-01-29 20:47:51 +01:00
cemrk2
66431ef7d3 Added renamedSubjectsEnabled check to titleItalic and nextSubjectItalic 2024-01-29 20:05:56 +01:00
cemrk2
5b3c47fa19 Fixed card title being italic when renamedSubjectsItalics is false 2024-01-29 18:20:57 +01:00
Kima
2d5160b232 progress in general settings menu 2024-01-25 21:35:45 +01:00
Kima
a2cf76cb88 fixed bell delay buttons and added option to new place 2024-01-25 21:14:05 +01:00
Kima
8d84b2c65f fixed translations 2024-01-25 20:11:11 +01:00
Kima
c55f4058c7 fix visual bug on grades page 2024-01-25 19:37:18 +01:00
Kima
3b78711478 nvm, this will work, not the prev one 2024-01-25 19:25:27 +01:00
Kima
a061ebd1e9 only show homework with deadline after today 2024-01-25 19:24:41 +01:00
Kima
4ed3cfc90e fixed grade counter maybe and other visual bugs 2024-01-25 19:22:01 +01:00
Kima
1cd1d7ae88 removed splash from notetile 2024-01-25 19:09:02 +01:00
Kima
4b0726f939 fixed separated widgets 2024-01-25 18:56:01 +01:00
Kima
c6633be301 fix weird code 2024-01-25 18:34:12 +01:00
Kima
11d99a4cf9 fixed visual bugs 2024-01-25 18:21:34 +01:00
Kima
a53b8c7fdb fixed translation and checked surprise grade shit 2024-01-25 17:47:45 +01:00
Kima
1483c39029 grade opening default false 2024-01-25 17:37:35 +01:00
Kima
5a39f2053f added check on grade weight at surprise grades 2024-01-24 20:49:53 +01:00
Kima
6fb6732a2d fix shit 2024-01-24 19:56:40 +01:00
Kima
bd00156ece idk commented unused shit 2024-01-24 19:46:51 +01:00
Kima
a6b9150983 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-01-24 19:44:17 +01:00
Kima
587811778d did lot of things in v5 settings page 2024-01-24 19:40:45 +01:00
Kima
4e5695a118 added escapehtml to grade tile as well 2024-01-24 19:40:31 +01:00
ReinerRego
8a2275e56e not settings_screen, desktop_screen 2024-01-15 22:04:41 +01:00
ReinerRego
a8c44c3096 started settings_screen 2024-01-15 22:03:25 +01:00
Kima
da62b1bfa9 new grades fix thingie 2024-01-11 18:14:58 +01:00
Kima
8bbeb11b59 finished refilc+ purchase page 2024-01-07 22:20:12 +01:00
Kima
caee521edd started new refilc+ purchase page 2024-01-07 01:49:52 +01:00
Kima
b607096317 also refilc+ things 2024-01-06 23:28:14 +01:00
Kima
d8b85ba1b4 did a lot in refilc+ 2024-01-06 23:27:56 +01:00
Kima
23673a34d8 premium thingies 2024-01-06 21:38:37 +01:00
Kima
af13555afb finished main premium authentication shit 2024-01-06 21:38:26 +01:00
Kima
de1e9fd8f4 Merge branch 'dev' of github.com:refilc/naplo into dev 2024-01-04 22:44:05 +01:00
Kima
23af433e5d started new settings menu 2024-01-04 22:43:58 +01:00
Pearoo
6323b567de Fix typo (magadadat) 2024-01-04 15:45:18 +01:00
Kima
fd603d8c9e added new v5 style login screen 2024-01-03 00:14:04 +01:00
Kima
05e9ee97ca color bug fix 2024-01-02 23:58:13 +01:00
Kima
0bf6feb731 little home page thingie 2024-01-02 23:52:29 +01:00
Kima
450d2bb3fa finally fixed empty absences page 2024-01-02 23:20:54 +01:00
Kima
0eabf19d23 timetable improvements 2024-01-02 23:10:36 +01:00
Kima
45bf766d1c finished message popup view 2024-01-02 22:46:14 +01:00
Kima
4a6fabd47d note tile color and size fix 2024-01-02 22:23:26 +01:00
Kima
ec5880290a timetable fixes 2024-01-02 22:07:54 +01:00
Kima
5f49633867 moved reFilc+ to refilc_plus directory 2024-01-02 19:21:40 +01:00
Kima
cce6bba19d moved reFilc+ to refilc_plus directory 2024-01-02 19:21:17 +01:00
Kima
f5d8c61a62 fixed description thing 2024-01-01 22:27:49 +01:00
Kima
6ec9f84eab almost finished lesson tile 2024-01-01 22:24:31 +01:00
Kima
34ca1c51a0 grade tile size fix 2024-01-01 22:24:22 +01:00
Kima
52b1b303bd started new lesson tile 2024-01-01 22:00:34 +01:00
Kima
c98e692546 exam tile fix 2024-01-01 22:00:22 +01:00
Kima
1042f6de02 remade timetable ui kinda 2024-01-01 21:43:38 +01:00
Kima
2ed822e1da little fix in absence tile 2024-01-01 20:42:55 +01:00
Kima
b5634ed59f finished new grade tile 2024-01-01 20:39:58 +01:00
Kima
187f0c0216 fixed font sizes 2023-12-31 00:10:32 +01:00
Kima
71e9bbc830 finished new exam tile 2023-12-31 00:05:43 +01:00
Kima
6297b9cc24 almost finished new subjects page 2023-12-30 23:47:09 +01:00
Kima
e62fd40f88 removed shit 2023-12-30 22:30:56 +01:00
Kima
e010242469 added new style widgets and total grade counter 2023-12-30 22:27:42 +01:00
Kima
5476397af6 finished notes page 2023-12-30 18:10:19 +01:00
Kima
f238b86dc7 other things in notes 2023-12-30 13:27:52 +01:00
Kima
f5ad70fb28 added self notes thing to db 2023-12-30 13:27:25 +01:00
Kima
697c003678 fixed goal planner + translation 2023-12-30 13:27:03 +01:00
Kima
ffbcc302ea something about notes 2023-12-29 00:02:17 +01:00
Kima
1ded31491a fixed db error 2023-12-28 23:50:20 +01:00
Kima
f8e2da3345 bug fixes 2023-12-28 22:54:05 +01:00
Tihanyi Marcell
8c77a0a323 Eletem egyszerubbe tetele 2023-12-26 13:51:08 +01:00
Márton Kiss
88717d5925 Merge pull request #82 from refilc/dev
Dev
2023-12-26 00:21:09 +01:00
Kima
6cb86245cb fixed little thingies 2023-12-26 00:15:29 +01:00
Kima
8f393cd9c5 changed version string 2023-12-26 00:12:45 +01:00
Kima
38d892d9a1 temp removed app icon change button 2023-12-26 00:07:49 +01:00
Márton Kiss
fb70b2be38 Merge pull request #81 from refilc/dev
Dev
2023-12-26 00:06:19 +01:00
Kima
a5e368d983 added back everything to refilc+ submodule 2023-12-26 00:05:45 +01:00
Kima
de3fa0c71d added submodule back 2023-12-26 00:00:45 +01:00
Kima
cbece0e841 temp removed submodule 2023-12-25 23:51:36 +01:00
Kima
ac77f26eb2 idk test 2023-12-25 23:43:41 +01:00
Kima
52b4a9429b fixed message sending error 2023-12-25 23:36:51 +01:00
Márton Kiss
588bc2567e Merge pull request #80 from refilc/dev
Dev
2023-12-25 22:09:31 +01:00
Márton Kiss
d2d36c3d0f Merge branch 'master' into dev 2023-12-25 22:09:22 +01:00
Kima
8ef2bee62e why 2023-12-25 21:59:12 +01:00
Kima
30bde8b040 Merge branch 'dev' of github.com:refilc/naplo into dev 2023-12-25 21:59:00 +01:00
Kima
042522dc5a idk windows something 2023-12-25 21:58:58 +01:00
ReinerRego
fdc9276170 what 2023-12-23 02:16:44 +01:00
ReinerRego
413494a9ac Merge branch 'dev' of github.com:refilc/naplo into dev 2023-12-23 02:15:56 +01:00
Kima
8e3996e2f0 hide bottom sheet after msg sent 2023-12-23 00:05:51 +01:00
Kima
f46610314d fixed msg sending and added error handler 2023-12-23 00:05:12 +01:00
Kima
fdc6209656 updated version string (probably last time before update) 2023-12-22 22:22:53 +01:00
Kima
6def864b1f fixed renamed subjects italic font 2023-12-22 22:04:11 +01:00
Kima
fc40793534 fixed goal planner limit 2023-12-22 21:54:35 +01:00
Kima
f533c5d4f5 changed open_file to open_filex fort (fixed some issues maybe) 2023-12-22 21:31:59 +01:00
Kima
3a44a2f9bc fixed teacher rename error 2023-12-22 21:01:57 +01:00
Kima
1bf512991b fixed teacher rename error 2023-12-22 21:01:47 +01:00
ReinerRego
fb8b3ae73f changed login screen desktop 2023-12-22 19:21:18 +01:00
Kima
50d2d44ac2 fixed smth in message sending 2023-12-21 21:55:34 +01:00
Kima
b929766b14 something idk 2023-12-21 21:17:49 +01:00
Kima
d34371bfff finally "fixed" all shit issues in vscode 2023-12-21 21:17:38 +01:00
Kima
6bac82f7d6 fixed warnings (super.key, etc) 2023-12-12 22:57:16 +01:00
Kima
fc3f538e6b added translation to message sending 2023-12-12 22:42:22 +01:00
Kima
939e33feeb almost finished send message ui and functionality 2023-12-12 21:55:30 +01:00
Kima
a175a9ea1c fixed warnings and added bottom sheet to message sending 2023-12-12 20:39:17 +01:00
Kima
969aec0f11 finished message sending api ig 2023-12-12 19:45:51 +01:00
Kima
871c93050c added almost everything to provider 2023-12-12 19:07:39 +01:00
Kima
7f9c22bdcd added db shit to recipient storing 2023-12-12 19:01:01 +01:00
Kima
c06e9bc807 fixed warnings 2023-12-10 22:49:55 +01:00
Kima
7b7f603d9c finished sendable message base class gn 2023-12-10 22:47:25 +01:00
Kima
f4a6a0ceb0 lot of work in message sending thing 2023-12-10 22:42:39 +01:00
Kima
adc8deffa9 startend msg sending api thingie 2023-12-10 20:37:40 +01:00
Kima
3484230ced commented dropdown cuz not used currently 2023-12-10 19:33:25 +01:00
ReinerRego
40740b80d0 done i think 2023-12-09 21:12:14 +01:00
ReinerRego
20f20218e0 updated and added dropdownbutton 2023-12-09 20:03:58 +01:00
Kima
68c9745ce0 added gitignore to git 2023-12-09 19:59:46 +01:00
ReinerRego
70c8ac1876 added exam filter finally 2023-12-09 19:58:43 +01:00
Kima
bdfec4230b fixed app close on back button 2023-12-09 18:05:17 +01:00
Kima
093063b438 updated version string 2023-12-09 17:53:12 +01:00
Kima
bcab128332 fixed another weird shit 2023-12-09 17:39:56 +01:00
Kima
56500406e5 fixed things that were fucked up by pub upgrade 2023-12-09 17:23:21 +01:00
Kima
9f5e57eec6 fixed other shit 2023-12-09 17:01:00 +01:00
Kima
5079e0cb29 fixed weird warnings 2023-12-09 16:52:52 +01:00
Kima
646948012d fixed translation 2023-12-09 16:48:33 +01:00
Kima
399069537f maybe fixed timetable clear bug on kreten api error 2023-12-09 16:13:36 +01:00
Kima
1c49ffd57f temp removed app icon shit 2023-12-09 16:02:31 +01:00
Kima
8df3623d91 Merge branch 'dev' of github.com:refilc/naplo into dev 2023-12-09 15:42:24 +01:00
Kima
61ad26e047 updatet smth 2023-12-09 15:42:22 +01:00
Kima
51a6492477 CONVERT KEY TO SUPER PARAMETER KYS 2023-12-09 15:42:02 +01:00
ReinerRego
7d26a8bc33 changed gitmodules 2023-12-09 14:07:36 +01:00
Kima
e243b5c186 added adfghsdhg 2023-12-08 21:22:03 +01:00
Kima
043785fe35 why the hell was widget code in gitignore 2023-12-08 21:19:29 +01:00
Kima
72332b5000 remove unused temp files 2023-12-08 21:17:53 +01:00
Kima
e73aa6c1b0 fixed build shit 2023-12-08 21:16:21 +01:00
Kima
3410e410d2 fully finished total grade calculator 2023-11-21 21:47:09 +01:00
Kima
aba39505d9 half-working total average calculator done :3 2023-11-19 23:21:10 +01:00
Kima
ebf9c8526d icon 2023-11-18 22:35:25 +01:00
Kima
f5ab4bbc98 perfect 2023-11-18 22:01:36 +01:00
Kima
1764bb0f01 refilc+ smth 2023-11-18 21:28:54 +01:00
Kima
271e47619e idk smth old commit 2023-11-18 10:59:06 +01:00
ReinerRego
cd0c821bae wrong api lol 2023-11-14 22:43:16 +01:00
ReinerRego
6a1cb9f3eb made linux and uncommnented login from desktop ui 2023-11-14 22:42:55 +01:00
Kima
c6c5759a2c finished custom app icon option 2023-10-23 19:43:13 +02:00
Kima
b94ed46c8a app icon db and other things 2023-10-23 17:54:16 +02:00
Kima
b0eb78218a updated gitignore 2023-10-23 16:08:15 +02:00
Kima
1ac618c29f some progress in custom app icon thingie 2023-10-21 23:49:21 +02:00
Kima
7840a07c95 added gitignore to rfplus 2023-10-21 22:33:21 +02:00
Kima
3f5b8ab607 started doing app icon change 2023-10-21 22:20:16 +02:00
Kima
41fe5a3d05 csinaltam ezt meg azt pusz 2023-10-21 21:39:02 +02:00
Kima
af87e5ed36 smth 2023-10-21 21:33:58 +02:00
Kima
797963e63d removed shit 2023-10-21 21:22:59 +02:00
Kima
6a1eafe980 added submodule 2023-10-21 21:22:43 +02:00
Kima
5e7414ada8 renamed folder so i can add it as a submodule 2023-10-21 21:17:27 +02:00
Kima
8e391c9c7f Merge branch 'dev' of github.com:refilc/naplo into dev 2023-10-21 21:11:42 +02:00
Kima
316039463f moved non-premium features from premium folder 2023-10-21 21:11:39 +02:00
Márton Kiss
8e320b235c removed sebrhq from readme 2023-10-21 11:23:05 +02:00
Pearoo
be28c50ffc Make room number bigger for live card 2023-10-19 09:39:52 +02:00
881 changed files with 60299 additions and 44026 deletions

View File

@@ -15,10 +15,10 @@ jobs:
encodedString: ${{ secrets.KEYSTORE_BASE64 }}
- name: Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > filcnaplo/android/key.properties
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> filcnaplo/android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> filcnaplo/android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> filcnaplo/android/key.properties
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > refilc/android/key.properties
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> refilc/android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> refilc/android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> refilc/android/key.properties
- uses: actions/setup-java@v3
with:
distribution: "zulu"
@@ -32,7 +32,7 @@ jobs:
- name: Install dependencies
run: ./fix-pub.sh
- name: Build
run: cd filcnaplo && ./build.sh
run: cd refilc && ./build.sh
- name: Upload Android Release
uses: actions/upload-artifact@v2
with:

View File

@@ -46,7 +46,7 @@ jobs:
# Build and sign the ipa using a single flutter command
- name: Building IPA
working-directory: filcnaplo
working-directory: refilc
run: bash build-ipa.sh
# Collect the file and upload as artifact
@@ -55,7 +55,7 @@ jobs:
with:
name: release-ipa
# Path to the release files
path: filcnaplo/build/ios/ipa/*.ipa
path: refilc/build/ios/ipa/*.ipa
# Important! Cleanup: remove the certificate and provisioning profile from the runner!
- name: Clean up keychain and provisioning profile

73
.gitignore vendored
View File

@@ -1,37 +1,56 @@
filcnaplo/.flutter-plugins
filcnaplo/.flutter-plugins-dependencies
filcnaplo/pubspec.lock
filcnaplo/.dart_tool/
filcnaplo/android/
filcnaplo/ios/
filcnaplo/windows/
filcnaplo/linux/
filcnaplo/macos/
filcnaplo/build/
refilc/.flutter-plugins
refilc/.flutter-plugins-dependencies
refilc/pubspec.lock
refilc/.dart_tool/
# refilc/android/
# refilc/ios/
# refilc/windows/
# refilc/linux/
# refilc/macos/
refilc/build/
refilc/android/key.properties
refilc/android/debug.keystore
filcnaplo_desktop_ui/.flutter-plugins
filcnaplo_desktop_ui/.flutter-plugins-dependencies
filcnaplo_desktop_ui/pubspec.lock
filcnaplo_desktop_ui/.dart_tool/
refilc_desktop_ui/.flutter-plugins
refilc_desktop_ui/.flutter-plugins-dependencies
refilc_desktop_ui/pubspec.lock
refilc_desktop_ui/.dart_tool/
filcnaplo_kreta_api/.flutter-plugins
filcnaplo_kreta_api/.flutter-plugins-dependencies
filcnaplo_kreta_api/pubspec.lock
filcnaplo_kreta_api/.dart_tool/
refilc_kreta_api/.flutter-plugins
refilc_kreta_api/.flutter-plugins-dependencies
refilc_kreta_api/pubspec.lock
refilc_kreta_api/.dart_tool/
filcnaplo_mobile_ui/.flutter-plugins
filcnaplo_mobile_ui/.flutter-plugins-dependencies
filcnaplo_mobile_ui/pubspec.lock
filcnaplo_mobile_ui/.dart_tool/
refilc_mobile_ui/.flutter-plugins
refilc_mobile_ui/.flutter-plugins-dependencies
refilc_mobile_ui/pubspec.lock
refilc_mobile_ui/.dart_tool/
filcnaplo_premium/.flutter-plugins
filcnaplo_premium/.flutter-plugins-dependencies
filcnaplo_premium/pubspec.lock
filcnaplo_premium/.dart_tool/
filcnaplo_premium/android/
# filcnaplo_premium/.flutter-plugins
# filcnaplo_premium/.flutter-plugins-dependencies
# filcnaplo_premium/pubspec.lock
# filcnaplo_premium/.dart_tool/
.vscode
.github
.idea
.gitmodules
.gradle
refilc/.DS_Store
.DS_Store
refilc/linux/flutter/
.plugin_symlinks/
refilc/macos/Flutter/
refilc/ios/Flutter/
refilc/ios/Runner/GeneratedPluginRegistrant.h
refilc/ios/Runner/GeneratedPluginRegistrant.m
refilc/android/local.properties
refilc/android/debugkey.properties
refilc/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
tool_logs/build/*.log
tool_logs/d8dx_fix/*.log
tool_logs/pub_fix/*.log
refilc_mobile_ui/android/local.properties

3
.gitmodules vendored
View File

@@ -0,0 +1,3 @@
[submodule "naplo-plus"]
path = refilc_plus
url = git@github.com:refilc/naplo-plus.git

View File

@@ -1,7 +1,7 @@
# Contribution guide
# Contribution guide (Hozzájárulási útmutató)
Köszönjük, ha programozással segíted a munkánkat!
A folytatáshoz szükséged lesz egy Linux-ot vagy Windows-t futtató számítógépre, minimális programozási tapasztalatra és egy kis angoltudásra.
A folytatáshoz szükséged lesz egy MacOS-t, Linux-ot vagy Windows-t futtató számítógépre, minimális programozási tapasztalatra és egy kis angoltudásra.
Segít, ha már gyakorlottabb vagy a programozásban, és ha ismered a [Git](https://git-scm.com/) és a [GitHub](https://github.com/) működését. ;)
## Miben segítsek?
@@ -14,7 +14,7 @@ A legjobban annak örülünk, ha az [Issues](https://github.com/refilc/naplo/iss
## Hogyan segítsek?
Nem ígérhetünk itt sem programozás-, sem Git-kurzust, de a projektspecifikus dolgokat leírjuk, és segítünk a Flutter telepítésében.
A **reFilc** a Google által pár éve létrehozott **[Flutter](https://flutter.dev/)** keretrendszert használja, aminek nyelve a **[Dart](https://dart.dev/)**. Ha ismered a C#, Java, C++, vagy egyéb hasonló programnyelvek működését, **nem fog nagy gondot okozni a használata.** A felhasználói felület létrehozásában az is segíthet, ha foglalkoztál már korábban weboldalakkal vagy alkalmazásfejlesztéssel.
A **reFilc** a Google által pár éve létrehozott **[Flutter](https://flutter.dev/)** keretrendszert használja, aminek nyelve a **[Dart](https://dart.dev/)**. Ha ismered a JavaScript, C#, Java, C++, vagy egyéb hasonló programnyelvek működését, **nem fog nagy gondot okozni a használata.** A felhasználói felület létrehozásában az is segíthet, ha foglalkoztál már korábban weboldalakkal vagy alkalmazásfejlesztéssel.
Ha még nem használtad a Flutter-t, mindenképp böngészd át a [YouTube csatornájukat](https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw).
Kód vagy UI teszteléséhez Flutter telepítése nélkül is használhatod a [DartPad](https://dartpad.dev/)-et.
@@ -24,13 +24,13 @@ Kód vagy UI teszteléséhez Flutter telepítése nélkül is használhatod a [D
Ha nem értessz a Git-hez vagy a GitHub-hoz, ajánljuk figyelmedbe [ezt a cikket](https://medium.com/envienta-magyarorsz%C3%A1g/git-%C3%A9s-github-gyorstalpal%C3%B3-f2d78a732deb), viszont arra kérünk, hogy a használatukat ne a **reFilc**en próbáld ki először. Hozz létre egy saját Repo-t és abban tesztelgess. Ha már nagyjából kitapasztaltad, várjuk hozzájárulásodat.
Készíts egy Fork-ot a saját GitHub fiókod alá.
A **reFilc** legfrissebb, **épp fejlesztés alatt álló verzióját a [master branch](https://github.com/refilc/naplo/tree/master)-en találod**. Kérjük ide Commit-olj és ide célozd a Fork-odból a Pull Request-edet. Írd le benne, hogy mit változtattál és ha lehet, csatolj képernyőképet is.
A **reFilc** legfrissebb, **épp fejlesztés alatt álló verzióját a [dev branch](https://github.com/refilc/naplo/tree/dev)-en találod**. Kérjük ide Commit-olj és ide célozd a Fork-odból a Pull Request-edet. Írd le benne, hogy mit változtattál és ha lehet, csatolj képernyőképet is.
Minél gyakrabban készíts minél részletesebben elnevezett Commit-okat, hogy mások is el tudjanak igazodni az általad beküldött kódban.
---
Az általad fejlesztett funkciók mellé a Changelog-ba odakerül a GitHub felhasználóneved.
Ha jelentős és rendszeres hozzájáruló vagy, Discord-on megkaphatod a `DEV` rangot.
Ha jelentős és rendszeres hozzájáruló vagy, Discord-on megkaphatod a `Contributor` rangot, valamint kaphatsz kedvezményt a reFilc+ előfizetésekből és Merch-ekből!
Ha bárhol elakadtál vagy kérdésed van, keress bátran Discordon!
Ha bárhol elakadtál vagy kérdésed van, keress bátran Discord-on!
**Jó fejlesztést kívánunk!**

56
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,56 @@
pipeline {
agent any
environment {
ANDROID_SDK = '/home/jenkins/flutter_things/android-sdk'
ANDROID_PATH="$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools"
FLUTTER = '/home/jenkins/flutter_things/flutter/bin'
PATH = "$PATH:$ANDROID_PATH:$FLUTTER"
//TODO: need to fix flutter
}
stages {
stage('Copy Key Properties') {
steps {
// Copy the key.properties file
sh 'cp /home/jenkins/key.properties refilc/android/key.properties'
}
}
stage('Flutter Doctor') {
steps {
// Ensure Flutter is set up correctly
sh 'flutter doctor'
}
}
stage('Dependencies') {
steps {
// Get Flutter dependencies
sh 'cd refilc && flutter pub get'
}
}
stage('Build') {
steps {
// Build the Flutter project
sh 'cd refilc && flutter build apk --release'
}
}
stage('Archive') {
steps {
// Archive the APK
archiveArtifacts artifacts: 'build/app/outputs/flutter-apk/app-release.apk', fingerprint: true
}
}
}
post {
always {
// Clean up workspace after build
cleanWs()
}
}
}

View File

@@ -1,5 +1,5 @@
<p align=center>
<img src="https://media.discordapp.net/attachments/1111727410677825596/1113217167513624646/reFilc_Logo_Squircle.png?width=671&height=671" width=150>
<img src="https://refilc.hu/image/brand/logo.png" width=150>
<h1 align=center><b>reFilc</b></h1>
</p>
@@ -11,8 +11,10 @@
### Clone the project
<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>
```sh
git clone https://github.com/refilc/naplo
git clone --branch dev https://github.com/refilc/naplo --recursive
cd naplo
```
@@ -23,8 +25,8 @@ Run `fix-pub.sh`
### Run the app
```sh
cd filcnaplo
flutter run
cd refilc
flutter run (--release)
```
### Contribution
@@ -43,10 +45,8 @@ Az összes (ugyan azon verzióhoz tartozó) contribution meg fog jelenni a relea
**vrolandd, TMarccci:** head developer
**dwe., xou, SebRHQ:** designer
**dwe., xou:** designer
**Péter:** video editor
**annon:** a régi Filc Napló fejlesztője (ez az app, ha bár sokban változott, alapjaiban a Filc-re épül)
<sup>Ez a projekt egy fork; az eredeti projektet megtaláljátok itt: [filc/naplo-archive](https://github.com/filc/naplo-archive) (köszi, annon)</sup>
<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>

View File

@@ -1,13 +0,0 @@
What's new:
- design tweak
- new premium ui
- premium fix
- rounding fix
- graph percentage fix
- fail warning
- Widget
- fix sent messages
- fix ios live activities
- Hibajavítások 🐛
- **Megérkezett a Filc Premium!** ✨

View File

@@ -1,30 +0,0 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
version:
revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: web
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

View File

@@ -1,29 +0,0 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

View File

@@ -1,5 +0,0 @@
-keep class io.flutter.plugin.editing.** { *; }
-keep class androidx.lifecycle.DefaultLifecycleObserver
-keep class com.pauldemarco.flutter_blue.** { *; }
-keep class com.mr.flutter.plugin.filepicker.** { *; }
-keep class com.shockwave.**

View File

@@ -1,86 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
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"
android:requestLegacyExternalStorage="true">
<activity android:exported="true" android:name="hu.refilc.naplo.MainActivity"
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"
android:showWhenLocked="true"
android:turnScreenOn="true">
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<meta-data android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with https://api.refilcapp.hu -->
<data
android:scheme="https"
android:host="api.refilcapp.hu"
android:pathPrefix="/v1/auth/callback" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with https://refilc.hu -->
<data
android:scheme="https"
android:host="refilc.hu"
android:pathPrefix="/app" />
</intent-filter>
</activity>
<meta-data android:name="flutterEmbedding" android:value="2" />
<receiver android:name="hu.refilc.naplo.widget_timetable.WidgetTimetable"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_LEFT" />
<action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_RIGHT" />
<action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_TODAY" />
<action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_REFRESH" />
<action android:name="list_widget.ACTION_WIDGET_CLICK_BUY_PREMIUM" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/home_widget_test_info" />
</receiver>
<service android:name="hu.refilc.naplo.widget_timetable.WidgetTimetableService"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver"
android:exported="true">
<intent-filter>
<action android:name="es.antonborri.home_widget.action.BACKGROUND" />
</intent-filter>
</receiver>
<service android:name="es.antonborri.home_widget.HomeWidgetBackgroundService"
android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true" />
</application>
<meta-data android:name="flutterEmbedding" android:value="2" />
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
</manifest>

View File

@@ -1,7 +0,0 @@
package hu.refilc.naplo;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}

View File

@@ -1,119 +0,0 @@
package hu.refilc.naplo.database;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import java.sql.SQLException;
import hu.refilc.naplo.database.SQLiteHelper;
public class DBManager {
private Context context;
private SQLiteDatabase database;
private SQLiteHelper dbHelper;
public DBManager(Context c) {
this.context = c;
}
public DBManager open() throws SQLException {
this.dbHelper = new SQLiteHelper(this.context);
this.database = this.dbHelper.getWritableDatabase();
return this;
}
public void close() {
this.dbHelper.close();
}
public Cursor fetchWidget(int wid) {
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_WIDGETS, new String[]{SQLiteHelper._ID, SQLiteHelper.DAY_SEL}, SQLiteHelper._ID + " = " + wid, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
public Cursor fetchTimetable() {
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_USER_DATA, new String[]{SQLiteHelper.TIMETABLE}, null, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
public Cursor fetchLastUser() {
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.LAST_ACCOUNT_ID}, null, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
public Cursor fetchTheme() {
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.THEME, SQLiteHelper.ACCENT_COLOR}, null, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
public Cursor fetchPremiumToken() {
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.PREMIUM_TOKEN}, null, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
public Cursor fetchPremiumScopes() {
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.PREMIUM_SCOPES}, null, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
public Cursor fetchLocale() {
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.LOCALE}, null, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
public void deleteWidget(int _id) {
this.database.delete(SQLiteHelper.TABLE_NAME_WIDGETS, "_id=" + _id, null);
}
/*public void changeSettings(int _id, Map<String, String> map) {
ContentValues con = new ContentValues();
for(Map.Entry<String, String> e: map.entrySet()){
con.put(e.getKey(), e.getValue());
}
this.database.update(SQLiteHelper.TABLE_NAME_WIDGETS, con, "_id = " + _id, null);
}
public void insertSettings(int _id, Map<String, String> map) {
ContentValues con = new ContentValues();
for(Map.Entry<String, String> e: map.entrySet()){
con.put(e.getKey(), e.getValue());
//Log.d("Settings added", e.getKey() + " - " + e.getValue());
}
this.database.insert(SQLiteHelper.TABLE_NAME_WIDGETS, null, con);
}*/
public void insertSelDay(int _id, int day_sel) {
ContentValues con = new ContentValues();
con.put(SQLiteHelper._ID, _id);
con.put(SQLiteHelper.DAY_SEL, day_sel);
this.database.insert(SQLiteHelper.TABLE_NAME_WIDGETS, null, con);
}
public int update(int _id, int day_sel) {
ContentValues con = new ContentValues();
con.put(SQLiteHelper.DAY_SEL, day_sel);
return this.database.update(SQLiteHelper.TABLE_NAME_WIDGETS, con, SQLiteHelper._ID + " = " + _id, null);
}
}

View File

@@ -1,36 +0,0 @@
package hu.refilc.naplo.database;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class SQLiteHelper extends SQLiteOpenHelper {
private static final String CREATE_TABLE_WIDGET = " create table widgets ( _id INTEGER NOT NULL, day_sel INTEGER NOT NULL);";
private static final String DB_NAME = "app.db";
private static final int DB_VERSION = 1;
public static final String _ID = "_id";
public static final String DAY_SEL = "day_sel";
public static final String TIMETABLE = "timetable";
public static final String LAST_ACCOUNT_ID = "last_account_id";
public static final String THEME = "theme";
public static final String PREMIUM_TOKEN = "premium_token";
public static final String PREMIUM_SCOPES = "premium_scopes";
public static final String LOCALE = "language";
public static final String ACCENT_COLOR = "accent_color";
public static final String TABLE_NAME_WIDGETS = "widgets";
public static final String TABLE_NAME_USER_DATA = "user_data";
public static final String TABLE_NAME_SETTINGS = "settings";
public SQLiteHelper(Context context) {
super(context, DB_NAME, null, 7);
}
public void onCreate(SQLiteDatabase db) {
db.execSQL(CREATE_TABLE_WIDGET);
}
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS widgets");
onCreate(db);
}
}

View File

@@ -1,36 +0,0 @@
package hu.refilc.naplo.utils;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import java.util.Calendar;
import java.util.Date;
public class Utils {
public static boolean hasNetwork(Context context) {
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netInfo = cm.getActiveNetworkInfo();
if (netInfo != null && netInfo.isConnectedOrConnecting()) {
return true;
}
return false;
}
public static Date getWeekStartDate() {
Calendar calendar = Calendar.getInstance();
while (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) {
calendar.add(Calendar.DATE, -1);
}
return calendar.getTime();
}
public static Date getWeekEndDate() {
Calendar calendar = Calendar.getInstance();
while (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) {
calendar.add(Calendar.DATE, 1);
}
calendar.add(Calendar.DATE, -1);
return calendar.getTime();
}
}

View File

@@ -1,65 +0,0 @@
package hu.refilc.naplo.utils;
import java.time.DayOfWeek;
import java.time.Duration;
import java.time.LocalDate;
public class Week {
private final LocalDate start;
private final LocalDate end;
private Week(LocalDate start, LocalDate end) {
this.start = start;
this.end = end;
}
public static Week current() {
return fromDate(LocalDate.now());
}
public static Week fromId(int id) {
LocalDate _now = getYearStart().plusDays(id * 7L);
return new Week(_now.minusDays(_now.getDayOfWeek().getValue() - 1), _now.plusDays(7 - _now.getDayOfWeek().getValue()));
}
public static Week fromDate(LocalDate date) {
return new Week(date.minusDays(date.getDayOfWeek().getValue() - 1), date.plusDays(7 - date.getDayOfWeek().getValue()));
}
public Week next() {
return Week.fromDate(start.plusDays(8));
}
public int id() {
return (int) Math.ceil(Duration.between(getYearStart().atStartOfDay(), start.atStartOfDay()).toDays() / 7f);
}
private static LocalDate getYearStart() {
LocalDate now = LocalDate.now();
LocalDate start = getYearStart(now.getYear());
return start.isBefore(now) ? start : getYearStart(now.getYear() -1);
}
private static LocalDate getYearStart(int year) {
LocalDate time = LocalDate.of(year, 9, 1);
if (time.getDayOfWeek() == DayOfWeek.SATURDAY)
return time.plusDays(2);
else if (time.getDayOfWeek() == DayOfWeek.SUNDAY)
return time.plusDays(1);
return time;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Week week = (Week) o;
return this.id() == week.id();
}
@Override
public int hashCode() {
return id();
}
}

View File

@@ -1,392 +0,0 @@
package hu.refilc.naplo.widget_timetable;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
import android.view.View;
import android.widget.RemoteViews;
import android.widget.Toast;
import org.joda.time.DateTime;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.time.DayOfWeek;
import java.time.format.TextStyle;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.HashMap;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import hu.refilc.naplo.database.DBManager;
import hu.refilc.naplo.MainActivity;
import hu.refilc.naplo.R;
import hu.refilc.naplo.utils.Week;
import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
import es.antonborri.home_widget.HomeWidgetBackgroundIntent;
import es.antonborri.home_widget.HomeWidgetLaunchIntent;
import es.antonborri.home_widget.HomeWidgetProvider;
public class WidgetTimetable extends HomeWidgetProvider {
private static final String ACTION_WIDGET_CLICK_NAV_LEFT = "list_widget.ACTION_WIDGET_CLICK_NAV_LEFT";
private static final String ACTION_WIDGET_CLICK_NAV_RIGHT = "list_widget.ACTION_WIDGET_CLICK_NAV_RIGHT";
private static final String ACTION_WIDGET_CLICK_NAV_TODAY = "list_widget.ACTION_WIDGET_CLICK_NAV_TODAY";
private static final String ACTION_WIDGET_CLICK_NAV_REFRESH = "list_widget.ACTION_WIDGET_CLICK_NAV_REFRESH";
private static final String ACTION_WIDGET_CLICK_BUY_PREMIUM = "list_widget.ACTION_WIDGET_CLICK_BUY_PREMIUM";
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds, SharedPreferences widgetData) {
for (int i = 0; i < appWidgetIds.length; i++) {
RemoteViews views = generateView(context, appWidgetIds[i]);
if(premiumEnabled(context) && userLoggedIn(context)) {
int rday = selectDay(context, appWidgetIds[i], 0, true);
views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday));
}
pushUpdate(context, views, appWidgetIds[i]);
}
}
public static void pushUpdate(Context context, RemoteViews remoteViews, int appWidgetSingleId) {
AppWidgetManager manager = AppWidgetManager.getInstance(context);
manager.updateAppWidget(appWidgetSingleId, remoteViews);
manager.notifyAppWidgetViewDataChanged(appWidgetSingleId, R.id.widget_list);
}
public static RemoteViews generateView(Context context, int appId) {
Intent serviceIntent = new Intent(context, WidgetTimetableService.class);
serviceIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appId);
serviceIntent.setData(Uri.parse(serviceIntent.toUri(Intent.URI_INTENT_SCHEME)));
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_timetable);
views.setViewVisibility(R.id.need_premium, View.GONE);
views.setViewVisibility(R.id.need_login, View.GONE);
views.setViewVisibility(R.id.tt_grid_cont, View.GONE);
if(!userLoggedIn(context)) {
views.setViewVisibility(R.id.need_login, View.VISIBLE);
views.setOnClickPendingIntent(R.id.open_login, makePending(context, ACTION_WIDGET_CLICK_BUY_PREMIUM, appId));
} else if(premiumEnabled(context)) {
views.setViewVisibility(R.id.tt_grid_cont, View.VISIBLE);
views.setOnClickPendingIntent(R.id.nav_to_left, makePending(context, ACTION_WIDGET_CLICK_NAV_LEFT, appId));
views.setOnClickPendingIntent(R.id.nav_to_right, makePending(context, ACTION_WIDGET_CLICK_NAV_RIGHT, appId));
views.setOnClickPendingIntent(R.id.nav_current, makePending(context, ACTION_WIDGET_CLICK_NAV_TODAY, appId));
views.setOnClickPendingIntent(R.id.nav_refresh, makePending(context, ACTION_WIDGET_CLICK_NAV_REFRESH, appId));
views.setRemoteAdapter(R.id.widget_list, serviceIntent);
views.setEmptyView(R.id.widget_list, R.id.empty_view);
} else {
views.setViewVisibility(R.id.need_premium, View.VISIBLE);
views.setOnClickPendingIntent(R.id.buy_premium, makePending(context, ACTION_WIDGET_CLICK_BUY_PREMIUM, appId));
}
return views;
}
static PendingIntent makePending(Context context, String action, int appWidgetId) {
Intent activebtnnext = new Intent(context, WidgetTimetable.class);
activebtnnext.setAction(action);
activebtnnext.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
return PendingIntent.getBroadcast(context, appWidgetId, activebtnnext , PendingIntent.FLAG_IMMUTABLE);
}
@Override
public void onReceive(Context context, Intent intent) {
super.onReceive(context, intent);
if(intent.hasExtra(AppWidgetManager.EXTRA_APPWIDGET_ID)) {
int appId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
RemoteViews views = generateView(context, appId);
try {
if(premiumEnabled(context) && userLoggedIn(context)) {
if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_LEFT)) {
int rday = selectDay(context, appId, -1, false);
views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday));
pushUpdate(context, views, appId);
} else if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_RIGHT)) {
int rday = selectDay(context, appId, 1, false);
views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday));
pushUpdate(context, views, appId);
} else if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_TODAY)) {
int rday = getToday(context);
setSelectedDay(context, appId, rday);
views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday));
pushUpdate(context, views, appId);
} else if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_REFRESH)) {
PendingIntent pendingIntent = HomeWidgetLaunchIntent.INSTANCE.getActivity(context, MainActivity.class, Uri.parse("timetable://refresh"));
pendingIntent.send();
} else if (intent.getAction().equals("android.appwidget.action.APPWIDGET_DELETED")) {
DBManager dbManager = new DBManager(context.getApplicationContext());
try {
dbManager.open();
dbManager.deleteWidget(appId);
dbManager.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
if(intent.getAction().equals(ACTION_WIDGET_CLICK_BUY_PREMIUM)) {
PendingIntent pendingIntent = HomeWidgetLaunchIntent.INSTANCE.getActivity(context, MainActivity.class, Uri.parse("settings://premium"));
pendingIntent.send();
}
}
catch (Exception e) {
e.printStackTrace();
}
}
}
public static String convertDayOfWeek(Context context, int rday) {
/*if(rday == -1) return DayOfWeek.of(1).getDisplayName(TextStyle.FULL, new Locale("hu", "HU"));
String dayOfWeek = DayOfWeek.of(rday + 1).getDisplayName(TextStyle.FULL, new Locale("hu", "HU"));*/
String dayOfWeek = "Unknown";
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Locale loc = getLocale(context);
if (rday == -1)
return DayOfWeek.of(1).getDisplayName(TextStyle.FULL, loc);
dayOfWeek = DayOfWeek.of(rday + 1).getDisplayName(TextStyle.FULL, loc);
}
return dayOfWeek.substring(0, 1).toUpperCase() + dayOfWeek.substring(1).toLowerCase();
}
public static void setSelectedDay(Context context, int wid, int day) {
DBManager dbManager = new DBManager(context.getApplicationContext());
try {
dbManager.open();
dbManager.update(wid, day);
dbManager.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public static int getToday(Context context) {
int rday = new DateTime().getDayOfWeek() - 1;
List<JSONArray> s = genJsonDays(context);
try {
if(checkIsAfter(s, rday)) rday += 1;
} catch (Exception e) {
e.printStackTrace();
}
return retDay(rday, s.size());
}
public static int selectDay(Context context, int wid, int add, Boolean afterSubjects) {
DBManager dbManager = new DBManager(context.getApplicationContext());
try {
dbManager.open();
Cursor cursor = dbManager.fetchWidget(wid);
List<JSONArray> s = genJsonDays(context);
int retday = new DateTime().getDayOfWeek() - 1;
if(cursor.getCount() != 0) retday = retDay(cursor.getInt(1) + add, s.size());
if(afterSubjects) if(checkIsAfter(s, retday)) retday += 1;
retday = retDay(retday, s.size());
if(cursor.getCount() == 0) dbManager.insertSelDay(wid, retday);
else dbManager.update(wid, retday);
dbManager.close();
return retday;
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
public static Boolean checkIsAfter(List<JSONArray> s, int retday) throws Exception {
retday = retDay(retday, s.size());
String vegIdopont = s.get(retday).getJSONObject(s.get(retday).length() - 1).getString("VegIdopont");
return new DateTime().isAfter(new DateTime(vegIdopont));
}
public static int retDay(int retday, int size) {
if (retday < 0) retday = size - 1;
else if (retday > size - 1) retday = 0;
return retday;
}
public static List<JSONArray> genJsonDays(Context context) {
List<JSONArray> genDays = new ArrayList<>();
Map<String, JSONArray> dayMap = new HashMap<>();
DBManager dbManager = new DBManager(context.getApplicationContext());
try {
dbManager.open();
Cursor ct = dbManager.fetchTimetable();
if (ct.getCount() == 0) {
return genDays;
}
JSONObject fetchedTimetable = new JSONObject(ct.getString(0));
String currentWeek = String.valueOf(Week.current().id());
JSONArray week = fetchedTimetable.getJSONArray(currentWeek);
// Organize lessons into dates
for (int i = 0; i < week.length(); i++) {
try {
JSONObject entry = week.getJSONObject(i);
String date = entry.getString("Datum");
dayMap.computeIfAbsent(date, k -> new JSONArray()).put(entry);
} catch (JSONException e) {
e.printStackTrace();
}
}
genDays.addAll(dayMap.values());
// Sort the 'genDays' list of JSON based on the start time of the first entry
genDays.sort((day1, day2) -> {
try {
// Extract the start time of the first entry in each day's JSON
String startTime1 = day1.getJSONObject(0).getString("KezdetIdopont");
String startTime2 = day2.getJSONObject(0).getString("KezdetIdopont");
// Compare the start times and return the result for sorting
return startTime1.compareTo(startTime2);
} catch (JSONException e) {
e.printStackTrace();
return 0;
}
});
} catch (Exception e) {
e.printStackTrace();
} finally {
dbManager.close();
}
return genDays;
}
public static String zeroPad(int value, int padding){
StringBuilder b = new StringBuilder();
b.append(value);
while(b.length() < padding){
b.insert(0,"0");
}
return b.toString();
}
public static Locale getLocale(Context context) {
DBManager dbManager = new DBManager(context.getApplicationContext());
try {
dbManager.open();
String loc = dbManager.fetchLocale().getString(0);
dbManager.close();
if(loc.equals("hu") || loc.equals("de")) {
return new Locale(loc, loc.toUpperCase());
}
} catch (Exception e) {
e.printStackTrace();
}
return new Locale("en", "GB");
}
public static boolean premiumEnabled(Context context) {
DBManager dbManager = new DBManager(context.getApplicationContext());
try {
dbManager.open();
String premium_token = dbManager.fetchPremiumToken().getString(0);
String premium_scopes_raw = dbManager.fetchPremiumScopes().getString(0);
dbManager.close();
JSONArray arr = new JSONArray(premium_scopes_raw);
List<String> premium_scopes = new ArrayList<>();
for(int i = 0; i < arr.length(); i++){
String scope = arr.getString(i);
premium_scopes.add(scope.substring(scope.lastIndexOf('.') + 1));
}
if(!premium_token.equals("") && (premium_scopes.contains("*") || premium_scopes.contains("TIMETALBE_WIDGET"))) {
return true;
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
public static boolean userLoggedIn(Context context) {
return !lastUserId(context).equals("");
}
public static String lastUserId(Context context) {
DBManager dbManager = new DBManager(context.getApplicationContext());
try {
dbManager.open();
Cursor cursor = dbManager.fetchLastUser();
dbManager.close();
if(cursor != null && !cursor.getString(0).equals("")) {
String last_user = cursor.getString(0);
return last_user;
}
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
@Override
public void onEnabled(Context context) {
}
@Override
public void onDisabled(Context context) {
}
}

View File

@@ -1,356 +0,0 @@
package hu.refilc.naplo.widget_timetable;
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.os.Build;
import android.util.Log;
import android.view.View;
import android.widget.RemoteViews;
import android.widget.RemoteViewsService;
import org.joda.time.DateTime;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import hu.refilc.naplo.database.DBManager;
import hu.refilc.naplo.R;
public class WidgetTimetableDataProvider implements RemoteViewsService.RemoteViewsFactory {
private Context context;
private int appWidgetId;
private int rday = 0;
private int theme;
private Integer[] colorValues;
List<Lesson> day_subjects = new ArrayList<>();
List<Integer> lessonIndexes = new ArrayList<>();
Item witem;
/* Default values */
static class Item {
int Layout;
int NumVisibility;
int NameVisibility;
int NameNodescVisibility;
int DescVisibility;
int RoomVisibility;
int TimeVisibility;
int NumColor;
int NameColor;
int NameNodescColor;
int DescColor;
Integer[] NameNodescPadding = {0, 0, 0, 0};
public Item(int Layout, int NumVisibility,int NameVisibility,int NameNodescVisibility,int DescVisibility,int RoomVisibility,int TimeVisibility,int NumColor,int NameColor,int NameNodescColor,int DescColor) {
this.Layout = Layout;
this.NumVisibility = NumVisibility;
this.NameVisibility = NameVisibility;
this.NameNodescVisibility = NameNodescVisibility;
this.DescVisibility = DescVisibility;
this.RoomVisibility = RoomVisibility;
this.TimeVisibility = TimeVisibility;
this.NumColor = NumColor;
this.NameColor = NameColor;
this.NameNodescColor = NameNodescColor;
this.DescColor = DescColor;
}
}
static class Lesson {
String status;
String lessonIndex;
String lessonName;
String lessonTopic;
String lessonRoom;
long lessonStart;
long lessonEnd;
String substituteTeacher;
public Lesson(String status, String lessonIndex,String lessonName,String lessonTopic, String lessonRoom,long lessonStart,long lessonEnd,String substituteTeacher) {
this.status = status;
this.lessonIndex = lessonIndex;
this.lessonName = lessonName;
this.lessonTopic = lessonTopic;
this.lessonRoom = lessonRoom;
this.lessonStart = lessonStart;
this.lessonEnd = lessonEnd;
this.substituteTeacher = substituteTeacher;
}
}
Integer[] itemNameNodescPadding = {0, 0, 0, 0};
public WidgetTimetableDataProvider(Context context, Intent intent) {
this.context = context;
this.appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
this.theme = getThemeAccent(context);
this.colorValues = new Integer[]{R.color.filc,
R.color.blue_shade300,
R.color.green_shade300,
R.color.lime_shade300,
R.color.yellow_shade300,
R.color.orange_shade300,
R.color.red_shade300,
R.color.pink_shade300,
R.color.purple_shade300};
}
@Override
public void onCreate() {
initData();
}
@Override
public void onDataSetChanged() {
initData();
}
@Override
public void onDestroy() {
}
@Override
public int getCount() {
return day_subjects.size();
}
public void setLayout(final RemoteViews view) {
/* Visibilities */
view.setViewVisibility(R.id.tt_item_num, witem.NumVisibility);
view.setViewVisibility(R.id.tt_item_name, witem.NameVisibility);
view.setViewVisibility(R.id.tt_item_name_nodesc, witem.NameNodescVisibility);
view.setViewVisibility(R.id.tt_item_desc, witem.DescVisibility);
view.setViewVisibility(R.id.tt_item_room, witem.RoomVisibility);
view.setViewVisibility(R.id.tt_item_time, witem.TimeVisibility);
/* backgroundResources */
view.setInt(R.id.main_lay, "setBackgroundResource", witem.Layout);
/* Paddings */
view.setViewPadding(R.id.tt_item_name_nodesc, witem.NameNodescPadding[0], witem.NameNodescPadding[1], witem.NameNodescPadding[2], witem.NameNodescPadding[3]);
/* Text Colors */
view.setInt(R.id.tt_item_num, "setTextColor", getColor(context, witem.NumColor));
view.setInt(R.id.tt_item_name, "setTextColor", getColor(context, witem.NameColor));
view.setInt(R.id.tt_item_name_nodesc, "setTextColor", getColor(context, witem.NameNodescColor));
view.setInt(R.id.tt_item_desc, "setTextColor", getColor(context, witem.DescColor));
}
public int getColor(Context context, int color) {
return context.getResources().getColor(color);
}
@Override
public RemoteViews getViewAt(int position) {
RemoteViews view = new RemoteViews(context.getPackageName(), R.layout.timetable_item);
witem = defaultItem(theme);
Lesson curr_subject = day_subjects.get(position);
if (curr_subject.status.equals("empty")) {
witem.NumColor = R.color.text_miss_num;
witem.TimeVisibility = View.GONE;
witem.RoomVisibility = View.GONE;
witem.NameNodescColor = R.color.text_miss;
}
if (!curr_subject.substituteTeacher.equals("null")) {
witem.NumColor = R.color.yellow;
witem.Layout = R.drawable.card_layout_tile_helyetesitett;
}
if (curr_subject.status.equals("Elmaradt")) {
witem.NumColor = R.color.red;
witem.Layout = R.drawable.card_layout_tile_elmarad;
} else if (curr_subject.status.equals("TanevRendjeEsemeny")) {
witem.NumVisibility = View.GONE;
witem.TimeVisibility = View.GONE;
witem.RoomVisibility = View.GONE;
witem.NameNodescPadding[0] = 50;
witem.NameNodescPadding[2] = 50;
witem.NameNodescColor = R.color.text_miss;
}
if (curr_subject.lessonTopic.equals("null")) {
witem.DescVisibility = View.GONE;
witem.NameVisibility = View.GONE;
witem.NameNodescVisibility = View.VISIBLE;
}
setLayout(view);
String lessonIndexTrailing = curr_subject.lessonIndex.equals("+") ? "" : ".";
view.setTextViewText(R.id.tt_item_num, curr_subject.lessonIndex + lessonIndexTrailing);
view.setTextViewText(R.id.tt_item_name, curr_subject.lessonName);
view.setTextViewText(R.id.tt_item_name_nodesc, curr_subject.lessonName);
view.setTextViewText(R.id.tt_item_desc, curr_subject.lessonTopic);
view.setTextViewText(R.id.tt_item_room, curr_subject.lessonRoom);
if(curr_subject.lessonStart != 0 && curr_subject.lessonEnd != 0)
view.setTextViewText(R.id.tt_item_time, WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonStart).getHourOfDay(), 2) + ":" + WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonStart).getMinuteOfHour(), 2) +
"\n" + WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonEnd).getHourOfDay(), 2) + ":" + WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonEnd).getMinuteOfHour(),2));
return view;
}
@Override
public RemoteViews getLoadingView() {
return null;
}
@Override
public int getViewTypeCount() {
return 1;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public boolean hasStableIds() {
return true;
}
private void initData() {
theme = getThemeAccent(context);
rday = WidgetTimetable.selectDay(context, appWidgetId, 0, false);
day_subjects.clear();
lessonIndexes.clear();
try {
List<JSONArray> arr = WidgetTimetable.genJsonDays(context);
if(arr.isEmpty()) {
return;
}
JSONArray arr_lessons = WidgetTimetable.genJsonDays(context).get(rday);
for (int i = 0; i < arr_lessons.length(); i++) {
JSONObject obj_lessons = arr_lessons.getJSONObject(i);
day_subjects.add(jsonToLesson(obj_lessons));
}
} catch (JSONException e) {
e.printStackTrace();
}
if(day_subjects.size() > 0) {
Collections.sort(day_subjects, new Comparator<Lesson>() {
public int compare(Lesson o1, Lesson o2) {
return new DateTime(o1.lessonStart).compareTo(new DateTime(o2.lessonStart));
}
});
for (int i = 0; i < day_subjects.size(); i++) {
if(!day_subjects.get(i).lessonIndex.equals("+")) {
lessonIndexes.add(Integer.valueOf(day_subjects.get(i).lessonIndex));
}
}
if(lessonIndexes.size() > 0) {
int lessonsChecked = Collections.min(lessonIndexes);
int i = 0;
while(lessonsChecked < Collections.max(lessonIndexes)) {
if(!lessonIndexes.contains(lessonsChecked)) {
day_subjects.add(i, emptyLesson(lessonsChecked));
}
lessonsChecked++;
i++;
}
}
}
}
public static Integer getThemeAccent(Context context) {
DBManager dbManager = new DBManager(context.getApplicationContext());
try {
dbManager.open();
Cursor cursor = dbManager.fetchTheme();
dbManager.close();
return cursor.getInt(1);
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
public Item defaultItem(int theme) {
return new Item(
R.drawable.card_layout_tile,
View.VISIBLE,
View.VISIBLE,
View.INVISIBLE,
View.VISIBLE,
View.VISIBLE,
View.VISIBLE,
colorValues[theme >= colorValues.length ? 0 : theme],
R.color.text,
R.color.text,
R.color.text_desc
);
}
public Lesson emptyLesson(int lessonIndex) {
return new Lesson("empty", String.valueOf(lessonIndex), "Lyukasóra", "null", "null", 0, 0, "null");
}
public Lesson jsonToLesson(JSONObject json) {
try {
String name = json.getString("Nev");
name = name.substring(0, 1).toUpperCase() + name.substring(1); // Capitalize name
return new Lesson(
json.getJSONObject("Allapot").getString("Nev"),
!json.getString("Oraszam").equals("null") ? json.getString("Oraszam") : "+",
name,
json.getString("Tema"),
json.getString("TeremNeve"),
new DateTime(json.getString("KezdetIdopont")).getMillis(),
new DateTime(json.getString("VegIdopont")).getMillis(),
json.getString("HelyettesTanarNeve")
);
}catch (Exception e) {
Log.d("Filc", "exception: " + e);
};
return null;
}
}

View File

@@ -1,12 +0,0 @@
package hu.refilc.naplo.widget_timetable;
import android.content.Intent;
import android.os.Build;
import android.widget.RemoteViewsService;
public class WidgetTimetableService extends RemoteViewsService {
@Override
public RemoteViewsFactory onGetViewFactory(Intent intent) {
return new WidgetTimetableDataProvider(getApplicationContext(), intent);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

View File

@@ -1,11 +0,0 @@
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 735 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,25 +0,0 @@
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
// here, Without this code the task will not work.
//SwiftFlutterForegroundTaskPlugin.setPluginRegistrantCallback(registerPlugins)
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
// here
func registerPlugins(registry: FlutterPluginRegistry) {
GeneratedPluginRegistrant.register(with: registry)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 KiB

View File

@@ -1,31 +0,0 @@
import Foundation
class LessonData {
var color: String
var icon: String
var index: String
var title: String
var subtitle: String
var description: String
var startDate: Date
var endDate: Date
var date: ClosedRange<Date>
var nextSubject: String
var nextRoom: String
init?() {
let sharedDefault = UserDefaults(suiteName: "group.refilc2.livecard")!
self.color = sharedDefault.string(forKey: "color")!
self.icon = sharedDefault.string(forKey: "icon")!
self.index = sharedDefault.string(forKey: "index")!
self.title = sharedDefault.string(forKey: "title")!
self.subtitle = sharedDefault.string(forKey: "subtitle")!
self.description = sharedDefault.string(forKey: "description")!
self.startDate = Date(timeIntervalSince1970: Double(sharedDefault.string(forKey: "startDate")!)! / 1000)
self.endDate = Date(timeIntervalSince1970: Double(sharedDefault.string(forKey: "endDate")!)! / 1000)
date = self.startDate...self.endDate
self.nextSubject = sharedDefault.string(forKey: "nextSubject")!
self.nextRoom = sharedDefault.string(forKey: "nextRoom")!
}
}

View File

@@ -1,205 +0,0 @@
import ActivityKit
import WidgetKit
import SwiftUI
@main
struct Widgets: WidgetBundle {
var body: some Widget {
if #available(iOS 16.1, *) {
LiveCardWidget()
}
}
}
// Color Converter
extension Color {
init(hex: String, alpha: Double = 1.0) {
var hexValue = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
if hexValue.hasPrefix("#") {
hexValue.remove(at: hexValue.startIndex)
}
var rgbValue: UInt64 = 0
Scanner(string: hexValue).scanHexInt64(&rgbValue)
let red = Double((rgbValue & 0xFF0000) >> 16) / 255.0
let green = Double((rgbValue & 0x00FF00) >> 8) / 255.0
let blue = Double(rgbValue & 0x0000FF) / 255.0
self.init(
.sRGB,
red: red,
green: green,
blue: blue,
opacity: alpha
)
}
}
// We need to redefined live activities pipe
struct LiveActivitiesAppAttributes: ActivityAttributes, Identifiable {
public struct ContentState: Codable, Hashable { }
var id = UUID()
}
struct LockScreenLiveActivityView: View {
let context: ActivityViewContext<LiveActivitiesAppAttributes>
let lesson = LessonData()
var body: some View {
HStack(alignment: .center) {
Image(systemName: lesson!.icon)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: CGFloat(30), height: CGFloat(30))
.padding(.leading, CGFloat(24))
VStack(alignment: .leading) {
HStack(alignment: .center) {
Text(lesson!.index + lesson!.title)
.font(.title3)
.bold()
Text(lesson!.subtitle)
.font(.subheadline)
.padding(.trailing, 12)
}
if (lesson!.description != "") {
Text(lesson!.description)
.font(.subheadline)
}
HStack {
Image(systemName: "arrow.right")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: CGFloat(8), height: CGFloat(8))
Text(lesson!.nextSubject)
.font(.caption)
Text(lesson!.nextRoom)
.font(.caption2)
}
}.padding(15)
Spacer()
Text(timerInterval: lesson!.date, countsDown: true)
.multilineTextAlignment(.center)
.frame(width: 85)
.font(.title2)
.monospacedDigit()
.padding(.trailing, CGFloat(24))
}
.activityBackgroundTint(
lesson!.color != "#676767"
? Color(hex: lesson!.color)
// Ha nem megy hat nem megy
: Color.clear
)
}
}
@available(iOSApplicationExtension 16.1, *)
struct LiveCardWidget: Widget {
var body: some WidgetConfiguration {
/// Live Activity Notification
ActivityConfiguration(for: LiveActivitiesAppAttributes.self) { context in
LockScreenLiveActivityView(context: context)
/// Dynamic Island
} dynamicIsland: { context in
let lesson = LessonData()
/// Expanded
return DynamicIsland {
DynamicIslandExpandedRegion(.leading) {
VStack {
Spacer()
ProgressView(
timerInterval: lesson!.date,
countsDown: true,
label: {
Image(systemName: lesson!.icon)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: CGFloat(32), height: CGFloat(32))
},
currentValueLabel: {
Image(systemName: lesson!.icon)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: CGFloat(32), height: CGFloat(32))
}
).progressViewStyle(.circular)
}
}
DynamicIslandExpandedRegion(.center) {
VStack(alignment: .leading) {
Text(lesson!.index + lesson!.title)
.lineLimit(1)
.font(.title3)
.bold()
Text(lesson!.description)
.lineLimit(2)
.font(.caption)
}.padding(EdgeInsets(top: 0.0, leading: 5.0, bottom: 0.0, trailing: 0.0))
}
DynamicIslandExpandedRegion(.trailing) {
VStack {
Spacer()
Text(lesson!.subtitle)
.lineLimit(1)
.font(.subheadline)
Spacer()
}
}
/// Compact
} compactLeading: {
Label {
Text(lesson!.title)
} icon: {
Image(systemName: lesson!.icon)
}
.font(.caption2)
}
compactTrailing: {
Text(timerInterval: lesson!.date, countsDown: true)
.multilineTextAlignment(.center)
.frame(width: 40)
.font(.caption2)
/// Collapsed
} minimal: {
VStack(alignment: .center, content: {
ProgressView(
timerInterval: lesson!.date,
countsDown: true,
label: {
Image(systemName: lesson!.icon)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: CGFloat(12), height: CGFloat(12))
},
currentValueLabel: {
Image(systemName: lesson!.icon)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: CGFloat(12), height: CGFloat(12))
}
).progressViewStyle(.circular)
})
}
.keylineTint(
lesson!.color != "#676767"
? Color(hex: lesson!.color)
: Color.clear
)
}
}
}

View File

@@ -1,189 +0,0 @@
// ignore_for_file: avoid_print, use_build_context_synchronously
import 'package:filcnaplo/utils/jwt.dart';
import 'package:filcnaplo_kreta_api/models/school.dart';
import 'package:filcnaplo_kreta_api/providers/absence_provider.dart';
import 'package:filcnaplo_kreta_api/providers/event_provider.dart';
import 'package:filcnaplo_kreta_api/providers/exam_provider.dart';
import 'package:filcnaplo_kreta_api/providers/grade_provider.dart';
import 'package:filcnaplo_kreta_api/providers/homework_provider.dart';
import 'package:filcnaplo_kreta_api/providers/message_provider.dart';
import 'package:filcnaplo_kreta_api/providers/note_provider.dart';
import 'package:filcnaplo_kreta_api/providers/timetable_provider.dart';
import 'package:filcnaplo/api/providers/user_provider.dart';
import 'package:filcnaplo/api/providers/database_provider.dart';
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo/models/user.dart';
import 'package:filcnaplo_kreta_api/client/api.dart';
import 'package:filcnaplo_kreta_api/client/client.dart';
import 'package:filcnaplo_kreta_api/models/student.dart';
import 'package:filcnaplo_kreta_api/models/week.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:filcnaplo/api/nonce.dart';
import 'package:uuid/uuid.dart';
enum LoginState {
missingFields,
invalidGrant,
failed,
normal,
inProgress,
success,
}
Nonce getNonce(String nonce, String username, String instituteCode) {
Nonce nonceEncoder = Nonce(
key: [98, 97, 83, 115, 120, 79, 119, 108, 85, 49, 106, 77], nonce: nonce);
nonceEncoder
.encode(instituteCode.toUpperCase() + nonce + username.toUpperCase());
return nonceEncoder;
}
Future loginAPI({
required String username,
required String password,
required String instituteCode,
required BuildContext context,
void Function(User)? onLogin,
void Function()? onSuccess,
}) async {
Future testLogin(School school) async {
var user = User(
username: username,
password: password,
instituteCode: instituteCode,
name: 'Teszt Lajos',
student: Student(
birth: DateTime.now(),
id: const Uuid().v4(),
name: 'Teszt Lajos',
school: school,
yearId: '1',
parents: ['Teszt András', 'Teszt Linda'],
json: {"a": "b"},
address: '1117 Budapest, Gábor Dénes utca 4.',
),
role: Role.parent,
);
if (onLogin != null) onLogin(user);
// store test user in db
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);
if (onSuccess != null) onSuccess();
return LoginState.success;
}
// if institute matches one of test things do test login
if (instituteCode == 'refilc-test-sweden') {
School school = School(
city: "Stockholm",
instituteCode: "refilc-test-sweden",
name: "reFilc Test SE - Leo Ekström High School",
);
await testLogin(school);
} else if (instituteCode == 'refilc-test-spain') {
School school = School(
city: "Madrid",
instituteCode: "refilc-test-spain",
name: "reFilc Test ES - Emilio Obrero University",
);
await testLogin(school);
} else {
// normal login from here
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",
};
String nonceStr = await Provider.of<KretaClient>(context, listen: false)
.getAPI(KretaAPI.nonce, json: false);
Nonce nonce = getNonce(nonceStr, username, instituteCode);
headers.addAll(nonce.header());
Map? res = await Provider.of<KretaClient>(context, listen: false)
.postAPI(KretaAPI.login,
headers: headers,
body: User.loginBody(
username: username,
password: password,
instituteCode: instituteCode,
));
if (res != null) {
if (res.containsKey("error")) {
if (res["error"] == "invalid_grant") {
return LoginState.invalidGrant;
}
} else {
if (res.containsKey("access_token")) {
try {
Provider.of<KretaClient>(context, listen: false).accessToken =
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: password,
instituteCode: instituteCode,
name: student.name,
student: student,
role: JwtUtils.getRoleFromJWT(res["access_token"])!,
);
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<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;
}
}
}
}
}
return LoginState.failed;
}

View File

@@ -1,294 +0,0 @@
// ignore_for_file: no_leading_underscores_for_local_identifiers
import 'dart:async';
import 'dart:io';
import 'package:filcnaplo/helpers/subject.dart';
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo_kreta_api/models/lesson.dart';
import 'package:filcnaplo_kreta_api/models/week.dart';
import 'package:filcnaplo/utils/format.dart';
import 'package:filcnaplo_kreta_api/providers/timetable_provider.dart';
import 'package:flutter/foundation.dart';
import 'package:live_activities/live_activities.dart';
import 'package:filcnaplo_mobile_ui/pages/home/live_card/live_card.i18n.dart';
enum LiveCardState {
empty,
duringLesson,
duringBreak,
morning,
afternoon,
night,
summary
}
class LiveCardProvider extends ChangeNotifier {
Lesson? currentLesson;
Lesson? nextLesson;
Lesson? prevLesson;
List<Lesson>? nextLessons;
LiveCardState currentState = LiveCardState.empty;
late Timer _timer;
late final TimetableProvider _timetable;
late final SettingsProvider _settings;
late Duration _delay;
final _liveActivitiesPlugin = LiveActivities();
String? _latestActivityId;
Map<String, String> _lastActivity = {};
bool _hasCheckedTimetable = false;
LiveCardProvider({
required TimetableProvider timetable,
required SettingsProvider settings,
}) : _timetable = timetable,
_settings = settings {
if (Platform.isIOS) {
_liveActivitiesPlugin.areActivitiesEnabled().then((value) {
// Console log
if (kDebugMode) {
print("iOS LiveActivity enabled: $value");
}
if (value) {
_liveActivitiesPlugin.init(appGroupId: "group.refilc2.livecard");
_liveActivitiesPlugin.getAllActivitiesIds().then((value) {
_latestActivityId = value.isNotEmpty ? value.first : null;
});
}
});
}
_timer = Timer.periodic(const Duration(seconds: 1), (timer) => update());
_delay = settings.bellDelayEnabled
? Duration(seconds: settings.bellDelay)
: Duration.zero;
update();
}
@override
void dispose() {
_timer.cancel();
if (Platform.isIOS) {
_liveActivitiesPlugin.areActivitiesEnabled().then((value) {
if (value) {
if (_latestActivityId != null) {
_liveActivitiesPlugin.endActivity(_latestActivityId!);
}
}
});
}
super.dispose();
}
// Debugging
static DateTime _now() {
// return DateTime(2023, 9, 27, 9, 30);
return DateTime.now();
}
String getFloorDifference() {
final prevFloor = prevLesson!.getFloor();
final nextFloor = nextLesson!.getFloor();
if (prevFloor == null || nextFloor == null || prevFloor == nextFloor) {
return "to room";
}
if (nextFloor == 0) {
return "ground floor";
}
if (nextFloor > prevFloor) {
return "up floor";
} else {
return "down floor";
}
}
Map<String, String> toMap() {
switch (currentState) {
case LiveCardState.duringLesson:
return {
"color":
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
"icon": currentLesson != null
? SubjectIcon.resolveName(subject: currentLesson?.subject)
: "book",
"index":
currentLesson != null ? '${currentLesson!.lessonIndex}. ' : "",
"title": currentLesson != null
? currentLesson?.subject.renamedTo ?? ShortSubject.resolve(subject: currentLesson?.subject).capital()
: "",
"subtitle": currentLesson?.room.replaceAll("_", " ") ?? "",
"description": currentLesson?.description ?? "",
"startDate": ((currentLesson?.start.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds)
.toString(),
"endDate": ((currentLesson?.end.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds)
.toString(),
"nextSubject": nextLesson != null
? nextLesson?.subject.renamedTo ?? ShortSubject.resolve(subject: nextLesson?.subject).capital()
: "",
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
};
case LiveCardState.duringBreak:
final iconFloorMap = {
"to room": "chevron.right.2",
"up floor": "arrow.up.right",
"down floor": "arrow.down.left",
"ground floor": "arrow.down.left",
};
final diff = getFloorDifference();
return {
"color":
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
"icon": iconFloorMap[diff] ?? "cup.and.saucer",
"title": "Szünet",
"description": "go $diff".i18n.fill([
diff != "to room" ? (nextLesson!.getFloor() ?? 0) : nextLesson!.room
]),
"startDate": ((prevLesson?.end.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds)
.toString(),
"endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds)
.toString(),
"nextSubject": (nextLesson != null
? nextLesson?.subject.renamedTo ?? ShortSubject.resolve(subject: nextLesson?.subject).capital()
: "")
.capital(),
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
"index": "",
"subtitle": "",
};
default:
return {};
}
}
void update() async {
if (Platform.isIOS) {
_liveActivitiesPlugin.areActivitiesEnabled().then((value) {
if (value) {
final cmap = toMap();
if (!mapEquals(cmap, _lastActivity)) {
_lastActivity = cmap;
try {
if (_lastActivity.isNotEmpty) {
if (_latestActivityId == null) {
_liveActivitiesPlugin
.createActivity(_lastActivity)
.then((value) => _latestActivityId = value);
} else {
_liveActivitiesPlugin.updateActivity(
_latestActivityId!, _lastActivity);
}
} else {
if (_latestActivityId != null) {
_liveActivitiesPlugin.endActivity(_latestActivityId!);
}
}
} catch (e) {
if (kDebugMode) {
print('ERROR: Unable to create or update iOS LiveActivity!');
}
}
}
}
});
}
List<Lesson> today = _today(_timetable);
if (today.isEmpty && !_hasCheckedTimetable) {
_hasCheckedTimetable = true;
await _timetable.fetch(week: Week.current());
today = _today(_timetable);
}
_delay = _settings.bellDelayEnabled
? Duration(seconds: _settings.bellDelay)
: Duration.zero;
final now = _now().add(_delay);
// Filter cancelled lessons #20
// Filter label lessons #128
today = today
.where((lesson) =>
lesson.status?.name != "Elmaradt" &&
lesson.subject.id != '' &&
!lesson.isEmpty)
.toList();
if (today.isNotEmpty) {
// sort
today.sort((a, b) => a.start.compareTo(b.start));
final _lesson = today.firstWhere(
(l) => l.start.isBefore(now) && l.end.isAfter(now),
orElse: () => Lesson.fromJson({}));
if (_lesson.start.year != 0) {
currentLesson = _lesson;
} else {
currentLesson = null;
}
final _next = today.firstWhere((l) => l.start.isAfter(now),
orElse: () => Lesson.fromJson({}));
nextLessons = today.where((l) => l.start.isAfter(now)).toList();
if (_next.start.year != 0) {
nextLesson = _next;
} else {
nextLesson = null;
}
final _prev = today.lastWhere((l) => l.end.isBefore(now),
orElse: () => Lesson.fromJson({}));
if (_prev.start.year != 0) {
prevLesson = _prev;
} else {
prevLesson = null;
}
}
if (now.isBefore(DateTime(now.year, DateTime.august, 31)) &&
now.isAfter(DateTime(now.year, DateTime.june, 14))) {
currentState = LiveCardState.summary;
} else if (currentLesson != null) {
currentState = LiveCardState.duringLesson;
} else if (nextLesson != null && prevLesson != null) {
currentState = LiveCardState.duringBreak;
} else if (now.hour >= 12 && now.hour < 20) {
currentState = LiveCardState.afternoon;
} else if (now.hour >= 20) {
currentState = LiveCardState.night;
} else if (now.hour >= 5 && now.hour <= 10) {
currentState = LiveCardState.morning;
} else {
currentState = LiveCardState.empty;
}
notifyListeners();
}
bool get show => currentState != LiveCardState.empty;
Duration get delay => _delay;
bool _sameDate(DateTime a, DateTime b) =>
(a.year == b.year && a.month == b.month && a.day == b.day);
List<Lesson> _today(TimetableProvider p) => (p.getWeek(Week.current()) ?? [])
.where((l) => _sameDate(l.date, _now()))
.toList();
}

View File

@@ -1,88 +0,0 @@
// ignore_for_file: use_build_context_synchronously
import 'dart:io';
import 'package:filcnaplo/api/providers/database_provider.dart';
import 'package:filcnaplo/api/providers/status_provider.dart';
import 'package:filcnaplo/api/providers/user_provider.dart';
import 'package:filcnaplo_kreta_api/client/api.dart';
import 'package:filcnaplo_kreta_api/client/client.dart';
import 'package:filcnaplo_kreta_api/models/student.dart';
import 'package:filcnaplo_kreta_api/models/week.dart';
import 'package:filcnaplo_kreta_api/providers/absence_provider.dart';
import 'package:filcnaplo_kreta_api/providers/event_provider.dart';
import 'package:filcnaplo_kreta_api/providers/exam_provider.dart';
import 'package:filcnaplo_kreta_api/providers/grade_provider.dart';
import 'package:filcnaplo_kreta_api/providers/homework_provider.dart';
import 'package:filcnaplo_kreta_api/providers/message_provider.dart';
import 'package:filcnaplo_kreta_api/providers/note_provider.dart';
import 'package:filcnaplo_kreta_api/providers/timetable_provider.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:provider/provider.dart';
import 'package:home_widget/home_widget.dart';
// Mutex
bool lock = false;
Future<void> syncAll(BuildContext context) {
if (lock) return Future.value();
// Lock
lock = true;
// ignore: avoid_print
print("INFO Syncing all");
UserProvider user = Provider.of<UserProvider>(context, listen: false);
StatusProvider statusProvider = Provider.of<StatusProvider>(context, listen: false);
List<Future<void>> tasks = [];
int taski = 0;
Future<void> syncStatus(Future<void> future) async {
await future.onError((error, stackTrace) => null);
taski++;
statusProvider.triggerSync(current: taski, max: tasks.length);
}
tasks = [
syncStatus(Provider.of<GradeProvider>(context, listen: false).fetch()),
syncStatus(Provider.of<TimetableProvider>(context, listen: false).fetch(week: Week.current())),
syncStatus(Provider.of<ExamProvider>(context, listen: false).fetch()),
syncStatus(Provider.of<HomeworkProvider>(context, listen: false).fetch(from: DateTime.now().subtract(const Duration(days: 30)))),
syncStatus(Provider.of<MessageProvider>(context, listen: false).fetchAll()),
syncStatus(Provider.of<NoteProvider>(context, listen: false).fetch()),
syncStatus(Provider.of<EventProvider>(context, listen: false).fetch()),
syncStatus(Provider.of<AbsenceProvider>(context, listen: false).fetch()),
// Sync student
syncStatus(() async {
if (user.user == null) return;
Map? studentJson = await Provider.of<KretaClient>(context, listen: false).getAPI(KretaAPI.student(user.instituteCode!));
if (studentJson == null) return;
Student student = Student.fromJson(studentJson);
user.user?.name = student.name;
// Store user
await Provider.of<DatabaseProvider>(context, listen: false).store.storeUser(user.user!);
}()),
];
Future<bool?> updateWidget() async {
try {
return HomeWidget.updateWidget(name: 'widget_timetable.WidgetTimetable');
} on PlatformException catch (exception) {
debugPrint('Error Updating Widget. $exception');
}
return false;
}
return Future.wait(tasks).then((value) {
// Unlock
lock = false;
// Update Widget
if (Platform.isAndroid) updateWidget();
});
}

View File

@@ -1,601 +0,0 @@
import 'package:filcnaplo/api/providers/database_provider.dart';
import 'package:filcnaplo/api/providers/status_provider.dart';
import 'package:filcnaplo/api/providers/user_provider.dart';
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo/helpers/notification_helper.i18n.dart';
import 'package:filcnaplo_kreta_api/client/api.dart';
import 'package:filcnaplo_kreta_api/client/client.dart';
import 'package:filcnaplo_kreta_api/models/absence.dart';
import 'package:filcnaplo_kreta_api/models/grade.dart';
import 'package:filcnaplo_kreta_api/models/lesson.dart';
import 'package:filcnaplo_kreta_api/models/week.dart';
import 'package:filcnaplo_kreta_api/providers/grade_provider.dart';
import 'package:filcnaplo_kreta_api/providers/timetable_provider.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'
hide Message;
import 'package:i18n_extension/i18n_widget.dart';
import 'package:intl/intl.dart';
import 'package:filcnaplo_kreta_api/models/message.dart';
class NotificationsHelper {
late DatabaseProvider database;
late SettingsProvider settingsProvider;
late UserProvider userProvider;
late KretaClient kretaClient;
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
FlutterLocalNotificationsPlugin();
List<T> combineLists<T, K>(
List<T> list1,
List<T> list2,
K Function(T) keyExtractor,
) {
Set<K> uniqueKeys = <K>{};
List<T> combinedList = [];
for (T item in list1) {
K key = keyExtractor(item);
if (!uniqueKeys.contains(key)) {
uniqueKeys.add(key);
combinedList.add(item);
}
}
for (T item in list2) {
K key = keyExtractor(item);
if (!uniqueKeys.contains(key)) {
uniqueKeys.add(key);
combinedList.add(item);
}
}
return combinedList;
}
String dayTitle(DateTime date) {
try {
return DateFormat("EEEE", I18n.locale.languageCode).format(date);
} catch (e) {
return "Unknown";
}
}
@pragma('vm:entry-point')
void backgroundJob() async {
// initialize providers
database = DatabaseProvider();
await database.init();
settingsProvider = await database.query.getSettings(database);
userProvider = await database.query.getUsers(settingsProvider);
if (userProvider.id != null && settingsProvider.notificationsEnabled) {
// refresh kreta login
final status = StatusProvider();
kretaClient = KretaClient(
user: userProvider, settings: settingsProvider, status: status);
kretaClient.refreshLogin();
if (settingsProvider.notificationsGradesEnabled) gradeNotification();
if (settingsProvider.notificationsAbsencesEnabled) absenceNotification();
if (settingsProvider.notificationsMessagesEnabled) messageNotification();
if (settingsProvider.notificationsLessonsEnabled) lessonNotification();
}
}
void gradeNotification() async {
// fetch grades
GradeProvider gradeProvider = GradeProvider(
settings: settingsProvider,
user: userProvider,
database: database,
kreta: kretaClient);
gradeProvider.fetch();
List<Grade> grades =
await database.userQuery.getGrades(userId: userProvider.id ?? "");
DateTime lastSeenGrade =
await database.userQuery.lastSeenGrade(userId: userProvider.id ?? "");
// loop through grades and see which hasn't been seen yet
for (Grade grade in grades) {
// if grade is not a normal grade (1-5), don't show it
if ([1, 2, 3, 4, 5].contains(grade.value.value)) {
// if the grade was added over a week ago, don't show it to avoid notification spam
if (grade.seenDate.isAfter(lastSeenGrade) &&
grade.date.difference(DateTime.now()).inDays * -1 < 7) {
// send notificiation about new grade
AndroidNotificationDetails androidNotificationDetails =
AndroidNotificationDetails(
'GRADES',
'Jegyek',
channelDescription: 'Értesítés jegyek beírásakor',
importance: Importance.max,
priority: Priority.max,
color: settingsProvider.customAccentColor,
ticker: 'Jegyek',
);
NotificationDetails notificationDetails =
NotificationDetails(android: androidNotificationDetails);
if (userProvider.getUsers().length == 1) {
await flutterLocalNotificationsPlugin.show(
grade.id.hashCode,
"title_grade".i18n,
"body_grade".i18n.fill(
[
grade.value.value.toString(),
grade.subject.isRenamed &&
settingsProvider.renamedSubjectsEnabled
? grade.subject.renamedTo!
: grade.subject.name
],
),
notificationDetails,
);
} else {
// multiple users are added, also display student name
await flutterLocalNotificationsPlugin.show(
grade.id.hashCode,
"title_grade".i18n,
"body_grade_multiuser".i18n.fill(
[
userProvider.displayName!,
grade.value.value.toString(),
grade.subject.isRenamed &&
settingsProvider.renamedSubjectsEnabled
? grade.subject.renamedTo!
: grade.subject.name
],
),
notificationDetails,
);
}
}
}
}
// set grade seen status
gradeProvider.seenAll();
}
void absenceNotification() async {
// get absences from api
List? absenceJson = await kretaClient
.getAPI(KretaAPI.absences(userProvider.instituteCode ?? ""));
List<Absence> storedAbsences =
await database.userQuery.getAbsences(userId: userProvider.id!);
if (absenceJson == null) {
return;
}
// format api absences to correct format while preserving isSeen value
List<Absence> absences = absenceJson.map((e) {
Absence apiAbsence = Absence.fromJson(e);
Absence storedAbsence = storedAbsences.firstWhere(
(stored) => stored.id == apiAbsence.id,
orElse: () => apiAbsence);
apiAbsence.isSeen = storedAbsence.isSeen;
return apiAbsence;
}).toList();
List<Absence> modifiedAbsences = [];
if (absences != storedAbsences) {
// remove absences that are not new
absences.removeWhere((element) => storedAbsences.contains(element));
for (Absence absence in absences) {
if (!absence.isSeen) {
absence.isSeen = true;
modifiedAbsences.add(absence);
AndroidNotificationDetails androidNotificationDetails =
AndroidNotificationDetails(
'ABSENCES',
'Hiányzások',
channelDescription: 'Értesítés hiányzások beírásakor',
importance: Importance.max,
priority: Priority.max,
color: settingsProvider.customAccentColor,
ticker: 'Hiányzások',
);
NotificationDetails notificationDetails =
NotificationDetails(android: androidNotificationDetails);
if (userProvider.getUsers().length == 1) {
await flutterLocalNotificationsPlugin.show(
absence.id.hashCode,
"title_absence".i18n, // https://discord.com/channels/1111649116020285532/1153273625206591528
"body_absence".i18n.fill(
[
DateFormat("yyyy-MM-dd").format(absence.date),
absence.subject.isRenamed &&
settingsProvider.renamedSubjectsEnabled
? absence.subject.renamedTo!
: absence.subject.name
],
),
notificationDetails,
);
} else {
await flutterLocalNotificationsPlugin.show(
absence.id.hashCode,
"title_absence".i18n, // https://discord.com/channels/1111649116020285532/1153273625206591528
"body_absence_multiuser".i18n.fill(
[
userProvider.displayName!,
DateFormat("yyyy-MM-dd").format(absence.date),
absence.subject.isRenamed &&
settingsProvider.renamedSubjectsEnabled
? absence.subject.renamedTo!
: absence.subject.name
],
),
notificationDetails,
);
}
}
}
}
// combine modified absences and storedabsences list and save them to the database
List<Absence> combinedAbsences = combineLists(
modifiedAbsences,
storedAbsences,
(Absence absence) => absence.id,
);
await database.userStore
.storeAbsences(combinedAbsences, userId: userProvider.id!);
}
void messageNotification() async {
// get messages from api
List? messageJson =
await kretaClient.getAPI(KretaAPI.messages("beerkezett"));
List<Message> storedmessages =
await database.userQuery.getMessages(userId: userProvider.id!);
if (messageJson == null) {
return;
}
// format api messages to correct format while preserving isSeen value
// Parse messages
List<Message> messages = [];
await Future.wait(List.generate(messageJson.length, (index) {
return () async {
Map message = messageJson.cast<Map>()[index];
Map? innerMessageJson = await kretaClient
.getAPI(KretaAPI.message(message["azonosito"].toString()));
if (innerMessageJson != null) {
messages.add(
Message.fromJson(innerMessageJson, forceType: MessageType.inbox));
}
}();
}));
for (Message message in messages) {
for (Message storedMessage in storedmessages) {
if (message.id == storedMessage.id) {
message.isSeen = storedMessage.isSeen;
}
}
}
List<Message> modifiedmessages = [];
if (messages != storedmessages) {
// remove messages that are not new
messages.removeWhere((element) => storedmessages.contains(element));
for (Message message in messages) {
if (!message.isSeen) {
message.isSeen = true;
modifiedmessages.add(message);
AndroidNotificationDetails androidNotificationDetails =
AndroidNotificationDetails(
'MESSAGES',
'Üzenetek',
channelDescription: 'Értesítés kapott üzenetekkor',
importance: Importance.max,
priority: Priority.max,
color: settingsProvider.customAccentColor,
ticker: 'Üzenetek',
);
NotificationDetails notificationDetails =
NotificationDetails(android: androidNotificationDetails);
if (userProvider.getUsers().length == 1) {
await flutterLocalNotificationsPlugin.show(
message.id.hashCode,
message.author,
message.content.replaceAll(RegExp(r'<[^>]*>'), ''),
notificationDetails,
);
} else {
await flutterLocalNotificationsPlugin.show(
message.id.hashCode,
"(${userProvider.displayName!}) ${message.author}",
message.content.replaceAll(RegExp(r'<[^>]*>'), ''),
notificationDetails,
);
}
}
}
}
// combine modified messages and storedmessages list and save them to the database
List<Message> combinedmessages = combineLists(
modifiedmessages,
storedmessages,
(Message message) => message.id,
);
await database.userStore
.storeMessages(combinedmessages, userId: userProvider.id!);
}
void lessonNotification() async {
// get lesson from api
TimetableProvider timetableProvider = TimetableProvider(
user: userProvider, database: database, kreta: kretaClient);
List<Lesson> storedlessons =
timetableProvider.lessons[Week.current()] ?? [];
List? apilessons = timetableProvider.getWeek(Week.current()) ?? [];
for (Lesson lesson in apilessons) {
for (Lesson storedLesson in storedlessons) {
if (lesson.id == storedLesson.id) {
lesson.isSeen = storedLesson.isSeen;
}
}
}
List<Lesson> modifiedlessons = [];
if (apilessons != storedlessons) {
// remove lessons that are not new
apilessons.removeWhere((element) => storedlessons.contains(element));
for (Lesson lesson in apilessons) {
if (!lesson.isSeen && lesson.isChanged) {
lesson.isSeen = true;
modifiedlessons.add(lesson);
AndroidNotificationDetails androidNotificationDetails =
AndroidNotificationDetails(
'LESSONS',
'Órák',
channelDescription:
'Értesítés órák elmaradásáról, helyettesítésről',
importance: Importance.max,
priority: Priority.max,
color: settingsProvider.customAccentColor,
ticker: 'Órák',
);
NotificationDetails notificationDetails =
NotificationDetails(android: androidNotificationDetails);
if (userProvider.getUsers().length == 1) {
if (lesson.status?.name == "Elmaradt") {
switch (I18n.localeStr) {
case "en_en":
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_canceled".i18n.fill(
[
lesson.lessonIndex,
lesson.name,
dayTitle(lesson.date)
],
),
notificationDetails,
);
break;
}
case "hu_hu":
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_canceled".i18n.fill(
[
dayTitle(lesson.date),
lesson.lessonIndex,
lesson.name
],
),
notificationDetails,
);
break;
}
default:
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_canceled".i18n.fill(
[
lesson.lessonIndex,
lesson.name,
dayTitle(lesson.date)
],
),
notificationDetails,
);
break;
}
}
} else if (lesson.substituteTeacher?.name != "") {
switch (I18n.localeStr) {
case "en_en":
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_substituted".i18n.fill(
[
lesson.lessonIndex,
lesson.name,
dayTitle(lesson.date),
lesson.substituteTeacher!.isRenamed
? lesson.substituteTeacher!.renamedTo!
: lesson.substituteTeacher!.name
],
),
notificationDetails,
);
break;
}
case "hu_hu":
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_substituted".i18n.fill(
[
dayTitle(lesson.date),
lesson.lessonIndex,
lesson.name,
lesson.substituteTeacher!.isRenamed
? lesson.substituteTeacher!.renamedTo!
: lesson.substituteTeacher!.name
],
),
notificationDetails,
);
break;
}
default:
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_substituted".i18n.fill(
[
lesson.lessonIndex,
lesson.name,
dayTitle(lesson.date),
lesson.substituteTeacher!.isRenamed
? lesson.substituteTeacher!.renamedTo!
: lesson.substituteTeacher!.name
],
),
notificationDetails,
);
break;
}
}
}
} else {
if (lesson.status?.name == "Elmaradt") {
switch (I18n.localeStr) {
case "en_en":
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_canceled".i18n.fill(
[
userProvider.displayName!,
lesson.lessonIndex,
lesson.name,
dayTitle(lesson.date)
],
),
notificationDetails,
);
break;
}
case "hu_hu":
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_canceled".i18n.fill(
[
userProvider.displayName!,
dayTitle(lesson.date),
lesson.lessonIndex,
lesson.name
],
),
notificationDetails,
);
break;
}
default:
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_canceled".i18n.fill(
[
userProvider.displayName!,
lesson.lessonIndex,
lesson.name,
dayTitle(lesson.date)
],
),
notificationDetails,
);
break;
}
}
} else if (lesson.substituteTeacher?.name != "") {
switch (I18n.localeStr) {
case "en_en":
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_substituted".i18n.fill(
[
userProvider.displayName!,
lesson.lessonIndex,
lesson.name,
dayTitle(lesson.date),
lesson.substituteTeacher!.isRenamed
? lesson.substituteTeacher!.renamedTo!
: lesson.substituteTeacher!.name
],
),
notificationDetails,
);
break;
}
case "hu_hu":
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_substituted".i18n.fill(
[
userProvider.displayName!,
dayTitle(lesson.date),
lesson.lessonIndex,
lesson.name,
lesson.substituteTeacher!.isRenamed
? lesson.substituteTeacher!.renamedTo!
: lesson.substituteTeacher!.name
],
),
notificationDetails,
);
break;
}
default:
{
await flutterLocalNotificationsPlugin.show(
lesson.id.hashCode,
"title_lesson".i18n,
"body_lesson_substituted".i18n.fill(
[
userProvider.displayName!,
lesson.lessonIndex,
lesson.name,
dayTitle(lesson.date),
lesson.substituteTeacher!.isRenamed
? lesson.substituteTeacher!.renamedTo!
: lesson.substituteTeacher!.name
],
),
notificationDetails,
);
break;
}
}
}
}
}
}
// combine modified lesson and storedlesson list and save them to the database
List<Lesson> combinedlessons = combineLists(
modifiedlessons,
storedlessons,
(Lesson message) => message.id,
);
Map<Week, List<Lesson>> timetableLessons = timetableProvider.lessons;
timetableLessons[Week.current()] = combinedlessons;
await database.userStore
.storeLessons(timetableLessons, userId: userProvider.id!);
}
}
}

View File

@@ -1,15 +0,0 @@
import 'package:filcnaplo/helpers/attachment_helper.dart';
import 'package:filcnaplo_kreta_api/models/attachment.dart';
import 'package:flutter/widgets.dart';
import 'package:share_plus/share_plus.dart';
class ShareHelper {
static Future<void> shareText(String text, {String? subject}) => Share.share(text, subject: subject);
// ignore: deprecated_member_use
static Future<void> shareFile(String path, {String? text, String? subject}) => Share.shareFiles([path], text: text, subject: subject);
static Future<void> shareAttachment(Attachment attachment, {required BuildContext context}) async {
String path = await attachment.download(context);
await shareFile(path);
}
}

View File

@@ -1,33 +0,0 @@
import 'package:flutter/material.dart';
enum AccentColor {
filc,
blue,
green,
lime,
yellow,
orange,
red,
pink,
purple,
none,
ogfilc,
adaptive,
custom
}
Map<AccentColor, Color> accentColorMap = {
AccentColor.filc: const Color(0xFF3D7BF4),
AccentColor.blue: Colors.blue.shade300,
AccentColor.green: Colors.green.shade400,
AccentColor.lime: Colors.lightGreen.shade400,
AccentColor.yellow: Colors.orange.shade300,
AccentColor.orange: Colors.deepOrange.shade300,
AccentColor.red: Colors.red.shade300,
AccentColor.pink: Colors.pink.shade300,
AccentColor.purple: Colors.purple.shade300,
//AccentColor.none: Colors.black,
AccentColor.ogfilc: const Color(0xff20AC9B),
AccentColor.adaptive: const Color(0xFF3D7BF4),
AccentColor.custom: const Color(0xFF3D7BF4),
};

View File

@@ -1,18 +0,0 @@
import 'package:flutter/material.dart';
class ThemeModeObserver extends ChangeNotifier {
ThemeMode _themeMode;
bool _updateNavbarColor;
ThemeMode get themeMode => _themeMode;
bool get updateNavbarColor => _updateNavbarColor;
ThemeModeObserver({ThemeMode initialTheme = ThemeMode.system, bool updateNavbarColor = true})
: _themeMode = initialTheme,
_updateNavbarColor = updateNavbarColor;
void changeTheme(ThemeMode mode, {bool updateNavbarColor = true}) {
_themeMode = mode;
_updateNavbarColor = updateNavbarColor;
notifyListeners();
}
}

View File

@@ -1,160 +0,0 @@
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo/theme/colors/accent.dart';
import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:filcnaplo/theme/observer.dart';
import 'package:flutter/material.dart';
import 'package:material_color_utilities/material_color_utilities.dart';
import 'package:provider/provider.dart';
class AppTheme {
// Dev note: All of these could be constant variables, but this is better for
// development (you don't have to hot-restart)
static const String _fontFamily = "Montserrat";
static Color? _paletteAccentLight(CorePalette? palette) => palette != null ? Color(palette.primary.get(70)) : null;
static Color? _paletteHighlightLight(CorePalette? palette) => palette != null ? Color(palette.neutral.get(100)) : null;
static Color? _paletteBackgroundLight(CorePalette? palette) => palette != null ? Color(palette.neutral.get(95)) : null;
static Color? _paletteAccentDark(CorePalette? palette) => palette != null ? Color(palette.primary.get(80)) : null;
static Color? _paletteBackgroundDark(CorePalette? palette) => palette != null ? Color(palette.neutralVariant.get(10)) : null;
static Color? _paletteHighlightDark(CorePalette? palette) => palette != null ? Color(palette.neutralVariant.get(20)) : null;
// Light Theme
static ThemeData lightTheme(BuildContext context, {CorePalette? palette}) {
var lightColors = AppColors.fromBrightness(Brightness.light);
final settings = Provider.of<SettingsProvider>(context, listen: false);
AccentColor accentColor = settings.accentColor;
final customAccentColor = accentColor == AccentColor.custom ? settings.customAccentColor : null;
Color accent = customAccentColor ?? accentColorMap[accentColor] ?? const Color(0x00000000);
if (accentColor == AccentColor.adaptive) {
if (palette != null) accent = _paletteAccentLight(palette)!;
} else {
palette = null;
}
Color backgroundColor =
(accentColor == AccentColor.custom ? settings.customBackgroundColor : _paletteBackgroundLight(palette)) ?? lightColors.background;
Color highlightColor =
(accentColor == AccentColor.custom ? settings.customHighlightColor : _paletteHighlightLight(palette)) ?? lightColors.highlight;
return ThemeData(
brightness: Brightness.light,
useMaterial3: true,
fontFamily: _fontFamily,
scaffoldBackgroundColor: backgroundColor,
primaryColor: lightColors.filc,
dividerColor: const Color(0x00000000),
colorScheme: ColorScheme(
primary: accent,
onPrimary: (accent.computeLuminance() > 0.5 ? Colors.black : Colors.white).withOpacity(.9),
secondary: accent,
onSecondary: (accent.computeLuminance() > 0.5 ? Colors.black : Colors.white).withOpacity(.9),
background: highlightColor,
onBackground: Colors.black.withOpacity(.9),
brightness: Brightness.light,
error: lightColors.red,
onError: Colors.white.withOpacity(.9),
surface: highlightColor,
onSurface: Colors.black.withOpacity(.9),
),
shadowColor: lightColors.shadow.withOpacity(.5),
appBarTheme: AppBarTheme(backgroundColor: backgroundColor),
indicatorColor: accent,
iconTheme: IconThemeData(color: lightColors.text.withOpacity(.75)),
navigationBarTheme: NavigationBarThemeData(
indicatorColor: accent.withOpacity(accentColor == AccentColor.adaptive ? 0.4 : 0.8),
iconTheme: MaterialStateProperty.all(IconThemeData(color: lightColors.text)),
backgroundColor: highlightColor,
labelTextStyle: MaterialStateProperty.all(TextStyle(
fontSize: 13.0,
fontWeight: FontWeight.w500,
color: lightColors.text.withOpacity(0.8),
)),
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
height: 76.0,
),
sliderTheme: SliderThemeData(
inactiveTrackColor: accent.withOpacity(.3),
),
progressIndicatorTheme: ProgressIndicatorThemeData(color: accent),
expansionTileTheme: ExpansionTileThemeData(iconColor: accent),
cardColor: highlightColor,
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: Provider.of<ThemeModeObserver>(context, listen: false).updateNavbarColor ? backgroundColor : null,
),
);
}
// Dark Theme
static ThemeData darkTheme(BuildContext context, {CorePalette? palette}) {
var darkColors = AppColors.fromBrightness(Brightness.dark);
final settings = Provider.of<SettingsProvider>(context, listen: false);
AccentColor accentColor = settings.accentColor;
final customAccentColor = accentColor == AccentColor.custom ? settings.customAccentColor : null;
Color accent = customAccentColor ?? accentColorMap[accentColor] ?? const Color(0x00000000);
if (accentColor == AccentColor.adaptive) {
if (palette != null) accent = _paletteAccentDark(palette)!;
} else {
palette = null;
}
Color backgroundColor =
(accentColor == AccentColor.custom ? settings.customBackgroundColor : _paletteBackgroundDark(palette)) ?? darkColors.background;
Color highlightColor =
(accentColor == AccentColor.custom ? settings.customHighlightColor : _paletteHighlightDark(palette)) ?? darkColors.highlight;
return ThemeData(
brightness: Brightness.dark,
useMaterial3: true,
fontFamily: _fontFamily,
scaffoldBackgroundColor: backgroundColor,
primaryColor: darkColors.filc,
dividerColor: const Color(0x00000000),
colorScheme: ColorScheme(
primary: accent,
onPrimary: (accent.computeLuminance() > 0.5 ? Colors.black : Colors.white).withOpacity(.9),
secondary: accent,
onSecondary: (accent.computeLuminance() > 0.5 ? Colors.black : Colors.white).withOpacity(.9),
background: highlightColor,
onBackground: Colors.white.withOpacity(.9),
brightness: Brightness.dark,
error: darkColors.red,
onError: Colors.black.withOpacity(.9),
surface: highlightColor,
onSurface: Colors.white.withOpacity(.9),
),
shadowColor: highlightColor.withOpacity(.5), //darkColors.shadow,
appBarTheme: AppBarTheme(backgroundColor: backgroundColor),
indicatorColor: accent,
iconTheme: IconThemeData(color: darkColors.text.withOpacity(.75)),
navigationBarTheme: NavigationBarThemeData(
indicatorColor: accent.withOpacity(accentColor == AccentColor.adaptive ? 0.4 : 0.8),
iconTheme: MaterialStateProperty.all(IconThemeData(color: darkColors.text)),
backgroundColor: highlightColor,
labelTextStyle: MaterialStateProperty.all(TextStyle(
fontSize: 13.0,
fontWeight: FontWeight.w500,
color: darkColors.text.withOpacity(0.8),
)),
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
height: 76.0,
),
sliderTheme: SliderThemeData(
inactiveTrackColor: accent.withOpacity(.3),
),
progressIndicatorTheme: ProgressIndicatorThemeData(color: accent),
expansionTileTheme: ExpansionTileThemeData(iconColor: accent),
cardColor: highlightColor,
chipTheme: ChipThemeData(
backgroundColor: accent.withOpacity(.2),
elevation: 1,
),
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: Provider.of<ThemeModeObserver>(context, listen: false).updateNavbarColor ? backgroundColor : null,
),
);
}
}

View File

@@ -1,15 +0,0 @@
import 'package:filcnaplo/ui/date_widget.dart';
import 'package:filcnaplo_kreta_api/models/absence.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/absence/absence_viewable.dart' as mobile;
List<DateWidget> getWidgets(List<Absence> providerAbsences, {bool noExcused = false}) {
List<DateWidget> items = [];
providerAbsences.where((a) => !noExcused || a.state != Justification.excused).forEach((absence) {
items.add(DateWidget(
key: absence.id,
date: absence.date,
widget: mobile.AbsenceViewable(absence),
));
});
return items;
}

View File

@@ -1,25 +0,0 @@
import 'package:filcnaplo/models/ad.dart';
import 'package:filcnaplo/ui/date_widget.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/ad/ad_viewable.dart'
as mobile;
List<DateWidget> getWidgets(List<Ad> providerAds) {
List<DateWidget> items = [];
if (providerAds.isNotEmpty) {
for (var ad in providerAds) {
if (ad.date.isBefore(DateTime.now()) &&
ad.expireDate.isAfter(DateTime.now())) {
providerAds.sort((a, b) => -a.date.compareTo(b.date));
items.add(DateWidget(
key: ad.description,
date: ad.date,
widget: mobile.AdViewable(ad),
));
}
}
}
return items;
}

View File

@@ -1,41 +0,0 @@
import 'package:filcnaplo/ui/date_widget.dart';
import 'package:filcnaplo/utils/platform.dart';
import 'package:filcnaplo_kreta_api/models/grade.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/grade/grade_viewable.dart' as mobile;
import 'package:filcnaplo_mobile_ui/common/widgets/grade/new_grades.dart' as mobile;
import 'package:filcnaplo_desktop_ui/common/widgets/grade/grade_viewable.dart' as desktop;
List<DateWidget> getWidgets(List<Grade> providerGrades, DateTime? lastSeenDate) {
List<DateWidget> items = [];
for (var grade in providerGrades) {
final surprise = (!(lastSeenDate != null && grade.date.isAfter(lastSeenDate)) || grade.value.value == 0);
if (grade.type == GradeType.midYear && surprise) {
items.add(DateWidget(
key: grade.id,
date: grade.date,
widget: PlatformUtils.isMobile ? mobile.GradeViewable(grade) : desktop.GradeViewable(grade),
));
}
}
return items;
}
List<DateWidget> getNewWidgets(List<Grade> providerGrades, DateTime? lastSeenDate) {
List<DateWidget> items = [];
List<Grade> newGrades = [];
for (var grade in providerGrades) {
final surprise = !(lastSeenDate != null && !grade.date.isAfter(lastSeenDate)) && grade.value.value != 0;
if (grade.type == GradeType.midYear && surprise) {
newGrades.add(grade);
}
}
newGrades.sort((a, b) => a.date.compareTo(b.date));
if (newGrades.isNotEmpty) {
items.add(DateWidget(
key: newGrades.last.id,
date: newGrades.last.date,
widget: mobile.NewGradesSurprise(newGrades),
));
}
return items;
}

View File

@@ -1,15 +0,0 @@
import 'package:filcnaplo/ui/date_widget.dart';
import 'package:filcnaplo_kreta_api/models/homework.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/homework/homework_viewable.dart' as mobile;
List<DateWidget> getWidgets(List<Homework> providerHomework) {
List<DateWidget> items = [];
for (var homework in providerHomework) {
items.add(DateWidget(
key: homework.id,
date: homework.deadline.year != 0 ? homework.deadline : homework.date,
widget: mobile.HomeworkViewable(homework),
));
}
return items;
}

View File

@@ -1,15 +0,0 @@
import 'package:filcnaplo/ui/date_widget.dart';
import 'package:filcnaplo_kreta_api/models/lesson.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/lesson/changed_lesson_viewable.dart' as mobile;
List<DateWidget> getWidgets(List<Lesson> providerLessons) {
List<DateWidget> items = [];
providerLessons.where((l) => l.isChanged && l.start.isAfter(DateTime.now())).forEach((lesson) {
items.add(DateWidget(
key: lesson.id,
date: DateTime(lesson.date.year, lesson.date.month, lesson.date.day, lesson.start.hour, lesson.start.minute),
widget: mobile.ChangedLessonViewable(lesson),
));
});
return items;
}

View File

@@ -1,23 +0,0 @@
import 'package:filcnaplo/ui/date_widget.dart';
import 'package:filcnaplo/ui/filter/widgets/notes.dart' as note_filter;
import 'package:filcnaplo/ui/filter/widgets/events.dart' as event_filter;
import 'package:filcnaplo_kreta_api/models/event.dart';
import 'package:filcnaplo_kreta_api/models/message.dart';
import 'package:filcnaplo_kreta_api/models/note.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/message/message_viewable.dart' as mobile;
List<DateWidget> getWidgets(List<Message> providerMessages, List<Note> providerNotes, List<Event> providerEvents) {
List<DateWidget> items = [];
for (var message in providerMessages) {
if (message.type == MessageType.inbox) {
items.add(DateWidget(
key: "${message.id}",
date: message.date,
widget: mobile.MessageViewable(message),
));
}
}
items.addAll(note_filter.getWidgets(providerNotes));
items.addAll(event_filter.getWidgets(providerEvents));
return items;
}

View File

@@ -1,10 +0,0 @@
import 'package:filcnaplo/models/release.dart';
import 'package:filcnaplo/ui/date_widget.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/update/update_viewable.dart' as mobile;
DateWidget getWidget(Release providerRelease) {
return DateWidget(
date: DateTime.now(),
widget: mobile.UpdateViewable(providerRelease),
);
}

View File

@@ -1,350 +0,0 @@
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo_kreta_api/providers/exam_provider.dart';
import 'package:filcnaplo_kreta_api/providers/homework_provider.dart';
import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:filcnaplo_kreta_api/models/exam.dart';
import 'package:filcnaplo_kreta_api/models/homework.dart';
import 'package:filcnaplo_kreta_api/models/lesson.dart';
import 'package:filcnaplo/utils/format.dart';
import 'package:filcnaplo_mobile_ui/common/panel/panel.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/exam/exam_view.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/homework/homework_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'lesson_tile.i18n.dart';
class LessonTile extends StatelessWidget {
const LessonTile(this.lesson, {Key? key, this.onTap, this.swapDesc = false})
: super(key: key);
final Lesson lesson;
final bool swapDesc;
final void Function()? onTap;
@override
Widget build(BuildContext context) {
List<Widget> subtiles = [];
Color accent = Theme.of(context).colorScheme.secondary;
bool fill = false;
bool fillLeading = false;
String lessonIndexTrailing = "";
SettingsProvider settingsProvider = Provider.of<SettingsProvider>(context);
// Only put a trailing . if its a digit
if (RegExp(r'\d').hasMatch(lesson.lessonIndex)) lessonIndexTrailing = ".";
var now = DateTime.now();
if (lesson.start.isBefore(now) &&
lesson.end.isAfter(now) &&
lesson.status?.name != "Elmaradt") {
fillLeading = true;
}
if (lesson.substituteTeacher != null &&
lesson.substituteTeacher?.name != "") {
fill = true;
accent = AppColors.of(context).yellow;
}
if (lesson.status?.name == "Elmaradt") {
fill = true;
accent = AppColors.of(context).red;
}
if (lesson.isEmpty) {
accent = AppColors.of(context).text.withOpacity(0.6);
}
if (!lesson.studentPresence) {
subtiles.add(LessonSubtile(
type: LessonSubtileType.absence,
title: "absence".i18n,
));
}
if (lesson.homeworkId != "") {
Homework homework = Provider.of<HomeworkProvider>(context, listen: false)
.homework
.firstWhere((h) => h.id == lesson.homeworkId,
orElse: () => Homework.fromJson({}));
if (homework.id != "") {
subtiles.add(LessonSubtile(
type: LessonSubtileType.homework,
title: homework.content,
onPressed: () => HomeworkView.show(homework, context: context),
));
}
}
if (lesson.exam != "") {
Exam exam = Provider.of<ExamProvider>(context, listen: false)
.exams
.firstWhere((t) => t.id == lesson.exam,
orElse: () => Exam.fromJson({}));
if (exam.id != "") {
subtiles.add(LessonSubtile(
type: LessonSubtileType.exam,
title: exam.description != ""
? exam.description
: exam.mode?.description ?? "exam".i18n,
onPressed: () => ExamView.show(exam, context: context),
));
}
}
String description = '';
String room = '';
final cleanDesc = lesson.description
.specialChars()
.toLowerCase()
.replaceAll(lesson.subject.name.specialChars().toLowerCase(), '');
if (!swapDesc) {
if (cleanDesc != "") {
description = lesson.description;
}
// Changed lesson Description
if (lesson.isChanged) {
if (lesson.status?.name == "Elmaradt") {
description = 'cancelled'.i18n;
} else if (lesson.substituteTeacher?.name != "") {
description = 'substitution'.i18n;
}
}
room = lesson.room.replaceAll("_", " ");
} else {
description = lesson.room.replaceAll("_", " ");
}
return Padding(
padding: const EdgeInsets.only(bottom: 2.0),
child: Material(
color: fill ? accent.withOpacity(.25) : Colors.transparent,
borderRadius: BorderRadius.circular(12.0),
child: Visibility(
visible: lesson.subject.id != '' || lesson.isEmpty,
replacement: Padding(
padding: const EdgeInsets.only(top: 6.0),
child: PanelTitle(title: Text(lesson.name)),
),
child: Padding(
padding: EdgeInsets.only(bottom: subtiles.isEmpty ? 0.0 : 12.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
minVerticalPadding: 12.0,
dense: true,
onTap: onTap,
// onLongPress: kDebugMode ? () => log(jsonEncode(lesson.json)) : null,
visualDensity: VisualDensity.compact,
contentPadding: const EdgeInsets.symmetric(horizontal: 4.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
title: Text(
!lesson.isEmpty
? lesson.subject.renamedTo ??
lesson.subject.name.capital()
: "empty".i18n,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 15.5,
color: AppColors.of(context)
.text
.withOpacity(!lesson.isEmpty ? 1.0 : 0.5),
fontStyle: lesson.subject.isRenamed &&
settingsProvider.renamedSubjectsItalics
? FontStyle.italic
: null),
),
subtitle: description != ""
? Text(
description,
style: const TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14.0,
),
maxLines: 1,
softWrap: false,
overflow: TextOverflow.ellipsis,
)
: null,
minLeadingWidth: 34.0,
leading: AspectRatio(
aspectRatio: 1,
child: Center(
child: Stack(
children: [
Text(
lesson.lessonIndex + lessonIndexTrailing,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 30.0,
fontWeight: FontWeight.w600,
color: accent,
),
),
// Current lesson indicator
Transform.translate(
offset: const Offset(-12.0, -2.0),
child: Container(
decoration: BoxDecoration(
color: fillLeading
? Theme.of(context)
.colorScheme
.secondary
.withOpacity(.3)
: const Color(0x00000000),
borderRadius: BorderRadius.circular(12.0),
boxShadow: [
if (fillLeading)
BoxShadow(
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(.25),
blurRadius: 6.0,
)
],
),
margin: const EdgeInsets.symmetric(vertical: 4.0),
width: 4.0,
height: double.infinity,
),
)
],
),
),
),
trailing: !lesson.isEmpty
? Row(
mainAxisSize: MainAxisSize.min,
children: [
if (!swapDesc)
SizedBox(
width: 52.0,
child: Padding(
padding: const EdgeInsets.only(right: 6.0),
child: Text(
room,
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontWeight: FontWeight.w500,
color: AppColors.of(context)
.text
.withOpacity(.75),
),
),
),
),
Stack(
alignment: Alignment.center,
children: [
// Fix alignment hack
const Opacity(opacity: 0, child: Text("EE:EE")),
Text(
"${DateFormat("H:mm").format(lesson.start)}\n${DateFormat("H:mm").format(lesson.end)}",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w500,
color: AppColors.of(context)
.text
.withOpacity(.9),
),
),
],
),
],
)
: null,
),
// Homework & Exams
...subtiles,
],
),
),
),
),
);
}
}
enum LessonSubtileType { homework, exam, absence }
class LessonSubtile extends StatelessWidget {
const LessonSubtile(
{Key? key, this.onPressed, required this.title, required this.type})
: super(key: key);
final Function()? onPressed;
final String title;
final LessonSubtileType type;
@override
Widget build(BuildContext context) {
IconData icon;
Color iconColor = AppColors.of(context).text;
switch (type) {
case LessonSubtileType.absence:
icon = FeatherIcons.slash;
iconColor = AppColors.of(context).red;
break;
case LessonSubtileType.exam:
icon = FeatherIcons.file;
break;
case LessonSubtileType.homework:
icon = FeatherIcons.home;
break;
}
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: InkWell(
onTap: onPressed,
borderRadius: BorderRadius.circular(8.0),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
children: [
Center(
child: SizedBox(
width: 30.0,
child:
Icon(icon, color: iconColor.withOpacity(.75), size: 20.0),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 20.0),
child: Text(
title.escapeHtml(),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.w500,
color: AppColors.of(context).text.withOpacity(.65)),
),
),
),
],
),
),
),
);
}
}

View File

@@ -1,38 +0,0 @@
import 'dart:developer';
import 'package:filcnaplo_kreta_api/models/absence.dart';
import 'package:filcnaplo_kreta_api/models/lesson.dart';
import 'package:filcnaplo_kreta_api/models/week.dart';
import 'package:filcnaplo_kreta_api/providers/timetable_provider.dart';
import 'package:flutter/cupertino.dart';
import 'package:provider/provider.dart';
class ReverseSearch {
static Future<Lesson?> getLessonByAbsence(Absence absence, BuildContext context) async {
final timetableProvider = Provider.of<TimetableProvider>(context, listen: false);
List<Lesson> lessons = [];
final week = Week.fromDate(absence.date);
try {
await timetableProvider.fetch(week: week);
} catch (e) {
log("[ERROR] getLessonByAbsence: $e");
}
lessons = timetableProvider.getWeek(week) ?? [];
// Find absence lesson in timetable
Lesson lesson = lessons.firstWhere(
(l) => _sameDate(l.date, absence.date) && l.subject.id == absence.subject.id && l.lessonIndex == absence.lessonIndex.toString(),
orElse: () => Lesson.fromJson({'isEmpty': true}),
);
if (lesson.isEmpty) {
return null;
} else {
return lesson;
}
}
// difference.inDays is not reliable
static bool _sameDate(DateTime a, DateTime b) => (a.year == b.year && a.month == b.month && a.day == b.day);
}

View File

@@ -1,14 +0,0 @@
import 'package:flutter/material.dart';
import 'package:filcnaplo_kreta_api/models/grade.dart';
import 'package:filcnaplo/ui/widgets/grade/grade_tile.dart';
class GradeViewable extends StatelessWidget {
const GradeViewable(this.grade, {Key? key}) : super(key: key);
final Grade grade;
@override
Widget build(BuildContext context) {
return GradeTile(grade);
}
}

View File

@@ -1,57 +0,0 @@
import 'package:i18n_extension/i18n_extension.dart';
extension ScreensLocalization on String {
static final _t = Translations.byLocale("hu_hu") +
{
"en_en": {
"Absences": "Absences",
"Delays": "Delays",
"Misses": "Misses",
"empty": "You have no absences.",
"stat_1": "Excused Absences",
"stat_2": "Unexcused Absences",
"stat_3": "Excused Delay",
"stat_4": "Unexcused Delay",
"min": "min",
"hr": "hrs",
"Subjects": "Subjects",
"attention": "Attention!",
"attention_body": "Percentage calculations are only an approximation so they may not be accurate.",
},
"hu_hu": {
"Absences": "Hiányzások",
"Delays": "Késések",
"Misses": "Hiányok",
"empty": "Nincsenek hiányaid.",
"stat_1": "Igazolt hiányzások",
"stat_2": "Igazolatlan hiányzások",
"stat_3": "Igazolt Késés",
"stat_4": "Igazolatlan Késés",
"min": "perc",
"hr": "óra",
"Subjects": "Tantárgyak",
"attention": "Figyelem!",
"attention_body": "A százalékos számítások csak közelítések, ezért előfordulhat, hogy nem pontosak.",
},
"de_de": {
"Absences": "Fehlen",
"Delays": "Verspätung",
"Misses": "Fehlt",
"empty": "Sie haben keine Fehlen.",
"stat_1": "Entschuldigte Fehlen",
"stat_2": "Unentschuldigte Fehlen",
"stat_3": "Entschuldigte Verspätung",
"stat_4": "Unentschuldigte Verspätung",
"min": "min",
"hr": "hrs",
"Subjects": "Fächer",
"attention": "Achtung!",
"attention_body": "Prozentberechnungen sind nur eine Annäherung und können daher ungenau sein.",
},
};
String get i18n => localize(this, _t);
String fill(List<Object> params) => localizeFill(this, params);
String plural(int value) => localizePlural(value, this, _t);
String version(Object modifier) => localizeVersion(modifier, this, _t);
}

View File

@@ -1,25 +0,0 @@
import 'package:flutter/material.dart';
import 'package:filcnaplo_kreta_api/models/grade.dart';
import 'package:filcnaplo_desktop_ui/pages/grades/grades_count_item.dart';
import 'package:collection/collection.dart';
class GradesCount extends StatelessWidget {
const GradesCount({Key? key, required this.grades}) : super(key: key);
final List<Grade> grades;
@override
Widget build(BuildContext context) {
List<int> gradesCount = List.generate(5, (int index) => grades.where((e) => e.value.value == index + 1).length);
return Container(
width: 75,
padding: const EdgeInsets.only(bottom: 6.0, top: 6.0, left: 12.0, right: 0.0),
margin: const EdgeInsets.symmetric(horizontal: 12.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: gradesCount.mapIndexed((index, e) => GradesCountItem(count: e, value: index + 1)).toList(),
),
);
}
}

View File

@@ -1,34 +0,0 @@
name: filcnaplo_desktop_ui
publish_to: "none"
environment:
sdk: ">=2.17.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# Filcnaplo main dep
filcnaplo:
path: ../filcnaplo/
filcnaplo_kreta_api:
path: ../filcnaplo_kreta_api/
cupertino_icons: ^1.0.2
flutter_feather_icons: ^2.0.0+1
provider: ^5.0.0
url_launcher: ^6.0.9
flutter_linkify: ^5.0.2
flutter_markdown: ^0.6.5
animations: ^2.0.1
confetti: ^0.6.0
auto_size_text: ^3.0.0
flutter_acrylic: ^1.1.3
elegant_notification: ^1.6.1
flutter_staggered_grid_view: ^0.7.0
dev_dependencies:
flutter_lints: ^1.0.0
flutter:
uses-material-design: true

View File

@@ -1,11 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "pub" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"

View File

@@ -1,246 +0,0 @@
// ignore_for_file: avoid_print
import 'dart:convert';
import 'dart:io';
import 'package:filcnaplo/api/login.dart';
import 'package:filcnaplo/api/nonce.dart';
import 'package:filcnaplo/api/providers/user_provider.dart';
import 'package:filcnaplo/api/providers/status_provider.dart';
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo/models/user.dart';
import 'package:filcnaplo/utils/jwt.dart';
import 'package:filcnaplo_kreta_api/client/api.dart';
import 'package:http/http.dart' as http;
import 'package:http/io_client.dart' as http;
import 'dart:async';
class KretaClient {
String? accessToken;
String? refreshToken;
String? idToken;
String? userAgent;
late http.Client client;
late final SettingsProvider _settings;
late final UserProvider _user;
late final StatusProvider _status;
bool _loginRefreshing = false;
KretaClient({
this.accessToken,
required SettingsProvider settings,
required UserProvider user,
required StatusProvider status,
}) : _settings = settings,
_user = user,
_status = status,
userAgent = settings.config.userAgent {
var ioclient = HttpClient();
ioclient.badCertificateCallback = _checkCerts;
client = http.IOClient(ioclient);
}
bool _checkCerts(X509Certificate cert, String host, int port) {
return _settings.developerMode;
}
Future<dynamic> getAPI(
String url, {
Map<String, String>? headers,
bool autoHeader = true,
bool json = true,
bool rawResponse = false,
}) async {
Map<String, String> headerMap;
if (rawResponse) json = false;
if (headers != null) {
headerMap = headers;
} else {
headerMap = {};
}
try {
http.Response? res;
for (int i = 0; i < 3; i++) {
if (autoHeader) {
if (!headerMap.containsKey("authorization") && accessToken != null) {
headerMap["authorization"] = "Bearer $accessToken";
}
if (!headerMap.containsKey("user-agent") && userAgent != null) {
headerMap["user-agent"] = "$userAgent";
}
}
res = await client.get(Uri.parse(url), headers: headerMap);
_status.triggerRequest(res);
if (res.statusCode == 401) {
await refreshLogin();
headerMap.remove("authorization");
} else {
break;
}
// Wait before retrying
await Future.delayed(const Duration(milliseconds: 500));
}
if (res == null) throw "Login error";
if (res.body == 'invalid_grant' || res.body.replaceAll(' ', '') == '') {
throw "Auth error";
}
if (json) {
return jsonDecode(res.body);
} else if (rawResponse) {
return res.bodyBytes;
} else {
return res.body;
}
} on http.ClientException catch (error) {
print(
"ERROR: KretaClient.getAPI ($url) ClientException: ${error.message}");
} catch (error) {
print("ERROR: KretaClient.getAPI ($url) ${error.runtimeType}: $error");
}
}
Future<dynamic> postAPI(
String url, {
Map<String, String>? headers,
bool autoHeader = true,
bool json = true,
Object? body,
}) async {
Map<String, String> headerMap;
if (headers != null) {
headerMap = headers;
} else {
headerMap = {};
}
try {
http.Response? res;
for (int i = 0; i < 3; i++) {
if (autoHeader) {
if (!headerMap.containsKey("authorization") && accessToken != null) {
headerMap["authorization"] = "Bearer $accessToken";
}
if (!headerMap.containsKey("user-agent") && userAgent != null) {
headerMap["user-agent"] = "$userAgent";
}
if (!headerMap.containsKey("content-type")) {
headerMap["content-type"] = "application/json";
}
}
res = await client.post(Uri.parse(url), headers: headerMap, body: body);
if (res.statusCode == 401) {
await refreshLogin();
headerMap.remove("authorization");
} else {
break;
}
}
if (res == null) throw "Login error";
if (json) {
return jsonDecode(res.body);
} else {
return res.body;
}
} on http.ClientException catch (error) {
print(
"ERROR: KretaClient.postAPI ($url) ClientException: ${error.message}");
} catch (error) {
print("ERROR: KretaClient.postAPI ($url) ${error.runtimeType}: $error");
}
}
Future<void> refreshLogin() async {
if (_loginRefreshing) return;
_loginRefreshing = true;
User? loginUser = _user.user;
if (loginUser == null) return;
Map<String, String> headers = {
"content-type": "application/x-www-form-urlencoded",
};
String nonceStr = await getAPI(KretaAPI.nonce, json: false);
Nonce nonce =
getNonce(nonceStr, loginUser.username, loginUser.instituteCode);
headers.addAll(nonce.header());
if (_settings.presentationMode) {
print("DEBUG: refreshLogin: ${loginUser.id}");
} else {
print("DEBUG: refreshLogin: ${loginUser.id} ${loginUser.name}");
}
Map? loginRes = await postAPI(
KretaAPI.login,
headers: headers,
body: User.loginBody(
username: loginUser.username,
password: loginUser.password,
instituteCode: loginUser.instituteCode,
),
);
if (loginRes != null) {
if (loginRes.containsKey("access_token")) {
accessToken = loginRes["access_token"];
}
if (loginRes.containsKey("refresh_token")) {
refreshToken = loginRes["refresh_token"];
}
// Update role
loginUser.role =
JwtUtils.getRoleFromJWT(accessToken ?? "") ?? Role.student;
}
if (refreshToken != null) {
Map? refreshRes = await postAPI(KretaAPI.login,
headers: headers,
body: User.refreshBody(
refreshToken: refreshToken!,
instituteCode: loginUser.instituteCode));
if (refreshRes != null) {
if (refreshRes.containsKey("id_token")) {
idToken = refreshRes["id_token"];
}
}
}
_loginRefreshing = false;
}
Future<void> logout() async {
User? loginUser = _user.user;
if (loginUser == null) return;
Map<String, String> headers = {
"content-type": "application/x-www-form-urlencoded",
};
await postAPI(
KretaAPI.logout,
headers: headers,
body: User.logoutBody(
refreshToken: refreshToken!,
),
json: false,
);
}
}

View File

@@ -1,80 +0,0 @@
import 'package:filcnaplo/api/providers/user_provider.dart';
import 'package:filcnaplo/api/providers/database_provider.dart';
import 'package:filcnaplo/models/user.dart';
import 'package:filcnaplo_kreta_api/client/api.dart';
import 'package:filcnaplo_kreta_api/client/client.dart';
import 'package:filcnaplo_kreta_api/models/message.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MessageProvider with ChangeNotifier {
late List<Message> _messages;
late BuildContext _context;
List<Message> get messages => _messages;
MessageProvider({
List<Message> initialMessages = const [],
required BuildContext context,
}) {
_messages = List.castFrom(initialMessages);
_context = context;
if (_messages.isEmpty) restore();
}
Future<void> restore() async {
String? userId = Provider.of<UserProvider>(_context, listen: false).id;
// Load messages from the database
if (userId != null) {
var dbMessages = await Provider.of<DatabaseProvider>(_context, listen: false).userQuery.getMessages(userId: userId);
_messages = dbMessages;
notifyListeners();
}
}
// Fetches all types of Messages
Future<void> fetchAll() => Future.forEach(MessageType.values, (MessageType v) => fetch(type: v));
// Fetches Messages from the Kreta API then stores them in the database
Future<void> fetch({MessageType type = MessageType.inbox}) async {
// Check Message Type
if (type == MessageType.draft) return;
String messageType = ["beerkezett", "elkuldott", "torolt"].elementAt(type.index);
// Check User
User? user = Provider.of<UserProvider>(_context, listen: false).user;
if (user == null) throw "Cannot fetch Messages for User null";
// Get messages
List? messagesJson = await Provider.of<KretaClient>(_context, listen: false).getAPI(KretaAPI.messages(messageType));
if (messagesJson == null) throw "Cannot fetch Messages for User ${user.id}";
// Parse messages
List<Message> messages = [];
await Future.wait(List.generate(messagesJson.length, (index) {
return () async {
Map message = messagesJson.cast<Map>()[index];
Map? messageJson = await Provider.of<KretaClient>(_context, listen: false).getAPI(KretaAPI.message(message["azonosito"].toString()));
if (messageJson != null) messages.add(Message.fromJson(messageJson, forceType: type));
}();
}));
await store(messages, type);
}
// Stores Messages in the database
Future<void> store(List<Message> messages, MessageType type) async {
// Only store the specified type
_messages.removeWhere((m) => m.type == type);
_messages.addAll(messages);
User? user = Provider.of<UserProvider>(_context, listen: false).user;
if (user == null) throw "Cannot store Messages for User null";
String userId = user.id;
await Provider.of<DatabaseProvider>(_context, listen: false).userStore.storeMessages(_messages, userId: userId);
notifyListeners();
}
}

View File

@@ -1,17 +0,0 @@
name: filcnaplo_kreta_api
publish_to: "none"
environment:
sdk: ">=2.17.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
filcnaplo:
path: ../filcnaplo/
http: ^0.13.3
provider: ^5.0.0
file_picker: ^5.3.2
dev_dependencies:
flutter_lints: ^1.0.0

View File

@@ -1,11 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "pub" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"

View File

@@ -1,45 +0,0 @@
import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:filcnaplo/ui/widgets/grade/grade_tile.dart';
import 'package:flutter/material.dart';
import 'package:i18n_extension/i18n_widget.dart';
class AverageDisplay extends StatelessWidget {
const AverageDisplay({Key? key, this.average = 0.0, this.border = false})
: super(key: key);
final double average;
final bool border;
@override
Widget build(BuildContext context) {
Color color = average == 0.0
? AppColors.of(context).text.withOpacity(.8)
: gradeColor(context: context, value: average);
String averageText = average.toStringAsFixed(2);
if (I18n.of(context).locale.languageCode != "en") {
averageText = averageText.replaceAll(".", ",");
}
return Container(
width: border ? 57.0 : 54.0,
padding: EdgeInsets.symmetric(
horizontal: 8.0 - (border ? 2 : 0), vertical: 6.0 - (border ? 2 : 0)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(45.0),
border: border
? Border.fromBorderSide(
BorderSide(color: color.withOpacity(.5), width: 3.0))
: null,
color: !border ? color.withOpacity(average == 0.0 ? .15 : .25) : null,
),
child: Text(
average == 0.0 ? "-" : averageText,
textAlign: TextAlign.center,
style: TextStyle(
color: color, fontWeight: FontWeight.w600, fontSize: 14.0),
maxLines: 1,
),
);
}
}

View File

@@ -1,70 +0,0 @@
import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:flutter/material.dart';
class RoundedBottomSheet extends StatelessWidget {
const RoundedBottomSheet({Key? key, this.child, this.borderRadius = 12.0, this.shrink = true, this.showHandle = true}) : super(key: key);
final Widget? child;
final double borderRadius;
final bool shrink;
final bool showHandle;
@override
Widget build(BuildContext context) {
return AnimatedContainer(
duration: const Duration(milliseconds: 500),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(borderRadius),
topRight: Radius.circular(borderRadius),
),
),
child: SafeArea(
child: Column(
mainAxisSize: shrink ? MainAxisSize.min : MainAxisSize.max,
children: [
if (showHandle)
Container(
width: 42.0,
height: 4.0,
margin: const EdgeInsets.only(top: 12.0, bottom: 4.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(45.0),
color: AppColors.of(context).text.withOpacity(0.10),
),
),
if (child != null) child!,
SizedBox(height: MediaQuery.of(context).padding.bottom),
],
),
),
);
}
}
Future<T?> showRoundedModalBottomSheet<T>(
BuildContext context, {
required Widget child,
bool rootNavigator = true,
}) async {
return await showModalBottomSheet<T>(
context: context,
backgroundColor: const Color(0x00000000),
elevation: 0,
isDismissible: true,
useRootNavigator: rootNavigator,
builder: (context) => RoundedBottomSheet(child: child));
}
PersistentBottomSheetController<T> showRoundedBottomSheet<T>(
BuildContext context, {
required Widget child,
}) {
return showBottomSheet<T>(
context: context,
backgroundColor: const Color(0x00000000),
elevation: 12.0,
builder: (context) => RoundedBottomSheet(child: child),
);
}

View File

@@ -1,137 +0,0 @@
import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:flutter/material.dart';
import 'package:filcnaplo/utils/format.dart';
class HeroScrollView extends StatefulWidget {
const HeroScrollView(
{Key? key,
required this.child,
required this.title,
required this.icon,
this.italic = false,
this.navBarItems = const [],
this.onClose,
this.iconSize = 64.0,
this.scrollController})
: super(key: key);
final Widget child;
final String title;
final IconData? icon;
final List<Widget> navBarItems;
final VoidCallback? onClose;
final double iconSize;
final ScrollController? scrollController;
final bool italic;
@override
_HeroScrollViewState createState() => _HeroScrollViewState();
}
class _HeroScrollViewState extends State<HeroScrollView> {
late ScrollController _scrollController;
bool showBarTitle = false;
@override
void initState() {
super.initState();
_scrollController = widget.scrollController ?? ScrollController();
_scrollController.addListener(() {
if (_scrollController.offset > 42.0) {
if (showBarTitle == false) setState(() => showBarTitle = true);
} else {
if (showBarTitle == true) setState(() => showBarTitle = false);
}
});
}
@override
void dispose() {
super.dispose();
_scrollController.dispose();
}
@override
Widget build(BuildContext context) {
return NestedScrollView(
controller: _scrollController,
physics:
const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
headerSliverBuilder: (context, _) => [
SliverAppBar(
pinned: true,
floating: false,
snap: false,
centerTitle: false,
titleSpacing: 0,
surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
title: AnimatedOpacity(
opacity: showBarTitle ? 1.0 : 0.0,
child: Row(
children: [
Icon(widget.icon,
color: AppColors.of(context).text.withOpacity(.8)),
const SizedBox(width: 8.0),
Expanded(
child: Text(
widget.title.capital(),
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
color: AppColors.of(context).text,
fontWeight: FontWeight.w500,
fontStyle: widget.italic ? FontStyle.italic : null),
),
),
],
),
duration: const Duration(milliseconds: 200)),
leading: BackButton(
color: AppColors.of(context).text,
onPressed: () {
if (widget.onClose != null) {
widget.onClose!();
} else {
Navigator.of(context).pop();
}
}),
actions: widget.navBarItems,
expandedHeight: 145.69,
stretch: true,
flexibleSpace: FlexibleSpaceBar(
background: Stack(
children: [
Center(
child: Icon(
widget.icon,
size: widget.iconSize,
color: AppColors.of(context).text.withOpacity(.15),
),
),
Container(
alignment: Alignment.center,
margin: const EdgeInsets.only(top: 82),
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: Text(
widget.title.capital(),
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 36.0,
color: AppColors.of(context).text.withOpacity(.9),
fontStyle: widget.italic ? FontStyle.italic : null,
fontWeight: FontWeight.bold),
),
),
],
),
),
),
],
body: widget.child,
);
}
}

View File

@@ -1,100 +0,0 @@
import 'package:filcnaplo/helpers/subject.dart';
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:filcnaplo/utils/format.dart';
import 'package:filcnaplo_kreta_api/models/subject.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/absence/absence_display.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class AbsenceSubjectTile extends StatelessWidget {
const AbsenceSubjectTile(this.subject,
{Key? key,
this.percentage = 0.0,
this.excused = 0,
this.unexcused = 0,
this.pending = 0,
this.onTap})
: super(key: key);
final GradeSubject subject;
final void Function()? onTap;
final double percentage;
final int excused;
final int unexcused;
final int pending;
@override
Widget build(BuildContext context) {
SettingsProvider settingsProvider = Provider.of<SettingsProvider>(context);
return Material(
type: MaterialType.transparency,
child: ListTile(
// minLeadingWidth: 32.0,
dense: true,
contentPadding: const EdgeInsets.only(left: 8.0, right: 6.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)),
visualDensity: VisualDensity.compact,
onTap: onTap,
leading: Icon(
SubjectIcon.resolveVariant(subject: subject, context: context),
size: 32.0),
title: Text(
subject.renamedTo ?? subject.name.capital(),
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 15.0,
fontStyle:
subject.isRenamed && settingsProvider.renamedSubjectsItalics
? FontStyle.italic
: null),
),
subtitle: AbsenceDisplay(excused, unexcused, pending),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(width: 8.0),
if (percentage >= 0)
Stack(
alignment: Alignment.centerRight,
children: [
const Opacity(
child: Text("100%",
style: TextStyle(fontFamily: "monospace")),
opacity: 0),
Text(
percentage.round().toString() + "%",
style: TextStyle(
// fontFamily: "monospace",
color: getColorByPercentage(percentage, context: context),
fontWeight: FontWeight.w700,
fontSize: 24.0,
),
),
],
),
],
),
),
);
}
}
Color getColorByPercentage(double percentage, {required BuildContext context}) {
Color color = AppColors.of(context).text;
percentage = percentage.round().toDouble();
if (percentage > 35) {
color = AppColors.of(context).red;
} else if (percentage > 25) {
color = AppColors.of(context).orange;
} else if (percentage > 15) {
color = AppColors.of(context).yellow;
}
return color.withOpacity(.8);
}

View File

@@ -1,43 +0,0 @@
import 'package:filcnaplo_kreta_api/models/grade.dart';
import 'package:filcnaplo_mobile_ui/common/panel/panel.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/cretification/certification_card.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/cretification/certification_tile.dart';
import 'package:filcnaplo_mobile_ui/common/hero_scrollview.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
class CertificationView extends StatelessWidget {
const CertificationView(this.grades, {Key? key, required this.gradeType}) : super(key: key);
final List<Grade> grades;
final GradeType gradeType;
static show(List<Grade> grades, {required BuildContext context, required GradeType gradeType}) =>
Navigator.of(context, rootNavigator: true).push(CupertinoPageRoute(builder: (context) => CertificationView(grades, gradeType: gradeType)));
@override
Widget build(BuildContext context) {
grades.sort((a, b) => a.subject.name.compareTo(b.subject.name));
List<Widget> tiles = grades.map((e) => CertificationTile(e)).toList();
return Scaffold(
body: HeroScrollView(
title: getGradeTypeTitle(gradeType),
icon: FeatherIcons.award,
iconSize: 50,
child: ListView(
children: [
SafeArea(
child: Panel(
child: Column(
children: tiles,
),
),
)
],
shrinkWrap: true,
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 24.0),
physics: const BouncingScrollPhysics(),
)));
}
}

View File

@@ -1,46 +0,0 @@
import 'package:filcnaplo_kreta_api/models/event.dart';
import 'package:filcnaplo/utils/format.dart';
import 'package:filcnaplo_mobile_ui/common/profile_image/profile_image.dart';
import 'package:flutter/material.dart';
class EventTile extends StatelessWidget {
const EventTile(this.event, {Key? key, this.onTap, this.padding}) : super(key: key);
final Event event;
final void Function()? onTap;
final EdgeInsetsGeometry? padding;
@override
Widget build(BuildContext context) {
return Material(
color: Theme.of(context).colorScheme.background,
borderRadius: BorderRadius.circular(14.0),
child: Padding(
padding: padding ?? const EdgeInsets.symmetric(horizontal: 8.0),
child: ListTile(
visualDensity: VisualDensity.compact,
contentPadding: const EdgeInsets.only(left: 8.0, right: 12.0),
onTap: onTap,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14.0)),
leading: const ProfileImage(
name: "!",
radius: 22.0,
),
title: Text(
event.title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontWeight: FontWeight.w600),
),
subtitle: Text(
event.content.escapeHtml().replaceAll('\n', ' '),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontWeight: FontWeight.w500),
),
minLeadingWidth: 0,
),
),
);
}
}

Some files were not shown because too many files have changed in this diff Show More