fix: aktualizace, změna odkazů a bug fixy
Změněn odkaz na zpětnou vazbu na nový formulář, přidáno tlačítko na zanechání recenze, aktualizována knihovna canteenlib, opravena chyba s vytvářením notifikací
This commit is contained in:
parent
28cddffe10
commit
403aa5f619
9 changed files with 49 additions and 15 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
# 1.4.1
|
||||||
|
- aktualizovat knihovnu canteenlib
|
||||||
|
- změnit odkaz na odeslání zpětné vazby
|
||||||
|
- přidat odkaz na hodnocení v obchodu s aplikacemi
|
||||||
|
- opravit chybu s vytvářením notifikace
|
||||||
# 1.4.0
|
# 1.4.0
|
||||||
- Opravit chybu, kdy po stisknutí tlačítka zpět na hlavní stránce byl uživatel vrácen na přihlašovací obrazovku
|
- Opravit chybu, kdy po stisknutí tlačítka zpět na hlavní stránce byl uživatel vrácen na přihlašovací obrazovku
|
||||||
- Přidat výběr z instancí (aktuálně pouze SŠTE Olomoucká)
|
- Přidat výběr z instancí (aktuálně pouze SŠTE Olomoucká)
|
||||||
|
|
|
@ -81,6 +81,8 @@ abstract class Languages {
|
||||||
|
|
||||||
String get reportBugs;
|
String get reportBugs;
|
||||||
|
|
||||||
|
String get review;
|
||||||
|
|
||||||
String get about;
|
String get about;
|
||||||
|
|
||||||
String get menu;
|
String get menu;
|
||||||
|
|
|
@ -122,7 +122,7 @@ class LanguageCz extends Languages {
|
||||||
String get rememberMe => "Zapamatovat si mě";
|
String get rememberMe => "Zapamatovat si mě";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get reportBugs => "Nahlásit chybu";
|
String get reportBugs => "Zpětná vazba";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get saturday => "Sobota";
|
String get saturday => "Sobota";
|
||||||
|
@ -234,4 +234,7 @@ class LanguageCz extends Languages {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get source => "Zdrojový kód";
|
String get source => "Zdrojový kód";
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get review => "Ohodnotit aplikaci";
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,7 @@ class LanguageEn extends Languages {
|
||||||
String get rememberMe => "Remember me";
|
String get rememberMe => "Remember me";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get reportBugs => "Report bug";
|
String get reportBugs => "Feedback";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get saturday => "Saturday";
|
String get saturday => "Saturday";
|
||||||
|
@ -232,4 +232,7 @@ class LanguageEn extends Languages {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get source => "Source code";
|
String get source => "Source code";
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get review => "Review the app";
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,10 @@ void oznamitPredem(SharedPreferences prefs, tz.Location l) async {
|
||||||
(element) => element.objednano); // získá objednané jídlo
|
(element) => element.objednano); // získá objednané jídlo
|
||||||
var kdy = DateTime.parse(prefs.getString(
|
var kdy = DateTime.parse(prefs.getString(
|
||||||
"oznameni_cas")!); // uložíme čas, kdy se má odeslat oznámení
|
"oznameni_cas")!); // uložíme čas, kdy se má odeslat oznámení
|
||||||
|
var cas = casNaDate(
|
||||||
|
TimeOfDay(hour: kdy.hour, minute: kdy.minute),
|
||||||
|
);
|
||||||
|
if (cas.isBefore(DateTime.now())) return;
|
||||||
// data o oznámení
|
// data o oznámení
|
||||||
const AndroidNotificationDetails androidSpec =
|
const AndroidNotificationDetails androidSpec =
|
||||||
AndroidNotificationDetails('predobedem', 'Oznámení před obědem',
|
AndroidNotificationDetails('predobedem', 'Oznámení před obědem',
|
||||||
|
@ -85,11 +88,7 @@ void oznamitPredem(SharedPreferences prefs, tz.Location l) async {
|
||||||
0,
|
0,
|
||||||
title,
|
title,
|
||||||
"${jidlo.varianta} - ${jidlo.nazev}",
|
"${jidlo.varianta} - ${jidlo.nazev}",
|
||||||
tz.TZDateTime.from(
|
tz.TZDateTime.from(cas, l),
|
||||||
casNaDate(
|
|
||||||
TimeOfDay(hour: kdy.hour, minute: kdy.minute),
|
|
||||||
),
|
|
||||||
l),
|
|
||||||
const NotificationDetails(android: androidSpec, iOS: iOSpec),
|
const NotificationDetails(android: androidSpec, iOS: iOSpec),
|
||||||
androidAllowWhileIdle: true,
|
androidAllowWhileIdle: true,
|
||||||
uiLocalNotificationDateInterpretation:
|
uiLocalNotificationDateInterpretation:
|
||||||
|
|
|
@ -342,9 +342,18 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
} else if (value == Languages.of(context)!.review) {
|
||||||
|
(Platform.isAndroid)
|
||||||
|
? launchUrl(
|
||||||
|
Uri.parse("market://details?id=cz.hernikplays.opencanteen"),
|
||||||
|
mode: LaunchMode.externalApplication)
|
||||||
|
: launchUrl(
|
||||||
|
Uri.parse(
|
||||||
|
"https://apps.apple.com/cs/app/opencanteen/id1621124445"),
|
||||||
|
mode: LaunchMode.externalApplication);
|
||||||
} else if (value == Languages.of(context)!.reportBugs) {
|
} else if (value == Languages.of(context)!.reportBugs) {
|
||||||
launchUrl(Uri.parse(
|
launchUrl(Uri.parse("https://forms.gle/jKN7QeFJwpaApSbC8"),
|
||||||
"https://github.com/hernikplays/opencanteen/issues/new/choose"));
|
mode: LaunchMode.externalApplication);
|
||||||
} else if (value == Languages.of(context)!.about) {
|
} else if (value == Languages.of(context)!.about) {
|
||||||
var packageInfo = await PackageInfo.fromPlatform();
|
var packageInfo = await PackageInfo.fromPlatform();
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
|
@ -434,6 +443,7 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
|
||||||
itemBuilder: (BuildContext context) {
|
itemBuilder: (BuildContext context) {
|
||||||
return {
|
return {
|
||||||
Languages.of(context)!.reportBugs,
|
Languages.of(context)!.reportBugs,
|
||||||
|
Languages.of(context)!.review,
|
||||||
Languages.of(context)!.settings,
|
Languages.of(context)!.settings,
|
||||||
Languages.of(context)!.about,
|
Languages.of(context)!.about,
|
||||||
Languages.of(context)!.signOut
|
Languages.of(context)!.signOut
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||||
import 'package:opencanteen/util.dart';
|
import 'package:opencanteen/util.dart';
|
||||||
|
@ -81,9 +83,18 @@ class _OfflineJidelnicekState extends State<OfflineJidelnicek> {
|
||||||
storage.deleteAll();
|
storage.deleteAll();
|
||||||
Navigator.pushReplacement(
|
Navigator.pushReplacement(
|
||||||
context, MaterialPageRoute(builder: (c) => const LoginPage()));
|
context, MaterialPageRoute(builder: (c) => const LoginPage()));
|
||||||
|
} else if (value == Languages.of(context)!.review) {
|
||||||
|
(Platform.isAndroid)
|
||||||
|
? launchUrl(
|
||||||
|
Uri.parse("market://details?id=cz.hernikplays.opencanteen"),
|
||||||
|
mode: LaunchMode.externalApplication)
|
||||||
|
: launchUrl(
|
||||||
|
Uri.parse(
|
||||||
|
"https://apps.apple.com/cs/app/opencanteen/id1621124445"),
|
||||||
|
mode: LaunchMode.externalApplication);
|
||||||
} else if (value == Languages.of(context)!.reportBugs) {
|
} else if (value == Languages.of(context)!.reportBugs) {
|
||||||
launchUrl(Uri.parse(
|
launchUrl(Uri.parse("https://forms.gle/jKN7QeFJwpaApSbC8"),
|
||||||
"https://github.com/hernikplays/opencanteen/issues/new/choose"));
|
mode: LaunchMode.externalApplication);
|
||||||
} else if (value == Languages.of(context)!.about) {
|
} else if (value == Languages.of(context)!.about) {
|
||||||
var packageInfo = await PackageInfo.fromPlatform();
|
var packageInfo = await PackageInfo.fromPlatform();
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
|
@ -120,6 +131,7 @@ class _OfflineJidelnicekState extends State<OfflineJidelnicek> {
|
||||||
itemBuilder: (BuildContext context) {
|
itemBuilder: (BuildContext context) {
|
||||||
return {
|
return {
|
||||||
Languages.of(context)!.reportBugs,
|
Languages.of(context)!.reportBugs,
|
||||||
|
Languages.of(context)!.review,
|
||||||
Languages.of(context)!.about,
|
Languages.of(context)!.about,
|
||||||
Languages.of(context)!.signOut
|
Languages.of(context)!.signOut
|
||||||
}.map((String choice) {
|
}.map((String choice) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ packages:
|
||||||
name: canteenlib
|
name: canteenlib
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.1"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -6,7 +6,7 @@ publish_to: 'none'
|
||||||
# The following defines the version and build number for your application.
|
# The following defines the version and build number for your application.
|
||||||
# A version number is three numbers separated by dots, like 1.2.43
|
# A version number is three numbers separated by dots, like 1.2.43
|
||||||
# followed by an optional build number separated by a +.
|
# followed by an optional build number separated by a +.
|
||||||
version: 1.4.0+19
|
version: 1.4.1+20
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.16.1 <3.0.0"
|
sdk: ">=2.16.1 <3.0.0"
|
||||||
|
@ -16,7 +16,7 @@ dependencies:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
canteenlib: ^1.0.0
|
canteenlib: ^1.0.1
|
||||||
flutter_secure_storage: 5.0.2
|
flutter_secure_storage: 5.0.2
|
||||||
url_launcher: ^6.0.20
|
url_launcher: ^6.0.20
|
||||||
path_provider: ^2.0.9
|
path_provider: ^2.0.9
|
||||||
|
|
Reference in a new issue