From 4818aaba7f48cd75d09f7290e0e2bfc845a80759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Caras?= Date: Tue, 17 May 2022 18:14:14 +0200 Subject: [PATCH] =?UTF-8?q?P=C5=99ipravit=20na=20nov=C3=A9=20vyd=C3=A1n?= =?UTF-8?q?=C3=AD=20(Closes=20#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- lib/lang/lang.dart | 4 ++ lib/lang/lang_cz.dart | 6 +++ lib/lang/lang_en.dart | 6 +++ lib/okna/about.dart | 99 +++++++++++++++++++++++-------------------- lib/okna/burza.dart | 29 +++++++------ lib/util.dart | 2 +- pubspec.yaml | 2 +- 8 files changed, 87 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aa21b5..d8af525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.2.0 +# 1.0.0 - Ukládání dnešního jídelníčku offline - Stránka s možnostmi nastavení aplikace - Přidán anglický překlad diff --git a/lib/lang/lang.dart b/lib/lang/lang.dart index cd5c1e7..1eecc7c 100644 --- a/lib/lang/lang.dart +++ b/lib/lang/lang.dart @@ -107,6 +107,10 @@ abstract class Languages { String get usedLibs; + String get license; + + String get copyright; + // Settings String get settings; diff --git a/lib/lang/lang_cz.dart b/lib/lang/lang_cz.dart index 9ea0573..7c11d50 100644 --- a/lib/lang/lang_cz.dart +++ b/lib/lang/lang_cz.dart @@ -19,6 +19,9 @@ class LanguageCz extends Languages { @override String get close => "Zavřít"; + @override + String get copyright => "© 2022 Matyáš Caras a přispěvatelé"; + @override String get disagree => "Nesouhlasím"; @@ -51,6 +54,9 @@ class LanguageCz extends Languages { @override String get inExchange => "V BURZE"; + @override + String get license => "Vydáno pod licencí GNU GPLv3"; + @override String get loading => "Načítání..."; diff --git a/lib/lang/lang_en.dart b/lib/lang/lang_en.dart index cf3c07c..5ab06ac 100644 --- a/lib/lang/lang_en.dart +++ b/lib/lang/lang_en.dart @@ -19,6 +19,9 @@ class LanguageEn extends Languages { @override String get close => "Close"; + @override + String get copyright => "© 2022 Matyáš Caras and contributors"; + @override String get disagree => "I disagree"; @@ -51,6 +54,9 @@ class LanguageEn extends Languages { @override String get inExchange => "ON EXCHANGE"; + @override + String get license => "Released under GNU GPLv3"; + @override String get loading => "Loading..."; diff --git a/lib/okna/about.dart b/lib/okna/about.dart index 607efa9..430b0bb 100644 --- a/lib/okna/about.dart +++ b/lib/okna/about.dart @@ -17,55 +17,58 @@ class _AboutPageState extends State { appBar: AppBar( title: Text(Languages.of(context)!.about), ), - body: SingleChildScrollView( + body: Center( child: SizedBox( height: MediaQuery.of(context).size.height, - child: Column(mainAxisSize: MainAxisSize.min, children: [ - const Text("OpenCanteen", style: TextStyle(fontSize: 30)), - const Text("© 2022 Matyáš Caras a přispěvatelé"), - InkWell( - onTap: () => launch( - "https://github.com/hernikplays/opencanteen/blob/main/LICENSE"), - child: const Text("Vydáno pod licencí GNU GPLv3")), - const SizedBox(height: 15), - Text(Languages.of(context)!.usedLibs, - style: const TextStyle(fontSize: 19)), - const SizedBox(height: 10), - cudlik( - "Flutter", - "Copyright 2014 The Flutter Authors. All rights reserved, licence BSD 3-Clause", - "https://github.com/flutter/flutter/blob/master/LICENSE"), - const SizedBox(height: 10), - cudlik( - "Flutter_secure_storage", - "Copyright 2017 German Saprykin. All rights reserved, licence BSD 3-Clause", - "https://github.com/mogol/flutter_secure_storage/blob/develop/flutter_secure_storage/LICENSE"), - const SizedBox(height: 10), - cudlik( - "connectivity_plus", - "Copyright 2017 The Chromium Authors. All rights reserved, licence BSD 3-Clause", - "https://github.com/fluttercommunity/plus_plugins/blob/main/packages/connectivity_plus/connectivity_plus/LICENSE"), - const SizedBox(height: 10), - cudlik( - "url_launcher", - "Copyright 2013 The Flutter Authors. All rights reserved, licence BSD 3-Clause", - "https://github.com/flutter/plugins/blob/main/packages/url_launcher/url_launcher/LICENSE"), - const SizedBox(height: 10), - cudlik( - "canteenlib", - "Copyright (c) 2022 Matyáš Caras and contributors, licence MIT", - "https://github.com/hernikplays/canteenlib/blob/main/LICENSE"), - const SizedBox(height: 10), - cudlik( - "path_provider", - "Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause", - "https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE"), - const SizedBox(height: 10), - cudlik( - "shared_preferences", - "Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause", - "https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE") - ]), + width: MediaQuery.of(context).size.width - 50, + child: SingleChildScrollView( + child: Column(mainAxisSize: MainAxisSize.min, children: [ + const Text("OpenCanteen", style: TextStyle(fontSize: 30)), + Text(Languages.of(context)!.copyright), + InkWell( + onTap: () => launch( + "https://github.com/hernikplays/opencanteen/blob/main/LICENSE"), + child: Text(Languages.of(context)!.license)), + const SizedBox(height: 15), + Text(Languages.of(context)!.usedLibs, + style: const TextStyle(fontSize: 19)), + const SizedBox(height: 10), + cudlik( + "Flutter", + "Copyright 2014 The Flutter Authors. All rights reserved, licence BSD 3-Clause", + "https://github.com/flutter/flutter/blob/master/LICENSE"), + const SizedBox(height: 10), + cudlik( + "Flutter_secure_storage", + "Copyright 2017 German Saprykin. All rights reserved, licence BSD 3-Clause", + "https://github.com/mogol/flutter_secure_storage/blob/develop/flutter_secure_storage/LICENSE"), + const SizedBox(height: 10), + cudlik( + "connectivity_plus", + "Copyright 2017 The Chromium Authors. All rights reserved, licence BSD 3-Clause", + "https://github.com/fluttercommunity/plus_plugins/blob/main/packages/connectivity_plus/connectivity_plus/LICENSE"), + const SizedBox(height: 10), + cudlik( + "url_launcher", + "Copyright 2013 The Flutter Authors. All rights reserved, licence BSD 3-Clause", + "https://github.com/flutter/plugins/blob/main/packages/url_launcher/url_launcher/LICENSE"), + const SizedBox(height: 10), + cudlik( + "canteenlib", + "Copyright (c) 2022 Matyáš Caras and contributors, licence MIT", + "https://github.com/hernikplays/canteenlib/blob/main/LICENSE"), + const SizedBox(height: 10), + cudlik( + "path_provider", + "Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause", + "https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE"), + const SizedBox(height: 10), + cudlik( + "shared_preferences", + "Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause", + "https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE") + ]), + ), ), ), ); @@ -82,6 +85,8 @@ class _AboutPageState extends State { ), Text( copyright, + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 12), ), ]), ); diff --git a/lib/okna/burza.dart b/lib/okna/burza.dart index 20c94a8..f4b58b3 100644 --- a/lib/okna/burza.dart +++ b/lib/okna/burza.dart @@ -120,19 +120,22 @@ class _BurzaPageState extends State { ), body: RefreshIndicator( child: Center( - child: Column( - children: [ - const SizedBox(height: 10), - Text("${Languages.of(context)!.balance}$kredit Kč"), - const SizedBox(height: 10), - SingleChildScrollView( - physics: const AlwaysScrollableScrollPhysics(), - child: SizedBox( - height: MediaQuery.of(context).size.height / 1.3, - child: Column(children: obsah), - ), - ) - ], + child: SizedBox( + width: MediaQuery.of(context).size.width - 50, + child: Column( + children: [ + const SizedBox(height: 10), + Text("${Languages.of(context)!.balance}$kredit Kč"), + const SizedBox(height: 10), + SingleChildScrollView( + physics: const AlwaysScrollableScrollPhysics(), + child: SizedBox( + height: MediaQuery.of(context).size.height / 1.3, + child: Column(children: obsah), + ), + ) + ], + ), ), ), onRefresh: () => nactiBurzu(context)), diff --git a/lib/util.dart b/lib/util.dart index 43c9ac9..3c967f9 100644 --- a/lib/util.dart +++ b/lib/util.dart @@ -81,5 +81,5 @@ class OfflineJidlo { required this.objednano, required this.cena, required this.naBurze, - required DateTime this.den}); + required this.den}); } diff --git a/pubspec.yaml b/pubspec.yaml index 14f0f79..b276656 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: 'none' # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 # followed by an optional build number separated by a +. -version: 0.2.0+3 +version: 1.0.0+3 environment: sdk: ">=2.16.1 <3.0.0"