Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
176243b881 | ||
|
|
ed02a340d0 | ||
|
|
2877f4fc5c | ||
|
|
fceb3bf31a | ||
|
|
9883d081ff | ||
|
|
db5a9fb197 | ||
|
|
93438ce3df | ||
|
|
95bca64fb8 | ||
|
|
7821e10869 | ||
|
|
cede3c3129 | ||
|
|
528ee862b9 | ||
|
|
d1507f5eae | ||
|
|
f5682e9137 | ||
|
|
518932c260 | ||
|
|
139d8869c2 | ||
|
|
29bf0c81dd | ||
|
|
9e510bed2d | ||
|
|
ef7437979c | ||
|
|
b1e68f18b0 | ||
|
|
5e02e697d2 | ||
|
|
bfa77fcfb6 | ||
|
|
bcf9d9688f | ||
|
|
281b9cf6c4 | ||
|
|
fb0de5a991 |
23
.gitignore
vendored
@@ -25,3 +25,26 @@ doc/api/
|
|||||||
*.js.map
|
*.js.map
|
||||||
|
|
||||||
*.txt
|
*.txt
|
||||||
|
filcnaplo/linux/flutter/generated_plugin_registrant.cc
|
||||||
|
filcnaplo/linux/flutter/generated_plugin_registrant.h
|
||||||
|
filcnaplo/linux/flutter/generated_plugins.cmake
|
||||||
|
filcnaplo/macos/Flutter/GeneratedPluginRegistrant.swift
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/dynamic_color
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/flutter_acrylic
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/permission_handler_windows
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/share_plus_windows
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/url_launcher_windows
|
||||||
|
filcnaplo/windows/flutter/ephemeral/generated_config.cmake
|
||||||
|
filcnaplo/windows/flutter/generated_plugin_registrant.cc
|
||||||
|
filcnaplo/windows/flutter/generated_plugin_registrant.h
|
||||||
|
filcnaplo/windows/flutter/generated_plugins.cmake
|
||||||
|
filcnaplo/linux/flutter/generated_plugin_registrant.cc
|
||||||
|
filcnaplo/linux/flutter/generated_plugin_registrant.h
|
||||||
|
filcnaplo/linux/flutter/generated_plugins.cmake
|
||||||
|
filcnaplo/macos/Flutter/GeneratedPluginRegistrant.swift
|
||||||
|
filcnaplo/linux/flutter/generated_plugin_registrant.cc
|
||||||
|
filcnaplo/linux/flutter/generated_plugin_registrant.h
|
||||||
|
filcnaplo/linux/flutter/generated_plugins.cmake
|
||||||
|
filcnaplo/macos/Flutter/GeneratedPluginRegistrant.swift
|
||||||
|
|||||||
24
.vscode/launch.json
vendored
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
@@ -10,8 +7,27 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"type": "dart",
|
"type": "dart",
|
||||||
"toolArgs": [
|
"toolArgs": [
|
||||||
"--dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1) --release"
|
"--dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1)"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "filcnaplo release",
|
||||||
|
"cwd": "filcnaplo release",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "release",
|
||||||
|
"program": "lib/main.dart",
|
||||||
|
"toolArgs": [
|
||||||
|
"--dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Flutter",
|
||||||
|
"program": "lib/main.dart",
|
||||||
|
"cwd": "filcnaplo",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "release"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<p align=center>
|
<p align=center>
|
||||||
<img src="https://media.discordapp.net/attachments/1111727410677825596/1111790518964326510/reFilc_Logo2.png?width=671&height=671" width=150>
|
<img src="https://media.discordapp.net/attachments/1111727410677825596/1113217167513624646/reFilc_Logo_Squircle.png?width=671&height=671" width=150>
|
||||||
<h1 align=center><b>reFilc</b></h1>
|
<h1 align=center><b>reFilc</b></h1>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -27,12 +27,16 @@ cd filcnaplo
|
|||||||
flutter run
|
flutter run
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Contribution
|
||||||
|
|
||||||
|
Az összes (ugyan azon verzióhoz tartozó) contribution meg fog jelenni a release-nél. Kérjük, írd le a Discord nevedet a Description-be, hogy adhassunk rangot.
|
||||||
|
|
||||||
-------
|
-------
|
||||||
|
|
||||||
# Kudo
|
# Kudo
|
||||||
|
|
||||||
**annon:** a Filc napló készítője (ez az app a Filcen alapul)
|
**annon:** a Filc napló készítője (ez az app a Filcen alapul)
|
||||||
|
|
||||||
**kima, chromium, peighter, mog, WolfY:** a fejlesztői csapat
|
**kima, mog, WolfY:** fő fejlesztők
|
||||||
|
|
||||||
**Regő, Pearoo:** weboldal design és community management
|
**Regő, Pearoo:** weboldal design és community management
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "hu.filc.naplo"
|
applicationId "hu.refilc.naplo"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.filc.naplo">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.refilc.naplo">
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools" package="hu.filc.naplo">
|
xmlns:tools="http://schemas.android.com/tools" package="hu.refilc.naplo">
|
||||||
<application android:label="reFilc" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
|
<application android:label="reFilc" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
|
||||||
android:requestLegacyExternalStorage="true">
|
android:requestLegacyExternalStorage="true">
|
||||||
<activity android:exported="true" android:name=".MainActivity"
|
<activity android:exported="true" android:name=".MainActivity"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package hu.filc.naplo;
|
package hu.refilc.naplo;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 844 B |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 28 KiB |
@@ -1,4 +1,4 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.filc.naplo">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.refilc.naplo">
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
|
|||||||
BIN
filcnaplo/assets/icons/ic_android.png
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 67 KiB |
15
filcnaplo/ios/Flutter/Generated 2.xcconfig
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// This is a generated file; do not edit or check into version control.
|
||||||
|
FLUTTER_ROOT=/Users/kima/development/flutter
|
||||||
|
FLUTTER_APPLICATION_PATH=/Users/kima/Documents/refilc/app/naplo/filcnaplo
|
||||||
|
COCOAPODS_PARALLEL_CODE_SIGN=true
|
||||||
|
FLUTTER_TARGET=/Users/kima/Documents/refilc/app/naplo/filcnaplo/lib/main.dart
|
||||||
|
FLUTTER_BUILD_DIR=build
|
||||||
|
FLUTTER_BUILD_NAME=3.5.1
|
||||||
|
FLUTTER_BUILD_NUMBER=197
|
||||||
|
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
|
||||||
|
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
|
||||||
|
DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC9iNGZiMTEyMTRkZDJkZGE2Y2UwMTJkZDk4ZWE0OThlOWU4YjkxMjYyLw==
|
||||||
|
DART_OBFUSCATION=false
|
||||||
|
TRACK_WIDGET_CREATION=true
|
||||||
|
TREE_SHAKE_ICONS=false
|
||||||
|
PACKAGE_CONFIG=/Users/kima/Documents/refilc/app/naplo/filcnaplo/.dart_tool/package_config.json
|
||||||
@@ -77,6 +77,8 @@ PODS:
|
|||||||
- Mantle/extobjc (2.2.0)
|
- Mantle/extobjc (2.2.0)
|
||||||
- open_file (0.0.1):
|
- open_file (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- package_info_plus (0.4.5):
|
||||||
|
- Flutter
|
||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
@@ -120,6 +122,7 @@ DEPENDENCIES:
|
|||||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||||
- live_activities (from `.symlinks/plugins/live_activities/ios`)
|
- live_activities (from `.symlinks/plugins/live_activities/ios`)
|
||||||
- open_file (from `.symlinks/plugins/open_file/ios`)
|
- open_file (from `.symlinks/plugins/open_file/ios`)
|
||||||
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||||
- quick_actions_ios (from `.symlinks/plugins/quick_actions_ios/ios`)
|
- quick_actions_ios (from `.symlinks/plugins/quick_actions_ios/ios`)
|
||||||
@@ -171,6 +174,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/live_activities/ios"
|
:path: ".symlinks/plugins/live_activities/ios"
|
||||||
open_file:
|
open_file:
|
||||||
:path: ".symlinks/plugins/open_file/ios"
|
:path: ".symlinks/plugins/open_file/ios"
|
||||||
|
package_info_plus:
|
||||||
|
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
permission_handler_apple:
|
permission_handler_apple:
|
||||||
@@ -213,6 +218,7 @@ SPEC CHECKSUMS:
|
|||||||
live_activities: 9ff56a06a2d43ecd68f56deeed13b18a8304789c
|
live_activities: 9ff56a06a2d43ecd68f56deeed13b18a8304789c
|
||||||
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
|
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
|
||||||
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
|
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
|
||||||
|
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||||
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
|
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
|
||||||
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
|
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
|
||||||
quick_actions_ios: 9e80dcfadfbc5d47d9cf8f47bcf428b11cf383d4
|
quick_actions_ios: 9e80dcfadfbc5d47d9cf8f47bcf428b11cf383d4
|
||||||
|
|||||||
@@ -478,7 +478,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 195;
|
CURRENT_PROJECT_VERSION = 195;
|
||||||
DEVELOPMENT_TEAM = JWGEQSC9U7;
|
DEVELOPMENT_TEAM = 48XS7JAZB7;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
||||||
@@ -488,7 +488,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 3.6.0;
|
MARKETING_VERSION = 3.6.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = hu.refilc.naplo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.refilc.naplo;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -510,7 +510,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = JWGEQSC9U7;
|
DEVELOPMENT_TEAM = 48XS7JAZB7;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@@ -526,7 +526,7 @@
|
|||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = hu.refilc.naplo.livecardpro;
|
PRODUCT_BUNDLE_IDENTIFIER = com.refilc.naplo.livecardpro;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@@ -552,7 +552,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = JWGEQSC9U7;
|
DEVELOPMENT_TEAM = 48XS7JAZB7;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@@ -567,7 +567,7 @@
|
|||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = hu.refilc.naplo.livecardpro;
|
PRODUCT_BUNDLE_IDENTIFIER = com.refilc.naplo.livecardpro;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@@ -592,7 +592,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = JWGEQSC9U7;
|
DEVELOPMENT_TEAM = 48XS7JAZB7;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@@ -607,7 +607,7 @@
|
|||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = hu.refilc.naplo.livecardpro;
|
PRODUCT_BUNDLE_IDENTIFIER = com.refilc.naplo.livecardpro;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@@ -736,7 +736,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 195;
|
CURRENT_PROJECT_VERSION = 195;
|
||||||
DEVELOPMENT_TEAM = JWGEQSC9U7;
|
DEVELOPMENT_TEAM = 48XS7JAZB7;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
||||||
@@ -746,7 +746,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 3.6.0;
|
MARKETING_VERSION = 3.6.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = hu.refilc.naplo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.refilc.naplo;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@@ -764,7 +764,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 195;
|
CURRENT_PROJECT_VERSION = 195;
|
||||||
DEVELOPMENT_TEAM = JWGEQSC9U7;
|
DEVELOPMENT_TEAM = 48XS7JAZB7;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
INFOPLIST_KEY_CFBundleDisplayName = reFilc;
|
||||||
@@ -774,7 +774,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 3.6.0;
|
MARKETING_VERSION = 3.6.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = hu.refilc.naplo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.refilc.naplo;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 610 KiB |
|
Before Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 887 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -3,6 +3,8 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
<array/>
|
<array>
|
||||||
|
<string>group.refilcnaplo.livecard</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
<array/>
|
<array>
|
||||||
|
<string>group.refilcnaplo.livecard</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -13,7 +13,14 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:live_activities/live_activities.dart';
|
import 'package:live_activities/live_activities.dart';
|
||||||
import 'package:filcnaplo_mobile_ui/pages/home/live_card/live_card.i18n.dart';
|
import 'package:filcnaplo_mobile_ui/pages/home/live_card/live_card.i18n.dart';
|
||||||
|
|
||||||
enum LiveCardState { empty, duringLesson, duringBreak, morning, afternoon, night }
|
enum LiveCardState {
|
||||||
|
empty,
|
||||||
|
duringLesson,
|
||||||
|
duringBreak,
|
||||||
|
morning,
|
||||||
|
afternoon,
|
||||||
|
night
|
||||||
|
}
|
||||||
|
|
||||||
class LiveCardProvider extends ChangeNotifier {
|
class LiveCardProvider extends ChangeNotifier {
|
||||||
Lesson? currentLesson;
|
Lesson? currentLesson;
|
||||||
@@ -42,14 +49,17 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
_latestActivityId = value.isNotEmpty ? value.first : null;
|
_latestActivityId = value.isNotEmpty ? value.first : null;
|
||||||
});
|
});
|
||||||
_timer = Timer.periodic(const Duration(seconds: 1), (timer) => update());
|
_timer = Timer.periodic(const Duration(seconds: 1), (timer) => update());
|
||||||
_delay = settings.bellDelayEnabled ? Duration(seconds: settings.bellDelay) : Duration.zero;
|
_delay = settings.bellDelayEnabled
|
||||||
|
? Duration(seconds: settings.bellDelay)
|
||||||
|
: Duration.zero;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_timer.cancel();
|
_timer.cancel();
|
||||||
if (_latestActivityId != null && Platform.isIOS) _liveActivitiesPlugin.endActivity(_latestActivityId!);
|
if (_latestActivityId != null && Platform.isIOS)
|
||||||
|
_liveActivitiesPlugin.endActivity(_latestActivityId!);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,14 +88,25 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
switch (currentState) {
|
switch (currentState) {
|
||||||
case LiveCardState.duringLesson:
|
case LiveCardState.duringLesson:
|
||||||
return {
|
return {
|
||||||
"icon": currentLesson != null ? SubjectIcon.resolveName(subject: currentLesson?.subject) : "book",
|
"icon": currentLesson != null
|
||||||
"index": currentLesson != null ? '${currentLesson!.lessonIndex}. ' : "",
|
? SubjectIcon.resolveName(subject: currentLesson?.subject)
|
||||||
"title": currentLesson != null ? ShortSubject.resolve(subject: currentLesson?.subject).capital() : "",
|
: "book",
|
||||||
|
"index":
|
||||||
|
currentLesson != null ? '${currentLesson!.lessonIndex}. ' : "",
|
||||||
|
"title": currentLesson != null
|
||||||
|
? ShortSubject.resolve(subject: currentLesson?.subject).capital()
|
||||||
|
: "",
|
||||||
"subtitle": currentLesson?.room.replaceAll("_", " ") ?? "",
|
"subtitle": currentLesson?.room.replaceAll("_", " ") ?? "",
|
||||||
"description": currentLesson?.description ?? "",
|
"description": currentLesson?.description ?? "",
|
||||||
"startDate": ((currentLesson?.start.millisecondsSinceEpoch ?? 0) - _delay.inMilliseconds).toString(),
|
"startDate": ((currentLesson?.start.millisecondsSinceEpoch ?? 0) -
|
||||||
"endDate": ((currentLesson?.end.millisecondsSinceEpoch ?? 0) - _delay.inMilliseconds).toString(),
|
_delay.inMilliseconds)
|
||||||
"nextSubject": nextLesson != null ? ShortSubject.resolve(subject: nextLesson?.subject).capital() : "",
|
.toString(),
|
||||||
|
"endDate": ((currentLesson?.end.millisecondsSinceEpoch ?? 0) -
|
||||||
|
_delay.inMilliseconds)
|
||||||
|
.toString(),
|
||||||
|
"nextSubject": nextLesson != null
|
||||||
|
? ShortSubject.resolve(subject: nextLesson?.subject).capital()
|
||||||
|
: "",
|
||||||
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
|
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
|
||||||
};
|
};
|
||||||
case LiveCardState.duringBreak:
|
case LiveCardState.duringBreak:
|
||||||
@@ -101,10 +122,19 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
return {
|
return {
|
||||||
"icon": iconFloorMap[diff] ?? "cup.and.saucer",
|
"icon": iconFloorMap[diff] ?? "cup.and.saucer",
|
||||||
"title": "Szünet",
|
"title": "Szünet",
|
||||||
"description": "go $diff".i18n.fill([diff != "to room" ? (nextLesson!.getFloor() ?? 0) : nextLesson!.room]),
|
"description": "go $diff".i18n.fill([
|
||||||
"startDate": ((prevLesson?.end.millisecondsSinceEpoch ?? 0) - _delay.inMilliseconds).toString(),
|
diff != "to room" ? (nextLesson!.getFloor() ?? 0) : nextLesson!.room
|
||||||
"endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) - _delay.inMilliseconds).toString(),
|
]),
|
||||||
"nextSubject": (nextLesson != null ? ShortSubject.resolve(subject: nextLesson?.subject) : "").capital(),
|
"startDate": ((prevLesson?.end.millisecondsSinceEpoch ?? 0) -
|
||||||
|
_delay.inMilliseconds)
|
||||||
|
.toString(),
|
||||||
|
"endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) -
|
||||||
|
_delay.inMilliseconds)
|
||||||
|
.toString(),
|
||||||
|
"nextSubject": (nextLesson != null
|
||||||
|
? ShortSubject.resolve(subject: nextLesson?.subject)
|
||||||
|
: "")
|
||||||
|
.capital(),
|
||||||
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
|
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
|
||||||
"index": "",
|
"index": "",
|
||||||
"subtitle": "",
|
"subtitle": "",
|
||||||
@@ -119,15 +149,25 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
final cmap = toMap();
|
final cmap = toMap();
|
||||||
if (!mapEquals(cmap, _lastActivity)) {
|
if (!mapEquals(cmap, _lastActivity)) {
|
||||||
_lastActivity = cmap;
|
_lastActivity = cmap;
|
||||||
|
try {
|
||||||
if (_lastActivity.isNotEmpty) {
|
if (_lastActivity.isNotEmpty) {
|
||||||
if (_latestActivityId == null) {
|
if (_latestActivityId == null) {
|
||||||
_liveActivitiesPlugin.createActivity(_lastActivity).then((value) => _latestActivityId = value);
|
_liveActivitiesPlugin
|
||||||
|
.createActivity(_lastActivity)
|
||||||
|
.then((value) => _latestActivityId = value);
|
||||||
|
} else {
|
||||||
|
_liveActivitiesPlugin.updateActivity(
|
||||||
|
_latestActivityId!, _lastActivity);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
_liveActivitiesPlugin.updateActivity(_latestActivityId!, _lastActivity);
|
if (_latestActivityId != null) {
|
||||||
|
_liveActivitiesPlugin.endActivity(_latestActivityId!);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('ERROR: Unable to create or update iOS LiveCard!');
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (_latestActivityId != null) _liveActivitiesPlugin.endActivity(_latestActivityId!);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,19 +179,28 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
today = _today(_timetable);
|
today = _today(_timetable);
|
||||||
}
|
}
|
||||||
|
|
||||||
_delay = _settings.bellDelayEnabled ? Duration(seconds: _settings.bellDelay) : Duration.zero;
|
_delay = _settings.bellDelayEnabled
|
||||||
|
? Duration(seconds: _settings.bellDelay)
|
||||||
|
: Duration.zero;
|
||||||
|
|
||||||
final now = _now().add(_delay);
|
final now = _now().add(_delay);
|
||||||
|
|
||||||
// Filter cancelled lessons #20
|
// Filter cancelled lessons #20
|
||||||
// Filter label lessons #128
|
// Filter label lessons #128
|
||||||
today = today.where((lesson) => lesson.status?.name != "Elmaradt" && lesson.subject.id != '' && !lesson.isEmpty).toList();
|
today = today
|
||||||
|
.where((lesson) =>
|
||||||
|
lesson.status?.name != "Elmaradt" &&
|
||||||
|
lesson.subject.id != '' &&
|
||||||
|
!lesson.isEmpty)
|
||||||
|
.toList();
|
||||||
|
|
||||||
if (today.isNotEmpty) {
|
if (today.isNotEmpty) {
|
||||||
// sort
|
// sort
|
||||||
today.sort((a, b) => a.start.compareTo(b.start));
|
today.sort((a, b) => a.start.compareTo(b.start));
|
||||||
|
|
||||||
final _lesson = today.firstWhere((l) => l.start.isBefore(now) && l.end.isAfter(now), orElse: () => Lesson.fromJson({}));
|
final _lesson = today.firstWhere(
|
||||||
|
(l) => l.start.isBefore(now) && l.end.isAfter(now),
|
||||||
|
orElse: () => Lesson.fromJson({}));
|
||||||
|
|
||||||
if (_lesson.start.year != 0) {
|
if (_lesson.start.year != 0) {
|
||||||
currentLesson = _lesson;
|
currentLesson = _lesson;
|
||||||
@@ -159,7 +208,8 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
currentLesson = null;
|
currentLesson = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final _next = today.firstWhere((l) => l.start.isAfter(now), orElse: () => Lesson.fromJson({}));
|
final _next = today.firstWhere((l) => l.start.isAfter(now),
|
||||||
|
orElse: () => Lesson.fromJson({}));
|
||||||
nextLessons = today.where((l) => l.start.isAfter(now)).toList();
|
nextLessons = today.where((l) => l.start.isAfter(now)).toList();
|
||||||
|
|
||||||
if (_next.start.year != 0) {
|
if (_next.start.year != 0) {
|
||||||
@@ -168,7 +218,8 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
nextLesson = null;
|
nextLesson = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final _prev = today.lastWhere((l) => l.end.isBefore(now), orElse: () => Lesson.fromJson({}));
|
final _prev = today.lastWhere((l) => l.end.isBefore(now),
|
||||||
|
orElse: () => Lesson.fromJson({}));
|
||||||
|
|
||||||
if (_prev.start.year != 0) {
|
if (_prev.start.year != 0) {
|
||||||
prevLesson = _prev;
|
prevLesson = _prev;
|
||||||
@@ -198,7 +249,10 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
Duration get delay => _delay;
|
Duration get delay => _delay;
|
||||||
|
|
||||||
bool _sameDate(DateTime a, DateTime b) => (a.year == b.year && a.month == b.month && a.day == b.day);
|
bool _sameDate(DateTime a, DateTime b) =>
|
||||||
|
(a.year == b.year && a.month == b.month && a.day == b.day);
|
||||||
|
|
||||||
List<Lesson> _today(TimetableProvider p) => (p.getWeek(Week.current()) ?? []).where((l) => _sameDate(l.date, _now())).toList();
|
List<Lesson> _today(TimetableProvider p) => (p.getWeek(Week.current()) ?? [])
|
||||||
|
.where((l) => _sameDate(l.date, _now()))
|
||||||
|
.toList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'dart:io';
|
|||||||
import 'package:filcnaplo/api/client.dart';
|
import 'package:filcnaplo/api/client.dart';
|
||||||
import 'package:filcnaplo/models/release.dart';
|
import 'package:filcnaplo/models/release.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
|
||||||
class UpdateProvider extends ChangeNotifier {
|
class UpdateProvider extends ChangeNotifier {
|
||||||
// Private
|
// Private
|
||||||
@@ -20,9 +21,11 @@ class UpdateProvider extends ChangeNotifier {
|
|||||||
_releases = List.castFrom(initialReleases);
|
_releases = List.castFrom(initialReleases);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const currentVersion = String.fromEnvironment("APPVER", defaultValue: "1.0");
|
|
||||||
|
|
||||||
Future<void> fetch() async {
|
Future<void> fetch() async {
|
||||||
|
late String currentVersion;
|
||||||
|
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||||
|
currentVersion = packageInfo.version;
|
||||||
|
|
||||||
if (!Platform.isAndroid) return;
|
if (!Platform.isAndroid) return;
|
||||||
|
|
||||||
_releases = await FilcAPI.getReleases() ?? [];
|
_releases = await FilcAPI.getReleases() ?? [];
|
||||||
@@ -30,10 +33,30 @@ class UpdateProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
// Check for new releases
|
// Check for new releases
|
||||||
if (_releases.isNotEmpty) {
|
if (_releases.isNotEmpty) {
|
||||||
_available = _releases.first.version.compareTo(Version.fromString(currentVersion)) == 1;
|
_available = _releases.first.version
|
||||||
|
.compareTo(Version.fromString(currentVersion)) ==
|
||||||
|
1;
|
||||||
// ignore: avoid_print
|
// ignore: avoid_print
|
||||||
if (_available) print("INFO: New update: ${releases.first.version}");
|
if (_available) print("INFO: New update: ${releases.first.version}");
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<Map> installedVersion() async {
|
||||||
|
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||||
|
|
||||||
|
String appName = packageInfo.appName;
|
||||||
|
String packageName = packageInfo.packageName;
|
||||||
|
String version = packageInfo.version;
|
||||||
|
String buildNumber = packageInfo.buildNumber;
|
||||||
|
|
||||||
|
Map<String, String> release = {
|
||||||
|
"app_name": appName,
|
||||||
|
"package_name": packageName,
|
||||||
|
"version": version,
|
||||||
|
"build_number": buildNumber,
|
||||||
|
};
|
||||||
|
|
||||||
|
return release;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import 'package:filcnaplo/models/config.dart';
|
|||||||
import 'package:filcnaplo/theme/observer.dart';
|
import 'package:filcnaplo/theme/observer.dart';
|
||||||
import 'package:filcnaplo/theme/theme.dart';
|
import 'package:filcnaplo/theme/theme.dart';
|
||||||
import 'package:filcnaplo_kreta_api/client/client.dart';
|
import 'package:filcnaplo_kreta_api/client/client.dart';
|
||||||
|
import 'package:filcnaplo_kreta_api/providers/grade_provider.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
@@ -22,13 +23,18 @@ import 'package:provider/provider.dart';
|
|||||||
import 'package:filcnaplo_mobile_ui/common/system_chrome.dart' as mobile;
|
import 'package:filcnaplo_mobile_ui/common/system_chrome.dart' as mobile;
|
||||||
import 'package:filcnaplo_mobile_ui/screens/login/login_route.dart' as mobile;
|
import 'package:filcnaplo_mobile_ui/screens/login/login_route.dart' as mobile;
|
||||||
import 'package:filcnaplo_mobile_ui/screens/login/login_screen.dart' as mobile;
|
import 'package:filcnaplo_mobile_ui/screens/login/login_screen.dart' as mobile;
|
||||||
import 'package:filcnaplo_mobile_ui/screens/navigation/navigation_screen.dart' as mobile;
|
import 'package:filcnaplo_mobile_ui/screens/navigation/navigation_screen.dart'
|
||||||
import 'package:filcnaplo_mobile_ui/screens/settings/settings_route.dart' as mobile;
|
as mobile;
|
||||||
import 'package:filcnaplo_mobile_ui/screens/settings/settings_screen.dart' as mobile;
|
import 'package:filcnaplo_mobile_ui/screens/settings/settings_route.dart'
|
||||||
|
as mobile;
|
||||||
|
import 'package:filcnaplo_mobile_ui/screens/settings/settings_screen.dart'
|
||||||
|
as mobile;
|
||||||
|
|
||||||
// Desktop UI
|
// Desktop UI
|
||||||
import 'package:filcnaplo_desktop_ui/screens/navigation/navigation_screen.dart' as desktop;
|
import 'package:filcnaplo_desktop_ui/screens/navigation/navigation_screen.dart'
|
||||||
import 'package:filcnaplo_desktop_ui/screens/login/login_screen.dart' as desktop;
|
as desktop;
|
||||||
|
import 'package:filcnaplo_desktop_ui/screens/login/login_screen.dart'
|
||||||
|
as desktop;
|
||||||
import 'package:filcnaplo_desktop_ui/screens/login/login_route.dart' as desktop;
|
import 'package:filcnaplo_desktop_ui/screens/login/login_route.dart' as desktop;
|
||||||
|
|
||||||
// Providers
|
// Providers
|
||||||
@@ -36,7 +42,6 @@ import 'package:filcnaplo/models/settings.dart';
|
|||||||
import 'package:filcnaplo_kreta_api/providers/absence_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/absence_provider.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/event_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/event_provider.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/exam_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/exam_provider.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/grade_provider.dart';
|
|
||||||
import 'package:filcnaplo_kreta_api/providers/homework_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/homework_provider.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/message_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/message_provider.dart';
|
||||||
import 'package:filcnaplo_kreta_api/providers/note_provider.dart';
|
import 'package:filcnaplo_kreta_api/providers/note_provider.dart';
|
||||||
@@ -52,7 +57,12 @@ class App extends StatelessWidget {
|
|||||||
final UserProvider user;
|
final UserProvider user;
|
||||||
final DatabaseProvider database;
|
final DatabaseProvider database;
|
||||||
|
|
||||||
const App({Key? key, required this.database, required this.settings, required this.user}) : super(key: key);
|
const App(
|
||||||
|
{Key? key,
|
||||||
|
required this.database,
|
||||||
|
required this.settings,
|
||||||
|
required this.user})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -65,7 +75,8 @@ class App extends StatelessWidget {
|
|||||||
|
|
||||||
final status = StatusProvider();
|
final status = StatusProvider();
|
||||||
final kreta = KretaClient(user: user, settings: settings, status: status);
|
final kreta = KretaClient(user: user, settings: settings, status: status);
|
||||||
final timetable = TimetableProvider(user: user, database: database, kreta: kreta);
|
final timetable =
|
||||||
|
TimetableProvider(user: user, database: database, kreta: kreta);
|
||||||
final premium = PremiumProvider(settings: settings);
|
final premium = PremiumProvider(settings: settings);
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
@@ -83,23 +94,44 @@ class App extends StatelessWidget {
|
|||||||
ChangeNotifierProvider<StatusProvider>(create: (_) => status),
|
ChangeNotifierProvider<StatusProvider>(create: (_) => status),
|
||||||
Provider<KretaClient>(create: (_) => kreta),
|
Provider<KretaClient>(create: (_) => kreta),
|
||||||
Provider<DatabaseProvider>(create: (context) => database),
|
Provider<DatabaseProvider>(create: (context) => database),
|
||||||
ChangeNotifierProvider<ThemeModeObserver>(create: (context) => ThemeModeObserver(initialTheme: settings.theme)),
|
ChangeNotifierProvider<ThemeModeObserver>(
|
||||||
ChangeNotifierProvider<NewsProvider>(create: (context) => NewsProvider(context: context)),
|
create: (context) =>
|
||||||
ChangeNotifierProvider<UpdateProvider>(create: (context) => UpdateProvider(context: context)),
|
ThemeModeObserver(initialTheme: settings.theme)),
|
||||||
|
ChangeNotifierProvider<NewsProvider>(
|
||||||
|
create: (context) => NewsProvider(context: context)),
|
||||||
|
ChangeNotifierProvider<UpdateProvider>(
|
||||||
|
create: (context) => UpdateProvider(context: context)),
|
||||||
|
|
||||||
// User data providers
|
// User data providers
|
||||||
ChangeNotifierProvider<GradeProvider>(create: (_) => GradeProvider(settings: settings, user: user, database: database, kreta: kreta)),
|
ChangeNotifierProvider<GradeProvider>(
|
||||||
|
create: (_) => GradeProvider(
|
||||||
|
settings: settings,
|
||||||
|
user: user,
|
||||||
|
database: database,
|
||||||
|
kreta: kreta)),
|
||||||
ChangeNotifierProvider<TimetableProvider>(create: (_) => timetable),
|
ChangeNotifierProvider<TimetableProvider>(create: (_) => timetable),
|
||||||
ChangeNotifierProvider<ExamProvider>(create: (context) => ExamProvider(context: context)),
|
ChangeNotifierProvider<ExamProvider>(
|
||||||
ChangeNotifierProvider<HomeworkProvider>(create: (context) => HomeworkProvider(context: context)),
|
create: (context) => ExamProvider(context: context)),
|
||||||
ChangeNotifierProvider<MessageProvider>(create: (context) => MessageProvider(context: context)),
|
ChangeNotifierProvider<HomeworkProvider>(
|
||||||
ChangeNotifierProvider<NoteProvider>(create: (context) => NoteProvider(context: context)),
|
create: (context) => HomeworkProvider(context: context)),
|
||||||
ChangeNotifierProvider<EventProvider>(create: (context) => EventProvider(context: context)),
|
ChangeNotifierProvider<MessageProvider>(
|
||||||
ChangeNotifierProvider<AbsenceProvider>(create: (context) => AbsenceProvider(context: context)),
|
create: (context) => MessageProvider(context: context)),
|
||||||
|
ChangeNotifierProvider<NoteProvider>(
|
||||||
|
create: (context) => NoteProvider(context: context)),
|
||||||
|
ChangeNotifierProvider<EventProvider>(
|
||||||
|
create: (context) => EventProvider(context: context)),
|
||||||
|
ChangeNotifierProvider<AbsenceProvider>(
|
||||||
|
create: (context) => AbsenceProvider(context: context)),
|
||||||
|
|
||||||
ChangeNotifierProvider<GradeCalculatorProvider>(
|
ChangeNotifierProvider<GradeCalculatorProvider>(
|
||||||
create: (_) => GradeCalculatorProvider(settings: settings, user: user, database: database, kreta: kreta)),
|
create: (_) => GradeCalculatorProvider(
|
||||||
ChangeNotifierProvider<LiveCardProvider>(create: (context) => LiveCardProvider(timetable: timetable, settings: settings))
|
settings: settings,
|
||||||
|
user: user,
|
||||||
|
database: database,
|
||||||
|
kreta: kreta)),
|
||||||
|
ChangeNotifierProvider<LiveCardProvider>(
|
||||||
|
create: (context) =>
|
||||||
|
LiveCardProvider(timetable: timetable, settings: settings))
|
||||||
],
|
],
|
||||||
child: Consumer<ThemeModeObserver>(
|
child: Consumer<ThemeModeObserver>(
|
||||||
builder: (context, themeMode, child) {
|
builder: (context, themeMode, child) {
|
||||||
@@ -110,12 +142,15 @@ class App extends StatelessWidget {
|
|||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
// Limit font size scaling to 1.0
|
// Limit font size scaling to 1.0
|
||||||
double textScaleFactor = min(MediaQuery.of(context).textScaleFactor, 1.0);
|
double textScaleFactor =
|
||||||
|
min(MediaQuery.of(context).textScaleFactor, 1.0);
|
||||||
|
|
||||||
return I18n(
|
return I18n(
|
||||||
initialLocale: Locale(settings.language, settings.language.toUpperCase()),
|
initialLocale: Locale(
|
||||||
|
settings.language, settings.language.toUpperCase()),
|
||||||
child: MediaQuery(
|
child: MediaQuery(
|
||||||
data: MediaQuery.of(context).copyWith(textScaleFactor: textScaleFactor),
|
data: MediaQuery.of(context)
|
||||||
|
.copyWith(textScaleFactor: textScaleFactor),
|
||||||
child: child ?? Container(),
|
child: child ?? Container(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -148,7 +183,8 @@ class App extends StatelessWidget {
|
|||||||
return locale;
|
return locale;
|
||||||
},
|
},
|
||||||
onGenerateRoute: (settings) => rootNavigator(settings),
|
onGenerateRoute: (settings) => rootNavigator(settings),
|
||||||
initialRoute: user.getUsers().isNotEmpty ? "navigation" : "login",
|
initialRoute:
|
||||||
|
user.getUsers().isNotEmpty ? "navigation" : "login",
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -162,7 +198,8 @@ class App extends StatelessWidget {
|
|||||||
if (Platform.isAndroid || Platform.isIOS) {
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
switch (route.name) {
|
switch (route.name) {
|
||||||
case "login_back":
|
case "login_back":
|
||||||
return CupertinoPageRoute(builder: (context) => const mobile.LoginScreen(back: true));
|
return CupertinoPageRoute(
|
||||||
|
builder: (context) => const mobile.LoginScreen(back: true));
|
||||||
case "login":
|
case "login":
|
||||||
return _rootRoute(const mobile.LoginScreen());
|
return _rootRoute(const mobile.LoginScreen());
|
||||||
case "navigation":
|
case "navigation":
|
||||||
@@ -175,7 +212,8 @@ class App extends StatelessWidget {
|
|||||||
} else if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
|
} else if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
|
||||||
switch (route.name) {
|
switch (route.name) {
|
||||||
case "login_back":
|
case "login_back":
|
||||||
return CupertinoPageRoute(builder: (context) => const desktop.LoginScreen(back: true));
|
return CupertinoPageRoute(
|
||||||
|
builder: (context) => const desktop.LoginScreen(back: true));
|
||||||
case "login":
|
case "login":
|
||||||
return _rootRoute(const desktop.LoginScreen());
|
return _rootRoute(const desktop.LoginScreen());
|
||||||
case "navigation":
|
case "navigation":
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class Config {
|
|||||||
|
|
||||||
factory Config.fromJson(Map json) {
|
factory Config.fromJson(Map json) {
|
||||||
return Config(
|
return Config(
|
||||||
userAgent: json["user_agent"] ?? "hu.filc.naplo/\$0/\$1/\$2",
|
userAgent: json["user_agent"] ?? "hu.refilc.naplo/\$0/\$1/\$2",
|
||||||
json: json,
|
json: json,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ Color gradeColor(
|
|||||||
|
|
||||||
switch (valueInt) {
|
switch (valueInt) {
|
||||||
case 5:
|
case 5:
|
||||||
return Color(0xff3d7bf4);
|
return settings.gradeColors[4];
|
||||||
case 4:
|
case 4:
|
||||||
return settings.gradeColors[3];
|
return settings.gradeColors[3];
|
||||||
case 3:
|
case 3:
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import connectivity_plus
|
|||||||
import dynamic_color
|
import dynamic_color
|
||||||
import flutter_acrylic
|
import flutter_acrylic
|
||||||
import flutter_local_notifications
|
import flutter_local_notifications
|
||||||
|
import package_info_plus
|
||||||
import path_provider_foundation
|
import path_provider_foundation
|
||||||
import share_plus_macos
|
import share_plus_macos
|
||||||
import sqflite
|
import sqflite
|
||||||
@@ -19,6 +20,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||||||
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
||||||
FlutterAcrylicPlugin.register(with: registry.registrar(forPlugin: "FlutterAcrylicPlugin"))
|
FlutterAcrylicPlugin.register(with: registry.registrar(forPlugin: "FlutterAcrylicPlugin"))
|
||||||
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
|
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
|
||||||
|
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
||||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
platform :osx, '10.11'
|
platform :osx, '10.14'
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|||||||
@@ -6,11 +6,14 @@ PODS:
|
|||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- flutter_acrylic (0.1.0):
|
- flutter_acrylic (0.1.0):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- flutter_local_notifications (0.0.1):
|
||||||
|
- FlutterMacOS
|
||||||
- FlutterMacOS (1.0.0)
|
- FlutterMacOS (1.0.0)
|
||||||
- FMDB (2.7.5):
|
- FMDB (2.7.5):
|
||||||
- FMDB/standard (= 2.7.5)
|
- FMDB/standard (= 2.7.5)
|
||||||
- FMDB/standard (2.7.5)
|
- FMDB/standard (2.7.5)
|
||||||
- path_provider_macos (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- ReachabilitySwift (5.0.0)
|
- ReachabilitySwift (5.0.0)
|
||||||
- share_plus_macos (0.0.1):
|
- share_plus_macos (0.0.1):
|
||||||
@@ -25,8 +28,9 @@ DEPENDENCIES:
|
|||||||
- connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos`)
|
- connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos`)
|
||||||
- dynamic_color (from `Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos`)
|
- dynamic_color (from `Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos`)
|
||||||
- flutter_acrylic (from `Flutter/ephemeral/.symlinks/plugins/flutter_acrylic/macos`)
|
- flutter_acrylic (from `Flutter/ephemeral/.symlinks/plugins/flutter_acrylic/macos`)
|
||||||
|
- flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`)
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`)
|
- share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`)
|
||||||
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`)
|
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`)
|
||||||
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||||
@@ -43,10 +47,12 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos
|
||||||
flutter_acrylic:
|
flutter_acrylic:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_acrylic/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/flutter_acrylic/macos
|
||||||
|
flutter_local_notifications:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos
|
||||||
FlutterMacOS:
|
FlutterMacOS:
|
||||||
:path: Flutter/ephemeral
|
:path: Flutter/ephemeral
|
||||||
path_provider_macos:
|
path_provider_foundation:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||||
share_plus_macos:
|
share_plus_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos
|
||||||
sqflite:
|
sqflite:
|
||||||
@@ -56,16 +62,17 @@ EXTERNAL SOURCES:
|
|||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
connectivity_plus: 18d3c32514c886e046de60e9c13895109866c747
|
connectivity_plus: 18d3c32514c886e046de60e9c13895109866c747
|
||||||
dynamic_color: 394d6a888650f8534e029b27d2f8bc5c64e44008
|
dynamic_color: 2eaa27267de1ca20d879fbd6e01259773fb1670f
|
||||||
flutter_acrylic: c3df24ae52ab6597197837ce59ef2a8542640c17
|
flutter_acrylic: c3df24ae52ab6597197837ce59ef2a8542640c17
|
||||||
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
|
flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4
|
||||||
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19
|
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
|
||||||
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
|
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
|
||||||
share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4
|
share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4
|
||||||
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
|
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
|
||||||
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
|
url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451
|
||||||
|
|
||||||
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
|
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.12.1
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 51;
|
objectVersion = 54;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXAggregateTarget section */
|
/* Begin PBXAggregateTarget section */
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastSwiftUpdateCheck = 0920;
|
LastSwiftUpdateCheck = 0920;
|
||||||
LastUpgradeCheck = 1400;
|
LastUpgradeCheck = 1300;
|
||||||
ORGANIZATIONNAME = "";
|
ORGANIZATIONNAME = "";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
33CC10EC2044A3C60003C045 = {
|
33CC10EC2044A3C60003C045 = {
|
||||||
@@ -254,6 +254,7 @@
|
|||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
@@ -403,7 +404,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
@@ -431,7 +432,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
NEW_SETTING = "";
|
NEW_SETTING = "";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = hu.filc.filcnaplo;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.filc.filcnaplo;
|
||||||
PRODUCT_NAME = "Felt Diary";
|
PRODUCT_NAME = "Felt Diary";
|
||||||
@@ -445,7 +446,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
};
|
};
|
||||||
name = Profile;
|
name = Profile;
|
||||||
@@ -495,7 +496,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
@@ -543,7 +544,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
@@ -571,7 +572,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
NEW_SETTING = "";
|
NEW_SETTING = "";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = hu.filc.filcnaplo;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.filc.filcnaplo;
|
||||||
PRODUCT_NAME = "Felt Diary";
|
PRODUCT_NAME = "Felt Diary";
|
||||||
@@ -601,7 +602,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
NEW_SETTING = "";
|
NEW_SETTING = "";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = hu.filc.filcnaplo;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.filc.filcnaplo;
|
||||||
PRODUCT_NAME = "Felt Diary";
|
PRODUCT_NAME = "Felt Diary";
|
||||||
@@ -615,7 +616,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@@ -625,7 +626,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1400"
|
LastUpgradeVersion = "1300"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ description: "Nem hivatalos e-napló alkalmazás az e-Kréta rendszerhez"
|
|||||||
homepage: https://refilc.hu
|
homepage: https://refilc.hu
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
|
|
||||||
version: 4.0.0+198
|
version: 4.0.1+205
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.17.0 <3.0.0"
|
sdk: ">=2.17.0 <3.0.0"
|
||||||
@@ -67,6 +67,7 @@ dependencies:
|
|||||||
animations: ^2.0.1
|
animations: ^2.0.1
|
||||||
background_fetch: ^1.1.5
|
background_fetch: ^1.1.5
|
||||||
flutter_local_notifications: ^14.1.0
|
flutter_local_notifications: ^14.1.0
|
||||||
|
package_info_plus: ^3.1.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_lints: ^2.0.1
|
flutter_lints: ^2.0.1
|
||||||
@@ -146,11 +147,13 @@ flutter:
|
|||||||
weight: 700
|
weight: 700
|
||||||
style: italic
|
style: italic
|
||||||
|
|
||||||
flutter_icons:
|
flutter_launcher_icons:
|
||||||
image_path: assets/icons/ic_launcher.png
|
image_path: assets/icons/ic_android.png
|
||||||
android: true
|
android: true
|
||||||
ios: true
|
adaptive_icon_background: "#3D7BF4"
|
||||||
remove_alpha_ios: true
|
adaptive_icon_foreground: assets/icons/ic_android.png
|
||||||
|
ios: false
|
||||||
|
remove_alpha_ios: false
|
||||||
|
|
||||||
flutter_native_splash:
|
flutter_native_splash:
|
||||||
color: "#3D7BF4"
|
color: "#3D7BF4"
|
||||||
|
|||||||
@@ -26,16 +26,18 @@ import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
|
|||||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'grades_page.i18n.dart';
|
import 'grades_page.i18n.dart';
|
||||||
// import 'package:filcnaplo_premium/ui/mobile/goalplanner/new_goal.dart';
|
//import 'package:filcnaplo_premium/ui/mobile/goal_planner/new_goal.dart';
|
||||||
|
|
||||||
class GradeSubjectView extends StatefulWidget {
|
class GradeSubjectView extends StatefulWidget {
|
||||||
const GradeSubjectView(this.subject, {Key? key, this.groupAverage = 0.0}) : super(key: key);
|
const GradeSubjectView(this.subject, {Key? key, this.groupAverage = 0.0})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
final Subject subject;
|
final Subject subject;
|
||||||
final double groupAverage;
|
final double groupAverage;
|
||||||
|
|
||||||
void push(BuildContext context, {bool root = false}) {
|
void push(BuildContext context, {bool root = false}) {
|
||||||
Navigator.of(context, rootNavigator: root).push(CupertinoPageRoute(builder: (context) => this));
|
Navigator.of(context, rootNavigator: root)
|
||||||
|
.push(CupertinoPageRoute(builder: (context) => this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -70,7 +72,9 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
final gradeDates = subjectGrades.map((e) => e.date.millisecondsSinceEpoch);
|
final gradeDates = subjectGrades.map((e) => e.date.millisecondsSinceEpoch);
|
||||||
final maxGradeDate = gradeDates.fold(0, max);
|
final maxGradeDate = gradeDates.fold(0, max);
|
||||||
final minGradeDate = gradeDates.fold(0, min);
|
final minGradeDate = gradeDates.fold(0, min);
|
||||||
if (maxGradeDate - minGradeDate < const Duration(days: 5).inMilliseconds) return false; // naplo/#78
|
if (maxGradeDate - minGradeDate < const Duration(days: 5).inMilliseconds) {
|
||||||
|
return false; // naplo/#78
|
||||||
|
}
|
||||||
|
|
||||||
return subjectGrades.where((e) => e.type == GradeType.midYear).length > 1;
|
return subjectGrades.where((e) => e.type == GradeType.midYear).length > 1;
|
||||||
}
|
}
|
||||||
@@ -129,7 +133,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
tiles.add(Padding(padding: EdgeInsets.only(bottom: !gradeCalcMode ? 24.0 : 250.0)));
|
tiles.add(Padding(
|
||||||
|
padding: EdgeInsets.only(bottom: !gradeCalcMode ? 24.0 : 250.0)));
|
||||||
gradeTiles = List.castFrom(tiles);
|
gradeTiles = List.castFrom(tiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +147,10 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
average = AverageHelper.averageEvals(subjectGrades);
|
average = AverageHelper.averageEvals(subjectGrades);
|
||||||
final prevAvg = subjectGrades.isNotEmpty
|
final prevAvg = subjectGrades.isNotEmpty
|
||||||
? AverageHelper.averageEvals(subjectGrades
|
? AverageHelper.averageEvals(subjectGrades
|
||||||
.where((e) => e.date.isBefore(subjectGrades.reduce((v, e) => e.date.isAfter(v.date) ? e : v).date.subtract(const Duration(days: 30))))
|
.where((e) => e.date.isBefore(subjectGrades
|
||||||
|
.reduce((v, e) => e.date.isAfter(v.date) ? e : v)
|
||||||
|
.date
|
||||||
|
.subtract(const Duration(days: 30))))
|
||||||
.toList())
|
.toList())
|
||||||
: 0.0;
|
: 0.0;
|
||||||
|
|
||||||
@@ -153,14 +161,17 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text("annual_average".i18n),
|
Text("annual_average".i18n),
|
||||||
if (average != prevAvg) TrendDisplay(current: average, previous: prevAvg),
|
if (average != prevAvg)
|
||||||
|
TrendDisplay(current: average, previous: prevAvg),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(top: 12.0, right: 12.0),
|
padding: const EdgeInsets.only(top: 12.0, right: 12.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: GradeGraph(subjectGrades, dayThreshold: 5, classAvg: widget.groupAverage)),
|
Expanded(
|
||||||
|
child: GradeGraph(subjectGrades,
|
||||||
|
dayThreshold: 5, classAvg: widget.groupAverage)),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 24.0),
|
padding: const EdgeInsets.only(bottom: 24.0),
|
||||||
child: GradesCount(grades: subjectGrades),
|
child: GradesCount(grades: subjectGrades),
|
||||||
@@ -174,7 +185,9 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
if (!gradeCalcMode) {
|
if (!gradeCalcMode) {
|
||||||
buildTiles(subjectGrades);
|
buildTiles(subjectGrades);
|
||||||
} else {
|
} else {
|
||||||
List<Grade> ghostGrades = calculatorProvider.ghosts.where((e) => e.subject == widget.subject).toList();
|
List<Grade> ghostGrades = calculatorProvider.ghosts
|
||||||
|
.where((e) => e.subject == widget.subject)
|
||||||
|
.toList();
|
||||||
buildTiles(ghostGrades);
|
buildTiles(ghostGrades);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +195,10 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
key: _scaffoldKey,
|
key: _scaffoldKey,
|
||||||
floatingActionButtonLocation: ExpandableFab.location,
|
floatingActionButtonLocation: ExpandableFab.location,
|
||||||
floatingActionButton: Visibility(
|
floatingActionButton: Visibility(
|
||||||
visible: !gradeCalcMode && subjectGrades.where((e) => e.type == GradeType.midYear).isNotEmpty,
|
visible: !gradeCalcMode &&
|
||||||
|
subjectGrades
|
||||||
|
.where((e) => e.type == GradeType.midYear)
|
||||||
|
.isNotEmpty,
|
||||||
child: ExpandableFab(
|
child: ExpandableFab(
|
||||||
type: ExpandableFabType.up,
|
type: ExpandableFabType.up,
|
||||||
distance: 50,
|
distance: 50,
|
||||||
@@ -215,12 +231,17 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
},
|
},
|
||||||
navBarItems: [
|
navBarItems: [
|
||||||
const SizedBox(width: 6.0),
|
const SizedBox(width: 6.0),
|
||||||
if (widget.groupAverage != 0) Center(child: AverageDisplay(average: widget.groupAverage, border: true)),
|
if (widget.groupAverage != 0)
|
||||||
|
Center(
|
||||||
|
child: AverageDisplay(
|
||||||
|
average: widget.groupAverage, border: true)),
|
||||||
const SizedBox(width: 6.0),
|
const SizedBox(width: 6.0),
|
||||||
if (average != 0) Center(child: AverageDisplay(average: average)),
|
if (average != 0)
|
||||||
|
Center(child: AverageDisplay(average: average)),
|
||||||
const SizedBox(width: 12.0),
|
const SizedBox(width: 12.0),
|
||||||
],
|
],
|
||||||
icon: SubjectIcon.resolveVariant(subject: widget.subject, context: context),
|
icon: SubjectIcon.resolveVariant(
|
||||||
|
subject: widget.subject, context: context),
|
||||||
scrollController: _scrollController,
|
scrollController: _scrollController,
|
||||||
title: widget.subject.renamedTo ?? widget.subject.name.capital(),
|
title: widget.subject.renamedTo ?? widget.subject.name.capital(),
|
||||||
italic: widget.subject.isRenamed,
|
italic: widget.subject.isRenamed,
|
||||||
@@ -240,13 +261,15 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
|
|
||||||
void gradeCalc(BuildContext context) {
|
void gradeCalc(BuildContext context) {
|
||||||
// Scroll to the top of the page
|
// Scroll to the top of the page
|
||||||
_scrollController.animateTo(75, duration: const Duration(milliseconds: 500), curve: Curves.ease);
|
_scrollController.animateTo(75,
|
||||||
|
duration: const Duration(milliseconds: 500), curve: Curves.ease);
|
||||||
|
|
||||||
calculatorProvider.clear();
|
calculatorProvider.clear();
|
||||||
calculatorProvider.addAllGrades(gradeProvider.grades);
|
calculatorProvider.addAllGrades(gradeProvider.grades);
|
||||||
|
|
||||||
_sheetController = _scaffoldKey.currentState?.showBottomSheet(
|
_sheetController = _scaffoldKey.currentState?.showBottomSheet(
|
||||||
(context) => RoundedBottomSheet(child: GradeCalculator(widget.subject), borderRadius: 14.0),
|
(context) => RoundedBottomSheet(
|
||||||
|
child: GradeCalculator(widget.subject), borderRadius: 14.0),
|
||||||
backgroundColor: const Color(0x00000000),
|
backgroundColor: const Color(0x00000000),
|
||||||
elevation: 12.0,
|
elevation: 12.0,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -41,13 +41,21 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
|
|
||||||
int avgDropValue = 0;
|
int avgDropValue = 0;
|
||||||
|
|
||||||
List<Grade> getSubjectGrades(Subject subject, {int days = 0}) => gradeProvider.grades
|
List<Grade> getSubjectGrades(Subject subject, {int days = 0}) => gradeProvider
|
||||||
.where(
|
.grades
|
||||||
(e) => e.subject == subject && e.type == GradeType.midYear && (days == 0 || e.date.isBefore(DateTime.now().subtract(Duration(days: days)))))
|
.where((e) =>
|
||||||
|
e.subject == subject &&
|
||||||
|
e.type == GradeType.midYear &&
|
||||||
|
(days == 0 ||
|
||||||
|
e.date.isBefore(DateTime.now().subtract(Duration(days: days)))))
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
void generateTiles() {
|
void generateTiles() {
|
||||||
List<Subject> subjects = gradeProvider.grades.map((e) => e.subject).toSet().toList()..sort((a, b) => a.name.compareTo(b.name));
|
List<Subject> subjects = gradeProvider.grades
|
||||||
|
.map((e) => e.subject)
|
||||||
|
.toSet()
|
||||||
|
.toList()
|
||||||
|
..sort((a, b) => a.name.compareTo(b.name));
|
||||||
List<Widget> tiles = [];
|
List<Widget> tiles = [];
|
||||||
|
|
||||||
Map<Subject, double> subjectAvgs = {};
|
Map<Subject, double> subjectAvgs = {};
|
||||||
@@ -59,11 +67,15 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
double averageBefore = 0.0;
|
double averageBefore = 0.0;
|
||||||
|
|
||||||
if (avgDropValue != 0) {
|
if (avgDropValue != 0) {
|
||||||
List<Grade> gradesBefore = getSubjectGrades(subject, days: avgDropValue);
|
List<Grade> gradesBefore =
|
||||||
averageBefore = avgDropValue == 0 ? 0.0 : AverageHelper.averageEvals(gradesBefore);
|
getSubjectGrades(subject, days: avgDropValue);
|
||||||
|
averageBefore =
|
||||||
|
avgDropValue == 0 ? 0.0 : AverageHelper.averageEvals(gradesBefore);
|
||||||
}
|
}
|
||||||
var nullavg = GroupAverage(average: 0.0, subject: subject, uid: "0");
|
var nullavg = GroupAverage(average: 0.0, subject: subject, uid: "0");
|
||||||
double groupAverage = gradeProvider.groupAverages.firstWhere((e) => e.subject == subject, orElse: () => nullavg).average;
|
double groupAverage = gradeProvider.groupAverages
|
||||||
|
.firstWhere((e) => e.subject == subject, orElse: () => nullavg)
|
||||||
|
.average;
|
||||||
|
|
||||||
if (avg != 0) subjectAvgs[subject] = avg;
|
if (avg != 0) subjectAvgs[subject] = avg;
|
||||||
|
|
||||||
@@ -73,7 +85,8 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
average: avg,
|
average: avg,
|
||||||
groupAverage: avgDropValue == 0 ? groupAverage : 0.0,
|
groupAverage: avgDropValue == 0 ? groupAverage : 0.0,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
GradeSubjectView(subject, groupAverage: groupAverage).push(context, root: true);
|
GradeSubjectView(subject, groupAverage: groupAverage)
|
||||||
|
.push(context, root: true);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}));
|
}));
|
||||||
@@ -81,7 +94,12 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
if (tiles.isNotEmpty) {
|
if (tiles.isNotEmpty) {
|
||||||
tiles.insert(0, yearlyGraph);
|
tiles.insert(0, yearlyGraph);
|
||||||
tiles.insert(1, FailWarning(subjectAvgs: subjectAvgs));
|
tiles.insert(1, FailWarning(subjectAvgs: subjectAvgs));
|
||||||
tiles.insert(2, PanelTitle(title: Text(avgDropValue == 0 ? "Subjects".i18n : "Subjects_changes".i18n)));
|
tiles.insert(
|
||||||
|
2,
|
||||||
|
PanelTitle(
|
||||||
|
title: Text(avgDropValue == 0
|
||||||
|
? "Subjects".i18n
|
||||||
|
: "Subjects_changes".i18n)));
|
||||||
tiles.insert(3, const PanelHeader(padding: EdgeInsets.only(top: 12.0)));
|
tiles.insert(3, const PanelHeader(padding: EdgeInsets.only(top: 12.0)));
|
||||||
tiles.add(const PanelFooter(padding: EdgeInsets.only(bottom: 12.0)));
|
tiles.add(const PanelFooter(padding: EdgeInsets.only(bottom: 12.0)));
|
||||||
tiles.add(const Padding(padding: EdgeInsets.only(bottom: 24.0)));
|
tiles.add(const Padding(padding: EdgeInsets.only(bottom: 24.0)));
|
||||||
@@ -95,9 +113,15 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
double subjectAvg = subjectAvgs.isNotEmpty ? subjectAvgs.values.fold(0.0, (double a, double b) => a + b) / subjectAvgs.length : 0.0;
|
double subjectAvg = subjectAvgs.isNotEmpty
|
||||||
|
? subjectAvgs.values.fold(0.0, (double a, double b) => a + b) /
|
||||||
|
subjectAvgs.length
|
||||||
|
: 0.0;
|
||||||
final double classAvg = gradeProvider.groupAverages.isNotEmpty
|
final double classAvg = gradeProvider.groupAverages.isNotEmpty
|
||||||
? gradeProvider.groupAverages.map((e) => e.average).fold(0.0, (double a, double b) => a + b) / gradeProvider.groupAverages.length
|
? gradeProvider.groupAverages
|
||||||
|
.map((e) => e.average)
|
||||||
|
.fold(0.0, (double a, double b) => a + b) /
|
||||||
|
gradeProvider.groupAverages.length
|
||||||
: 0.0;
|
: 0.0;
|
||||||
|
|
||||||
if (subjectAvg > 0) {
|
if (subjectAvg > 0) {
|
||||||
@@ -151,18 +175,31 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
|
|
||||||
final double totalClassAvg = gradeProvider.groupAverages.isEmpty
|
final double totalClassAvg = gradeProvider.groupAverages.isEmpty
|
||||||
? 0.0
|
? 0.0
|
||||||
: gradeProvider.groupAverages.map((e) => e.average).fold(0.0, (double a, double b) => a + b) / gradeProvider.groupAverages.length;
|
: gradeProvider.groupAverages
|
||||||
|
.map((e) => e.average)
|
||||||
|
.fold(0.0, (double a, double b) => a + b) /
|
||||||
|
gradeProvider.groupAverages.length;
|
||||||
|
|
||||||
final now = gradeProvider.grades.isNotEmpty ? gradeProvider.grades.reduce((v, e) => e.date.isAfter(v.date) ? e : v).date : DateTime.now();
|
final now = gradeProvider.grades.isNotEmpty
|
||||||
|
? gradeProvider.grades
|
||||||
|
.reduce((v, e) => e.date.isAfter(v.date) ? e : v)
|
||||||
|
.date
|
||||||
|
: DateTime.now();
|
||||||
|
|
||||||
final currentStudentAvg = AverageHelper.averageEvals(gradeProvider.grades.where((e) => e.type == GradeType.midYear).toList());
|
final currentStudentAvg = AverageHelper.averageEvals(gradeProvider.grades
|
||||||
|
.where((e) => e.type == GradeType.midYear)
|
||||||
|
.toList());
|
||||||
final prevStudentAvg = AverageHelper.averageEvals(gradeProvider.grades
|
final prevStudentAvg = AverageHelper.averageEvals(gradeProvider.grades
|
||||||
.where((e) => e.type == GradeType.midYear)
|
.where((e) => e.type == GradeType.midYear)
|
||||||
.where((e) => e.date.isBefore(now.subtract(const Duration(days: 30))))
|
.where((e) => e.date.isBefore(now.subtract(const Duration(days: 30))))
|
||||||
.toList());
|
.toList());
|
||||||
|
|
||||||
List<Grade> graphGrades = gradeProvider.grades
|
List<Grade> graphGrades = gradeProvider.grades
|
||||||
.where((e) => e.type == GradeType.midYear && (avgDropValue == 0 || e.date.isAfter(DateTime.now().subtract(Duration(days: avgDropValue)))))
|
.where((e) =>
|
||||||
|
e.type == GradeType.midYear &&
|
||||||
|
(avgDropValue == 0 ||
|
||||||
|
e.date.isAfter(
|
||||||
|
DateTime.now().subtract(Duration(days: avgDropValue)))))
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
yearlyGraph = Padding(
|
yearlyGraph = Padding(
|
||||||
@@ -183,8 +220,12 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
children: [
|
children: [
|
||||||
// if (totalClassAvg >= 1.0) AverageDisplay(average: totalClassAvg, border: true),
|
// if (totalClassAvg >= 1.0) AverageDisplay(average: totalClassAvg, border: true),
|
||||||
// const SizedBox(width: 4.0),
|
// const SizedBox(width: 4.0),
|
||||||
TrendDisplay(previous: prevStudentAvg, current: currentStudentAvg),
|
TrendDisplay(
|
||||||
if (gradeProvider.grades.where((e) => e.type == GradeType.midYear).isNotEmpty) AverageDisplay(average: currentStudentAvg),
|
previous: prevStudentAvg, current: currentStudentAvg),
|
||||||
|
if (gradeProvider.grades
|
||||||
|
.where((e) => e.type == GradeType.midYear)
|
||||||
|
.isNotEmpty)
|
||||||
|
AverageDisplay(average: currentStudentAvg),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -193,7 +234,9 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
padding: const EdgeInsets.only(top: 12.0, right: 12.0),
|
padding: const EdgeInsets.only(top: 12.0, right: 12.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: GradeGraph(graphGrades, dayThreshold: 2, classAvg: totalClassAvg)),
|
Expanded(
|
||||||
|
child: GradeGraph(graphGrades,
|
||||||
|
dayThreshold: 2, classAvg: totalClassAvg)),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 24.0),
|
padding: const EdgeInsets.only(bottom: 24.0),
|
||||||
child: GradesCount(grades: graphGrades),
|
child: GradesCount(grades: graphGrades),
|
||||||
@@ -210,7 +253,8 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.only(top: 9.0),
|
padding: const EdgeInsets.only(top: 9.0),
|
||||||
child: NestedScrollView(
|
child: NestedScrollView(
|
||||||
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
|
physics: const BouncingScrollPhysics(
|
||||||
|
parent: AlwaysScrollableScrollPhysics()),
|
||||||
headerSliverBuilder: (context, _) => [
|
headerSliverBuilder: (context, _) => [
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
@@ -223,7 +267,10 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
padding: const EdgeInsets.only(left: 8.0),
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
"Grades".i18n,
|
"Grades".i18n,
|
||||||
style: TextStyle(color: AppColors.of(context).text, fontSize: 32.0, fontWeight: FontWeight.bold),
|
style: TextStyle(
|
||||||
|
color: AppColors.of(context).text,
|
||||||
|
fontSize: 32.0,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
shadowColor: Theme.of(context).shadowColor,
|
shadowColor: Theme.of(context).shadowColor,
|
||||||
@@ -238,7 +285,8 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
itemCount: max(subjectTiles.length, 1),
|
itemCount: max(subjectTiles.length, 1),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (subjectTiles.isNotEmpty) {
|
if (subjectTiles.isNotEmpty) {
|
||||||
EdgeInsetsGeometry panelPadding = const EdgeInsets.symmetric(horizontal: 24.0);
|
EdgeInsetsGeometry panelPadding =
|
||||||
|
const EdgeInsets.symmetric(horizontal: 24.0);
|
||||||
|
|
||||||
if (subjectTiles[index].runtimeType == GradeSubjectTile) {
|
if (subjectTiles[index].runtimeType == GradeSubjectTile) {
|
||||||
return Padding(
|
return Padding(
|
||||||
@@ -248,7 +296,8 @@ class _GradesPageState extends State<GradesPage> {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
return Padding(padding: panelPadding, child: subjectTiles[index]);
|
return Padding(
|
||||||
|
padding: panelPadding, child: subjectTiles[index]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Container();
|
return Container();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:filcnaplo_kreta_api/client/api.dart';
|
|||||||
import 'package:filcnaplo_kreta_api/client/client.dart';
|
import 'package:filcnaplo_kreta_api/client/client.dart';
|
||||||
import 'package:filcnaplo_kreta_api/models/grade.dart';
|
import 'package:filcnaplo_kreta_api/models/grade.dart';
|
||||||
import 'package:filcnaplo_kreta_api/models/group_average.dart';
|
import 'package:filcnaplo_kreta_api/models/group_average.dart';
|
||||||
|
import 'package:filcnaplo_kreta_api/providers/grade_provider.i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class GradeProvider with ChangeNotifier {
|
class GradeProvider with ChangeNotifier {
|
||||||
@@ -21,7 +22,8 @@ class GradeProvider with ChangeNotifier {
|
|||||||
|
|
||||||
// Public
|
// Public
|
||||||
List<Grade> get grades => _grades;
|
List<Grade> get grades => _grades;
|
||||||
DateTime get lastSeenDate => _settings.gradeOpeningFun ? _lastSeen : DateTime(3000);
|
DateTime get lastSeenDate =>
|
||||||
|
_settings.gradeOpeningFun ? _lastSeen : DateTime(3000);
|
||||||
String get groups => _groups;
|
String get groups => _groups;
|
||||||
List<GroupAverage> get groupAverages => _groupAvg;
|
List<GroupAverage> get groupAverages => _groupAvg;
|
||||||
|
|
||||||
@@ -65,7 +67,9 @@ class GradeProvider with ChangeNotifier {
|
|||||||
_groupAvg = await userQuery.getGroupAverages(userId: userId);
|
_groupAvg = await userQuery.getGroupAverages(userId: userId);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
DateTime lastSeenDB = await userQuery.lastSeenGrade(userId: userId);
|
DateTime lastSeenDB = await userQuery.lastSeenGrade(userId: userId);
|
||||||
if (lastSeenDB.millisecondsSinceEpoch == 0 || lastSeenDB.year == 0 || !_settings.gradeOpeningFun) {
|
if (lastSeenDB.millisecondsSinceEpoch == 0 ||
|
||||||
|
lastSeenDB.year == 0 ||
|
||||||
|
!_settings.gradeOpeningFun) {
|
||||||
_lastSeen = DateTime.now();
|
_lastSeen = DateTime.now();
|
||||||
await seenAll();
|
await seenAll();
|
||||||
} else {
|
} else {
|
||||||
@@ -77,13 +81,25 @@ class GradeProvider with ChangeNotifier {
|
|||||||
|
|
||||||
// good student mode, renamed subjects
|
// good student mode, renamed subjects
|
||||||
Future<void> convertBySettings() async {
|
Future<void> convertBySettings() async {
|
||||||
Map<String, String> renamedSubjects = _settings.renamedSubjectsEnabled ? await _database.userQuery.renamedSubjects(userId: _user.user!.id) : {};
|
Map<String, String> renamedSubjects = _settings.renamedSubjectsEnabled
|
||||||
|
? await _database.userQuery.renamedSubjects(userId: _user.user!.id)
|
||||||
|
: {};
|
||||||
|
|
||||||
for (Grade grade in _grades) {
|
for (Grade grade in _grades) {
|
||||||
grade.subject.renamedTo = renamedSubjects.isNotEmpty ? renamedSubjects[grade.subject.id] : null;
|
//grade.subject.renamedTo = renamedSubjects.isNotEmpty ? renamedSubjects[grade.subject.id] : null;
|
||||||
grade.value.value = _settings.goodStudent ? 5 : grade.json!["SzamErtek"] ?? 0;
|
grade.subject.renamedTo = null;
|
||||||
grade.value.valueName = _settings.goodStudent ? "Példás" : grade.json!["SzovegesErtek"] ?? "";
|
if (renamedSubjects.isNotEmpty) {
|
||||||
grade.value.shortName = _settings.goodStudent ? "Példás" : grade.json!["SzovegesErtekelesRovidNev"] ?? "";
|
grade.subject.name =
|
||||||
|
renamedSubjects[grade.subject.id] ?? grade.subject.name;
|
||||||
|
}
|
||||||
|
grade.value.value =
|
||||||
|
_settings.goodStudent ? 5 : grade.json!["SzamErtek"] ?? 0;
|
||||||
|
grade.value.valueName = _settings.goodStudent
|
||||||
|
? "Jeles".i18n
|
||||||
|
: grade.json!["SzovegesErtek"].i18n ?? "";
|
||||||
|
grade.value.shortName = _settings.goodStudent
|
||||||
|
? "Jeles".i18n
|
||||||
|
: grade.json!["SzovegesErtekelesRovidNev"].i18n ?? "";
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
@@ -102,12 +118,16 @@ class GradeProvider with ChangeNotifier {
|
|||||||
if (grades.isNotEmpty || _grades.isNotEmpty) await store(grades);
|
if (grades.isNotEmpty || _grades.isNotEmpty) await store(grades);
|
||||||
|
|
||||||
List? groupsJson = await _kreta.getAPI(KretaAPI.groups(iss));
|
List? groupsJson = await _kreta.getAPI(KretaAPI.groups(iss));
|
||||||
if (groupsJson == null || groupsJson.isEmpty) throw "Cannot fetch Groups for User ${user.id}";
|
if (groupsJson == null || groupsJson.isEmpty)
|
||||||
|
throw "Cannot fetch Groups for User ${user.id}";
|
||||||
_groups = (groupsJson[0]["OktatasNevelesiFeladat"] ?? {})["Uid"] ?? "";
|
_groups = (groupsJson[0]["OktatasNevelesiFeladat"] ?? {})["Uid"] ?? "";
|
||||||
|
|
||||||
List? groupAvgJson = await _kreta.getAPI(KretaAPI.groupAverages(iss, _groups));
|
List? groupAvgJson =
|
||||||
if (groupAvgJson == null) throw "Cannot fetch Class Averages for User ${user.id}";
|
await _kreta.getAPI(KretaAPI.groupAverages(iss, _groups));
|
||||||
final groupAvgs = groupAvgJson.map((e) => GroupAverage.fromJson(e)).toList();
|
if (groupAvgJson == null)
|
||||||
|
throw "Cannot fetch Class Averages for User ${user.id}";
|
||||||
|
final groupAvgs =
|
||||||
|
groupAvgJson.map((e) => GroupAverage.fromJson(e)).toList();
|
||||||
await storeGroupAvg(groupAvgs);
|
await storeGroupAvg(groupAvgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
33
filcnaplo_kreta_api/lib/providers/grade_provider.i18n.dart
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import 'package:i18n_extension/i18n_extension.dart';
|
||||||
|
|
||||||
|
extension Localization on String {
|
||||||
|
static final _t = Translations.byLocale("hu_hu") +
|
||||||
|
{
|
||||||
|
"en_en": {
|
||||||
|
"Elégtelen": "Fail",
|
||||||
|
"Elégséges": "Warning but passing",
|
||||||
|
"Közepes": "Passed",
|
||||||
|
"Jó": "Good",
|
||||||
|
"Jeles": "Excellent"
|
||||||
|
},
|
||||||
|
"hu_hu": {
|
||||||
|
"Elégtelen": "Elégtelen",
|
||||||
|
"Elégséges": "Elégséges",
|
||||||
|
"Közepes": "Közepes",
|
||||||
|
"Jó": "Jó",
|
||||||
|
"Jeles": "Jeles"
|
||||||
|
},
|
||||||
|
"de_de": {
|
||||||
|
"Elégtelen": "Ungenügend",
|
||||||
|
"Elégséges": "Mangelhaft",
|
||||||
|
"Közepes": "Ausreichend",
|
||||||
|
"Jó": "Befriedigend",
|
||||||
|
"Jeles": "Gut"
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
String get i18n => localize(this, _t);
|
||||||
|
String fill(List<Object> params) => localizeFill(this, params);
|
||||||
|
String plural(int value) => localizePlural(value, this, _t);
|
||||||
|
String version(Object modifier) => localizeVersion(modifier, this, _t);
|
||||||
|
}
|
||||||
@@ -57,7 +57,8 @@ class _HeroScrollViewState extends State<HeroScrollView> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return NestedScrollView(
|
return NestedScrollView(
|
||||||
controller: _scrollController,
|
controller: _scrollController,
|
||||||
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
|
physics:
|
||||||
|
const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
|
||||||
headerSliverBuilder: (context, _) => [
|
headerSliverBuilder: (context, _) => [
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
pinned: true,
|
pinned: true,
|
||||||
@@ -70,7 +71,8 @@ class _HeroScrollViewState extends State<HeroScrollView> {
|
|||||||
opacity: showBarTitle ? 1.0 : 0.0,
|
opacity: showBarTitle ? 1.0 : 0.0,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(widget.icon, color: AppColors.of(context).text.withOpacity(.8)),
|
Icon(widget.icon,
|
||||||
|
color: AppColors.of(context).text.withOpacity(.8)),
|
||||||
const SizedBox(width: 8.0),
|
const SizedBox(width: 8.0),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -78,7 +80,9 @@ class _HeroScrollViewState extends State<HeroScrollView> {
|
|||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.of(context).text, fontWeight: FontWeight.w500, fontStyle: widget.italic ? FontStyle.italic : null),
|
color: AppColors.of(context).text,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontStyle: widget.italic ? FontStyle.italic : null),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -94,7 +98,7 @@ class _HeroScrollViewState extends State<HeroScrollView> {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
actions: widget.navBarItems,
|
actions: widget.navBarItems,
|
||||||
expandedHeight: 124.0,
|
expandedHeight: 145.69,
|
||||||
stretch: true,
|
stretch: true,
|
||||||
flexibleSpace: FlexibleSpaceBar(
|
flexibleSpace: FlexibleSpaceBar(
|
||||||
background: Stack(
|
background: Stack(
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||||
|
|
||||||
class HomeworkTile extends StatelessWidget {
|
class HomeworkTile extends StatelessWidget {
|
||||||
const HomeworkTile(this.homework, {Key? key, this.onTap, this.padding, this.censored = false}) : super(key: key);
|
const HomeworkTile(this.homework,
|
||||||
|
{Key? key, this.onTap, this.padding, this.censored = false})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
final Homework homework;
|
final Homework homework;
|
||||||
final void Function()? onTap;
|
final void Function()? onTap;
|
||||||
@@ -24,7 +26,8 @@ class HomeworkTile extends StatelessWidget {
|
|||||||
visualDensity: VisualDensity.compact,
|
visualDensity: VisualDensity.compact,
|
||||||
contentPadding: const EdgeInsets.only(left: 8.0, right: 12.0),
|
contentPadding: const EdgeInsets.only(left: 8.0, right: 12.0),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)),
|
shape:
|
||||||
|
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)),
|
||||||
leading: SizedBox(
|
leading: SizedBox(
|
||||||
width: 44,
|
width: 44,
|
||||||
height: 44,
|
height: 44,
|
||||||
@@ -38,7 +41,8 @@ class HomeworkTile extends StatelessWidget {
|
|||||||
: Padding(
|
: Padding(
|
||||||
padding: const EdgeInsets.only(top: 2.0),
|
padding: const EdgeInsets.only(top: 2.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
SubjectIcon.resolveVariant(subjectName: homework.subjectName, context: context),
|
SubjectIcon.resolveVariant(
|
||||||
|
subjectName: homework.subjectName, context: context),
|
||||||
size: 28.0,
|
size: 28.0,
|
||||||
color: AppColors.of(context).text.withOpacity(.75),
|
color: AppColors.of(context).text.withOpacity(.75),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -29,16 +29,18 @@ import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
|
|||||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'grades_page.i18n.dart';
|
import 'grades_page.i18n.dart';
|
||||||
// import 'package:filcnaplo_premium/ui/mobile/goalplanner/new_goal.dart';
|
// import 'package:filcnaplo_premium/ui/mobile/goal_planner/new_goal.dart';
|
||||||
|
|
||||||
class GradeSubjectView extends StatefulWidget {
|
class GradeSubjectView extends StatefulWidget {
|
||||||
const GradeSubjectView(this.subject, {Key? key, this.groupAverage = 0.0}) : super(key: key);
|
const GradeSubjectView(this.subject, {Key? key, this.groupAverage = 0.0})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
final Subject subject;
|
final Subject subject;
|
||||||
final double groupAverage;
|
final double groupAverage;
|
||||||
|
|
||||||
void push(BuildContext context, {bool root = false}) {
|
void push(BuildContext context, {bool root = false}) {
|
||||||
Navigator.of(context, rootNavigator: root).push(CupertinoPageRoute(builder: (context) => this));
|
Navigator.of(context, rootNavigator: root)
|
||||||
|
.push(CupertinoPageRoute(builder: (context) => this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -73,7 +75,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
final gradeDates = subjectGrades.map((e) => e.date.millisecondsSinceEpoch);
|
final gradeDates = subjectGrades.map((e) => e.date.millisecondsSinceEpoch);
|
||||||
final maxGradeDate = gradeDates.fold(0, max);
|
final maxGradeDate = gradeDates.fold(0, max);
|
||||||
final minGradeDate = gradeDates.fold(0, min);
|
final minGradeDate = gradeDates.fold(0, min);
|
||||||
if (maxGradeDate - minGradeDate < const Duration(days: 5).inMilliseconds) return false; // naplo/#78
|
if (maxGradeDate - minGradeDate < const Duration(days: 5).inMilliseconds)
|
||||||
|
return false; // naplo/#78
|
||||||
|
|
||||||
return subjectGrades.where((e) => e.type == GradeType.midYear).length > 1;
|
return subjectGrades.where((e) => e.type == GradeType.midYear).length > 1;
|
||||||
}
|
}
|
||||||
@@ -139,7 +142,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
tiles.add(Padding(padding: EdgeInsets.only(bottom: !gradeCalcMode ? 24.0 : 250.0)));
|
tiles.add(Padding(
|
||||||
|
padding: EdgeInsets.only(bottom: !gradeCalcMode ? 24.0 : 250.0)));
|
||||||
gradeTiles = List.castFrom(tiles);
|
gradeTiles = List.castFrom(tiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +156,10 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
average = AverageHelper.averageEvals(subjectGrades);
|
average = AverageHelper.averageEvals(subjectGrades);
|
||||||
final prevAvg = subjectGrades.isNotEmpty
|
final prevAvg = subjectGrades.isNotEmpty
|
||||||
? AverageHelper.averageEvals(subjectGrades
|
? AverageHelper.averageEvals(subjectGrades
|
||||||
.where((e) => e.date.isBefore(subjectGrades.reduce((v, e) => e.date.isAfter(v.date) ? e : v).date.subtract(const Duration(days: 30))))
|
.where((e) => e.date.isBefore(subjectGrades
|
||||||
|
.reduce((v, e) => e.date.isAfter(v.date) ? e : v)
|
||||||
|
.date
|
||||||
|
.subtract(const Duration(days: 30))))
|
||||||
.toList())
|
.toList())
|
||||||
: 0.0;
|
: 0.0;
|
||||||
|
|
||||||
@@ -163,12 +170,14 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text("annual_average".i18n),
|
Text("annual_average".i18n),
|
||||||
if (average != prevAvg) TrendDisplay(current: average, previous: prevAvg),
|
if (average != prevAvg)
|
||||||
|
TrendDisplay(current: average, previous: prevAvg),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(top: 16.0, right: 12.0),
|
padding: const EdgeInsets.only(top: 16.0, right: 12.0),
|
||||||
child: GradeGraph(subjectGrades, dayThreshold: 5, classAvg: widget.groupAverage),
|
child: GradeGraph(subjectGrades,
|
||||||
|
dayThreshold: 5, classAvg: widget.groupAverage),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -176,7 +185,9 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
if (!gradeCalcMode) {
|
if (!gradeCalcMode) {
|
||||||
buildTiles(subjectGrades);
|
buildTiles(subjectGrades);
|
||||||
} else {
|
} else {
|
||||||
List<Grade> ghostGrades = calculatorProvider.ghosts.where((e) => e.subject == widget.subject).toList();
|
List<Grade> ghostGrades = calculatorProvider.ghosts
|
||||||
|
.where((e) => e.subject == widget.subject)
|
||||||
|
.toList();
|
||||||
buildTiles(ghostGrades);
|
buildTiles(ghostGrades);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +195,10 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
key: _scaffoldKey,
|
key: _scaffoldKey,
|
||||||
floatingActionButtonLocation: ExpandableFab.location,
|
floatingActionButtonLocation: ExpandableFab.location,
|
||||||
floatingActionButton: Visibility(
|
floatingActionButton: Visibility(
|
||||||
visible: !gradeCalcMode && subjectGrades.where((e) => e.type == GradeType.midYear).isNotEmpty,
|
visible: !gradeCalcMode &&
|
||||||
|
subjectGrades
|
||||||
|
.where((e) => e.type == GradeType.midYear)
|
||||||
|
.isNotEmpty,
|
||||||
child: ExpandableFab(
|
child: ExpandableFab(
|
||||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||||
type: ExpandableFabType.up,
|
type: ExpandableFabType.up,
|
||||||
@@ -204,14 +218,19 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
child: const Icon(FeatherIcons.flag, size: 20.0),
|
child: const Icon(FeatherIcons.flag, size: 20.0),
|
||||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (!Provider.of<PremiumProvider>(context, listen: false).hasScope(PremiumScopes.goalPlanner)) {
|
if (!Provider.of<PremiumProvider>(context, listen: false)
|
||||||
PremiumLockedFeatureUpsell.show(context: context, feature: PremiumFeature.goalplanner);
|
.hasScope(PremiumScopes.goalPlanner)) {
|
||||||
|
PremiumLockedFeatureUpsell.show(
|
||||||
|
context: context, feature: PremiumFeature.goalplanner);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Hamarosan...")));
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(content: Text("Hamarosan...")));
|
||||||
|
|
||||||
// Navigator.of(context).push(CupertinoPageRoute(builder: (context) => PremiumGoalplannerNewGoalScreen(subject: widget.subject)));
|
//Navigator.of(context).push(CupertinoPageRoute(
|
||||||
|
//builder: (context) => PremiumGoalplannerNewGoalScreen(
|
||||||
|
// subject: widget.subject)));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -230,12 +249,17 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
},
|
},
|
||||||
navBarItems: [
|
navBarItems: [
|
||||||
const SizedBox(width: 6.0),
|
const SizedBox(width: 6.0),
|
||||||
if (widget.groupAverage != 0) Center(child: AverageDisplay(average: widget.groupAverage, border: true)),
|
if (widget.groupAverage != 0)
|
||||||
|
Center(
|
||||||
|
child: AverageDisplay(
|
||||||
|
average: widget.groupAverage, border: true)),
|
||||||
const SizedBox(width: 6.0),
|
const SizedBox(width: 6.0),
|
||||||
if (average != 0) Center(child: AverageDisplay(average: average)),
|
if (average != 0)
|
||||||
|
Center(child: AverageDisplay(average: average)),
|
||||||
const SizedBox(width: 12.0),
|
const SizedBox(width: 12.0),
|
||||||
],
|
],
|
||||||
icon: SubjectIcon.resolveVariant(subject: widget.subject, context: context),
|
icon: SubjectIcon.resolveVariant(
|
||||||
|
subject: widget.subject, context: context),
|
||||||
scrollController: _scrollController,
|
scrollController: _scrollController,
|
||||||
title: widget.subject.renamedTo ?? widget.subject.name.capital(),
|
title: widget.subject.renamedTo ?? widget.subject.name.capital(),
|
||||||
italic: widget.subject.isRenamed,
|
italic: widget.subject.isRenamed,
|
||||||
@@ -255,13 +279,15 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
|
|
||||||
void gradeCalc(BuildContext context) {
|
void gradeCalc(BuildContext context) {
|
||||||
// Scroll to the top of the page
|
// Scroll to the top of the page
|
||||||
_scrollController.animateTo(75, duration: const Duration(milliseconds: 500), curve: Curves.ease);
|
_scrollController.animateTo(75,
|
||||||
|
duration: const Duration(milliseconds: 500), curve: Curves.ease);
|
||||||
|
|
||||||
calculatorProvider.clear();
|
calculatorProvider.clear();
|
||||||
calculatorProvider.addAllGrades(gradeProvider.grades);
|
calculatorProvider.addAllGrades(gradeProvider.grades);
|
||||||
|
|
||||||
_sheetController = _scaffoldKey.currentState?.showBottomSheet(
|
_sheetController = _scaffoldKey.currentState?.showBottomSheet(
|
||||||
(context) => RoundedBottomSheet(child: GradeCalculator(widget.subject), borderRadius: 14.0),
|
(context) => RoundedBottomSheet(
|
||||||
|
child: GradeCalculator(widget.subject), borderRadius: 14.0),
|
||||||
backgroundColor: const Color(0x00000000),
|
backgroundColor: const Color(0x00000000),
|
||||||
elevation: 12.0,
|
elevation: 12.0,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ class NavItem {
|
|||||||
final Widget icon;
|
final Widget icon;
|
||||||
final Widget activeIcon;
|
final Widget activeIcon;
|
||||||
|
|
||||||
const NavItem({required this.title, required this.icon, required this.activeIcon});
|
const NavItem(
|
||||||
|
{required this.title, required this.icon, required this.activeIcon});
|
||||||
}
|
}
|
||||||
|
|
||||||
class NavbarItem extends StatelessWidget {
|
class NavbarItem extends StatelessWidget {
|
||||||
@@ -25,14 +26,16 @@ class NavbarItem extends StatelessWidget {
|
|||||||
final Widget icon = active ? item.activeIcon : item.icon;
|
final Widget icon = active ? item.activeIcon : item.icon;
|
||||||
|
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: InkWell(
|
child: GestureDetector(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 6.0),
|
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 6.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(12.0),
|
padding: const EdgeInsets.all(12.0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: active ? Theme.of(context).colorScheme.secondary.withOpacity(.4) : null,
|
color: active
|
||||||
|
? Theme.of(context).colorScheme.secondary.withOpacity(.4)
|
||||||
|
: null,
|
||||||
borderRadius: BorderRadius.circular(14.0),
|
borderRadius: BorderRadius.circular(14.0),
|
||||||
),
|
),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
@@ -45,7 +48,9 @@ class NavbarItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
IconTheme(
|
IconTheme(
|
||||||
data: IconThemeData(
|
data: IconThemeData(
|
||||||
color: Theme.of(context).brightness == Brightness.light ? Colors.black.withOpacity(.5) : Colors.white.withOpacity(.3),
|
color: Theme.of(context).brightness == Brightness.light
|
||||||
|
? Colors.black.withOpacity(.5)
|
||||||
|
: Colors.white.withOpacity(.3),
|
||||||
),
|
),
|
||||||
child: icon,
|
child: icon,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ class NavigationScreenState extends State<NavigationScreen>
|
|||||||
|
|
||||||
initPlatformState();
|
initPlatformState();
|
||||||
|
|
||||||
HomeWidget.setAppGroupId('hu.filc.naplo.group');
|
HomeWidget.setAppGroupId('hu.refilc.naplo.group');
|
||||||
|
|
||||||
_checkForWidgetLaunch();
|
_checkForWidgetLaunch();
|
||||||
HomeWidget.widgetClicked.listen(_launchedFromWidget);
|
HomeWidget.widgetClicked.listen(_launchedFromWidget);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:filcnaplo_mobile_ui/common/panel/panel.dart';
|
|||||||
import 'package:filcnaplo_mobile_ui/screens/news/news_tile.dart';
|
import 'package:filcnaplo_mobile_ui/screens/news/news_tile.dart';
|
||||||
import 'package:filcnaplo/models/news.dart';
|
import 'package:filcnaplo/models/news.dart';
|
||||||
import 'package:filcnaplo_mobile_ui/screens/news/news_view.dart';
|
import 'package:filcnaplo_mobile_ui/screens/news/news_view.dart';
|
||||||
|
import 'package:filcnaplo_mobile_ui/screens/settings/settings_screen.i18n.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:filcnaplo/api/providers/news_provider.dart';
|
import 'package:filcnaplo/api/providers/news_provider.dart';
|
||||||
@@ -24,24 +25,28 @@ class NewsScreen extends StatelessWidget {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
|
surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
|
||||||
leading: BackButton(color: AppColors.of(context).text),
|
leading: BackButton(color: AppColors.of(context).text),
|
||||||
title: Text("News", style: TextStyle(color: AppColors.of(context).text)),
|
title: Text("news".i18n,
|
||||||
|
style: TextStyle(color: AppColors.of(context).text)),
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: RefreshIndicator(
|
child: RefreshIndicator(
|
||||||
onRefresh: () => newsProvider.fetch(),
|
onRefresh: () => newsProvider.fetch(),
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
|
physics: const BouncingScrollPhysics(
|
||||||
|
parent: AlwaysScrollableScrollPhysics()),
|
||||||
itemCount: max(news.length, 1),
|
itemCount: max(news.length, 1),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (news.isNotEmpty) {
|
if (news.isNotEmpty) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 24.0, vertical: 12.0),
|
||||||
child: Panel(
|
child: Panel(
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: NewsTile(
|
child: NewsTile(
|
||||||
news[index],
|
news[index],
|
||||||
onTap: () => NewsView.show(news[index], context: context, force: true),
|
onTap: () => NewsView.show(news[index],
|
||||||
|
context: context, force: true),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ import 'settings_screen.i18n.dart';
|
|||||||
class PrivacyView extends StatelessWidget {
|
class PrivacyView extends StatelessWidget {
|
||||||
const PrivacyView({Key? key}) : super(key: key);
|
const PrivacyView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
static void show(BuildContext context) => showDialog(context: context, builder: (context) => const PrivacyView(), barrierDismissible: true);
|
static void show(BuildContext context) => showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => const PrivacyView(),
|
||||||
|
barrierDismissible: true);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -44,7 +47,7 @@ Ha az adataiddal kapcsolatban bármilyen kérdésed van (törlés, módosítás,
|
|||||||
|
|
||||||
Az alkalmazás használatával jelzed, hogy ezt a tájékoztatót tudomásul vetted.
|
Az alkalmazás használatával jelzed, hogy ezt a tájékoztatót tudomásul vetted.
|
||||||
|
|
||||||
Utolsó módosítás: 2021. 09. 25.
|
Utolsó módosítás: 2023. 05. 28.
|
||||||
""",
|
""",
|
||||||
onOpen: (link) => launch(link.url,
|
onOpen: (link) => launch(link.url,
|
||||||
customTabsOption: CustomTabsOption(
|
customTabsOption: CustomTabsOption(
|
||||||
|
|||||||
@@ -30,7 +30,11 @@ import 'package:filcnaplo/utils/format.dart';
|
|||||||
import 'package:filcnaplo_premium/ui/mobile/settings/theme.dart';
|
import 'package:filcnaplo_premium/ui/mobile/settings/theme.dart';
|
||||||
|
|
||||||
class SettingsHelper {
|
class SettingsHelper {
|
||||||
static const Map<String, String> langMap = {"en": "🇬🇧 English", "hu": "🇭🇺 Magyar", "de": "🇩🇪 Deutsch"};
|
static const Map<String, String> langMap = {
|
||||||
|
"en": "🇬🇧 English",
|
||||||
|
"hu": "🇭🇺 Magyar",
|
||||||
|
"de": "🇩🇪 Deutsch"
|
||||||
|
};
|
||||||
|
|
||||||
static const Map<Pages, String> pageTitle = {
|
static const Map<Pages, String> pageTitle = {
|
||||||
Pages.home: "home",
|
Pages.home: "home",
|
||||||
@@ -47,9 +51,11 @@ class SettingsHelper {
|
|||||||
VibrationStrength.strong: "vstrong",
|
VibrationStrength.strong: "vstrong",
|
||||||
};
|
};
|
||||||
|
|
||||||
static Map<Pages, String> localizedPageTitles() => pageTitle.map((key, value) => MapEntry(key, ScreensLocalization(value).i18n));
|
static Map<Pages, String> localizedPageTitles() => pageTitle
|
||||||
|
.map((key, value) => MapEntry(key, ScreensLocalization(value).i18n));
|
||||||
static Map<VibrationStrength, String> localizedVibrationTitles() =>
|
static Map<VibrationStrength, String> localizedVibrationTitles() =>
|
||||||
vibrationTitle.map((key, value) => MapEntry(key, SettingsLocalization(value).i18n));
|
vibrationTitle
|
||||||
|
.map((key, value) => MapEntry(key, SettingsLocalization(value).i18n));
|
||||||
|
|
||||||
static void language(BuildContext context) {
|
static void language(BuildContext context) {
|
||||||
showBottomSheetMenu(
|
showBottomSheetMenu(
|
||||||
@@ -58,7 +64,8 @@ class SettingsHelper {
|
|||||||
String lang = langMap.keys.toList()[index];
|
String lang = langMap.keys.toList()[index];
|
||||||
return BottomSheetMenuItem(
|
return BottomSheetMenuItem(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Provider.of<SettingsProvider>(context, listen: false).update(language: lang);
|
Provider.of<SettingsProvider>(context, listen: false)
|
||||||
|
.update(language: lang);
|
||||||
I18n.of(context).locale = Locale(lang, lang.toUpperCase());
|
I18n.of(context).locale = Locale(lang, lang.toUpperCase());
|
||||||
Navigator.of(context).maybePop();
|
Navigator.of(context).maybePop();
|
||||||
if (Platform.isAndroid || Platform.isIOS) {
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
@@ -81,6 +88,19 @@ class SettingsHelper {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void uwuMode(BuildContext context, value) {
|
||||||
|
final settings = Provider.of<SettingsProvider>(context, listen: false);
|
||||||
|
if (value) {
|
||||||
|
I18n.of(context).locale = const Locale('uw', 'UW');
|
||||||
|
} else {
|
||||||
|
I18n.of(context).locale =
|
||||||
|
Locale(settings.language, settings.language.toUpperCase());
|
||||||
|
}
|
||||||
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
|
setupQuickActions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void iconPack(BuildContext context) {
|
static void iconPack(BuildContext context) {
|
||||||
final settings = Provider.of<SettingsProvider>(context, listen: false);
|
final settings = Provider.of<SettingsProvider>(context, listen: false);
|
||||||
showBottomSheetMenu(
|
showBottomSheetMenu(
|
||||||
@@ -122,16 +142,20 @@ class SettingsHelper {
|
|||||||
items: List.generate(Pages.values.length, (index) {
|
items: List.generate(Pages.values.length, (index) {
|
||||||
return BottomSheetMenuItem(
|
return BottomSheetMenuItem(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Provider.of<SettingsProvider>(context, listen: false).update(startPage: Pages.values[index]);
|
Provider.of<SettingsProvider>(context, listen: false)
|
||||||
|
.update(startPage: Pages.values[index]);
|
||||||
Navigator.of(context).maybePop();
|
Navigator.of(context).maybePop();
|
||||||
},
|
},
|
||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(pageIcons[Pages.values[index]], size: 20.0, color: Theme.of(context).colorScheme.secondary),
|
Icon(pageIcons[Pages.values[index]],
|
||||||
|
size: 20.0, color: Theme.of(context).colorScheme.secondary),
|
||||||
const SizedBox(width: 16.0),
|
const SizedBox(width: 16.0),
|
||||||
Text(localizedPageTitles()[Pages.values[index]] ?? ""),
|
Text(localizedPageTitles()[Pages.values[index]] ?? ""),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
if (Pages.values[index] == Provider.of<SettingsProvider>(context, listen: false).startPage)
|
if (Pages.values[index] ==
|
||||||
|
Provider.of<SettingsProvider>(context, listen: false)
|
||||||
|
.startPage)
|
||||||
Icon(
|
Icon(
|
||||||
Icons.check_circle,
|
Icons.check_circle,
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
@@ -165,7 +189,8 @@ class SettingsHelper {
|
|||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 16.0),
|
padding: const EdgeInsets.only(right: 16.0),
|
||||||
child: Icon(FeatherIcons.smartphone, size: 20.0, color: Theme.of(context).colorScheme.secondary),
|
child: Icon(FeatherIcons.smartphone,
|
||||||
|
size: 20.0, color: Theme.of(context).colorScheme.secondary),
|
||||||
),
|
),
|
||||||
Text(SettingsLocalization("system").i18n),
|
Text(SettingsLocalization("system").i18n),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
@@ -183,7 +208,8 @@ class SettingsHelper {
|
|||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 16.0),
|
padding: const EdgeInsets.only(right: 16.0),
|
||||||
child: Icon(FeatherIcons.sun, size: 20.0, color: Theme.of(context).colorScheme.secondary),
|
child: Icon(FeatherIcons.sun,
|
||||||
|
size: 20.0, color: Theme.of(context).colorScheme.secondary),
|
||||||
),
|
),
|
||||||
Text(SettingsLocalization("light").i18n),
|
Text(SettingsLocalization("light").i18n),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
@@ -201,7 +227,8 @@ class SettingsHelper {
|
|||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 16.0),
|
padding: const EdgeInsets.only(right: 16.0),
|
||||||
child: Icon(FeatherIcons.moon, size: 20.0, color: Theme.of(context).colorScheme.secondary),
|
child: Icon(FeatherIcons.moon,
|
||||||
|
size: 20.0, color: Theme.of(context).colorScheme.secondary),
|
||||||
),
|
),
|
||||||
Text(SettingsLocalization("dark").i18n),
|
Text(SettingsLocalization("dark").i18n),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
@@ -219,7 +246,8 @@ class SettingsHelper {
|
|||||||
static void accentColor(BuildContext context) {
|
static void accentColor(BuildContext context) {
|
||||||
Navigator.of(context, rootNavigator: true).push(
|
Navigator.of(context, rootNavigator: true).push(
|
||||||
PageRouteBuilder(
|
PageRouteBuilder(
|
||||||
pageBuilder: (context, _, __) => const PremiumCustomAccentColorSetting(),
|
pageBuilder: (context, _, __) =>
|
||||||
|
const PremiumCustomAccentColorSetting(),
|
||||||
transitionDuration: Duration.zero,
|
transitionDuration: Duration.zero,
|
||||||
reverseTransitionDuration: Duration.zero,
|
reverseTransitionDuration: Duration.zero,
|
||||||
),
|
),
|
||||||
@@ -241,7 +269,8 @@ class SettingsHelper {
|
|||||||
|
|
||||||
return BottomSheetMenuItem(
|
return BottomSheetMenuItem(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Provider.of<SettingsProvider>(context, listen: false).update(vibrate: value);
|
Provider.of<SettingsProvider>(context, listen: false)
|
||||||
|
.update(vibrate: value);
|
||||||
Navigator.of(context).maybePop();
|
Navigator.of(context).maybePop();
|
||||||
},
|
},
|
||||||
title: Row(
|
title: Row(
|
||||||
@@ -250,14 +279,18 @@ class SettingsHelper {
|
|||||||
width: 12.0,
|
width: 12.0,
|
||||||
height: 12.0,
|
height: 12.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.secondary.withOpacity((index + 1) / (vibrationTitle.length + 1)),
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.secondary
|
||||||
|
.withOpacity((index + 1) / (vibrationTitle.length + 1)),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 16.0),
|
const SizedBox(width: 16.0),
|
||||||
Text(localizedVibrationTitles()[value] ?? "?"),
|
Text(localizedVibrationTitles()[value] ?? "?"),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
if (value == Provider.of<SettingsProvider>(context, listen: false).vibrate)
|
if (value ==
|
||||||
|
Provider.of<SettingsProvider>(context, listen: false).vibrate)
|
||||||
Icon(
|
Icon(
|
||||||
Icons.check_circle,
|
Icons.check_circle,
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
@@ -291,7 +324,8 @@ class _RoundingSettingState extends State<RoundingSetting> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
rounding = Provider.of<SettingsProvider>(context, listen: false).rounding / 10;
|
rounding =
|
||||||
|
Provider.of<SettingsProvider>(context, listen: false).rounding / 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -336,12 +370,14 @@ class _RoundingSettingState extends State<RoundingSetting> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Text("4.5", style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.w500)),
|
const Text("4.5",
|
||||||
|
style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.w500)),
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24.0),
|
padding: EdgeInsets.symmetric(horizontal: 24.0),
|
||||||
child: Icon(FeatherIcons.arrowRight, color: Colors.grey),
|
child: Icon(FeatherIcons.arrowRight, color: Colors.grey),
|
||||||
),
|
),
|
||||||
GradeValueWidget(GradeValue(roundingResult, "", "", 100), fill: true, size: 32.0),
|
GradeValueWidget(GradeValue(roundingResult, "", "", 100),
|
||||||
|
fill: true, size: 32.0),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
@@ -349,7 +385,8 @@ class _RoundingSettingState extends State<RoundingSetting> {
|
|||||||
child: MaterialActionButton(
|
child: MaterialActionButton(
|
||||||
child: Text(SettingsLocalization("done").i18n),
|
child: Text(SettingsLocalization("done").i18n),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Provider.of<SettingsProvider>(context, listen: false).update(rounding: (rounding * 10).toInt());
|
Provider.of<SettingsProvider>(context, listen: false)
|
||||||
|
.update(rounding: (rounding * 10).toInt());
|
||||||
Navigator.of(context).maybePop();
|
Navigator.of(context).maybePop();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -367,15 +404,24 @@ class BellDelaySetting extends StatefulWidget {
|
|||||||
State<BellDelaySetting> createState() => _BellDelaySettingState();
|
State<BellDelaySetting> createState() => _BellDelaySettingState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _BellDelaySettingState extends State<BellDelaySetting> with SingleTickerProviderStateMixin {
|
class _BellDelaySettingState extends State<BellDelaySetting>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
late TabController _tabController;
|
late TabController _tabController;
|
||||||
late Duration currentDelay;
|
late Duration currentDelay;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_tabController = TabController(length: 2, vsync: this, initialIndex: Provider.of<SettingsProvider>(context, listen: false).bellDelay > 0 ? 1 : 0);
|
_tabController = TabController(
|
||||||
currentDelay = Duration(seconds: Provider.of<SettingsProvider>(context, listen: false).bellDelay);
|
length: 2,
|
||||||
|
vsync: this,
|
||||||
|
initialIndex:
|
||||||
|
Provider.of<SettingsProvider>(context, listen: false).bellDelay > 0
|
||||||
|
? 1
|
||||||
|
: 0);
|
||||||
|
currentDelay = Duration(
|
||||||
|
seconds:
|
||||||
|
Provider.of<SettingsProvider>(context, listen: false).bellDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -416,7 +462,10 @@ class _BellDelaySettingState extends State<BellDelaySetting> with SingleTickerPr
|
|||||||
),
|
),
|
||||||
Text(SettingsLocalization("sync_help").i18n,
|
Text(SettingsLocalization("sync_help").i18n,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w500, color: AppColors.of(context).text.withOpacity(.75))),
|
style: TextStyle(
|
||||||
|
fontSize: 12.0,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: AppColors.of(context).text.withOpacity(.75))),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 12.0, top: 6.0),
|
padding: const EdgeInsets.only(bottom: 12.0, top: 6.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -425,21 +474,25 @@ class _BellDelaySettingState extends State<BellDelaySetting> with SingleTickerPr
|
|||||||
backgroundColor: AppColors.of(context).filc,
|
backgroundColor: AppColors.of(context).filc,
|
||||||
child: Text(SettingsLocalization("sync").i18n),
|
child: Text(SettingsLocalization("sync").i18n),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
final lessonProvider = Provider.of<TimetableProvider>(context, listen: false);
|
final lessonProvider =
|
||||||
|
Provider.of<TimetableProvider>(context, listen: false);
|
||||||
|
|
||||||
Duration? closest;
|
Duration? closest;
|
||||||
DateTime now = DateTime.now();
|
DateTime now = DateTime.now();
|
||||||
for (var lesson in lessonProvider.getWeek(Week.current()) ?? []) {
|
for (var lesson
|
||||||
|
in lessonProvider.getWeek(Week.current()) ?? []) {
|
||||||
Duration sdiff = lesson.start.difference(now);
|
Duration sdiff = lesson.start.difference(now);
|
||||||
Duration ediff = lesson.end.difference(now);
|
Duration ediff = lesson.end.difference(now);
|
||||||
|
|
||||||
if (closest == null || sdiff.abs() < closest.abs()) closest = sdiff;
|
if (closest == null || sdiff.abs() < closest.abs())
|
||||||
|
closest = sdiff;
|
||||||
if (ediff.abs() < closest.abs()) closest = ediff;
|
if (ediff.abs() < closest.abs()) closest = ediff;
|
||||||
}
|
}
|
||||||
if (closest != null) {
|
if (closest != null) {
|
||||||
if (closest.inHours.abs() >= 1) return;
|
if (closest.inHours.abs() >= 1) return;
|
||||||
currentDelay = closest;
|
currentDelay = closest;
|
||||||
Provider.of<SettingsProvider>(context, listen: false).update(bellDelay: currentDelay.inSeconds);
|
Provider.of<SettingsProvider>(context, listen: false)
|
||||||
|
.update(bellDelay: currentDelay.inSeconds);
|
||||||
_tabController.index = currentDelay.inSeconds > 0 ? 1 : 0;
|
_tabController.index = currentDelay.inSeconds > 0 ? 1 : 0;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
@@ -449,7 +502,8 @@ class _BellDelaySettingState extends State<BellDelaySetting> with SingleTickerPr
|
|||||||
child: Text(SettingsLocalization("done").i18n),
|
child: Text(SettingsLocalization("done").i18n),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
//Provider.of<SettingsProvider>(context, listen: false).update(context, rounding: (r * 10).toInt());
|
//Provider.of<SettingsProvider>(context, listen: false).update(context, rounding: (r * 10).toInt());
|
||||||
Provider.of<SettingsProvider>(context, listen: false).update(bellDelay: currentDelay.inSeconds);
|
Provider.of<SettingsProvider>(context, listen: false)
|
||||||
|
.update(bellDelay: currentDelay.inSeconds);
|
||||||
Navigator.of(context).maybePop();
|
Navigator.of(context).maybePop();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -513,8 +567,11 @@ class _GradeColorsSettingState extends State<GradeColorsSetting> {
|
|||||||
children: [
|
children: [
|
||||||
MaterialActionButton(
|
MaterialActionButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
List<Color> colors = List.castFrom(settings.gradeColors);
|
List<Color> colors =
|
||||||
var defaultColors = SettingsProvider.defaultSettings().gradeColors;
|
List.castFrom(settings.gradeColors);
|
||||||
|
var defaultColors =
|
||||||
|
SettingsProvider.defaultSettings()
|
||||||
|
.gradeColors;
|
||||||
colors[index] = defaultColors[index];
|
colors[index] = defaultColors[index];
|
||||||
settings.update(gradeColors: colors);
|
settings.update(gradeColors: colors);
|
||||||
Navigator.of(context).maybePop();
|
Navigator.of(context).maybePop();
|
||||||
@@ -523,9 +580,11 @@ class _GradeColorsSettingState extends State<GradeColorsSetting> {
|
|||||||
),
|
),
|
||||||
MaterialActionButton(
|
MaterialActionButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
List<Color> colors = List.castFrom(settings.gradeColors);
|
List<Color> colors =
|
||||||
|
List.castFrom(settings.gradeColors);
|
||||||
colors[index] = currentColor.withAlpha(255);
|
colors[index] = currentColor.withAlpha(255);
|
||||||
settings.update(gradeColors: settings.gradeColors);
|
settings.update(
|
||||||
|
gradeColors: settings.gradeColors);
|
||||||
Navigator.of(context).maybePop();
|
Navigator.of(context).maybePop();
|
||||||
},
|
},
|
||||||
child: Text(SettingsLocalization("done").i18n),
|
child: Text(SettingsLocalization("done").i18n),
|
||||||
@@ -536,7 +595,8 @@ class _GradeColorsSettingState extends State<GradeColorsSetting> {
|
|||||||
]),
|
]),
|
||||||
).then((value) => setState(() {}));
|
).then((value) => setState(() {}));
|
||||||
},
|
},
|
||||||
child: GradeValueWidget(GradeValue(index + 1, "", "", 0), fill: true, size: 36.0),
|
child: GradeValueWidget(GradeValue(index + 1, "", "", 0),
|
||||||
|
fill: true, size: 36.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -51,9 +51,11 @@ class SettingsScreen extends StatefulWidget {
|
|||||||
|
|
||||||
class _SettingsScreenState extends State<SettingsScreen>
|
class _SettingsScreenState extends State<SettingsScreen>
|
||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
int devmodeCountdown = 3;
|
int devmodeCountdown = 5;
|
||||||
bool __ss = false; // secret settings
|
bool __ss = false; // secret settings
|
||||||
|
|
||||||
|
Future<Map>? futureRelease;
|
||||||
|
|
||||||
late UserProvider user;
|
late UserProvider user;
|
||||||
late UpdateProvider updateProvider;
|
late UpdateProvider updateProvider;
|
||||||
late SettingsProvider settings;
|
late SettingsProvider settings;
|
||||||
@@ -150,6 +152,9 @@ class _SettingsScreenState extends State<SettingsScreen>
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
Future.delayed(Duration.zero, () {
|
||||||
|
futureRelease = Provider.of<UpdateProvider>(context).installedVersion();
|
||||||
|
});
|
||||||
_hideContainersController = AnimationController(
|
_hideContainersController = AnimationController(
|
||||||
vsync: this, duration: const Duration(milliseconds: 200));
|
vsync: this, duration: const Duration(milliseconds: 200));
|
||||||
}
|
}
|
||||||
@@ -524,14 +529,34 @@ class _SettingsScreenState extends State<SettingsScreen>
|
|||||||
contentPadding: const EdgeInsets.only(left: 12.0),
|
contentPadding: const EdgeInsets.only(left: 12.0),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12.0)),
|
borderRadius: BorderRadius.circular(12.0)),
|
||||||
title: const Text("Presentation Mode",
|
title: Text("presentation".i18n,
|
||||||
style: TextStyle(fontWeight: FontWeight.w500)),
|
style:
|
||||||
|
const TextStyle(fontWeight: FontWeight.w500)),
|
||||||
onChanged: (v) =>
|
onChanged: (v) =>
|
||||||
settings.update(presentationMode: v),
|
settings.update(presentationMode: v),
|
||||||
value: settings.presentationMode,
|
value: settings.presentationMode,
|
||||||
activeColor: Theme.of(context).colorScheme.secondary,
|
activeColor: Theme.of(context).colorScheme.secondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
// UwU-fied mode (why????)
|
||||||
|
// Material(
|
||||||
|
// type: MaterialType.transparency,
|
||||||
|
// child: SwitchListTile(
|
||||||
|
// contentPadding: const EdgeInsets.only(left: 12.0),
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(12.0)),
|
||||||
|
// title: Text("uwufymode".i18n,
|
||||||
|
// style:
|
||||||
|
// const TextStyle(fontWeight: FontWeight.w500)),
|
||||||
|
// onChanged: (v) {
|
||||||
|
// SettingsHelper.uwuMode(context, v);
|
||||||
|
// setState(() {});
|
||||||
|
// },
|
||||||
|
// value: settings.presentationMode,
|
||||||
|
// activeColor: Theme.of(context).colorScheme.secondary,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -877,9 +902,36 @@ class _SettingsScreenState extends State<SettingsScreen>
|
|||||||
top: false,
|
top: false,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
child: const Panel(
|
child: FutureBuilder<Map>(
|
||||||
title: Text("v" +
|
future: futureRelease,
|
||||||
String.fromEnvironment("APPVER", defaultValue: "?"))),
|
builder: (context, release) {
|
||||||
|
if (release.hasData) {
|
||||||
|
return DefaultTextStyle(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.titleMedium!
|
||||||
|
.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColors.of(context)
|
||||||
|
.text
|
||||||
|
.withOpacity(0.65)),
|
||||||
|
child: Text("v${release.data!['version']}"),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return DefaultTextStyle(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.titleMedium!
|
||||||
|
.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColors.of(context)
|
||||||
|
.text
|
||||||
|
.withOpacity(0.65)),
|
||||||
|
child: const Text("v?"),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (devmodeCountdown > 0) {
|
if (devmodeCountdown > 0) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ extension SettingsLocalization on String {
|
|||||||
"done": "Done",
|
"done": "Done",
|
||||||
"reset": "Reset",
|
"reset": "Reset",
|
||||||
"open": "Open",
|
"open": "Open",
|
||||||
"data_collected": "Data collected: Platform (eg. Android), App version (eg. 3.0.0), Unique Install Identifier",
|
"data_collected":
|
||||||
|
"Data collected: Platform (eg. Android), App version (eg. 3.0.0), Unique Install Identifier",
|
||||||
"Analytics": "Analytics",
|
"Analytics": "Analytics",
|
||||||
"Anonymous Usage Analytics": "Anonymous Usage Analytics",
|
"Anonymous Usage Analytics": "Anonymous Usage Analytics",
|
||||||
"graph_class_avg": "Class average on graph",
|
"graph_class_avg": "Class average on graph",
|
||||||
@@ -63,6 +64,8 @@ extension SettingsLocalization on String {
|
|||||||
"Background Color": "Background Color",
|
"Background Color": "Background Color",
|
||||||
"Highlight Color": "Highlight Color",
|
"Highlight Color": "Highlight Color",
|
||||||
"Adaptive Theme": "Adaptive Theme",
|
"Adaptive Theme": "Adaptive Theme",
|
||||||
|
"presentation": "Presentation mode",
|
||||||
|
"uwufymode": "UwU-fied mode (hungarian)",
|
||||||
},
|
},
|
||||||
"hu_hu": {
|
"hu_hu": {
|
||||||
"personal_details": "Személyes információk",
|
"personal_details": "Személyes információk",
|
||||||
@@ -92,7 +95,7 @@ extension SettingsLocalization on String {
|
|||||||
"about": "Névjegy",
|
"about": "Névjegy",
|
||||||
"supporters": "Támogatók",
|
"supporters": "Támogatók",
|
||||||
"privacy": "Adatvédelmi irányelvek",
|
"privacy": "Adatvédelmi irányelvek",
|
||||||
"licenses": "Licenszek",
|
"licenses": "Licencek",
|
||||||
"vibrate": "Rezgés",
|
"vibrate": "Rezgés",
|
||||||
"voff": "Kikapcsolás",
|
"voff": "Kikapcsolás",
|
||||||
"vlight": "Alacsony",
|
"vlight": "Alacsony",
|
||||||
@@ -102,7 +105,8 @@ extension SettingsLocalization on String {
|
|||||||
"done": "Kész",
|
"done": "Kész",
|
||||||
"reset": "Visszaállítás",
|
"reset": "Visszaállítás",
|
||||||
"open": "Megnyitás",
|
"open": "Megnyitás",
|
||||||
"data_collected": "Gyűjtött adat: Platform (pl. Android), App verzió (pl. 3.0.0), Egyedi telepítési azonosító",
|
"data_collected":
|
||||||
|
"Gyűjtött adat: Platform (pl. Android), App verzió (pl. 3.0.0), Egyedi telepítési azonosító",
|
||||||
"Analytics": "Analitika",
|
"Analytics": "Analitika",
|
||||||
"Anonymous Usage Analytics": "Névtelen használati analitika",
|
"Anonymous Usage Analytics": "Névtelen használati analitika",
|
||||||
"graph_class_avg": "Osztályátlag a grafikonon",
|
"graph_class_avg": "Osztályátlag a grafikonon",
|
||||||
@@ -124,6 +128,8 @@ extension SettingsLocalization on String {
|
|||||||
"Background Color": "Háttér színe",
|
"Background Color": "Háttér színe",
|
||||||
"Highlight Color": "Panelek színe",
|
"Highlight Color": "Panelek színe",
|
||||||
"Adaptive Theme": "Adaptív téma",
|
"Adaptive Theme": "Adaptív téma",
|
||||||
|
"presentation": "Bemutató mód",
|
||||||
|
"uwufymode": "UwU mód (magyar)",
|
||||||
},
|
},
|
||||||
"de_de": {
|
"de_de": {
|
||||||
"personal_details": "Persönliche Angaben",
|
"personal_details": "Persönliche Angaben",
|
||||||
@@ -163,7 +169,8 @@ extension SettingsLocalization on String {
|
|||||||
"done": "Fertig",
|
"done": "Fertig",
|
||||||
"reset": "Zurücksetzen",
|
"reset": "Zurücksetzen",
|
||||||
"open": "Öffnen",
|
"open": "Öffnen",
|
||||||
"data_collected": "Erhobene Daten: Plattform (z.B. Android), App version (z.B. 3.0.0), Eindeutige Installationskennung",
|
"data_collected":
|
||||||
|
"Erhobene Daten: Plattform (z.B. Android), App version (z.B. 3.0.0), Eindeutige Installationskennung",
|
||||||
"Analytics": "Analytik",
|
"Analytics": "Analytik",
|
||||||
"Anonymous Usage Analytics": "Anonyme Nutzungsanalyse",
|
"Anonymous Usage Analytics": "Anonyme Nutzungsanalyse",
|
||||||
"graph_class_avg": "Klassendurchschnitt in der Grafik",
|
"graph_class_avg": "Klassendurchschnitt in der Grafik",
|
||||||
@@ -184,6 +191,8 @@ extension SettingsLocalization on String {
|
|||||||
"Background Color": "Background Color",
|
"Background Color": "Background Color",
|
||||||
"Highlight Color": "Highlight Color",
|
"Highlight Color": "Highlight Color",
|
||||||
"Adaptive Theme": "Adaptive Theme",
|
"Adaptive Theme": "Adaptive Theme",
|
||||||
|
"presentation": "Präsentationsmodus",
|
||||||
|
"uwufymode": "UwU-Modus (ungarisch)",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ dependencies:
|
|||||||
flutter_svg: ^1.1.6
|
flutter_svg: ^1.1.6
|
||||||
background_fetch: ^1.1.5
|
background_fetch: ^1.1.5
|
||||||
wtf_sliding_sheet: ^1.0.0
|
wtf_sliding_sheet: ^1.0.0
|
||||||
|
package_info_plus: ^3.1.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_lints: ^1.0.0
|
flutter_lints: ^1.0.0
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package hu.filc.naplo.database;
|
package hu.refilc.naplo.database;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -7,7 +7,7 @@ import android.database.sqlite.SQLiteDatabase;
|
|||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
import hu.filc.naplo.database.SQLiteHelper;
|
import hu.refilc.naplo.database.SQLiteHelper;
|
||||||
|
|
||||||
public class DBManager {
|
public class DBManager {
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|||||||