fix: change up about dialog
also update CHANGELOG.md
This commit is contained in:
parent
432e752937
commit
095e2f62ba
11 changed files with 158 additions and 34 deletions
|
@ -1,4 +1,9 @@
|
|||
|
||||
# 1.0.0
|
||||
- Change icon
|
||||
- Placeholder text is now inserted into the field in setup, instead of showing as label
|
||||
- Show version text in about dialog
|
||||
- Added tessdata license text into about dialog
|
||||
# 1.0.0-alpha+5
|
||||
- Add tests
|
||||
- Add searching through entries to homepage
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
"langDownloadDialog": "Stahuji {lang}, vyčkejte prosím...",
|
||||
"langDownloadProgress": "Postup: {progress} %",
|
||||
"addingFromOcr": "Přidat skrz OCR",
|
||||
"license":"©️ 2023 Matyáš Caras\nVydáno pod licencí GNU AGPL license verze 3",
|
||||
"license":"©️ 2023 Matyáš Caras\nVydáno pod licencí GNU AGPL license verze 3\nObsahuje tessdata_fast OCR data pro angličtinu ©️ tessdata_fast / Tesseract přispěvatelé, použito pod licencí Apache 2.0",
|
||||
"description":"Popis",
|
||||
"newWallet":"Přidat novou peněženku",
|
||||
"walletExists":"Peněženka s tímto názvem již existuje!",
|
||||
|
@ -104,5 +104,7 @@
|
|||
"selectExportWallet":"Zvolte peněženku k exportování",
|
||||
"exportError":"Při exportování peněženky nastala chyba",
|
||||
"exportCompleted":"Export dokončen",
|
||||
"importCompleted":"Import dokončen"
|
||||
"importCompleted":"Import dokončen",
|
||||
"setup":"Prvotní nastavení",
|
||||
"sourceCode":"Zdrojový kód"
|
||||
}
|
|
@ -89,7 +89,7 @@
|
|||
}
|
||||
},
|
||||
"addingFromOcr": "Add from OCR",
|
||||
"license": "©️ 2023 Matyáš Caras\nReleased under the GNU AGPL license version 3",
|
||||
"license": "©️ 2023 Matyáš Caras\nReleased under the GNU AGPL license version 3\nIncludes the tessdata_fast English trained data, ©️ tessdata_fast / Tesseract contributors, used under the Apache 2.0 license",
|
||||
"description": "Description",
|
||||
"newWallet": "Add new wallet",
|
||||
"walletExists": "A wallet with this name already exists!",
|
||||
|
@ -220,5 +220,7 @@
|
|||
"selectExportWallet":"Select a wallet to export",
|
||||
"exportError":"An error occured trying to export wallet",
|
||||
"exportCompleted":"Export completed",
|
||||
"importCompleted":"Import completed"
|
||||
"importCompleted":"Import completed",
|
||||
"setup":"Setup",
|
||||
"sourceCode":"Source code"
|
||||
}
|
38
lib/util/utils.dart
Normal file
38
lib/util/utils.dart
Normal file
|
@ -0,0 +1,38 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:prasule/pw/platformbutton.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
/// Shows an [AboutDialog] with all the data filled,
|
||||
/// so I don't have to copypaste the same function everywhere
|
||||
void showAbout(BuildContext context) {
|
||||
showAboutDialog(
|
||||
context: context,
|
||||
applicationLegalese: AppLocalizations.of(context).license,
|
||||
applicationName: "Prašule",
|
||||
applicationVersion: "1.0.0",
|
||||
applicationIcon: const CircleAvatar(
|
||||
backgroundImage: AssetImage("assets/icon/full_ico.png"),
|
||||
),
|
||||
children: [
|
||||
PlatformButton(
|
||||
text: "Tessdata",
|
||||
onPressed: () {
|
||||
unawaited(
|
||||
launchUrlString(
|
||||
"https://github.com/tesseract-ocr/tessdata_fast",
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
PlatformButton(
|
||||
text: AppLocalizations.of(context).sourceCode,
|
||||
onPressed: () {
|
||||
unawaited(launchUrlString("https://git.mnau.xyz/hernik/prasule"));
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
|
@ -11,6 +11,7 @@ import 'package:prasule/pw/platformbutton.dart';
|
|||
import 'package:prasule/pw/platformroute.dart';
|
||||
import 'package:prasule/util/drawer.dart';
|
||||
import 'package:prasule/util/graphs.dart';
|
||||
import 'package:prasule/util/utils.dart';
|
||||
import 'package:prasule/views/settings/settings.dart';
|
||||
import 'package:prasule/views/setup.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
@ -193,11 +194,7 @@ class _GraphViewState extends State<GraphView> {
|
|||
setState(() {});
|
||||
});
|
||||
} else if (value == AppLocalizations.of(context).about) {
|
||||
showAboutDialog(
|
||||
context: context,
|
||||
applicationLegalese: AppLocalizations.of(context).license,
|
||||
applicationName: "Prašule",
|
||||
);
|
||||
showAbout(context);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
|
|
@ -25,6 +25,7 @@ import 'package:prasule/pw/platformfield.dart';
|
|||
import 'package:prasule/pw/platformroute.dart';
|
||||
import 'package:prasule/util/drawer.dart';
|
||||
import 'package:prasule/util/text_color.dart';
|
||||
import 'package:prasule/util/utils.dart';
|
||||
import 'package:prasule/views/create_entry.dart';
|
||||
import 'package:prasule/views/settings/settings.dart';
|
||||
import 'package:prasule/views/settings/tessdata_list.dart';
|
||||
|
@ -219,11 +220,7 @@ class _HomeViewState extends State<HomeView> {
|
|||
await WalletManager.loadWallet(selectedWallet!.name);
|
||||
});
|
||||
} else if (value == AppLocalizations.of(context).about) {
|
||||
showAboutDialog(
|
||||
context: context,
|
||||
applicationLegalese: AppLocalizations.of(context).license,
|
||||
applicationName: "Prašule",
|
||||
);
|
||||
showAbout(context);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
@ -355,8 +352,10 @@ class _HomeViewState extends State<HomeView> {
|
|||
),
|
||||
),
|
||||
elements: selectedWallet!.entries
|
||||
.where((element) =>
|
||||
element.data.name.contains(_filter),)
|
||||
.where(
|
||||
(element) => element.data.name
|
||||
.contains(_filter),
|
||||
)
|
||||
.toList(),
|
||||
itemComparator: (a, b) =>
|
||||
b.date.compareTo(a.date),
|
||||
|
@ -636,9 +635,11 @@ class _HomeViewState extends State<HomeView> {
|
|||
TextButton(
|
||||
onPressed: () async {
|
||||
final filePath = await FlutterFileDialog.pickFile(
|
||||
params: OpenFileDialogParams(
|
||||
dialogType: OpenFileDialogType.image,
|
||||
sourceType: sourceType,),);
|
||||
params: OpenFileDialogParams(
|
||||
dialogType: OpenFileDialogType.image,
|
||||
sourceType: sourceType,
|
||||
),
|
||||
);
|
||||
if (filePath == null) {
|
||||
if (mounted) Navigator.of(context).pop();
|
||||
return;
|
||||
|
|
|
@ -14,6 +14,7 @@ import 'package:prasule/pw/platformbutton.dart';
|
|||
import 'package:prasule/pw/platformroute.dart';
|
||||
import 'package:prasule/util/drawer.dart';
|
||||
import 'package:prasule/util/text_color.dart';
|
||||
import 'package:prasule/util/utils.dart';
|
||||
import 'package:prasule/views/create_recur_entry.dart';
|
||||
import 'package:prasule/views/settings/settings.dart';
|
||||
import 'package:prasule/views/setup.dart';
|
||||
|
@ -117,11 +118,7 @@ class _RecurringEntriesViewState extends State<RecurringEntriesView> {
|
|||
await WalletManager.loadWallet(selectedWallet!.name);
|
||||
});
|
||||
} else if (value == AppLocalizations.of(context).about) {
|
||||
showAboutDialog(
|
||||
context: context,
|
||||
applicationLegalese: AppLocalizations.of(context).license,
|
||||
applicationName: "Prašule",
|
||||
);
|
||||
showAbout(context);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
|
|
@ -15,6 +15,7 @@ import 'package:prasule/pw/platformbutton.dart';
|
|||
import 'package:prasule/pw/platformfield.dart';
|
||||
import 'package:prasule/pw/platformroute.dart';
|
||||
import 'package:prasule/util/text_color.dart';
|
||||
import 'package:prasule/util/utils.dart';
|
||||
import 'package:prasule/views/settings/settings.dart';
|
||||
import 'package:prasule/views/setup.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
@ -106,11 +107,7 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
|
|||
),
|
||||
);
|
||||
} else if (value == AppLocalizations.of(context).about) {
|
||||
showAboutDialog(
|
||||
context: context,
|
||||
applicationLegalese: AppLocalizations.of(context).license,
|
||||
applicationName: "Prašule",
|
||||
);
|
||||
showAbout(context);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
@ -158,7 +155,8 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
|
|||
),
|
||||
],
|
||||
title: Text(
|
||||
AppLocalizations.of(context).pickColor,),
|
||||
AppLocalizations.of(context).pickColor,
|
||||
),
|
||||
content: Column(
|
||||
children: [
|
||||
ColorPicker(
|
||||
|
@ -242,8 +240,10 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
|
|||
),
|
||||
),
|
||||
],
|
||||
title: Text(AppLocalizations.of(context)
|
||||
.setupCategoriesEditingName,),
|
||||
title: Text(
|
||||
AppLocalizations.of(context)
|
||||
.setupCategoriesEditingName,
|
||||
),
|
||||
content: SizedBox(
|
||||
width: 400,
|
||||
child:
|
||||
|
|
|
@ -18,6 +18,7 @@ import 'package:prasule/pw/platformfield.dart';
|
|||
import 'package:prasule/pw/platformroute.dart';
|
||||
import 'package:prasule/util/show_message.dart';
|
||||
import 'package:prasule/util/text_color.dart';
|
||||
import 'package:prasule/util/utils.dart';
|
||||
import 'package:prasule/views/home.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
|
@ -107,6 +108,20 @@ class _SetupViewState extends State<SetupView> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context).setup),
|
||||
actions: [
|
||||
Tooltip(
|
||||
message: AppLocalizations.of(context).about,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
showAbout(context);
|
||||
},
|
||||
icon: const Icon(Icons.info_outline),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Center(
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
|
|
66
pubspec.lock
66
pubspec.lock
|
@ -1017,6 +1017,70 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
url_launcher:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: url_launcher
|
||||
sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.4"
|
||||
url_launcher_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.2"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.4"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_linux
|
||||
sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
url_launcher_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_macos
|
||||
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
url_launcher_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_platform_interface
|
||||
sha256: a932c3a8082e118f80a475ce692fde89dc20fddb24c57360b96bc56f7035de1f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
url_launcher_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_web
|
||||
sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.3"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_windows
|
||||
sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1106,7 +1170,7 @@ packages:
|
|||
source: hosted
|
||||
version: "6.5.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: yaml
|
||||
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: prasule
|
||||
description: Open-source private expense tracker
|
||||
|
||||
version: 1.0.0-alpha+5
|
||||
version: 1.0.0+6
|
||||
|
||||
environment:
|
||||
sdk: '>=3.1.0-262.2.beta <4.0.0'
|
||||
|
@ -39,6 +39,7 @@ dependencies:
|
|||
path_provider: ^2.0.15
|
||||
settings_ui: ^2.0.2
|
||||
shared_preferences: ^2.2.2
|
||||
url_launcher: ^6.2.4
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: ^2.4.6
|
||||
|
@ -56,6 +57,7 @@ dev_dependencies:
|
|||
sdk: flutter
|
||||
test: ^1.24.6
|
||||
very_good_analysis: ^5.1.0
|
||||
yaml: ^3.1.2
|
||||
|
||||
flutter_launcher_icons:
|
||||
android: true
|
||||
|
@ -87,6 +89,7 @@ flutter:
|
|||
assets:
|
||||
- assets/tessdata_config.json
|
||||
- assets/tessdata/eng.traineddata
|
||||
- assets/icon/full_ico.png
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
# assets:
|
||||
# - images/a_dot_burr.jpeg
|
||||
|
|
Loading…
Reference in a new issue