1.0.0 release #31

Merged
hernik merged 31 commits from dev into main 2024-02-10 16:27:33 +01:00
11 changed files with 158 additions and 34 deletions
Showing only changes of commit 095e2f62ba - Show all commits

View file

@ -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 # 1.0.0-alpha+5
- Add tests - Add tests
- Add searching through entries to homepage - Add searching through entries to homepage

View file

@ -53,7 +53,7 @@
"langDownloadDialog": "Stahuji {lang}, vyčkejte prosím...", "langDownloadDialog": "Stahuji {lang}, vyčkejte prosím...",
"langDownloadProgress": "Postup: {progress} %", "langDownloadProgress": "Postup: {progress} %",
"addingFromOcr": "Přidat skrz OCR", "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", "description":"Popis",
"newWallet":"Přidat novou peněženku", "newWallet":"Přidat novou peněženku",
"walletExists":"Peněženka s tímto názvem již existuje!", "walletExists":"Peněženka s tímto názvem již existuje!",
@ -104,5 +104,7 @@
"selectExportWallet":"Zvolte peněženku k exportování", "selectExportWallet":"Zvolte peněženku k exportování",
"exportError":"Při exportování peněženky nastala chyba", "exportError":"Při exportování peněženky nastala chyba",
"exportCompleted":"Export dokončen", "exportCompleted":"Export dokončen",
"importCompleted":"Import dokončen" "importCompleted":"Import dokončen",
"setup":"Prvotní nastavení",
"sourceCode":"Zdrojový kód"
} }

View file

@ -89,7 +89,7 @@
} }
}, },
"addingFromOcr": "Add from OCR", "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", "description": "Description",
"newWallet": "Add new wallet", "newWallet": "Add new wallet",
"walletExists": "A wallet with this name already exists!", "walletExists": "A wallet with this name already exists!",
@ -220,5 +220,7 @@
"selectExportWallet":"Select a wallet to export", "selectExportWallet":"Select a wallet to export",
"exportError":"An error occured trying to export wallet", "exportError":"An error occured trying to export wallet",
"exportCompleted":"Export completed", "exportCompleted":"Export completed",
"importCompleted":"Import completed" "importCompleted":"Import completed",
"setup":"Setup",
"sourceCode":"Source code"
} }

38
lib/util/utils.dart Normal file
View 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"));
},
),
],
);
}

View file

@ -11,6 +11,7 @@ import 'package:prasule/pw/platformbutton.dart';
import 'package:prasule/pw/platformroute.dart'; import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/drawer.dart'; import 'package:prasule/util/drawer.dart';
import 'package:prasule/util/graphs.dart'; import 'package:prasule/util/graphs.dart';
import 'package:prasule/util/utils.dart';
import 'package:prasule/views/settings/settings.dart'; import 'package:prasule/views/settings/settings.dart';
import 'package:prasule/views/setup.dart'; import 'package:prasule/views/setup.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -193,11 +194,7 @@ class _GraphViewState extends State<GraphView> {
setState(() {}); setState(() {});
}); });
} else if (value == AppLocalizations.of(context).about) { } else if (value == AppLocalizations.of(context).about) {
showAboutDialog( showAbout(context);
context: context,
applicationLegalese: AppLocalizations.of(context).license,
applicationName: "Prašule",
);
} }
}, },
), ),

View file

@ -25,6 +25,7 @@ import 'package:prasule/pw/platformfield.dart';
import 'package:prasule/pw/platformroute.dart'; import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/drawer.dart'; import 'package:prasule/util/drawer.dart';
import 'package:prasule/util/text_color.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/create_entry.dart';
import 'package:prasule/views/settings/settings.dart'; import 'package:prasule/views/settings/settings.dart';
import 'package:prasule/views/settings/tessdata_list.dart'; import 'package:prasule/views/settings/tessdata_list.dart';
@ -219,11 +220,7 @@ class _HomeViewState extends State<HomeView> {
await WalletManager.loadWallet(selectedWallet!.name); await WalletManager.loadWallet(selectedWallet!.name);
}); });
} else if (value == AppLocalizations.of(context).about) { } else if (value == AppLocalizations.of(context).about) {
showAboutDialog( showAbout(context);
context: context,
applicationLegalese: AppLocalizations.of(context).license,
applicationName: "Prašule",
);
} }
}, },
), ),
@ -355,8 +352,10 @@ class _HomeViewState extends State<HomeView> {
), ),
), ),
elements: selectedWallet!.entries elements: selectedWallet!.entries
.where((element) => .where(
element.data.name.contains(_filter),) (element) => element.data.name
.contains(_filter),
)
.toList(), .toList(),
itemComparator: (a, b) => itemComparator: (a, b) =>
b.date.compareTo(a.date), b.date.compareTo(a.date),
@ -638,7 +637,9 @@ class _HomeViewState extends State<HomeView> {
final filePath = await FlutterFileDialog.pickFile( final filePath = await FlutterFileDialog.pickFile(
params: OpenFileDialogParams( params: OpenFileDialogParams(
dialogType: OpenFileDialogType.image, dialogType: OpenFileDialogType.image,
sourceType: sourceType,),); sourceType: sourceType,
),
);
if (filePath == null) { if (filePath == null) {
if (mounted) Navigator.of(context).pop(); if (mounted) Navigator.of(context).pop();
return; return;

View file

@ -14,6 +14,7 @@ import 'package:prasule/pw/platformbutton.dart';
import 'package:prasule/pw/platformroute.dart'; import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/drawer.dart'; import 'package:prasule/util/drawer.dart';
import 'package:prasule/util/text_color.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/create_recur_entry.dart';
import 'package:prasule/views/settings/settings.dart'; import 'package:prasule/views/settings/settings.dart';
import 'package:prasule/views/setup.dart'; import 'package:prasule/views/setup.dart';
@ -117,11 +118,7 @@ class _RecurringEntriesViewState extends State<RecurringEntriesView> {
await WalletManager.loadWallet(selectedWallet!.name); await WalletManager.loadWallet(selectedWallet!.name);
}); });
} else if (value == AppLocalizations.of(context).about) { } else if (value == AppLocalizations.of(context).about) {
showAboutDialog( showAbout(context);
context: context,
applicationLegalese: AppLocalizations.of(context).license,
applicationName: "Prašule",
);
} }
}, },
), ),

View file

@ -15,6 +15,7 @@ import 'package:prasule/pw/platformbutton.dart';
import 'package:prasule/pw/platformfield.dart'; import 'package:prasule/pw/platformfield.dart';
import 'package:prasule/pw/platformroute.dart'; import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/text_color.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/settings/settings.dart';
import 'package:prasule/views/setup.dart'; import 'package:prasule/views/setup.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -106,11 +107,7 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
), ),
); );
} else if (value == AppLocalizations.of(context).about) { } else if (value == AppLocalizations.of(context).about) {
showAboutDialog( showAbout(context);
context: context,
applicationLegalese: AppLocalizations.of(context).license,
applicationName: "Prašule",
);
} }
}, },
), ),
@ -158,7 +155,8 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
), ),
], ],
title: Text( title: Text(
AppLocalizations.of(context).pickColor,), AppLocalizations.of(context).pickColor,
),
content: Column( content: Column(
children: [ children: [
ColorPicker( ColorPicker(
@ -242,8 +240,10 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
), ),
), ),
], ],
title: Text(AppLocalizations.of(context) title: Text(
.setupCategoriesEditingName,), AppLocalizations.of(context)
.setupCategoriesEditingName,
),
content: SizedBox( content: SizedBox(
width: 400, width: 400,
child: child:

View file

@ -18,6 +18,7 @@ import 'package:prasule/pw/platformfield.dart';
import 'package:prasule/pw/platformroute.dart'; import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/show_message.dart'; import 'package:prasule/util/show_message.dart';
import 'package:prasule/util/text_color.dart'; import 'package:prasule/util/text_color.dart';
import 'package:prasule/util/utils.dart';
import 'package:prasule/views/home.dart'; import 'package:prasule/views/home.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -107,6 +108,20 @@ class _SetupViewState extends State<SetupView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( 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( body: Center(
child: SizedBox( child: SizedBox(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,

View file

@ -1017,6 +1017,70 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.2" 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: vector_math:
dependency: transitive dependency: transitive
description: description:
@ -1106,7 +1170,7 @@ packages:
source: hosted source: hosted
version: "6.5.0" version: "6.5.0"
yaml: yaml:
dependency: transitive dependency: "direct dev"
description: description:
name: yaml name: yaml
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"

View file

@ -1,7 +1,7 @@
name: prasule name: prasule
description: Open-source private expense tracker description: Open-source private expense tracker
version: 1.0.0-alpha+5 version: 1.0.0+6
environment: environment:
sdk: '>=3.1.0-262.2.beta <4.0.0' sdk: '>=3.1.0-262.2.beta <4.0.0'
@ -39,6 +39,7 @@ dependencies:
path_provider: ^2.0.15 path_provider: ^2.0.15
settings_ui: ^2.0.2 settings_ui: ^2.0.2
shared_preferences: ^2.2.2 shared_preferences: ^2.2.2
url_launcher: ^6.2.4
dev_dependencies: dev_dependencies:
build_runner: ^2.4.6 build_runner: ^2.4.6
@ -56,6 +57,7 @@ dev_dependencies:
sdk: flutter sdk: flutter
test: ^1.24.6 test: ^1.24.6
very_good_analysis: ^5.1.0 very_good_analysis: ^5.1.0
yaml: ^3.1.2
flutter_launcher_icons: flutter_launcher_icons:
android: true android: true
@ -87,6 +89,7 @@ flutter:
assets: assets:
- assets/tessdata_config.json - assets/tessdata_config.json
- assets/tessdata/eng.traineddata - assets/tessdata/eng.traineddata
- assets/icon/full_ico.png
# To add assets to your application, add an assets section, like this: # To add assets to your application, add an assets section, like this:
# assets: # assets:
# - images/a_dot_burr.jpeg # - images/a_dot_burr.jpeg