Compare commits

...

41 Commits
3.4.2 ... 3.5.0

Author SHA1 Message Date
55nknown
f451660a7c version 2023-02-27 18:24:32 +01:00
55nknown
dd7c0ed8fe fix live activities floor desc 2023-02-27 15:50:51 +01:00
55nknown
8f466a9a37 design fix 2023-02-27 15:21:35 +01:00
55nknown
a43bf056c9 fixes 2023-02-27 14:38:56 +01:00
55nknown
c8bb55450a fix pub 2023-02-19 22:46:58 +01:00
55nknown
d293e1ceeb livecard fix 2023-01-25 08:32:17 +01:00
55nknown
fbb39b3d0d beta 2023-01-25 08:02:41 +01:00
ezyyeah
7332720302 fix every grade tile was italic 2023-01-23 19:31:07 +01:00
ezyyeah
26071db351 better rename func 2023-01-23 15:23:46 +01:00
55nknown
6dc0168ec4 filcnaplo 2023-01-23 15:03:43 +01:00
55nknown
b22e6da194 cleanup 2023-01-21 16:45:06 +01:00
55nknown
28d7bc823c cleanup 2023-01-21 16:45:05 +01:00
55nknown
b387438e79 premium inline 2023-01-21 16:39:30 +01:00
55nknown
10730c15c9 sdk constraint 2023-01-21 15:38:35 +01:00
55nknown
29e65d0ff1 kisotos 2023-01-21 14:20:23 +01:00
55nknown
b6d4c0398a m3 2023-01-21 13:59:32 +01:00
ezyyeah
f2be74d819 bottom navbar color fix 2022-12-31 13:32:47 +01:00
ezyyeah
a839f20a38 remove renamedSubject unnecesary query 2022-12-31 11:58:25 +01:00
ezyyeah
9b0621e3f9 rework goodStudent logic 2022-12-31 11:51:29 +01:00
ezyyeah
8bc695b70f subjects rename 2022-12-31 00:45:10 +01:00
ezyyeah
35e5c9cdc6 android build fix for image picker package 2022-12-30 15:23:19 +01:00
ezyyeah
fdeb576ffa profile picture in db 2022-12-30 15:10:23 +01:00
ezyyeah
d09e41ee7d profile picture dependencies 2022-12-30 15:09:54 +01:00
55nknown
ada17585cd next beta 2022-12-29 20:02:12 +01:00
ezyyeah
c478380c04 censor stuff 2022-12-29 00:40:27 +01:00
55nknown
0f5bf5f66e changelog beta 2022-12-25 16:46:32 +01:00
55nknown
def7113fcf fail under 2 2022-12-25 16:41:57 +01:00
55nknown
1282a0c87e rounding fix #148 2022-12-25 14:58:15 +01:00
55nknown
1379a059a9 fix icons not showing 2022-12-25 14:44:02 +01:00
55nknown
6791b1b0fc add filled icons 2022-12-18 21:05:27 +01:00
55nknown
84e65d2b7a premium assets + livecard fix 2022-12-19 09:14:36 +01:00
55nknown
695f4e44f5 cleanup 2022-12-08 21:17:06 +01:00
ezyyeah
fe5e93797a unnecessary png 2022-12-07 22:29:12 +01:00
ezyyeah
5524d467c2 widget better design, user provider await 2022-12-07 22:23:38 +01:00
ezyyeah
0de763a297 widgets implementation 2022-12-06 23:08:52 +01:00
ezyyeah
e32d2483d3 update implicitly_animated_reorderable_list to _2 2022-12-06 17:19:18 +01:00
55nknown
8267839176 widget src 2022-12-03 13:47:12 +01:00
55nknown
af3ab5ec65 widget impl 2022-12-03 13:44:01 +01:00
55nknown
48fa36c928 migrate widget resources 2022-12-01 15:08:45 +01:00
55nknown
fa4c205cde migrate widget xml 2022-12-01 14:38:01 +01:00
55nknown
0dc5c21a93 widget assets 2022-12-01 14:12:49 +01:00
110 changed files with 1562 additions and 233 deletions

View File

@@ -1,4 +1,13 @@
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

@@ -38,6 +38,9 @@ android {
lintOptions {
disable 'InvalidPackage'
disable "Instantiatable"
checkReleaseBuilds false
abortOnError false
}
defaultConfig {
@@ -66,6 +69,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
viewBinding true
}
}
flutter {
@@ -75,6 +82,7 @@ flutter {
dependencies {
implementation 'com.android.support:multidex:2.0.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'joda-time:joda-time:2.9.4'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}

View File

@@ -19,7 +19,7 @@
</activity>
<meta-data android:name="flutterEmbedding" android:value="2" />
<!-- <receiver android:name=".WidgetTimetable.widget_timetable"
<receiver android:name=".widget_timetable.WidgetTimetable"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
@@ -27,6 +27,7 @@
<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
@@ -34,7 +35,7 @@
android:resource="@xml/home_widget_test_info" />
</receiver>
<service android:name=".WidgetTimetable.widget_timetable_service"
<service android:name=".widget_timetable.WidgetTimetableService"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver"
@@ -46,7 +47,6 @@
<service android:name="es.antonborri.home_widget.HomeWidgetBackgroundService"
android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true" />
-->
</application>
<!-- Permissions -->

View File

@@ -0,0 +1,18 @@
package hu.filc.naplo;
import android.os.Bundle;
import io.flutter.embedding.android.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.embedding.engine.FlutterEngine;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(new FlutterEngine(this));
}
}

View File

@@ -0,0 +1 @@
../../../../../../../../../filcnaplo_premium/android/database

View File

@@ -0,0 +1 @@
../../../../../../../../../filcnaplo_premium/android/utils

View File

@@ -0,0 +1 @@
../../../../../../../../../filcnaplo_premium/android/widget_timetable

View File

@@ -1,6 +0,0 @@
package hu.filc.naplo
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M20,6l-11,11l-5,-5"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ff141516"
android:strokeLineCap="round"/>
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M15,18l-6,-6l6,-6"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ff141516"
android:strokeLineCap="round"/>
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M9,18l6,-6l-6,-6"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ff141516"
android:strokeLineCap="round"/>
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,2.69l5.66,5.66a8,8 0,1 1,-11.31 0z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ff141516"
android:strokeLineCap="round"/>
</vector>

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,2l7,19l-7,-4l-7,4l7,-19z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ff141516"
android:strokeLineCap="round"/>
</vector>

View File

@@ -0,0 +1,27 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M23,4l0,6l-6,0"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ff141516"
android:strokeLineCap="round"/>
<path
android:pathData="M1,20l0,-6l6,0"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ff141516"
android:strokeLineCap="round"/>
<path
android:pathData="M3.51,9a9,9 0,0 1,14.85 -3.36L23,10M1,14l4.64,4.36A9,9 0,0 0,20.49 15"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#ff141516"
android:strokeLineCap="round"/>
</vector>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
Background for widgets to make the rounded corners based on the
appWidgetRadius attribute value
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="?attr/appWidgetRadius" />
<solid android:color="?android:attr/colorBackground" />
</shape>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
Background for views inside widgets to make the rounded corners based on the
appWidgetInnerRadius attribute value
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="?attr/appWidgetInnerRadius" />
<solid android:color="?android:attr/colorAccent" />
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<stroke android:width="1dp" android:color="#D8E0E1" />
<corners android:radius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/>
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#00FFFFFF"/>
<corners android:radius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/>
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/light_red"/>
<corners android:radius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/>
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/light_yellow"/>
<corners android:radius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/>
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/launch_gradient_background" />
<item>
<bitmap android:gravity="center" android:src="@mipmap/ic_splash"/>
</item>
</layer-list>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient
android:startColor="#123323"
android:endColor="#20AC9B"
android:angle="135" />
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/highlight_light"/>
<stroke android:width="1dp" android:color="@color/highlight_light" />
<corners android:bottomLeftRadius="14dp" android:bottomRightRadius="14dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/>
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/highlight"/>
<stroke android:width="1dp" android:color="@color/highlight" />
<corners android:bottomLeftRadius="14dp" android:bottomRightRadius="14dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/>
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/highlight_light"/>
<stroke android:width="1dp" android:color="@color/highlight_light" />
<corners android:topLeftRadius="14dp" android:topRightRadius="14dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/>
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/highlight"/>
<stroke android:width="1dp" android:color="@color/highlight" />
<corners android:topLeftRadius="14dp" android:topRightRadius="14dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp"/>
</shape>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!--<gradient
android:angle="45"
android:endColor="@color/filc"
android:startColor="@color/filc" />-->
<solid android:color="@color/highlight_light"/>
<corners android:radius="12dp" />
<size android:width="2dp"/>
<padding
android:left="0.5dp"
android:right="0.5dp" />
</shape>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#ffE0CCEC"></solid>
<corners android:radius="10dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<gradient android:endColor="#ffE0CCEC" android:startColor="#ffC9ABDC" />
<corners android:radius="10dp" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#ff1D8868"></solid>
<corners android:radius="10dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<gradient android:endColor="#ff1D8868" android:startColor="#ff1EA18F" />
<corners android:radius="10dp" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,26 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp"
android:orientation="vertical"
android:background="@drawable/app_widget_background"
android:padding="8dp"
android:id="@+id/widget_container">
<TextView
android:id="@+id/widget_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="36sp"
android:textStyle="bold"
tools:text="Title" />
<TextView
android:id="@+id/widget_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
tools:text="Message" />
</LinearLayout>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/main_lay"
android:layout_height="50dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:layout_marginTop="2.5dp"
android:layout_marginBottom="2.5dp"
android:layout_marginLeft="7.5dp"
android:layout_marginRight="7.5dp"
android:background="@drawable/card_layout_tile">
<TextView
android:id="@+id/tt_item_num"
android:layout_width="50dp"
android:layout_height="match_parent"
android:textSize="30sp"
android:textStyle="bold"
android:fontFamily="@font/montserrat_medium"
android:text="1."
android:gravity="center"
android:textColor="@color/filc"></TextView>
<TextView
android:id="@+id/tt_item_name"
android:layout_width="match_parent"
android:layout_height="20dp"
android:textSize="15.5sp"
android:textFontWeight="700"
android:fontFamily="@font/montserrat_medium"
android:layout_marginTop="2.5dp"
android:text="Óra neve"
android:maxLines="1"
android:ellipsize="end"
android:layout_toLeftOf="@id/tt_item_room"
android:gravity="center_vertical"
android:layout_toRightOf="@id/tt_item_num"
android:textColor="@color/text"></TextView>
<TextView
android:id="@+id/tt_item_name_nodesc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="15.5sp"
android:textStyle="bold"
android:fontFamily="@font/montserrat_medium"
android:visibility="gone"
android:layout_marginTop="2.5dp"
android:layout_toLeftOf="@id/tt_item_room"
android:text="Óra neve"
android:maxLines="1"
android:ellipsize="end"
android:gravity="center_vertical"
android:layout_toRightOf="@id/tt_item_num"
android:textColor="@color/text"></TextView>
<TextView
android:id="@+id/tt_item_desc"
android:layout_width="match_parent"
android:layout_height="20dp"
android:textSize="14sp"
android:textStyle="bold"
android:textFontWeight="600"
android:fontFamily="@font/montserrat_medium"
android:text="Óra leírása"
android:maxLines="1"
android:ellipsize="end"
android:gravity="center_vertical"
android:layout_toRightOf="@id/tt_item_num"
android:layout_toLeftOf="@id/tt_item_room"
android:layout_below="@id/tt_item_name"
android:textColor="@color/text_desc"></TextView>
<TextView
android:id="@+id/tt_item_room"
android:layout_width="40dp"
android:layout_height="match_parent"
android:textSize="14sp"
android:textFontWeight="500"
android:fontFamily="@font/montserrat_medium"
android:textStyle="bold"
android:text="56."
android:ellipsize="end"
android:maxLines="2"
android:gravity="center"
android:layout_toLeftOf="@id/tt_item_time"
android:textColor="@color/text_desc"></TextView>
<TextView
android:id="@+id/tt_item_time"
android:layout_width="50dp"
android:layout_height="match_parent"
android:textSize="14sp"
android:textFontWeight="500"
android:fontFamily="@font/montserrat_medium"
android:textStyle="bold"
android:layout_marginLeft="2dp"
android:layout_marginTop="-2dp"
android:text="8:30\n9:10"
android:gravity="center"
android:layout_alignParentRight="true"
android:textColor="@color/white"></TextView>
</RelativeLayout>

View File

@@ -0,0 +1,219 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:layout_margin="@dimen/widget_margin">
<RelativeLayout
android:id="@+id/tt_grid_cont"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#00000000"
android:background="@drawable/card_layout_bg"
android:orientation="vertical">
<TextView
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="Empty"
android:textColor="@color/text"
android:textSize="20sp"
android:textStyle="bold" />
<ListView
android:id="@+id/widget_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/bottom_nav"
android:layout_marginTop="-8dp"
android:background="@drawable/widget_card_bottom_dark"
android:divider="#00000000"
android:paddingTop="5dp"
android:paddingBottom="16dp"
android:scrollbarFadeDuration="150"
android:scrollbarSize="10dp"
android:scrollbarThumbVertical="@drawable/widget_scroll_style" />
<RelativeLayout
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@drawable/widget_card_top_dark">
<ImageView
android:id="@+id/nav_refresh"
android:layout_width="40dp"
android:layout_height="match_parent"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
android:src="@drawable/ic_refresh_cw"
android:layout_toLeftOf="@id/nav_to_left"
android:tint="@color/text_desc"
tools:ignore="UseAppTint"
android:padding="10dp" />
<ImageView
android:id="@+id/nav_to_left"
android:layout_width="50dp"
android:layout_height="match_parent"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
android:src="@drawable/ic_chevron_left"
android:layout_toLeftOf="@id/nav_to_right"
android:tint="@color/text_desc"
tools:ignore="UseAppTint"
android:padding="10dp" />
<ImageView
android:id="@+id/nav_to_right"
android:layout_width="50dp"
android:layout_height="match_parent"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
android:src="@drawable/ic_chevron_right"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:tint="@color/text_desc"
tools:ignore="UseAppTint"
android:padding="10dp" />
<TextView
android:id="@+id/nav_current"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20sp"
android:layout_toLeftOf="@id/nav_refresh"
android:fontFamily="@font/montserrat_medium"
android:gravity="center_vertical"
android:maxLines="1"
android:text="Timetable"
android:textColor="@color/text"
android:textSize="24sp"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:visibility="gone"
android:id="@+id/need_login"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="#ffF4F4F4"
android:background="@drawable/card_layout_bg"
android:orientation="vertical" >
<!--<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:paddingHorizontal="10dp"
android:paddingTop="5dp"
android:src="@drawable/tinta_icon" />-->
<ImageView
android:id="@+id/iv_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:paddingHorizontal="10dp"
android:paddingTop="10dp"
android:src="@drawable/tinta_image" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/iv_1"
android:layout_marginHorizontal="15dp"
android:fontFamily="@font/montserrat_medium"
android:text="A widget használatához, bejelentkezés szükséges."
android:textColor="@color/black"
android:paddingTop="10dp"
android:textSize="17dp"
android:textStyle="bold" />
<Button
android:id="@+id/open_login"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:background="@drawable/btn_shape_login"
android:text="Alkalmazás megnyitása"
android:padding="0dp"
android:layout_margin="10dp"
android:textColor="@color/white"
android:fontFamily="@font/montserrat_medium"
android:textSize="16dp"
android:textStyle="bold"/>
</RelativeLayout>
<RelativeLayout
android:visibility="gone"
android:id="@+id/need_premium"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="#ffF4F4F4"
android:background="@drawable/card_layout_bg"
android:orientation="vertical" >
<!--<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:paddingHorizontal="10dp"
android:paddingTop="5dp"
android:src="@drawable/tinta_icon" />-->
<ImageView
android:id="@+id/iv_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:paddingHorizontal="10dp"
android:paddingTop="10dp"
android:src="@drawable/tinta_image" />
<TextView
android:id="@+id/tw_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/iv_2"
android:layout_marginHorizontal="15dp"
android:fontFamily="@font/montserrat_medium"
android:text="Órák a kezdőképernyőd kényelméből."
android:textColor="@color/black"
android:paddingTop="10dp"
android:textSize="16dp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tw_1"
android:fontFamily="@font/montserrat_medium"
android:text="Támogass Tinta szinten és helyezz egy widgetet a kezdőképernyődre."
android:textColor="@color/black"
android:layout_marginTop="0dp"
android:layout_marginHorizontal="15dp"
android:textSize="14dp" />
<Button
android:id="@+id/buy_premium"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/btn_shape"
android:gravity="center"
android:text="Vigyél oda!"
android:padding="0dp"
android:layout_alignParentBottom="true"
android:layout_margin="10dp"
android:textColor="#ff691A9B"
android:fontFamily="@font/montserrat_medium"
android:textSize="16dp"
android:textStyle="bold"/>
</RelativeLayout>
</RelativeLayout>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Having themes.xml for night-v31 because of the priority order of the resource qualifiers.
-->
<style name="Theme.Android.AppWidgetContainerParent" parent="@android:style/Theme.DeviceDefault.DayNight">
<item name="appWidgetRadius">@android:dimen/system_app_widget_background_radius</item>
<item name="appWidgetInnerRadius">@android:dimen/system_app_widget_inner_radius</item>
</style>
</resources>

View File

@@ -0,0 +1,12 @@
<resources>
<style name="Widget.Android.AppWidget.Container" parent="android:Widget">
<item name="android:padding">?attr/appWidgetPadding</item>
<item name="android:background">@drawable/app_widget_background</item>
</style>
<style name="Widget.Android.AppWidget.InnerView" parent="android:Widget">
<item name="android:padding">?attr/appWidgetPadding</item>
<item name="android:background">@drawable/app_widget_inner_view_background</item>
</style>
</resources>

View File

@@ -0,0 +1,14 @@
<resources>
<style name="Widget.Android.AppWidget.Container" parent="android:Widget">
<item name="android:padding">?attr/appWidgetPadding</item>
<item name="android:background">@drawable/app_widget_background</item>
<item name="android:clipToOutline">true</item>
</style>
<style name="Widget.Android.AppWidget.InnerView" parent="android:Widget">
<item name="android:padding">?attr/appWidgetPadding</item>
<item name="android:background">@drawable/app_widget_inner_view_background</item>
<item name="android:clipToOutline">true</item>
</style>
</resources>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Having themes.xml for v31 variant because @android:dimen/system_app_widget_background_radius
and @android:dimen/system_app_widget_internal_padding requires API level 31
-->
<style name="Theme.Android.AppWidgetContainerParent" parent="@android:style/Theme.DeviceDefault.DayNight">
<item name="appWidgetRadius">@android:dimen/system_app_widget_background_radius</item>
<item name="appWidgetInnerRadius">@android:dimen/system_app_widget_inner_radius</item>
</style>
</resources>

View File

@@ -0,0 +1,7 @@
<resources>
<declare-styleable name="AppWidgetAttrs">
<attr name="appWidgetPadding" format="dimension" />
<attr name="appWidgetInnerRadius" format="dimension" />
<attr name="appWidgetRadius" format="dimension" />
</declare-styleable>
</resources>

View File

@@ -1,4 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#1F5B50</color>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="light_blue_50">#FFE1F5FE</color>
<color name="light_blue_200">#FF81D4FA</color>
<color name="light_blue_600">#FF039BE5</color>
<color name="light_blue_900">#FF01579B</color>
<color name="shadow_light">#ffE8E8E8</color>
<color name="text_light">#000000</color>
<color name="text_desc_light">#B9B9B9</color>
<color name="text_desc_dark_light">#B9B9B9</color>
<color name="text_miss_light">#888C8F</color>
<color name="background_light">#ffF4F9FF</color>
<color name="highlight_light">#ffFFFFFF</color>
<color name="red_light">#ffFF3B30</color>
<color name="light_red_light">#40FF3B30</color>
<color name="orange_light">#ffFF9500</color>
<color name="yellow_light">#ffFFCC00</color>
<color name="light_yellow_light">#40FFD60A</color>
<color name="green_light">#ff34C759</color>
<color name="filc_light">#ff247665</color>
<color name="teal_light">#ff5AC8FA</color>
<color name="blue_light">#ff007AFF</color>
<color name="indigo_light">#ff5856D6</color>
<color name="purple_light">#ffAF52DE</color>
<color name="pink_light">#ffFF2D55</color>
<!-- dark -->
<color name="shadow">#000</color>
<color name="text">#FFFFFFFF</color>
<color name="text_desc">#B9B9B9</color>
<color name="text_miss">#93979A</color>
<color name="text_miss_num">#A1A5A8</color>
<color name="background">#ff000000</color>
<color name="highlight">#ff141516</color>
<color name="red">#ffFF453A</color>
<color name="light_red">#40FF453A</color>
<color name="orange">#ffFF9F0A</color>
<color name="yellow">#ffFFD60A</color>
<color name="light_yellow">#40FFD60A</color>
<color name="green">#ff32D74B</color>
<color name="filc">#ff29826F</color>
<color name="teal">#ff64D2FF</color>
<color name="blue">#ff0A84FF</color>
<color name="indigo">#ff5E5CE6</color>
<color name="purple">#ffBF5AF2</color>
<color name="pink">#ffFF375F</color>
<color name="blue_shade300">#FF64B5F6</color>
<color name="green_shade300">#FF81C784</color>
<color name="lime_shade300">#FFDCE775</color>
<color name="yellow_shade300">#FFFFF176</color>
<color name="orange_shade300">#FFFF8A65</color>
<color name="red_shade300">#FFE57373</color>
<color name="pink_shade300">#FFF06292</color>
<color name="purple_shade300">#FFBA68C8</color>
</resources>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Refer to App Widget Documentation for margin information
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
-->
<dimen name="widget_margin">0dp</dimen>
</resources>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="appwidget_text">Órarend Widget</string>
<string name="add_widget">Add widget</string>
<string name="app_widget_description">Mindig lásd, milyen órád lesz, a kezdőképernyőd kényelméből.</string>
</resources>

View File

@@ -16,4 +16,14 @@
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
<style name="Widget.Android.AppWidget.Container" parent="android:Widget">
<item name="android:id">@android:id/background</item>
<item name="android:background">?android:attr/colorBackground</item>
</style>
<style name="Widget.Android.AppWidget.InnerView" parent="android:Widget">
<item name="android:background">?android:attr/colorBackground</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
</resources>

View File

@@ -0,0 +1,16 @@
<resources>
<style name="Theme.Android.AppWidgetContainerParent" parent="@android:style/Theme.DeviceDefault">
<!-- Radius of the outer bound of widgets to make the rounded corners -->
<item name="appWidgetRadius">16dp</item>
<!--
Radius of the inner view's bound of widgets to make the rounded corners.
It needs to be 8dp or less than the value of appWidgetRadius
-->
<item name="appWidgetInnerRadius">8dp</item>
</style>
<style name="Theme.Android.AppWidgetContainer" parent="Theme.Android.AppWidgetContainerParent">
<!-- Apply padding to avoid the content of the widget colliding with the rounded corners -->
<item name="appWidgetPadding">16dp</item>
</style>
</resources>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/app_widget_description"
android:initialKeyguardLayout="@layout/widget_timetable"
android:initialLayout="@layout/widget_timetable"
android:minWidth="250dp"
android:minHeight="110dp"
android:previewImage="@drawable/timetable_widget_preview"
android:resizeMode="horizontal|vertical"
android:targetCellWidth="2"
android:targetCellHeight="2"
android:updatePeriodMillis="86400000"
android:widgetCategory="home_screen" />

Binary file not shown.

View File

@@ -0,0 +1,3 @@
<svg width="19" height="13" viewBox="0 0 19 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.8333 11.375C16.7042 11.375 17.4088 10.6438 17.4088 9.75L17.4167 1.625C17.4167 0.73125 16.7042 0 15.8333 0H3.16667C2.29583 0 1.58333 0.73125 1.58333 1.625V9.75C1.58333 10.6438 2.29583 11.375 3.16667 11.375H0V13H19V11.375H15.8333ZM3.16667 1.625H15.8333V9.75H3.16667V1.625Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 403 B

View File

@@ -0,0 +1,3 @@
<svg width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.5 0C9.9898 0 8.49438 0.291587 7.09914 0.858113C5.7039 1.42464 4.43615 2.25501 3.36827 3.30181C1.2116 5.41593 0 8.28329 0 11.2731C0 16.2558 3.3005 20.4832 7.866 21.9825C8.441 22.0727 8.625 21.7233 8.625 21.4189V19.5137C5.4395 20.1901 4.761 18.0031 4.761 18.0031C4.232 16.6955 3.4845 16.346 3.4845 16.346C2.438 15.6471 3.565 15.6696 3.565 15.6696C4.715 15.7485 5.3245 16.8307 5.3245 16.8307C6.325 18.5442 8.0155 18.037 8.671 17.7664C8.7745 17.0336 9.0735 16.5376 9.3955 16.2558C6.8425 15.974 4.163 15.0045 4.163 10.7094C4.163 9.45813 4.6 8.45482 5.3475 7.65443C5.2325 7.37261 4.83 6.2002 5.4625 4.67834C5.4625 4.67834 6.4285 4.37396 8.625 5.82819C9.5335 5.58018 10.5225 5.45618 11.5 5.45618C12.4775 5.45618 13.4665 5.58018 14.375 5.82819C16.5715 4.37396 17.5375 4.67834 17.5375 4.67834C18.17 6.2002 17.7675 7.37261 17.6525 7.65443C18.4 8.45482 18.837 9.45813 18.837 10.7094C18.837 15.0158 16.146 15.9627 13.5815 16.2445C13.9955 16.594 14.375 17.2817 14.375 18.3301V21.4189C14.375 21.7233 14.559 22.084 15.1455 21.9825C19.711 20.4719 23 16.2558 23 11.2731C23 9.79269 22.7025 8.32678 22.1246 6.95907C21.5467 5.59135 20.6996 4.34862 19.6317 3.30181C18.5639 2.25501 17.2961 1.42464 15.9009 0.858113C14.5056 0.291587 13.0102 0 11.5 0Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,3 @@
<svg width="16" height="19" viewBox="0 0 16 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.33331 0C0.979692 0 0.64056 0.142984 0.390517 0.397498C0.140473 0.652012 0 0.997206 0 1.35714V19H2.66661V1.35714C2.66661 0.997206 2.52614 0.652012 2.2761 0.397498C2.02605 0.142984 1.68692 0 1.33331 0ZM15.7504 7.50229L3.33327 12.6187V1.63129L15.7504 6.74704C15.8241 6.77749 15.8873 6.82967 15.9318 6.89688C15.9762 6.96409 16 7.04329 16 7.12432C16 7.20536 15.9762 7.28455 15.9318 7.35176C15.8873 7.41897 15.8241 7.47115 15.7504 7.50161V7.50229Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,3 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.61217 0.411889C9.48161 0.281306 9.32661 0.17772 9.15602 0.107047C8.98543 0.0363749 8.80259 0 8.61794 0C8.43329 0 8.25045 0.0363749 8.07986 0.107047C7.90927 0.17772 7.75427 0.281306 7.62372 0.411889L5.96753 2.06861C5.6922 2.34397 5.50939 2.69821 5.44447 3.08217C5.37956 3.46613 5.43576 3.86077 5.60527 4.21134L3.03383 5.49501C2.68443 5.66957 2.37523 5.91499 2.12591 6.21564C1.87658 6.51629 1.69262 6.86558 1.58572 7.24125L0.0392041 12.6857C-0.0109899 12.8626 -0.0130219 13.0497 0.0333182 13.2277C0.0796583 13.4057 0.172689 13.568 0.302791 13.698C0.432894 13.828 0.595347 13.9208 0.773354 13.967C0.951362 14.0131 1.13846 14.0109 1.31532 13.9605L6.75673 12.4115C7.1321 12.3047 7.48112 12.1209 7.78159 11.8718C8.08205 11.6228 8.32738 11.3139 8.50195 10.9648L9.78603 8.39323C10.1367 8.56347 10.5317 8.62033 10.9161 8.55592C11.3006 8.4915 11.6554 8.30901 11.9315 8.03376L13.5881 6.37704C13.7187 6.24648 13.8223 6.09147 13.893 5.92087C13.9636 5.75028 14 5.56743 14 5.38277C14 5.19811 13.9636 5.01526 13.893 4.84466C13.8223 4.67407 13.7187 4.51906 13.5881 4.3885L9.6117 0.411889H9.61217ZM8.28638 1.07458C8.3299 1.031 8.38159 0.996437 8.43848 0.972851C8.49537 0.949266 8.55635 0.937127 8.61794 0.937127C8.67953 0.937127 8.74051 0.949266 8.7974 0.972851C8.85429 0.996437 8.90598 1.031 8.9495 1.07458L12.9259 5.05119C13.0138 5.13908 13.0631 5.25826 13.0631 5.38253C13.0631 5.50681 13.0138 5.62599 12.9259 5.71388L11.2688 7.37107L6.62926 2.73131L8.28638 1.07458ZM6.62972 4.71984L9.27756 7.36779C9.24199 7.40344 9.2124 7.44458 9.18992 7.48965L7.66402 10.5453C7.54772 10.7781 7.38424 10.9841 7.18398 11.1502C6.98373 11.3164 6.75108 11.439 6.50085 11.5103L1.82145 12.8418L4.69798 9.96513C4.99727 10.1077 5.3373 10.14 5.65807 10.0562C5.97883 9.97251 6.25971 9.77815 6.45112 9.50747C6.64253 9.23679 6.73218 8.90719 6.70424 8.57684C6.67629 8.24649 6.53256 7.93663 6.29839 7.70195C6.064 7.46672 5.75392 7.32205 5.42307 7.29357C5.09223 7.26509 4.76198 7.35464 4.49084 7.54635C4.2197 7.73807 4.02516 8.01958 3.9417 8.341C3.85824 8.66242 3.89124 9.00301 4.03485 9.30244L1.15739 12.18L2.48833 7.49714C2.55947 7.24677 2.68196 7.01396 2.84801 6.81353C3.01406 6.6131 3.22003 6.44944 3.4528 6.33298L6.50788 4.80748C6.55297 4.78487 6.59412 4.75512 6.62972 4.71938V4.71984Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,3 @@
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.97258 0H8.02016C7.50351 0.000653543 6.99296 0.11297 6.52264 0.329438C6.05233 0.545906 5.63309 0.861535 5.29297 1.25522C4.95286 1.6489 4.6997 2.11155 4.55043 2.61225C4.40116 3.11294 4.35922 3.64013 4.42742 4.15855L4.48403 5.04316C4.12638 5.10009 3.80265 5.29026 3.57636 5.57636C3.35008 5.86247 3.23758 6.22384 3.26094 6.58958C3.2843 6.95531 3.44183 7.29901 3.70263 7.55324C3.96342 7.80746 4.30864 7.95385 4.67056 7.96369L4.75403 9.25754C4.84634 9.95556 5.1451 10.609 5.61106 11.1319C6.07701 11.6549 6.68836 12.0229 7.36476 12.1876C5.58243 12.5072 3.92957 13.3421 2.60565 14.5916V14.5843C1.42818 15.6953 0.553297 17.0946 0.0653227 18.6473V18.7282C0.0392656 18.8052 0.0174577 18.8837 0 18.9633L2.60347 18.9927L2.60492 19H15.3936L15.3958 18.9927L18 18.9633L17.984 18.9199C17.9565 18.8595 17.9398 18.7945 17.9347 18.7282V18.6473C17.444 17.0959 16.5696 15.6972 15.3944 14.5843V14.5916C14.0712 13.3434 12.4197 12.509 10.6389 12.1891C11.3162 12.025 11.9285 11.6571 12.3952 11.1338C12.8619 10.6105 13.161 9.95634 13.2532 9.25754L13.3323 7.96148C13.6852 7.93871 14.0176 7.78639 14.2674 7.53309C14.5171 7.27979 14.667 6.94293 14.6888 6.58573C14.7107 6.22853 14.603 5.87554 14.3859 5.59302C14.1689 5.31049 13.8575 5.11785 13.5102 5.05124L13.5653 4.15855C13.6336 3.64011 13.5918 3.11287 13.4426 2.61213C13.2933 2.11138 13.0402 1.64867 12.7001 1.25497C12.3599 0.861257 11.9406 0.545628 11.4703 0.3292C10.9999 0.112771 10.4893 0.00053424 9.97258 0Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@@ -0,0 +1,3 @@
<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.16667 0C2.75081 0 2.33903 0.0819083 1.95484 0.241048C1.57064 0.400188 1.22155 0.633443 0.927495 0.927495C0.33363 1.52136 0 2.32681 0 3.16667V15.8333C0 16.6732 0.33363 17.4786 0.927495 18.0725C1.22155 18.3666 1.57064 18.5998 1.95484 18.759C2.33903 18.9181 2.75081 19 3.16667 19H15.8333C16.6732 19 17.4786 18.6664 18.0725 18.0725C18.6664 17.4786 19 16.6732 19 15.8333V3.16667C19 2.75081 18.9181 2.33903 18.759 1.95484C18.5998 1.57064 18.3666 1.22155 18.0725 0.927495C17.7785 0.633443 17.4294 0.400188 17.0452 0.241048C16.661 0.0819083 16.2492 0 15.8333 0H3.16667ZM1.26667 3.16667C1.26667 2.66276 1.46684 2.17948 1.82316 1.82316C2.17948 1.46684 2.66276 1.26667 3.16667 1.26667H15.8333C16.7371 1.26667 17.4927 1.89747 17.6858 2.74233L8.84767 11.6071C8.78933 11.6658 8.71034 11.6993 8.62761 11.7005C8.54487 11.7017 8.46496 11.6704 8.40497 11.6134L7.04457 10.3214C6.78224 10.0725 6.43338 9.93524 6.07172 9.93878C5.71007 9.94233 5.36396 10.0864 5.10657 10.3404L1.26667 14.1297V3.16667ZM1.26793 15.8979L5.84947 11.3582C5.90766 11.3005 5.98598 11.2675 6.06796 11.2663C6.14993 11.2652 6.22917 11.2958 6.289 11.3519L7.65067 12.6299C7.91356 12.8766 8.2618 13.0117 8.62224 13.007C8.98268 13.0023 9.32726 12.858 9.5836 12.6046L17.7333 4.5448V15.8333C17.7333 16.3372 17.5332 16.8205 17.1768 17.1768C16.8205 17.5332 16.3372 17.7333 15.8333 17.7333H3.16667C2.67397 17.7333 2.20056 17.5419 1.84631 17.1994C1.49206 16.857 1.28469 16.3903 1.26793 15.8979Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,3 @@
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.2777 0.748963C18.8178 0.280979 18.1938 0.0123079 17.5392 0.000412436C16.8846 -0.011483 16.2513 0.234342 15.7749 0.68531L6.27841 9.67238L6.26855 9.67097L4.76926 11.1562C4.65745 11.2668 4.56485 11.3954 4.49532 11.5367C3.90325 11.5167 3.32013 11.6859 2.82983 12.0198C2.30986 12.3226 1.87751 12.7564 1.57544 13.2783C1.27337 13.8002 1.11201 14.3922 1.1073 14.9959C1.11849 15.2442 1.0807 15.4924 0.996102 15.726C0.911504 15.9597 0.781767 16.1742 0.614346 16.3573L0.0587138 16.88L0.0171647 17.1092C-0.0290688 17.3612 0.0188538 17.6216 0.151766 17.8404C0.284678 18.0592 0.49325 18.2212 0.737585 18.2952L2.55378 18.849L2.90589 18.9197C3.76665 19.0771 4.6536 19.0022 5.47605 18.7024C6.29849 18.4027 7.02692 17.889 7.58686 17.2138C7.99108 16.7301 8.22066 16.1254 8.24179 15.498C8.41784 15.4308 8.58404 15.3255 8.7277 15.184L9.28967 14.6267L9.30023 14.6479L19.2953 4.26755C19.7503 3.795 20.0033 3.1624 20 2.50501C19.9967 1.84762 19.7374 1.2169 19.2777 0.748963ZM8.99037 12.9349L7.01151 10.9221L16.7411 1.71436C16.9499 1.51759 17.227 1.41053 17.5132 1.41602C17.7995 1.42151 18.0723 1.53911 18.2735 1.74374C18.4747 1.94836 18.5883 2.22383 18.5901 2.5114C18.592 2.79896 18.4819 3.07586 18.2833 3.28305L8.99037 12.9349ZM3.15941 17.5293L2.92701 17.4861L1.81152 17.1466C2.24317 16.5719 2.48631 15.8767 2.5073 15.1571C2.48871 14.7622 2.58091 14.37 2.77339 14.0252C2.96587 13.6803 3.2509 13.3967 3.59603 13.2065C3.86776 13.0169 4.19727 12.9295 4.52679 12.9595C4.8563 12.9895 5.16478 13.135 5.39813 13.3706L6.42207 14.4025C6.66996 14.6525 6.81583 14.9866 6.83108 15.3391C6.84632 15.6916 6.72983 16.0371 6.50447 16.3078C6.10445 16.7906 5.58401 17.158 4.99631 17.3726C4.40861 17.5872 3.77472 17.6413 3.15941 17.5293Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,5 @@
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.58619 1.96552V0.854345C4.58619 0.38131 4.95178 0 5.40516 0C5.85854 0 6.22412 0.38131 6.22412 0.854345V1.96552H4.58619ZM12.7758 11.269C12.7758 11.1473 12.8242 11.0307 12.9102 10.9447C12.9962 10.8587 13.1128 10.8103 13.2345 10.8103H14.9379C15.0595 10.8103 15.1762 10.8587 15.2622 10.9447C15.3482 11.0307 15.3965 11.1473 15.3965 11.269V12.9724C15.3965 13.094 15.3482 13.2107 15.2622 13.2967C15.1762 13.3827 15.0595 13.431 14.9379 13.431H13.2345C13.1128 13.431 12.9962 13.3827 12.9102 13.2967C12.8242 13.2107 12.7758 13.094 12.7758 12.9724V11.269ZM4.25861 7.9931C4.25861 7.87147 4.30692 7.75482 4.39293 7.66881C4.47894 7.5828 4.59559 7.53448 4.71723 7.53448H6.42068C6.54231 7.53448 6.65896 7.5828 6.74497 7.66881C6.83098 7.75482 6.8793 7.87147 6.8793 7.9931V9.69655C6.8793 9.81818 6.83098 9.93484 6.74497 10.0208C6.65896 10.1069 6.54231 10.1552 6.42068 10.1552H4.71723C4.59559 10.1552 4.47894 10.1069 4.39293 10.0208C4.30692 9.93484 4.25861 9.81818 4.25861 9.69655V7.9931ZM4.91378 8.18966V9.5H6.22412V8.18966H4.91378ZM8.51723 7.9931C8.51723 7.87147 8.56555 7.75482 8.65155 7.66881C8.73756 7.5828 8.85421 7.53448 8.97585 7.53448H10.6793C10.8009 7.53448 10.9176 7.5828 11.0036 7.66881C11.0896 7.75482 11.1379 7.87147 11.1379 7.9931V9.69655C11.1379 9.81818 11.0896 9.93484 11.0036 10.0208C10.9176 10.1069 10.8009 10.1552 10.6793 10.1552H8.97585C8.85421 10.1552 8.73756 10.1069 8.65155 10.0208C8.56555 9.93484 8.51723 9.81818 8.51723 9.69655V7.9931ZM9.1724 8.18966V9.5H10.4827V8.18966H9.1724ZM12.7758 7.9931C12.7758 7.87147 12.8242 7.75482 12.9102 7.66881C12.9962 7.5828 13.1128 7.53448 13.2345 7.53448H14.9379C15.0595 7.53448 15.1762 7.5828 15.2622 7.66881C15.3482 7.75482 15.3965 7.87147 15.3965 7.9931V9.69655C15.3965 9.81818 15.3482 9.93484 15.2622 10.0208C15.1762 10.1069 15.0595 10.1552 14.9379 10.1552H13.2345C13.1128 10.1552 12.9962 10.1069 12.9102 10.0208C12.8242 9.93484 12.7758 9.81818 12.7758 9.69655V7.9931ZM13.431 8.18966V9.5H14.7414V8.18966H13.431ZM4.25861 11.269C4.25861 11.1473 4.30692 11.0307 4.39293 10.9447C4.47894 10.8587 4.59559 10.8103 4.71723 10.8103H6.42068C6.54231 10.8103 6.65896 10.8587 6.74497 10.9447C6.83098 11.0307 6.8793 11.1473 6.8793 11.269V12.9724C6.8793 13.094 6.83098 13.2107 6.74497 13.2967C6.65896 13.3827 6.54231 13.431 6.42068 13.431H4.71723C4.59559 13.431 4.47894 13.3827 4.39293 13.2967C4.30692 13.2107 4.25861 13.094 4.25861 12.9724V11.269ZM4.91378 11.4655V12.7759H6.22412V11.4655H4.91378ZM8.51723 11.269C8.51723 11.1473 8.56555 11.0307 8.65155 10.9447C8.73756 10.8587 8.85421 10.8103 8.97585 10.8103H10.6793C10.8009 10.8103 10.9176 10.8587 11.0036 10.9447C11.0896 11.0307 11.1379 11.1473 11.1379 11.269V12.9724C11.1379 13.094 11.0896 13.2107 11.0036 13.2967C10.9176 13.3827 10.8009 13.431 10.6793 13.431H8.97585C8.85421 13.431 8.73756 13.3827 8.65155 13.2967C8.56555 13.2107 8.51723 13.094 8.51723 12.9724V11.269ZM9.1724 11.4655V12.7759H10.4827V11.4655H9.1724ZM4.25861 14.5448C4.25861 14.4232 4.30692 14.3065 4.39293 14.2205C4.47894 14.1345 4.59559 14.0862 4.71723 14.0862H6.42068C6.54231 14.0862 6.65896 14.1345 6.74497 14.2205C6.83098 14.3065 6.8793 14.4232 6.8793 14.5448V16.2483C6.8793 16.3699 6.83098 16.4866 6.74497 16.5726C6.65896 16.6586 6.54231 16.7069 6.42068 16.7069H4.71723C4.59559 16.7069 4.47894 16.6586 4.39293 16.5726C4.30692 16.4866 4.25861 16.3699 4.25861 16.2483V14.5448ZM4.91378 14.7414V16.0517H6.22412V14.7414H4.91378ZM8.51723 14.5448C8.51723 14.4232 8.56555 14.3065 8.65155 14.2205C8.73756 14.1345 8.85421 14.0862 8.97585 14.0862H10.6793C10.8009 14.0862 10.9176 14.1345 11.0036 14.2205C11.0896 14.3065 11.1379 14.4232 11.1379 14.5448V16.2483C11.1379 16.3699 11.0896 16.4866 11.0036 16.5726C10.9176 16.6586 10.8009 16.7069 10.6793 16.7069H8.97585C8.85421 16.7069 8.73756 16.6586 8.65155 16.5726C8.56555 16.4866 8.51723 16.3699 8.51723 16.2483V14.5448ZM9.1724 14.7414V16.0517H10.4827V14.7414H9.1724Z" fill="white"/>
<path d="M4.58621 3.07672C4.58621 3.54975 4.95179 3.93106 5.40517 3.93106C5.85855 3.93106 6.22414 3.54975 6.22414 3.07672V1.96554H13.431V3.07672C13.431 3.54975 13.7966 3.93106 14.25 3.93106C14.7034 3.93106 15.069 3.54975 15.069 3.07672V1.96554H17.1924C18.5486 1.96554 19.6552 3.07344 19.6552 4.44537V15.8814C19.6552 17.598 18.2629 19 16.5372 19H3.11862C2.29194 18.9986 1.49951 18.6696 0.914954 18.0851C0.330399 17.5005 0.00138589 16.7081 0 15.8814V4.44537C0 3.07344 1.10724 1.95899 2.46279 1.96554H4.58621V3.07672ZM1.31034 5.89658V15.8814C1.31173 16.3605 1.5026 16.8195 1.84127 17.1583C2.17995 17.4971 2.63892 17.6881 3.11797 17.6897H14.0928V16.7069H13.2345C13.1128 16.7069 12.9962 16.6586 12.9102 16.5726C12.8242 16.4866 12.7759 16.3699 12.7759 16.2483V14.5449C12.7759 14.4232 12.8242 14.3066 12.9102 14.2206C12.9962 14.1346 13.1128 14.0862 13.2345 14.0862H14.9379C14.9823 14.0862 15.0264 14.0926 15.069 14.1052C15.5735 13.6702 16.2176 13.4309 16.8838 13.4311H18.3448V5.89658H1.31034ZM14.1 16.017C14.1331 15.5639 14.2771 15.1258 14.5193 14.7414H13.431V16.0518H14.098L14.1 16.017ZM14.7479 17.5541L18.2158 14.0862H16.8838C16.3179 14.088 15.7756 14.3135 15.3754 14.7137C14.9752 15.1139 14.7497 15.6562 14.7479 16.2221V17.5541Z" fill="white"/>
<path d="M13.431 0.854345V1.96552H15.069V0.854345C15.069 0.38131 14.7034 0 14.25 0C13.7966 0 13.431 0.38131 13.431 0.854345Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -0,0 +1,3 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.63347 1.46773e-08C4.17718 1.46773e-08 2.15934 1.9315 1.9387 4.3981C1.66876 4.46542 1.43013 4.6275 1.26399 4.85636C1.09784 5.08522 1.01461 5.36652 1.02863 5.65173C1.04265 5.93694 1.15306 6.20817 1.34081 6.41864C1.52855 6.62911 1.78186 6.76561 2.05704 6.8046C2.099 6.97812 2.14991 7.14776 2.20932 7.31353L2.18622 7.30965C2.06688 7.28651 1.94628 7.27097 1.82508 7.26312H1.80057C1.49035 7.27282 1.31025 7.5234 1.25273 7.72988C1.19144 7.94993 1.22916 8.18792 1.32062 8.41621L1.35834 8.51024L0.640782 8.70217L0.637482 8.70314C0.400811 8.76809 0.0575906 8.92126 0.0057304 9.32016C-0.0140708 9.47187 0.0222314 9.60128 0.0420326 9.66381C0.0514617 9.69483 0.0627766 9.72536 0.0703199 9.7462L0.0722057 9.75153L0.0882353 9.79855C0.166497 10.0603 0.331035 10.3206 0.519618 10.5489C0.897617 11.0007 1.36672 11.3626 1.89439 11.6094L1.64357 11.8372C1.5589 11.9114 1.4921 12.0048 1.44839 12.11C1.39862 12.2346 1.38969 12.3724 1.42293 12.5027C1.44839 12.6054 1.49506 12.6868 1.52335 12.7338C1.54456 12.7687 1.57191 12.8099 1.59265 12.841L1.60963 12.8662C1.78642 13.1347 2.09805 13.3901 2.46155 13.5855C2.83447 13.7866 3.30074 13.9451 3.81934 13.9882C4.816 14.0716 5.96164 13.7241 6.96066 12.5419C7.96014 13.7246 9.10578 14.0716 10.102 13.9882C10.5761 13.9484 11.0377 13.8116 11.4598 13.5859C11.8233 13.3901 12.1349 13.1347 12.3117 12.8662L12.3287 12.841C12.3494 12.8099 12.3772 12.7683 12.398 12.7338C12.4428 12.6625 12.4766 12.5845 12.4984 12.5027C12.5316 12.3724 12.5227 12.2346 12.4729 12.11C12.4293 12.0051 12.3627 11.9118 12.2782 11.8377L12.0529 11.6326C12.6017 11.386 13.0896 11.0156 13.4804 10.5489C13.669 10.3206 13.8335 10.0603 13.9118 9.79855L13.9278 9.75153L13.9297 9.7462C13.9373 9.72536 13.9481 9.69483 13.958 9.66381C13.9773 9.60079 14.0141 9.47187 13.9943 9.32016C13.9425 8.92126 13.5992 8.76809 13.3626 8.70314L13.3593 8.70217L12.6412 8.51024L12.679 8.41621C12.7704 8.1884 12.8086 7.94993 12.7473 7.72988C12.6898 7.5234 12.5092 7.27282 12.199 7.26312H12.1754C12.0584 7.27055 11.9418 7.28544 11.8266 7.30771C11.8893 7.13128 11.9425 6.95001 11.9859 6.76486C12.2221 6.69215 12.4306 6.54602 12.5828 6.34656C12.735 6.14709 12.8233 5.90408 12.8357 5.6509C12.8481 5.39773 12.784 5.14681 12.6521 4.93264C12.5202 4.71847 12.327 4.55155 12.0991 4.45481C12.0032 3.24113 11.4666 2.10899 10.5958 1.28357C9.72506 0.45814 8.584 -9.46918e-05 7.39958 1.46773e-08H6.63347ZM11.1538 4.46984C10.9539 4.56225 10.7825 4.70948 10.6586 4.89538C10.5347 5.08128 10.4629 5.29868 10.4513 5.52373C10.4396 5.74877 10.4884 5.97279 10.5923 6.1712C10.6963 6.36961 10.8514 6.53476 11.0406 6.64853C10.8238 7.47062 10.3497 8.19645 9.69163 8.71399C9.03357 9.23153 8.22811 9.512 7.39958 9.5121H6.63347C5.78749 9.51203 4.96607 9.21968 4.30113 8.68199C3.63619 8.1443 3.16631 7.39247 2.96695 6.54723C3.11456 6.42609 3.23205 6.27062 3.30974 6.09363C3.38744 5.91665 3.4231 5.72321 3.4138 5.52927C3.4045 5.33533 3.3505 5.14644 3.25625 4.97817C3.162 4.8099 3.0302 4.66707 2.87171 4.56144C2.94183 3.58507 3.3686 2.67211 4.06635 2.00583C4.7641 1.33956 5.68117 0.969298 6.63347 0.969386H7.39958C8.33646 0.969275 9.23984 1.32765 9.93382 1.97471C10.6278 2.62178 11.0627 3.51122 11.1538 4.46984ZM10.7799 9.01335L12.9755 9.60128C12.935 9.68513 12.8661 9.79516 12.7615 9.92118C12.62 10.0928 12.4343 10.2702 12.224 10.4253C11.8718 10.6851 11.5107 10.8421 11.2113 10.8697C10.7876 10.485 10.3623 10.1021 9.93555 9.721C10.2425 9.51928 10.5259 9.28183 10.7799 9.01335ZM9.06665 10.1698C9.09494 10.2357 9.13784 10.2963 9.19536 10.3458C9.45466 10.5692 10.7201 11.716 11.4706 12.3975C11.3857 12.4896 11.2377 12.6107 11.0227 12.7271C10.7127 12.8925 10.3737 12.9928 10.0256 13.0222C9.28729 13.0838 8.36324 12.8293 7.51273 11.7058L7.5099 11.7024C7.4802 11.6636 7.41467 11.5764 7.32509 11.5105C7.21945 11.4319 7.09092 11.3925 6.96066 11.399C6.83039 11.3925 6.70186 11.4319 6.59622 11.5105C6.50664 11.5764 6.44064 11.6636 6.41141 11.7024L6.40905 11.7058C5.55807 12.8293 4.63402 13.0838 3.89619 13.0222C3.54787 12.9927 3.20875 12.8922 2.89859 12.7266C2.6836 12.6112 2.53557 12.4891 2.4507 12.3975L3.07303 11.8328C3.09377 11.8304 3.11499 11.828 3.13573 11.8246L3.1296 11.7809C3.65861 11.2991 4.19074 10.8208 4.72595 10.3463C4.7922 10.2895 4.84195 10.215 4.86975 10.131C5.43028 10.3633 6.02912 10.4823 6.63347 10.4815H7.39958C7.96904 10.4822 8.53389 10.3766 9.06665 10.1698ZM4.03338 9.67835C3.78775 9.895 3.25265 10.3778 2.71896 10.861C2.43373 10.8179 2.10041 10.6657 1.77511 10.4248C1.57712 10.2796 1.39669 10.1108 1.23765 9.92166C1.15436 9.82394 1.08267 9.71639 1.02408 9.60128L3.24605 9.00559C3.48319 9.25763 3.74721 9.4835 4.03338 9.67786V9.67835ZM2.31822 12.2123L2.31917 12.2147C2.31883 12.2139 2.31852 12.2131 2.31822 12.2123ZM11.6021 12.2123L11.6012 12.2147C11.6015 12.2139 11.6019 12.2131 11.6021 12.2123Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.65 11.3L8 5.65L13.65 0L19.3 5.65L13.65 11.3ZM0 9.3V1.3H8V9.3H0ZM10 19.3V11.3H18V19.3H10ZM0 19.3V11.3H8V19.3H0Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 243 B

View File

@@ -1,4 +1,6 @@
PODS:
- app_group_directory (1.0.0):
- Flutter
- connectivity_plus (0.0.1):
- Flutter
- ReachabilitySwift
@@ -39,13 +41,36 @@ PODS:
- Flutter (1.0.0)
- flutter_custom_tabs (0.0.1):
- Flutter
- flutter_image_compress (1.0.0):
- Flutter
- Mantle
- SDWebImage
- SDWebImageWebPCoder
- flutter_native_image (0.0.1):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- home_widget (0.0.1):
- Flutter
- image_crop (0.0.1):
- Flutter
- image_picker_ios (0.0.1):
- Flutter
- libwebp (1.2.4):
- libwebp/demux (= 1.2.4)
- libwebp/mux (= 1.2.4)
- libwebp/webp (= 1.2.4)
- libwebp/demux (1.2.4):
- libwebp/webp
- libwebp/mux (1.2.4):
- libwebp/demux
- libwebp/webp (1.2.4)
- live_activities (0.0.1):
- Flutter
- Mantle (2.2.0):
- Mantle/extobjc (= 2.2.0)
- Mantle/extobjc (2.2.0)
- open_file (0.0.1):
- Flutter
- path_provider_ios (0.0.1):
@@ -58,6 +83,9 @@ PODS:
- SDWebImage (5.13.2):
- SDWebImage/Core (= 5.13.2)
- SDWebImage/Core (5.13.2)
- SDWebImageWebPCoder (0.9.1):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.13)
- share_plus (0.0.1):
- Flutter
- sqflite (0.0.2):
@@ -72,12 +100,17 @@ PODS:
- Flutter
DEPENDENCIES:
- app_group_directory (from `.symlinks/plugins/app_group_directory/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- DKImagePickerController/PhotoGallery (from `https://github.com/zhangao0086/DKImagePickerController.git`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- flutter_custom_tabs (from `.symlinks/plugins/flutter_custom_tabs/ios`)
- flutter_image_compress (from `.symlinks/plugins/flutter_image_compress/ios`)
- flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`)
- home_widget (from `.symlinks/plugins/home_widget/ios`)
- image_crop (from `.symlinks/plugins/image_crop/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- live_activities (from `.symlinks/plugins/live_activities/ios`)
- open_file (from `.symlinks/plugins/open_file/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
@@ -93,11 +126,16 @@ SPEC REPOS:
trunk:
- DKPhotoGallery
- FMDB
- libwebp
- Mantle
- ReachabilitySwift
- SDWebImage
- SDWebImageWebPCoder
- SwiftyGif
EXTERNAL SOURCES:
app_group_directory:
:path: ".symlinks/plugins/app_group_directory/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
DKImagePickerController:
@@ -108,8 +146,16 @@ EXTERNAL SOURCES:
:path: Flutter
flutter_custom_tabs:
:path: ".symlinks/plugins/flutter_custom_tabs/ios"
flutter_image_compress:
:path: ".symlinks/plugins/flutter_image_compress/ios"
flutter_native_image:
:path: ".symlinks/plugins/flutter_native_image/ios"
home_widget:
:path: ".symlinks/plugins/home_widget/ios"
image_crop:
:path: ".symlinks/plugins/image_crop/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
live_activities:
:path: ".symlinks/plugins/live_activities/ios"
open_file:
@@ -137,21 +183,29 @@ CHECKOUT OPTIONS:
:git: https://github.com/zhangao0086/DKImagePickerController.git
SPEC CHECKSUMS:
app_group_directory: 7bf9f8f9819ead554de29da7c25fb7a680d6a9a0
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_custom_tabs: 7a10a08686955cb748e5d26e0ae586d30689bf89
flutter_image_compress: 5a5e9aee05b6553048b8df1c3bc456d0afaac433
flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
home_widget: 2829415127ee92e876f816cbbe44c0b6601b8a37
image_crop: e0a67085d3ebf3cf46ca46d61c53a082507b0bc3
image_picker_ios: 58b9c4269cb176f89acea5e5d043c9358f2d25f8
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
live_activities: 9ff56a06a2d43ecd68f56deeed13b18a8304789c
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
quick_actions_ios: 56c03753992beabaa6c598e470e12d430d6e5e2f
quick_actions_ios: d211ffc5d7619ace7e9fb1800540b14a1aafe940
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866
SDWebImageWebPCoder: 18503de6621dd2c420d680e33d46bf8e1d5169b0
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780

View File

@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@@ -71,6 +71,7 @@
3127F7A328EAEE3D00C2EFB3 /* livecard.intentdefinition */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.intentdefinition; path = livecard.intentdefinition; sourceTree = "<group>"; };
3127F7A528EAEE5900C2EFB3 /* livecard.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = livecard.swift; sourceTree = "<group>"; tabWidth = 2; };
3127F7A728EAEE8500C2EFB3 /* lesson_model.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = lesson_model.swift; sourceTree = "<group>"; };
317DE77A294F6FFB002E323E /* livecard.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = livecard.entitlements; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
707F8089D970F81C480F73C4 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
@@ -111,6 +112,7 @@
3127F78F28EAEDE200C2EFB3 /* livecard */ = {
isa = PBXGroup;
children = (
317DE77A294F6FFB002E323E /* livecard.entitlements */,
3127F7A728EAEE8500C2EFB3 /* lesson_model.swift */,
3127F7A328EAEE3D00C2EFB3 /* livecard.intentdefinition */,
3127F79728EAEDE300C2EFB3 /* Assets.xcassets */,
@@ -296,6 +298,7 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -349,6 +352,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -498,6 +502,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
@@ -539,6 +544,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
@@ -578,6 +584,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;

View File

@@ -56,5 +56,7 @@
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>

View File

@@ -8,5 +8,9 @@
<array>
<string>applinks:api.filcnaplo.hu</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.filcnaplo.livecard</string>
</array>
</dict>
</plist>

View File

@@ -7,5 +7,7 @@
<key>NSExtensionPointIdentifier</key>
<string>com.apple.widgetkit-extension</string>
</dict>
<key>NSSupportsLiveActivities</key>
<true/>
</dict>
</plist>

View File

@@ -12,16 +12,18 @@ class LessonData {
var nextSubject: String
var nextRoom: String
init?(JSONData data:[String: String]) {
self.icon = data["icon"]!
self.index = data["index"]!
self.title = data["title"]!
self.subtitle = data["subtitle"]!
self.description = data["description"]!
self.startDate = Date(timeIntervalSince1970: Double(data["startDate"]!)! / 1000)
self.endDate = Date(timeIntervalSince1970: Double(data["endDate"]!)! / 1000)
init?() {
let sharedDefault = UserDefaults(suiteName: "group.filcnaplo.livecard")!
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 = data["nextSubject"]!
self.nextRoom = data["nextRoom"]!
self.nextSubject = sharedDefault.string(forKey: "nextSubject")!
self.nextRoom = sharedDefault.string(forKey: "nextRoom")!
}
}

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.filcnaplo.livecard</string>
</array>
</dict>
</plist>

View File

@@ -13,11 +13,7 @@ struct Widgets: WidgetBundle {
// We need to redefined live activities pipe
struct LiveActivitiesAppAttributes: ActivityAttributes, Identifiable {
public typealias LiveDeliveryData = ContentState
public struct ContentState: Codable, Hashable {
var data: Dictionary<String, String>
}
public struct ContentState: Codable, Hashable { }
var id = UUID()
}
@@ -27,7 +23,7 @@ struct LiveCardWidget: Widget {
var body: some WidgetConfiguration {
/// Live Activity Notification
ActivityConfiguration(for: LiveActivitiesAppAttributes.self) { context in
let lesson = LessonData(JSONData: context.state.data)
let lesson = LessonData()
HStack(alignment: .center) {
Image(systemName: lesson!.icon)
@@ -66,7 +62,7 @@ struct LiveCardWidget: Widget {
}.padding(12)
/// Dynamic Island
} dynamicIsland: { context in
let lesson = LessonData(JSONData: context.state.data)
let lesson = LessonData()
/// Expanded
return DynamicIsland {

View File

@@ -1,5 +1,3 @@
// ignore_for_file: avoid_print
import 'dart:convert';
import 'dart:developer';
@@ -16,13 +14,13 @@ class FilcAPI {
// Public API
static const schoolList = "https://filcnaplo.hu/v2/school_list.json";
static const news = "https://filcnaplo.hu/v2/news.json";
static const supporters = "https://filcnaplo.hu/v2/supporters.json";
static const supporters = "https://api.filcnaplo.hu/sponsors";
// Private API
static const config = "https://api.filcnaplo.hu/config";
static const reportApi = "https://api.filcnaplo.hu/report";
static const premiumApi = "https://api.filcnaplo.hu/premium/activate";
static const premiumScopesApi = "https://api.filcnaplo.hu/premium/scopes";
// static const premiumScopesApi = "https://api.filcnaplo.hu/premium/scopes";
// Updates
static const repo = "filc/naplo";
@@ -45,8 +43,8 @@ class FilcAPI {
} else {
throw "HTTP ${res.statusCode}: ${res.body}";
}
} catch (error) {
print("ERROR: FilcAPI.getSchools: $error");
} on Exception catch (error, stacktrace) {
log("ERROR: FilcAPI.getSchools: $error $stacktrace");
}
return null;
}
@@ -72,8 +70,8 @@ class FilcAPI {
if (res.statusCode == 200) return Config.fromJson(jsonDecode(res.body));
}
throw "HTTP ${res.statusCode}: ${res.body}";
} catch (error) {
print("ERROR: FilcAPI.getConfig: $error");
} on Exception catch (error, stacktrace) {
log("ERROR: FilcAPI.getConfig: $error $stacktrace");
}
return null;
}
@@ -87,8 +85,8 @@ class FilcAPI {
} else {
throw "HTTP ${res.statusCode}: ${res.body}";
}
} catch (error) {
print("ERROR: FilcAPI.getNews: $error");
} on Exception catch (error, stacktrace) {
log("ERROR: FilcAPI.getNews: $error $stacktrace");
}
return null;
}
@@ -102,8 +100,8 @@ class FilcAPI {
} else {
throw "HTTP ${res.statusCode}: ${res.body}";
}
} catch (error) {
print("ERROR: FilcAPI.getSupporters: $error");
} on Exception catch (error, stacktrace) {
log("ERROR: FilcAPI.getSupporters: $error $stacktrace");
}
return null;
}
@@ -117,8 +115,8 @@ class FilcAPI {
} else {
throw "HTTP ${res.statusCode}: ${res.body}";
}
} catch (error) {
print("ERROR: FilcAPI.getReleases: $error");
} on Exception catch (error, stacktrace) {
log("ERROR: FilcAPI.getReleases: $error $stacktrace");
}
return null;
}
@@ -128,8 +126,8 @@ class FilcAPI {
var client = http.Client();
var request = http.Request('GET', Uri.parse(release.url));
return client.send(request);
} catch (error) {
print("ERROR: FilcAPI.downloadRelease: $error");
} on Exception catch (error, stacktrace) {
log("ERROR: FilcAPI.downloadRelease: $error $stacktrace");
return Future.value(null);
}
}
@@ -146,8 +144,8 @@ class FilcAPI {
if (res.statusCode != 200) {
throw "HTTP ${res.statusCode}: ${res.body}";
}
} catch (error) {
print("ERROR: FilcAPI.sendReport: $error");
} on Exception catch (error, stacktrace) {
log("ERROR: FilcAPI.sendReport: $error $stacktrace");
}
}
}

View File

@@ -11,6 +11,7 @@ import 'package:filcnaplo/utils/format.dart';
import 'package:filcnaplo_kreta_api/providers/timetable_provider.dart';
import 'package:flutter/widgets.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 }
@@ -36,9 +37,10 @@ class LiveCardProvider extends ChangeNotifier {
required SettingsProvider settings,
}) : _timetable = timetable,
_settings = settings {
_liveActivitiesPlugin.init(appGroupId: "group.filcnaplo.livecard");
_timer = Timer.periodic(const Duration(seconds: 1), (timer) => update());
timetable.restore().then((_) => update());
_delay = settings.bellDelayEnabled ? Duration(seconds: settings.bellDelay) : Duration.zero;
update();
}
@override
@@ -96,7 +98,7 @@ class LiveCardProvider extends ChangeNotifier {
return {
"icon": iconFloorMap[diff] ?? "cup.and.saucer",
"title": "Szünet",
"description": "Maradj ebben a teremben.",
"description": 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 ? ShortSubject.resolve(subject: nextLesson?.subject) : "",
@@ -115,7 +117,7 @@ class LiveCardProvider extends ChangeNotifier {
if (cmap != _lastActivity) {
_lastActivity = cmap;
if (_lastActivity != {}) {
if (_lastActivity.isNotEmpty) {
if (_latestActivityId == null) {
_liveActivitiesPlugin.createActivity(_lastActivity).then((value) => _latestActivityId = value);
} else {
@@ -195,5 +197,5 @@ class LiveCardProvider extends ChangeNotifier {
bool _sameDate(DateTime a, DateTime b) => (a.year == b.year && a.month == b.month && a.day == b.day);
List<Lesson> _today(TimetableProvider p) => p.lessons.where((l) => _sameDate(l.date, _now())).toList();
List<Lesson> _today(TimetableProvider p) => (p.getWeek(Week.current()) ?? []).where((l) => _sameDate(l.date, _now())).toList();
}

View File

@@ -1,5 +1,7 @@
// 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';
@@ -15,8 +17,10 @@ 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;
@@ -65,7 +69,20 @@ Future<void> syncAll(BuildContext context) {
}()),
];
return Future.wait(tasks)
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
.then((value) => lock = false);
lock = false;
// Update Widget
if (Platform.isAndroid) updateWidget();
});
}

View File

@@ -1,7 +1,11 @@
import 'dart:io';
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo/models/user.dart';
import 'package:filcnaplo_kreta_api/models/student.dart';
import 'package:flutter/foundation.dart';
import 'package:home_widget/home_widget.dart';
import 'package:flutter/services.dart';
class UserProvider with ChangeNotifier {
final Map<String, User> _users = {};
@@ -17,18 +21,31 @@ class UserProvider with ChangeNotifier {
Role? get role => user?.role;
Student? get student => user?.student;
String? get nickname => user?.nickname;
String get picture => user?.picture ?? "";
String? get displayName => user?.displayName;
final SettingsProvider _settings;
UserProvider({required SettingsProvider settings}) : _settings = settings;
void setUser(String userId) {
void setUser(String userId) async {
_selectedUserId = userId;
_settings.update(lastAccountId: userId);
await _settings.update(lastAccountId: userId);
if (Platform.isAndroid) updateWidget();
notifyListeners();
}
Future<bool?> updateWidget() async {
try {
return HomeWidget.updateWidget(name: 'widget_timetable.WidgetTimetable');
} on PlatformException catch (exception) {
if (kDebugMode) {
print('Error Updating Widget After setUser. $exception');
}
}
return false;
}
void addUser(User user) {
_users[user.id] = user;
if (kDebugMode) {
@@ -36,9 +53,14 @@ class UserProvider with ChangeNotifier {
}
}
void removeUser(String userId) {
void removeUser(String userId) async {
_users.removeWhere((key, value) => key == userId);
if (_users.isNotEmpty) _selectedUserId = _users.keys.first;
if (_users.isNotEmpty) {
setUser(_users.keys.first);
} else {
await _settings.update(lastAccountId: "");
}
if (Platform.isAndroid) updateWidget();
notifyListeners();
}
@@ -49,4 +71,8 @@ class UserProvider with ChangeNotifier {
List<User> getUsers() {
return _users.values.toList();
}
void refresh() {
notifyListeners();
}
}

View File

@@ -16,15 +16,20 @@ const settingsDB = DatabaseStruct("settings", {
"vibration_strength": int, "ab_weeks": int, "swap_ab_weeks": int,
"notifications": int, "notifications_bitfield": int, "notification_poll_interval": int, // notifications
"x_filc_id": String, "graph_class_avg": int, "presentation_mode": int, "bell_delay": int, "bell_delay_enabled": int,
"grade_opening_fun": int, "icon_pack": String, "premium_scopes": String, "premium_token": String, "last_account_id": String,
"grade_opening_fun": int, "icon_pack": String, "premium_scopes": String, "premium_token": String, "premium_login": String,
"last_account_id": String, "renamed_subjects_enabled": int,
});
// DON'T FORGET TO UPDATE DEFAULT VALUES IN `initDB` MIGRATION OR ELSE PARENTS WILL COMPLAIN ABOUT THEIR CHILDREN MISSING
// YOU'VE BEEN WARNED!!!
const usersDB = DatabaseStruct("users", {
"id": String, "name": String, "username": String, "password": String, "institute_code": String, "student": String, "role": int,
"nickname": String // premium only
"nickname": String, "picture": String // premium only
});
const userDataDB = DatabaseStruct("user_data", {
"id": String, "grades": String, "timetable": String, "exams": String, "homework": String, "messages": String, "notes": String,
"events": String, "absences": String, "group_averages": String,
// renamed subjects // non kreta data
"renamed_subjects": String,
// "subject_lesson_count": String, // non kreta data
"last_seen_grade": int,
});
@@ -60,11 +65,13 @@ Future<Database> initDB(DatabaseProvider database) async {
await migrateDB(
db,
struct: usersDB,
defaultValues: {"role": 0},
defaultValues: {"role": 0, "nickname": "", "picture": ""},
);
await migrateDB(db, struct: userDataDB, defaultValues: {
"grades": "[]", "timetable": "[]", "exams": "[]", "homework": "[]", "messages": "[]", "notes": "[]", "events": "[]", "absences": "[]",
"group_averages": "[]",
// renamed subjects // non kreta data
"renamed_subjects": "{}",
// "subject_lesson_count": "{}", // non kreta data
"last_seen_grade": 0,
});

View File

@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:filcnaplo/api/providers/database_provider.dart';
import 'package:filcnaplo/models/subject_lesson_count.dart';
import 'package:filcnaplo/models/user.dart';
import 'package:filcnaplo_kreta_api/models/week.dart';
// ignore: depend_on_referenced_packages
import 'package:sqflite_common/sqlite_api.dart';
@@ -61,12 +62,15 @@ class UserDatabaseQuery {
return grades;
}
Future<List<Lesson>> getLessons({required String userId}) async {
Future<Map<Week, List<Lesson>>> getLessons({required String userId}) async {
List<Map> userData = await db.query("user_data", where: "id = ?", whereArgs: [userId]);
if (userData.isEmpty) return [];
if (userData.isEmpty) return {};
String? lessonsJson = userData.elementAt(0)["timetable"] as String?;
if (lessonsJson == null) return [];
List<Lesson> lessons = (jsonDecode(lessonsJson) as List).map((e) => Lesson.fromJson(e)).toList();
if (lessonsJson == null) return {};
if (jsonDecode(lessonsJson) is List) return {};
Map<Week, List<Lesson>> lessons = (jsonDecode(lessonsJson) as Map).cast<String, List>().map((key, value) {
return MapEntry(Week.fromId(int.parse(key)), value.cast<Map<String, Object?>>().map((e) => Lesson.fromJson(e)).toList());
}).cast();
return lessons;
}
@@ -150,4 +154,12 @@ class UserDatabaseQuery {
DateTime lastSeen = DateTime.fromMillisecondsSinceEpoch(lastSeenDate);
return lastSeen;
}
Future<Map<String, String>> renamedSubjects({required String userId}) async {
List<Map> userData = await db.query("user_data", where: "id = ?", whereArgs: [userId]);
if (userData.isEmpty) return {};
String? renamedSubjectsJson = userData.elementAt(0)["renamed_subjects"] as String?;
if (renamedSubjectsJson == null) return {};
return (jsonDecode(renamedSubjectsJson) as Map).map((key, value) => MapEntry(key.toString(), value.toString()));
}
}

View File

@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:filcnaplo/models/subject_lesson_count.dart';
import 'package:filcnaplo_kreta_api/models/week.dart';
// ignore: depend_on_referenced_packages
import 'package:sqflite_common/sqlite_api.dart';
@@ -51,8 +52,11 @@ class UserDatabaseStore {
await db.update("user_data", {"grades": gradesJson}, where: "id = ?", whereArgs: [userId]);
}
Future<void> storeLessons(List<Lesson> lessons, {required String userId}) async {
String lessonsJson = jsonEncode(lessons.map((e) => e.json).toList());
Future<void> storeLessons(Map<Week, List<Lesson>?> lessons, {required String userId}) async {
final map = lessons.map<String, List<Map<String, Object?>>>(
(k, v) => MapEntry(k.id.toString(), v!.where((e) => e.json != null).map((e) => e.json!).toList().cast()),
);
String lessonsJson = jsonEncode(map);
await db.update("user_data", {"timetable": lessonsJson}, where: "id = ?", whereArgs: [userId]);
}
@@ -100,4 +104,9 @@ class UserDatabaseStore {
int lastSeenDate = date.millisecondsSinceEpoch;
await db.update("user_data", {"last_seen_grade": lastSeenDate}, where: "id = ?", whereArgs: [userId]);
}
Future<void> storeRenamedSubjects(Map<String, String> subjects, {required String userId}) async {
String renamedSubjectsJson = jsonEncode(subjects);
await db.update("user_data", {"renamed_subjects": renamedSubjectsJson}, where: "id = ?", whereArgs: [userId]);
}
}

View File

@@ -8,8 +8,10 @@ import 'package:filcnaplo/models/release.dart';
import 'package:open_file/open_file.dart';
enum UpdateState { none, preparing, downloading, installing }
typedef UpdateCallback = Function(double progress, UpdateState state);
// ignore: todo
// TODO: cleanup old apk files
extension UpdateHelper on Release {

View File

@@ -6,17 +6,38 @@ class FilcIcons {
static const iconFontFamily = 'FilcIcons';
/// home
static const IconData home = IconData(0x00, fontFamily: iconFontFamily);
static const IconData home = IconData(0x21, fontFamily: iconFontFamily);
/// linux
static const IconData linux = IconData(0x01, fontFamily: iconFontFamily);
static const IconData linux = IconData(0x22, fontFamily: iconFontFamily);
/// upstairs
static const IconData upstairs = IconData(0x02, fontFamily: iconFontFamily);
static const IconData upstairs = IconData(0x23, fontFamily: iconFontFamily);
/// downstairs
static const IconData downstairs = IconData(0x03, fontFamily: iconFontFamily);
static const IconData downstairs = IconData(0x24, fontFamily: iconFontFamily);
/// premium
static const IconData premium = IconData(0x04, fontFamily: iconFontFamily);
static const IconData premium = IconData(0x25, fontFamily: iconFontFamily);
/// tinta
static const IconData tinta = IconData(0x26, fontFamily: iconFontFamily);
/// kupak
static const IconData kupak = IconData(0x27, fontFamily: iconFontFamily);
/// homefill
static const IconData homefill = IconData(0x28, fontFamily: iconFontFamily);
/// gradesfill
static const IconData gradesfill = IconData(0x29, fontFamily: iconFontFamily);
/// timetablefill
static const IconData timetablefill = IconData(0x2a, fontFamily: iconFontFamily);
/// messagesfill
static const IconData messagesfill = IconData(0x2b, fontFamily: iconFontFamily);
/// absencesfill
static const IconData absencesfill = IconData(0x2c, fontFamily: iconFontFamily);
}

View File

@@ -64,7 +64,9 @@ class SettingsProvider extends ChangeNotifier {
Color _customHighlightColor;
List<String> _premiumScopes;
String _premiumAccessToken;
String _premiumLogin;
String _lastAccountId;
bool _renamedSubjectsEnabled;
SettingsProvider({
DatabaseProvider? database,
@@ -98,7 +100,9 @@ class SettingsProvider extends ChangeNotifier {
required Color customHighlightColor,
required List<String> premiumScopes,
required String premiumAccessToken,
required String premiumLogin,
required String lastAccountId,
required bool renameSubjectsEnabled,
}) : _database = database,
_language = language,
_startPage = startPage,
@@ -130,7 +134,9 @@ class SettingsProvider extends ChangeNotifier {
_customHighlightColor = customHighlightColor,
_premiumScopes = premiumScopes,
_premiumAccessToken = premiumAccessToken,
_lastAccountId = lastAccountId;
_premiumLogin = premiumLogin,
_lastAccountId = lastAccountId,
_renamedSubjectsEnabled = renameSubjectsEnabled;
factory SettingsProvider.fromMap(Map map, {required DatabaseProvider database}) {
Map<String, Object?>? configMap;
@@ -179,7 +185,9 @@ class SettingsProvider extends ChangeNotifier {
customHighlightColor: Color(map["custom_highlight_color"]),
premiumScopes: jsonDecode(map["premium_scopes"]).cast<String>(),
premiumAccessToken: map["premium_token"],
premiumLogin: map["premium_login"],
lastAccountId: map["last_account_id"],
renameSubjectsEnabled: map["renamed_subjects_enabled"] == 1,
);
}
@@ -218,7 +226,9 @@ class SettingsProvider extends ChangeNotifier {
"custom_highlight_color": _customHighlightColor.value,
"premium_scopes": jsonEncode(_premiumScopes),
"premium_token": _premiumAccessToken,
"premium_login": _premiumLogin,
"last_account_id": _lastAccountId,
"renamed_subjects_enabled": _renamedSubjectsEnabled ? 1 : 0
};
}
@@ -261,7 +271,9 @@ class SettingsProvider extends ChangeNotifier {
customHighlightColor: const Color(0xff222222),
premiumScopes: [],
premiumAccessToken: "",
premiumLogin: "",
lastAccountId: "",
renameSubjectsEnabled: false,
);
}
@@ -296,7 +308,9 @@ class SettingsProvider extends ChangeNotifier {
Color? get customHighlightColor => _customHighlightColor;
List<String> get premiumScopes => _premiumScopes;
String get premiumAccessToken => _premiumAccessToken;
String get premiumLogin => _premiumLogin;
String get lastAccountId => _lastAccountId;
bool get renamedSubjectsEnabled => _renamedSubjectsEnabled;
Future<void> update({
bool store = true,
@@ -330,7 +344,9 @@ class SettingsProvider extends ChangeNotifier {
Color? customHighlightColor,
List<String>? premiumScopes,
String? premiumAccessToken,
String? premiumLogin,
String? lastAccountId,
bool? renamedSubjectsEnabled,
}) async {
if (language != null && language != _language) _language = language;
if (startPage != null && startPage != _startPage) _startPage = startPage;
@@ -364,7 +380,9 @@ class SettingsProvider extends ChangeNotifier {
if (customHighlightColor != null && customHighlightColor != _customHighlightColor) _customHighlightColor = customHighlightColor;
if (premiumScopes != null && premiumScopes != _premiumScopes) _premiumScopes = premiumScopes;
if (premiumAccessToken != null && premiumAccessToken != _premiumAccessToken) _premiumAccessToken = premiumAccessToken;
if (premiumLogin != null && premiumLogin != _premiumLogin) _premiumLogin = premiumLogin;
if (lastAccountId != null && lastAccountId != _lastAccountId) _lastAccountId = lastAccountId;
if (renamedSubjectsEnabled != null && renamedSubjectsEnabled != _renamedSubjectsEnabled) _renamedSubjectsEnabled = renamedSubjectsEnabled;
if (store) await _database?.store.storeSettings(this);
notifyListeners();

View File

@@ -1,38 +1,50 @@
enum DonationType { once, monthly }
class Supporter {
String name;
String amount;
String platform;
final String avatar;
final String name;
final String comment;
final int price;
final DonationType type;
Supporter(this.name, this.amount, this.platform);
const Supporter({required this.avatar, required this.name, this.comment = "", this.price = 0, this.type = DonationType.once});
factory Supporter.fromJson(Map json) {
factory Supporter.fromJson(Map json, {String? avatarPattern}) {
return Supporter(
(json["name"] ?? "").trim(),
json["amount"] ?? "",
json["platform"] ?? "",
avatar: json["avatar"] ?? avatarPattern != null ? avatarPattern!.replaceFirst("\$", json["name"]) : "",
name: json["name"] ?? "Unknown",
comment: json["comment"] ?? "",
price: json["price"].toInt() ?? 0,
type: DonationType.values.asNameMap()[json["type"] ?? "once"] ?? DonationType.once,
);
}
}
class Supporters {
List<Supporter> top;
List<Supporter> all;
int progress;
int max;
final double progress;
final double max;
final String description;
final List<Supporter> github;
final List<Supporter> patreon;
Supporters({
required this.top,
required this.all,
required this.progress,
required this.max,
required this.description,
required this.github,
required this.patreon,
});
factory Supporters.fromJson(Map json) {
return Supporters(
max: (json["progress"] ?? {})["max"] ?? 1,
progress: (json["progress"] ?? {})["value"] ?? 0,
all: ((json["all"] ?? []) as List).cast<Map>().map((e) => Supporter.fromJson(e)).toList(),
top: ((json["top"] ?? []) as List).cast<Map>().map((e) => Supporter.fromJson(e)).toList(),
progress: json["percentage"].toDouble() ?? 100.0,
max: json["target"].toDouble() ?? 1.0,
description: json["description"] ?? "",
github: json["sponsors"]["github"]
.map((e) => Supporter.fromJson(e, avatarPattern: "https://github.com/\$.png?size=200"))
.cast<Supporter>()
.toList(),
patreon: json["sponsors"]["patreon"].map((e) => Supporter.fromJson(e)).cast<Supporter>().toList(),
);
}
}

View File

@@ -14,6 +14,7 @@ class User {
Student student;
Role role;
String nickname;
String picture;
String get displayName => nickname != '' ? nickname : name;
@@ -26,6 +27,7 @@ class User {
required this.student,
required this.role,
this.nickname = "",
this.picture = "",
}) {
if (id != null) {
this.id = id;
@@ -44,6 +46,7 @@ class User {
student: Student.fromJson(jsonDecode(map["student"])),
role: Role.values[map["role"] ?? 0],
nickname: map["nickname"] ?? "",
picture: map["picture"] ?? "",
);
}
@@ -57,6 +60,7 @@ class User {
"student": jsonEncode(student.json),
"role": role.index,
"nickname": nickname,
"picture": picture,
};
}

View File

@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
class AppColors {
static ThemeAppColors of(BuildContext context) => fromBrightness(Theme.of(context).brightness);
static fromBrightness(Brightness brightness) {
static ThemeAppColors fromBrightness(Brightness brightness) {
if (Platform.isAndroid || Platform.isIOS) {
switch (brightness) {
case Brightness.light:

View File

@@ -2,12 +2,17 @@ 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}) : _themeMode = initialTheme;
ThemeModeObserver({ThemeMode initialTheme = ThemeMode.system, bool updateNavbarColor = true})
: _themeMode = initialTheme,
_updateNavbarColor = updateNavbarColor;
void changeTheme(ThemeMode mode) {
void changeTheme(ThemeMode mode, {bool updateNavbarColor = true}) {
_themeMode = mode;
_updateNavbarColor = updateNavbarColor;
notifyListeners();
}
}

View File

@@ -1,6 +1,7 @@
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';
@@ -34,34 +35,38 @@ class AppTheme {
}
Color backgroundColor =
accentColor == AccentColor.custom ? settings.customBackgroundColor : _paletteBackgroundLight(palette) ?? lightColors.background;
Color highlighColor =
accentColor == AccentColor.custom ? settings.customHighlightColor : _paletteHighlightLight(palette) ?? lightColors.highlight;
(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: false,
useMaterial3: true,
fontFamily: _fontFamily,
scaffoldBackgroundColor: backgroundColor,
backgroundColor: highlighColor,
primaryColor: lightColors.filc,
dividerColor: const Color(0x00000000),
colorScheme: ColorScheme.fromSwatch(
accentColor: accent,
backgroundColor: backgroundColor,
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,
cardColor: highlighColor,
errorColor: lightColors.red,
primaryColorDark: lightColors.filc,
error: lightColors.red,
onError: Colors.white.withOpacity(.9),
surface: highlightColor,
onSurface: Colors.black.withOpacity(.9),
),
shadowColor: highlighColor.withOpacity(.5), //lightColors.shadow,
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: highlighColor,
backgroundColor: highlightColor,
labelTextStyle: MaterialStateProperty.all(TextStyle(
fontSize: 13.0,
fontWeight: FontWeight.w500,
@@ -75,6 +80,10 @@ class AppTheme {
),
progressIndicatorTheme: ProgressIndicatorThemeData(color: accent),
expansionTileTheme: ExpansionTileThemeData(iconColor: accent),
cardColor: highlightColor,
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: Provider.of<ThemeModeObserver>(context, listen: false).updateNavbarColor ? backgroundColor : null,
),
);
}
@@ -93,24 +102,29 @@ class AppTheme {
}
Color backgroundColor =
accentColor == AccentColor.custom ? settings.customBackgroundColor : _paletteBackgroundDark(palette) ?? darkColors.background;
Color highlightColor = accentColor == AccentColor.custom ? settings.customHighlightColor : _paletteHighlightDark(palette) ?? darkColors.highlight;
(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: false,
useMaterial3: true,
fontFamily: _fontFamily,
scaffoldBackgroundColor: backgroundColor,
backgroundColor: highlightColor,
primaryColor: darkColors.filc,
dividerColor: const Color(0x00000000),
colorScheme: ColorScheme.fromSwatch(
accentColor: accent,
backgroundColor: backgroundColor,
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,
cardColor: highlightColor,
errorColor: darkColors.red,
primaryColorDark: darkColors.filc,
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),
@@ -133,6 +147,14 @@ class AppTheme {
),
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

@@ -7,7 +7,7 @@ import 'package:filcnaplo_mobile_ui/common/panel/panel.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/absence/absence_viewable.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/absence_group/absence_group_tile.dart';
import 'package:flutter/material.dart';
import 'package:implicitly_animated_reorderable_list/implicitly_animated_reorderable_list.dart';
import 'package:animated_list_plus/animated_list_plus.dart';
import 'package:filcnaplo_mobile_ui/common/widgets/lesson/changed_lesson_tile.dart';
import 'package:filcnaplo/utils/format.dart';

View File

@@ -12,7 +12,7 @@ import 'package:filcnaplo/ui/filter/widgets/events.dart' as event_filter;
import 'package:filcnaplo/ui/filter/widgets/lessons.dart' as lesson_filter;
import 'package:filcnaplo/ui/filter/widgets/update.dart' as update_filter;
import 'package:filcnaplo/ui/filter/widgets/missed_exams.dart' as missed_exam_filter;
import 'package:filcnaplo/ui/filter/widgets/premium.dart' as premium_filter;
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';
@@ -22,14 +22,15 @@ 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_premium/providers/premium_provider.dart';
import 'package:filcnaplo_premium/ui/mobile/premium/premium_inline.dart';
import 'package:filcnaplo_mobile_ui/common/panel/panel.dart';
import 'package:flutter/material.dart';
import 'package:implicitly_animated_reorderable_list/transitions.dart';
import 'package:animated_list_plus/transitions.dart';
import 'package:provider/provider.dart';
const List<FilterType> homeFilters = [FilterType.all, FilterType.grades, FilterType.messages, FilterType.absences];
enum FilterType { all, grades, newGrades, messages, absences, homework, exams, notes, events, lessons, updates, certifications, missedExams, premium }
enum FilterType { all, grades, newGrades, messages, absences, homework, exams, notes, events, lessons, updates, certifications, missedExams }
Future<List<DateWidget>> getFilterWidgets(FilterType activeData, {bool absencesNoExcused = false, required BuildContext context}) async {
final gradeProvider = Provider.of<GradeProvider>(context);
@@ -42,7 +43,6 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData, {bool absencesN
final eventProvider = Provider.of<EventProvider>(context);
final updateProvider = Provider.of<UpdateProvider>(context);
final settingsProvider = Provider.of<SettingsProvider>(context);
final premiumProvider = Provider.of<PremiumProvider>(context);
List<DateWidget> items = [];
@@ -59,7 +59,6 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData, {bool absencesN
getFilterWidgets(FilterType.updates, context: context),
getFilterWidgets(FilterType.certifications, context: context),
getFilterWidgets(FilterType.missedExams, context: context),
getFilterWidgets(FilterType.premium, context: context),
]);
items = all.expand((x) => x).toList();
@@ -119,7 +118,7 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData, {bool absencesN
// Changed Lessons
case FilterType.lessons:
items = lesson_filter.getWidgets(timetableProvider.lessons);
items = lesson_filter.getWidgets(timetableProvider.getWeek(Week.current()) ?? []);
break;
// Updates
@@ -129,24 +128,32 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData, {bool absencesN
// Missed Exams
case FilterType.missedExams:
items = missed_exam_filter.getWidgets(timetableProvider.lessons);
break;
case FilterType.premium:
final now = DateTime.now();
final isWeekend = now.weekday == DateTime.saturday || now.weekday == DateTime.sunday;
items = [if (!premiumProvider.hasPremium && isWeekend) premium_filter.getWidget()];
items = missed_exam_filter.getWidgets(timetableProvider.getWeek(Week.current()) ?? []);
break;
}
return items;
}
Widget filterItemBuilder(BuildContext context, Animation<double> animation, Widget item, int index) {
if (item.key == const Key("\$premium")) {
return Provider.of<PremiumProvider>(context, listen: false).hasPremium || DateTime.now().weekday <= 5
? const SizedBox()
: const Padding(
padding: EdgeInsets.only(bottom: 24.0),
child: PremiumInline(features: [
PremiumInlineFeature.nickname,
PremiumInlineFeature.theme,
PremiumInlineFeature.widget,
]),
);
}
final wrappedItem = SizeFadeTransition(
curve: Curves.easeInOutCubic,
animation: animation,
child: item,
);
return item is Panel
// Re-add & animate shadow
? AnimatedBuilder(

View File

@@ -1,16 +0,0 @@
import 'package:filcnaplo/ui/date_widget.dart';
import 'package:filcnaplo_premium/ui/mobile/premium/premium_banner_button.dart';
import 'package:flutter/widgets.dart';
DateWidget getWidget() {
return DateWidget(
date: DateTime.now().add(const Duration(minutes: 1)),
widget: Padding(
padding: const EdgeInsets.symmetric(horizontal: 6.0),
child: ClipRRect(
borderRadius: BorderRadius.circular(14.0),
child: const PremiumBannerButton(),
),
),
);
}

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