Compare commits
27 Commits
3.0.0-beta
...
3.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
549570a48c | ||
|
|
930e8d86b8 | ||
|
|
4aff7df96f | ||
|
|
c839ac178a | ||
|
|
2c7efc0a18 | ||
|
|
5252813721 | ||
|
|
15d3daefed | ||
|
|
0729c13362 | ||
|
|
4bb978ba63 | ||
|
|
d9c071b5ae | ||
|
|
6ffe4b6c33 | ||
|
|
7bd5d8bd5a | ||
|
|
c0ffa5d726 | ||
|
|
befb107183 | ||
|
|
e56488094e | ||
|
|
74831c3e56 | ||
|
|
9d3347d680 | ||
|
|
25100ab7d9 | ||
|
|
b509adcbc9 | ||
|
|
d421ae9031 | ||
|
|
c3b79fcb3f | ||
|
|
3cf57ac6d4 | ||
|
|
d72bf84a36 | ||
|
|
638b8c9413 | ||
|
|
d5bdca698b | ||
|
|
ea6b2ec73d | ||
|
|
7ffb58c9ac |
1
filcnaplo/android/.gitignore
vendored
1
filcnaplo/android/.gitignore
vendored
@@ -9,3 +9,4 @@ GeneratedPluginRegistrant.java
|
|||||||
# Remember to never publicly share your keystore.
|
# Remember to never publicly share your keystore.
|
||||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||||
key.properties
|
key.properties
|
||||||
|
.project
|
||||||
@@ -52,6 +52,7 @@ android {
|
|||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@@ -77,6 +78,7 @@ flutter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation 'com.android.support:multidex:2.0.1'
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
androidTestImplementation 'androidx.test:runner:1.1.1'
|
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.6.3'
|
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'dart:convert';
|
|||||||
import 'package:filcnaplo/models/config.dart';
|
import 'package:filcnaplo/models/config.dart';
|
||||||
import 'package:filcnaplo/models/news.dart';
|
import 'package:filcnaplo/models/news.dart';
|
||||||
import 'package:filcnaplo/models/release.dart';
|
import 'package:filcnaplo/models/release.dart';
|
||||||
|
import 'package:filcnaplo/models/supporter.dart';
|
||||||
import 'package:filcnaplo_kreta_api/models/school.dart';
|
import 'package:filcnaplo_kreta_api/models/school.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
@@ -10,6 +11,7 @@ class FilcAPI {
|
|||||||
static const SCHOOL_LIST = "https://filcnaplo.hu/v2/school_list.json";
|
static const SCHOOL_LIST = "https://filcnaplo.hu/v2/school_list.json";
|
||||||
static const CONFIG = "https://filcnaplo.hu/v2/config.json";
|
static const CONFIG = "https://filcnaplo.hu/v2/config.json";
|
||||||
static const NEWS = "https://filcnaplo.hu/v2/news.json";
|
static const NEWS = "https://filcnaplo.hu/v2/news.json";
|
||||||
|
static const SUPPORTERS = "https://filcnaplo.hu/v2/supporters.json";
|
||||||
static const REPO = "filc/naplo";
|
static const REPO = "filc/naplo";
|
||||||
static const RELEASES = "https://api.github.com/repos/$REPO/releases";
|
static const RELEASES = "https://api.github.com/repos/$REPO/releases";
|
||||||
|
|
||||||
@@ -18,7 +20,13 @@ class FilcAPI {
|
|||||||
http.Response res = await http.get(Uri.parse(SCHOOL_LIST));
|
http.Response res = await http.get(Uri.parse(SCHOOL_LIST));
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
return (jsonDecode(res.body) as List).cast<Map>().map((json) => School.fromJson(json)).toList();
|
List<School> schools = (jsonDecode(res.body) as List).cast<Map>().map((json) => School.fromJson(json)).toList();
|
||||||
|
schools.add(School(
|
||||||
|
city: "Tiszabura",
|
||||||
|
instituteCode: "supporttest-reni-tiszabura-teszt01",
|
||||||
|
name: "FILC Éles Reni tiszabura-teszt",
|
||||||
|
));
|
||||||
|
return schools;
|
||||||
} else {
|
} else {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
}
|
}
|
||||||
@@ -55,6 +63,20 @@ class FilcAPI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Future<Supporters?> getSupporters() async {
|
||||||
|
try {
|
||||||
|
http.Response res = await http.get(Uri.parse(SUPPORTERS));
|
||||||
|
|
||||||
|
if (res.statusCode == 200) {
|
||||||
|
return Supporters.fromJson(jsonDecode(res.body));
|
||||||
|
} else {
|
||||||
|
throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
print("ERROR: FilcAPI.getSupporters: $error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static Future<List<Release>?> getReleases() async {
|
static Future<List<Release>?> getReleases() async {
|
||||||
try {
|
try {
|
||||||
http.Response res = await http.get(Uri.parse(RELEASES));
|
http.Response res = await http.get(Uri.parse(RELEASES));
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:filcnaplo/api/client.dart';
|
import 'package:filcnaplo/api/client.dart';
|
||||||
import 'package:filcnaplo/api/providers/news_provider.dart';
|
import 'package:filcnaplo/api/providers/news_provider.dart';
|
||||||
import 'package:filcnaplo/api/providers/database_provider.dart';
|
import 'package:filcnaplo/api/providers/database_provider.dart';
|
||||||
@@ -77,8 +79,11 @@ class App extends StatelessWidget {
|
|||||||
builder: (context, themeMode, child) {
|
builder: (context, themeMode, child) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
|
// Limit font size scaling to 1.0
|
||||||
|
double textScaleFactor = min(MediaQuery.of(context).textScaleFactor, 1.0);
|
||||||
|
|
||||||
return MediaQuery(
|
return MediaQuery(
|
||||||
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
|
data: MediaQuery.of(context).copyWith(textScaleFactor: textScaleFactor),
|
||||||
child: child ?? Container(),
|
child: child ?? Container(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ class SubjectIcon {
|
|||||||
if (RegExp("mate(k|matika)").hasMatch(name) || category == "matematika") return Icons.calculate_outlined;
|
if (RegExp("mate(k|matika)").hasMatch(name) || category == "matematika") return Icons.calculate_outlined;
|
||||||
if (RegExp("magyar nyelv|nyelvtan").hasMatch(name)) return Icons.spellcheck_outlined;
|
if (RegExp("magyar nyelv|nyelvtan").hasMatch(name)) return Icons.spellcheck_outlined;
|
||||||
if (RegExp("irodalom").hasMatch(name)) return Icons.menu_book_outlined;
|
if (RegExp("irodalom").hasMatch(name)) return Icons.menu_book_outlined;
|
||||||
if (RegExp("rajz|muvtori|muveszet|kultura").hasMatch(name)) return Icons.palette_outlined;
|
|
||||||
if (RegExp("tor(i|tenelem)").hasMatch(name)) return Icons.hourglass_empty_outlined;
|
if (RegExp("tor(i|tenelem)").hasMatch(name)) return Icons.hourglass_empty_outlined;
|
||||||
if (RegExp("foldrajz").hasMatch(name)) return Icons.public_outlined;
|
if (RegExp("foldrajz").hasMatch(name)) return Icons.public_outlined;
|
||||||
|
if (RegExp("rajz|muvtori|muveszet|kultura").hasMatch(name)) return Icons.palette_outlined;
|
||||||
if (RegExp("fizika").hasMatch(name)) return Icons.emoji_objects_outlined;
|
if (RegExp("fizika").hasMatch(name)) return Icons.emoji_objects_outlined;
|
||||||
if (RegExp("^enek|zene|szolfezs|zongora|korus").hasMatch(name)) return Icons.music_note_outlined;
|
if (RegExp("^enek|zene|szolfezs|zongora|korus").hasMatch(name)) return Icons.music_note_outlined;
|
||||||
if (RegExp("^tes(i|tneveles)|sport").hasMatch(name)) return Icons.sports_soccer_outlined;
|
if (RegExp("^tes(i|tneveles)|sport").hasMatch(name)) return Icons.sports_soccer_outlined;
|
||||||
|
|||||||
38
filcnaplo/lib/models/supporter.dart
Normal file
38
filcnaplo/lib/models/supporter.dart
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
class Supporter {
|
||||||
|
String name;
|
||||||
|
String amount;
|
||||||
|
String platform;
|
||||||
|
|
||||||
|
Supporter(this.name, this.amount, this.platform);
|
||||||
|
|
||||||
|
factory Supporter.fromJson(Map json) {
|
||||||
|
return Supporter(
|
||||||
|
json["name"] ?? "",
|
||||||
|
json["amount"] ?? "",
|
||||||
|
json["platform"] ?? "",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Supporters {
|
||||||
|
List<Supporter> top;
|
||||||
|
List<Supporter> all;
|
||||||
|
int progress;
|
||||||
|
int max;
|
||||||
|
|
||||||
|
Supporters({
|
||||||
|
required this.top,
|
||||||
|
required this.all,
|
||||||
|
required this.progress,
|
||||||
|
required this.max,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Supporters.fromJson(Map json) {
|
||||||
|
return Supporters(
|
||||||
|
max: (json["progress"] ?? {})["max"] ?? 1,
|
||||||
|
progress: (json["progress"] ?? {})["value"] ?? 0,
|
||||||
|
all: ((json["all"] ?? []) as List).cast<Map>().map((e) => Supporter.fromJson(e)).toList(),
|
||||||
|
top: ((json["top"] ?? []) as List).cast<Map>().map((e) => Supporter.fromJson(e)).toList(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,7 +18,7 @@ extension StringFormatUtils on String {
|
|||||||
|
|
||||||
String capital() => this.length > 0 ? this[0].toUpperCase() + this.substring(1) : "";
|
String capital() => this.length > 0 ? this[0].toUpperCase() + this.substring(1) : "";
|
||||||
|
|
||||||
String capitalize() => this.split(" ").map((w) => this.capital()).join(" ");
|
String capitalize() => this.split(" ").map((w) => w.capital()).join(" ");
|
||||||
|
|
||||||
String escapeHtml() {
|
String escapeHtml() {
|
||||||
String htmlString = this;
|
String htmlString = this;
|
||||||
@@ -37,11 +37,11 @@ extension DateFormatUtils on DateTime {
|
|||||||
if (timeOnly) return DateFormat("HH:mm").format(this);
|
if (timeOnly) return DateFormat("HH:mm").format(this);
|
||||||
|
|
||||||
DateTime now = DateTime.now();
|
DateTime now = DateTime.now();
|
||||||
if (this.difference(now).inDays == 0) {
|
if (now.year == this.year && now.month == this.month && now.day == this.day) {
|
||||||
if (this.hour == 0 && this.minute == 0 && this.second == 0) return "Today".i18n;
|
if (this.hour == 0 && this.minute == 0 && this.second == 0) return "Today".i18n;
|
||||||
return DateFormat("HH:mm").format(this);
|
return DateFormat("HH:mm").format(this);
|
||||||
}
|
}
|
||||||
if (this.difference(now).inDays == 1) return "Yesterday".i18n;
|
if (now.year == this.year && now.month == this.month && now.subtract(Duration(days: 1)).day == this.day) return "Yesterday".i18n;
|
||||||
|
|
||||||
String formatString;
|
String formatString;
|
||||||
if (this.year == now.year)
|
if (this.year == now.year)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ description: "Nem hivatalos e-napló alkalmazás az e-Kréta rendszerhez"
|
|||||||
homepage: https://filcnaplo.hu
|
homepage: https://filcnaplo.hu
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
|
|
||||||
version: 3.0.0-beta.3+125
|
version: 3.0.1+129
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0 <3.0.0"
|
sdk: ">=2.12.0 <3.0.0"
|
||||||
|
|||||||
Submodule filcnaplo_kreta_api updated: 9d09624313...a35587d449
Submodule filcnaplo_mobile_ui updated: 51578dd62a...f65383f551
Reference in New Issue
Block a user