diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.md new file mode 100644 index 0000000..1c23a0f --- /dev/null +++ b/PRIVACY_POLICY.md @@ -0,0 +1,55 @@ + + +

Privacy Policy

+

vyPal built the EduPage2 app as a open source app. This SERVICE is provided by vyPal at no cost and is intended + for use as is.

+

This page is used to inform website visitors regarding my policies with the collection, use, and + disclosure of Personal Information if anyone decided to use my Service.

+ +

Information Collection and Use

+

The app does use third party services that may collect information used to identify you. + +

Log Data

+

I want to inform you that whenever you use my Service, in case of an error in the app I collect + data and information (through third party products) on your phone called Log Data. This Log Data + may include information such as your devices’s Internet Protocol (“IP”) address, device name, + operating system version, configuration of the app when utilising my Service, the time and date + of your use of the Service, and other statistics.

+ +

Service Providers

+

I may employ third-party companies and individuals due to the following reasons:

+ +

I want to inform users of this Service that these third parties have access to your Personal + Information. The reason is to perform the tasks assigned to them on our behalf. However, they + are obligated not to disclose or use the information for any other purpose.

+ +

Security

+

I value your trust in providing us your Personal Information, thus we are striving to use + commercially acceptable means of protecting it. But remember that no method of transmission over + the internet, or method of electronic storage is 100% secure and reliable, and I cannot + guarantee its absolute security.

+ +

Links to Other Sites

+

This Service may contain links to other sites. If you click on a third-party link, you will be + directed to that site. Note that these external sites are not operated by me. Therefore, I + strongly advise you to review the Privacy Policy of these websites. I have no control over, and + assume no responsibility for the content, privacy policies, or practices of any third-party + sites or services.

+ +

Changes to This Privacy Policy

+

I may update our Privacy Policy from time to time. Thus, you are advised to review this page + periodically for any changes. I will notify you of any changes by posting the new Privacy Policy + on this page. These changes are effective immediately, after they are posted on this page.

+ +

Contact Us

+

If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact + me.

+

This Privacy Policy page was created at privacypolicytemplate.net.

+ + \ No newline at end of file diff --git a/lib/api.dart b/lib/api.dart index 42d2acb..32256d8 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -717,7 +717,7 @@ class Homework { final List groups; final int eTestCards; final int eTestAnswerCards; - final bool studyTopics; + final dynamic studyTopics; final dynamic gradeEventId; final String studentsHidden; final Map data; diff --git a/lib/home.dart b/lib/home.dart index 65c5e96..b11deb8 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -255,7 +255,7 @@ class HomePageState extends BaseState { var lunches = jsonDecode(l) as List; if (lunches.isNotEmpty) { var lunchToday = lunches[0] as Map; - if (DateTime.parse(lunchToday["day"]).day != DateTime.now().day) { + if (DateTime.parse(lunchToday["day"]).day == DateTime.now().day) { lunch = 0; var todayLunches = lunchToday["lunches"]; for (int i = 0; i < todayLunches.length; i++) { @@ -548,9 +548,11 @@ class HomePageState extends BaseState { mainAxisSize: MainAxisSize.min, children: [ for (TimelineItem m in msgsWOR.length < 5 - ? msgsWOR - : msgsWOR.getRange( - msgsWOR.length - 5, msgsWOR.length)) + ? msgsWOR.reversed + : msgsWOR + .getRange(msgsWOR.length - 5, msgsWOR.length) + .toList() + .reversed) InkWell( highlightColor: Colors.transparent, splashColor: Colors.transparent, @@ -574,12 +576,15 @@ class HomePageState extends BaseState { ), onTap: () { Navigator.push( - context, - MaterialPageRoute( - builder: (context) => MessagePage( - sessionManager: - widget.sessionManager, - id: int.parse(m.id)))); + context, + MaterialPageRoute( + builder: (context) => MessagePage( + sessionManager: widget.sessionManager, + id: int.parse(m.id), + date: m.timestamp, + ), + ), + ); }, ), ], diff --git a/lib/icanteen_setup.dart b/lib/icanteen_setup.dart index 4c8209c..2139a88 100644 --- a/lib/icanteen_setup.dart +++ b/lib/icanteen_setup.dart @@ -29,6 +29,7 @@ class ICanteenSetupScreenState extends BaseState { String email = ""; String password = ""; String server = ""; + bool showPassword = false; Future login() async { setState(() { @@ -88,9 +89,18 @@ class ICanteenSetupScreenState extends BaseState { decoration: InputDecoration( icon: const Icon(Icons.key), hintText: local!.iCanteenSetupPassword, + suffixIcon: IconButton( + icon: Icon( + showPassword ? Icons.visibility : Icons.visibility_off), + onPressed: () { + setState(() { + showPassword = !showPassword; + }); + }, + ), ), onChanged: (text) => {password = text}, - obscureText: true, + obscureText: !showPassword, keyboardType: TextInputType.visiblePassword, ), ElevatedButton( diff --git a/lib/login.dart b/lib/login.dart index b23b567..1609339 100644 --- a/lib/login.dart +++ b/lib/login.dart @@ -20,6 +20,7 @@ class LoinPageState extends BaseState { bool _showServerField = false; bool _useCustomEndpoint = false; String _customEndpoint = ''; + bool showPassword = false; @override void initState() { @@ -87,6 +88,15 @@ class LoinPageState extends BaseState { decoration: InputDecoration( icon: const Icon(Icons.key), hintText: local!.loginPassword, + suffixIcon: IconButton( + icon: Icon( + showPassword ? Icons.visibility : Icons.visibility_off), + onPressed: () { + setState(() { + showPassword = !showPassword; + }); + }, + ), ), onChanged: (text) => {password = text}, obscureText: true, diff --git a/lib/message.dart b/lib/message.dart index de059ce..ce5a528 100644 --- a/lib/message.dart +++ b/lib/message.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:eduapge2/api.dart'; import 'package:eduapge2/main.dart'; import 'package:firebase_remote_config/firebase_remote_config.dart'; @@ -14,9 +16,13 @@ import 'package:url_launcher/url_launcher.dart'; class MessagePage extends StatefulWidget { final SessionManager sessionManager; final int id; + final DateTime date; const MessagePage( - {super.key, required this.sessionManager, required this.id}); + {super.key, + required this.sessionManager, + required this.id, + required this.date}); @override BaseState createState() => MessagePageState(); @@ -44,7 +50,7 @@ class MessagePageState extends BaseState { loading = true; //make loading true to show progressindicator }); Response response = await dio.get( - "$baseUrl/api/timelineitem/${widget.id}", + "$baseUrl/api/timelineitem/${widget.id}?date=${widget.date.toIso8601String()}", options: Options( headers: { "Authorization": "Bearer ${EP2Data.getInstance().user.token}", @@ -53,7 +59,7 @@ class MessagePageState extends BaseState { ); HtmlUnescape unescape = HtmlUnescape(); - + print(jsonEncode(response.data)); Map data = response.data; bool isImportantMessage = false; if (data["data"]["Value"] != null && @@ -258,10 +264,10 @@ class MessagePageState extends BaseState { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Text( - "${r["owner"]["firstname"]} ${r["owner"]["lastname"]}: "), - Text( - unescape.convert(r["text"]), + Text("${r["vlastnik_meno"]}: "), + SelectableLinkify( + text: unescape.convert(r["text"]), + onOpen: _onOpen, ), ], ), diff --git a/lib/messages.dart b/lib/messages.dart index 7eeb7ed..c1263bf 100644 --- a/lib/messages.dart +++ b/lib/messages.dart @@ -115,9 +115,9 @@ class TimeTablePageState extends BaseState { for (TimelineItem msg in msgs) { if (msg.reactionTo != "") { if (!bump.any((element) => - element["ineid"]!.compareTo(int.parse(msg.reactionTo)) == 0)) { + element["timelineid"]!.compareTo(int.parse(msg.reactionTo)) == 0)) { bump.add({ - "ineid": int.parse(msg.reactionTo), + "timelineid": int.parse(msg.reactionTo), "index": msgsWOR.indexOf(msg) }); msgsWOR.remove(msg); @@ -131,16 +131,27 @@ class TimeTablePageState extends BaseState { if (msg.data["Value"]["messageContent"] != null) { isImportantMessage = true; } + /* + for (TimelineItem r in msgs + .where((element) => element.reactionTo == msg.otherId.toString()) + .toList()) { + print(r.id); + } + */ rows.add(Card( //color: msg["isSeen"] ? null : Theme.of(context).colorScheme.tertiaryContainer, child: InkWell( onTap: () { Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext buildContext) => MessagePage( - sessionManager: widget.sessionManager, - id: int.parse(msg.id)))); + context, + MaterialPageRoute( + builder: (BuildContext buildContext) => MessagePage( + sessionManager: widget.sessionManager, + id: int.parse(msg.id), + date: msg.timestamp, + ), + ), + ); }, child: Padding( padding: const EdgeInsets.all(10), @@ -187,10 +198,10 @@ class TimeTablePageState extends BaseState { ) ], ), - if (msg.reactionTo != "") + if (msg.reactionTo == "") for (TimelineItem r in msgs - .where((element) => - element.reactionTo == msg.otherId.toString()) + .where( + (element) => element.reactionTo == msg.id.toString()) .toList()) Row( children: [ diff --git a/pubspec.lock b/pubspec.lock index b947da1..462f13a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "1a52f1afae8ab7ac4741425114713bdbba802f1ce1e0648e167ffcc6e05e96cf" + sha256: "4eec93681221723a686ad580c2e7d960e1017cf1a4e0a263c2573c2c6b0bf5cd" url: "https://pub.dev" source: hosted - version: "1.3.21" + version: "1.3.25" args: dependency: transitive description: @@ -93,18 +93,18 @@ packages: dependency: "direct main" description: name: dio - sha256: "797e1e341c3dd2f69f2dad42564a6feff3bfb87187d05abb93b9609e6f1645c3" + sha256: "49af28382aefc53562459104f64d16b9dfd1e8ef68c862d5af436cc8356ce5a8" url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.4.1" dynamic_color: dependency: "direct main" description: name: dynamic_color - sha256: a866f1f8947bfdaf674d7928e769eac7230388a2e7a2542824fad4bb5b87be3b + sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d url: "https://pub.dev" source: hosted - version: "1.6.9" + version: "1.7.0" fake_async: dependency: transitive description: @@ -117,50 +117,50 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" firebase_analytics: dependency: "direct main" description: name: firebase_analytics - sha256: edb9f9eaecf0e6431e5c12b7fabdb68be3e85ce51f941ccbfa6cb71327e8b535 + sha256: b13cbf1ee78744ca5e6b762e9218db3bd3967a0edfed75f58339907892a2ccb9 url: "https://pub.dev" source: hosted - version: "10.8.5" + version: "10.8.9" firebase_analytics_platform_interface: dependency: transitive description: name: firebase_analytics_platform_interface - sha256: de4a54353cf58412c6da6b660a0dbad8efacb33b345c0286bc3a2edb869124d8 + sha256: "416b33d62033db5ecd2df719fcb657ad04e9995fa0fc392ffdab4ca0e76cb679" url: "https://pub.dev" source: hosted - version: "3.9.5" + version: "3.9.9" firebase_analytics_web: dependency: transitive description: name: firebase_analytics_web - sha256: "77e4c02ffd0204ccc7856221193265c807b7e056fa62855f973a7f77435b5d41" + sha256: "9dca9d8d468172444ef18cabb73fe99f7aae24733bfad67115bd36bffd2d65c1" url: "https://pub.dev" source: hosted - version: "0.5.5+17" + version: "0.5.5+21" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "7e049e32a9d347616edb39542cf92cd53fdb4a99fb6af0a0bff327c14cd76445" + sha256: "53316975310c8af75a96e365f9fccb67d1c544ef0acdbf0d88bbe30eedd1c4f9" url: "https://pub.dev" source: hosted - version: "2.25.4" + version: "2.27.0" firebase_core_platform_interface: dependency: transitive description: @@ -173,58 +173,58 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: "57e61d6010e253b36d38191cefd6199d7849152cdcd234b61ca290cdb278a0ba" + sha256: c8e1d59385eee98de63c92f961d2a7062c5d9a65e7f45bdc7f1b0b205aab2492 url: "https://pub.dev" source: hosted - version: "2.11.4" + version: "2.11.5" firebase_performance: dependency: "direct main" description: name: firebase_performance - sha256: ceb4631f50cfefdfb675034001ff590dac8f12a70945b46d5d5fc2744dd0864e + sha256: "28cf10f0b0b8b7416b4ec800f81847ac684eb4d009a9386a7b0b5e39858be790" url: "https://pub.dev" source: hosted - version: "0.9.3+13" + version: "0.9.3+17" firebase_performance_platform_interface: dependency: transitive description: name: firebase_performance_platform_interface - sha256: "65a777eef5e0df7be151551df286c577b272aff6f8e5c585a3251ec5af8b6754" + sha256: "85332a719cfc5c7c7af7c56821690a2db361931b70e7bbb86d3b454e9ecf9996" url: "https://pub.dev" source: hosted - version: "0.1.4+21" + version: "0.1.4+25" firebase_performance_web: dependency: transitive description: name: firebase_performance_web - sha256: b80ce2bfb30b20db26d9a37d638a4970a19056ea2dfaf7d8db3d8bd53dbd778f + sha256: dccc79b6eb4a1160e52d766a2fb751803b74ae76449ae3346864eb203adfad33 url: "https://pub.dev" source: hosted - version: "0.1.4+21" + version: "0.1.4+25" firebase_remote_config: dependency: "direct main" description: name: firebase_remote_config - sha256: "701d563063b44ea39e4d23bb5c3fcc3f6eab8fa9247a9a0b276058ad7325ec86" + sha256: b085a72c007bd8f177a7ab98b8292d764659b07fb6b0561b84125239ee656efc url: "https://pub.dev" source: hosted - version: "4.3.13" + version: "4.3.17" firebase_remote_config_platform_interface: dependency: transitive description: name: firebase_remote_config_platform_interface - sha256: "270df798d81421bfbb7fdc4f0bebdcb77e594fefdf1e6a65d56584ff5a06ea54" + sha256: c589e007156b2c9f903253764c108abb96c1b56dd17cf0b91afc4b72ccab7bb6 url: "https://pub.dev" source: hosted - version: "1.4.21" + version: "1.4.25" firebase_remote_config_web: dependency: transitive description: name: firebase_remote_config_web - sha256: a78967a208bc7a9bf44f8339c3c411b9d7e9529c644194ea5d4d0ca503c3481b + sha256: "92443c70e2721ab9d4beb23eb1d9f971da7381332451daee04f619b0f9204569" url: "https://pub.dev" source: hosted - version: "1.4.21" + version: "1.4.25" fixnum: dependency: transitive description: @@ -364,6 +364,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.7" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" linkify: dependency: transitive description: @@ -384,26 +408,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" nm: dependency: transitive description: @@ -416,10 +440,10 @@ packages: dependency: "direct main" description: name: onesignal_flutter - sha256: "5d717e25ed5d72c52ae66f422c11272a54ef0b2fb208bcf27a4b4bc5fe033128" + sha256: "175e75e9611893c395de07c40027f5db28966373f9b1ff276b77d7363aed1fb6" url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.1.2" package_info_plus: dependency: "direct main" description: @@ -440,10 +464,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: transitive description: @@ -504,10 +528,10 @@ packages: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -520,10 +544,10 @@ packages: dependency: transitive description: name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "5.0.2" restart_app: dependency: "direct main" description: @@ -544,18 +568,18 @@ packages: dependency: transitive description: name: sentry - sha256: a7946f4a90b0feb47214981d881b98149e05f6c576da9f2a2f33945bf561de25 + sha256: a524a87d096799b775530176c8c082afe7aa1f10cc31ba078fecdd74e9afc923 url: "https://pub.dev" source: hosted - version: "7.16.0" + version: "7.17.0" sentry_flutter: dependency: "direct main" description: name: sentry_flutter - sha256: "6db7fa1b076faf2f5dd77d8cc9ef206171f32a290cc638842d78e5d62b441a27" + sha256: e0f8367f8f7c74dba9f7521f71700bce6c6ee065cf342f065d4fce411b84fc7b url: "https://pub.dev" source: hosted - version: "7.16.0" + version: "7.17.0" shared_preferences: dependency: "direct main" description: @@ -725,26 +749,26 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c + sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f" + sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745 url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.3.0" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.2.5" url_launcher_linux: dependency: transitive description: @@ -765,10 +789,10 @@ packages: dependency: transitive description: name: url_launcher_platform_interface - sha256: a932c3a8082e118f80a475ce692fde89dc20fddb24c57360b96bc56f7035de1f + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" url_launcher_web: dependency: transitive description: @@ -805,34 +829,34 @@ packages: dependency: transitive description: name: vm_service - sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "11.10.0" + version: "13.0.0" web: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.4.2" webdriver: dependency: transitive description: name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" win32: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "8cb58b45c47dcb42ab3651533626161d6b67a2921917d8d429791f76972b3480" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.3.0" xdg_directories: dependency: transitive description: @@ -850,5 +874,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.16.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.16.6"