added release confetti and welcome message

This commit is contained in:
Kima 2023-05-29 10:05:25 +02:00
parent 7543f946f2
commit 5d18354cbb
3 changed files with 21 additions and 4 deletions

View File

@ -151,8 +151,9 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
// Updates // Updates
case FilterType.updates: case FilterType.updates:
if (updateProvider.available) if (updateProvider.available) {
items = [update_filter.getWidget(updateProvider.releases.first)]; items = [update_filter.getWidget(updateProvider.releases.first)];
}
break; break;
// Missed Exams // Missed Exams

View File

@ -108,6 +108,16 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
now.day == user.student?.birth.day) { now.day == user.student?.birth.day) {
greeting = "happybirthday"; greeting = "happybirthday";
if (NavigationScreen.of(context)?.init("confetti") ?? false) {
_confettiController =
ConfettiController(duration: const Duration(seconds: 3));
Future.delayed(const Duration(seconds: 1))
.then((value) => mounted ? _confettiController?.play() : null);
}
} else if (now.isAfter(DateTime(now.year, DateTime.may, 28)) &&
now.isBefore(DateTime(now.year, DateTime.may, 30))) {
greeting = "refilcopen";
if (NavigationScreen.of(context)?.init("confetti") ?? false) { if (NavigationScreen.of(context)?.init("confetti") ?? false) {
_confettiController = _confettiController =
ConfettiController(duration: const Duration(seconds: 3)); ConfettiController(duration: const Duration(seconds: 3));

View File

@ -11,13 +11,15 @@ extension Localization on String {
"happybirthday": "🎂 Happy birthday, %s!", "happybirthday": "🎂 Happy birthday, %s!",
"merryxmas": "🎄 Merry Christmas, %s!", "merryxmas": "🎄 Merry Christmas, %s!",
"happynewyear": "🎉 Happy New Year, %s!", "happynewyear": "🎉 Happy New Year, %s!",
"refilcopen": "🎈 Welcome in reFilc, %s!",
"empty": "Nothing to see here.", "empty": "Nothing to see here.",
"All": "All", "All": "All",
"Grades": "Grades", "Grades": "Grades",
"Messages": "Messages", "Messages": "Messages",
"Absences": "Absences", "Absences": "Absences",
"update_available": "Update Available", "update_available": "Update Available",
"missed_exams": "You missed %s exams this week.".one("You missed an exam this week."), "missed_exams": "You missed %s exams this week."
.one("You missed an exam this week."),
"missed_exam_contact": "Contact %s, to resolve it!", "missed_exam_contact": "Contact %s, to resolve it!",
}, },
"hu_hu": { "hu_hu": {
@ -28,13 +30,15 @@ extension Localization on String {
"happybirthday": "🎂 Boldog születésnapot, %s!", "happybirthday": "🎂 Boldog születésnapot, %s!",
"merryxmas": "🎄 Boldog Karácsonyt, %s!", "merryxmas": "🎄 Boldog Karácsonyt, %s!",
"happynewyear": "🎉 Boldog új évet, %s!", "happynewyear": "🎉 Boldog új évet, %s!",
"refilcopen": "🎈 Üdv a reFilc-ben, %s!",
"empty": "Nincs itt semmi látnivaló.", "empty": "Nincs itt semmi látnivaló.",
"All": "Összes", "All": "Összes",
"Grades": "Jegyek", "Grades": "Jegyek",
"Messages": "Üzenetek", "Messages": "Üzenetek",
"Absences": "Hiányok", "Absences": "Hiányok",
"update_available": "Frissítés elérhető", "update_available": "Frissítés elérhető",
"missed_exams": "Ezen a héten hiányoztál %s dolgozatról.".one("Ezen a héten hiányoztál egy dolgozatról."), "missed_exams": "Ezen a héten hiányoztál %s dolgozatról."
.one("Ezen a héten hiányoztál egy dolgozatról."),
"missed_exam_contact": "Keresd %s-t, ha pótolni szeretnéd!", "missed_exam_contact": "Keresd %s-t, ha pótolni szeretnéd!",
}, },
"de_de": { "de_de": {
@ -45,13 +49,15 @@ extension Localization on String {
"happybirthday": "🎂 Alles Gute zum Geburtstag, %s!", "happybirthday": "🎂 Alles Gute zum Geburtstag, %s!",
"merryxmas": "🎄 Frohe Weihnachten, %s!", "merryxmas": "🎄 Frohe Weihnachten, %s!",
"happynewyear": "🎉 Frohes neues Jahr, %s!", "happynewyear": "🎉 Frohes neues Jahr, %s!",
"refilcopen": "🎈 Willkommen bei reFilc, %s!",
"empty": "Hier gibt es nichts zu sehen.", "empty": "Hier gibt es nichts zu sehen.",
"All": "Alles", "All": "Alles",
"Grades": "Noten", "Grades": "Noten",
"Messages": "Nachrichten", "Messages": "Nachrichten",
"Absences": "Fehlen", "Absences": "Fehlen",
"update_available": "Update verfügbar", "update_available": "Update verfügbar",
"missed_exams": "Diese Woche haben Sie %s Prüfungen verpasst.".one("Diese Woche haben Sie eine Prüfung verpasst."), "missed_exams": "Diese Woche haben Sie %s Prüfungen verpasst."
.one("Diese Woche haben Sie eine Prüfung verpasst."),
"missed_exam_contact": "Wenden Sie sich an %s, um sie zu erneuern!", "missed_exam_contact": "Wenden Sie sich an %s, um sie zu erneuern!",
}, },
}; };