diff --git a/.gitea/ISSUE_TEMPLATE/bug.md b/.gitea/ISSUE_TEMPLATE/bug.md new file mode 100644 index 0000000..14a5468 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,37 @@ +--- +name: 'Bug Report' +about: 'Use this when filing a bug report' +title: 'Bug title' +ref: 'main' +labels: + - 'Kind/Bug' + - 'Status/Need More Info' +--- + + + +### Operating System + Version + + +### App version + + +### What was expected to happen + + +### What actually happened + + +### Steps to reproduce + + +- [] I have checked the [list of issues](https://git.mnau.xyz/hernik/prasule/issues) and I'm sure this is not a duplicate + \ No newline at end of file diff --git a/.gitea/ISSUE_TEMPLATE/feature.md b/.gitea/ISSUE_TEMPLATE/feature.md new file mode 100644 index 0000000..e86b14e --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/feature.md @@ -0,0 +1,17 @@ +--- +name: 'Feature Request' +about: 'Request a new feature' +title: 'My awesome feature' +ref: 'main' +labels: + - 'Kind/Feature' +--- + +- [] I have checked the [list of issues](https://git.mnau.xyz/hernik/prasule/issues) and I'm sure this is not a duplicate + + +### Is your feature request related to a bug or an issue? If yes, describe it or link it + + +### Describe your request, how you'd like it to be implemented etc. + diff --git a/CHANGELOG.md b/CHANGELOG.md index 757b0a1..2e0114d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# 1.0.0-alpha+4 +- Fix OCR downloads # 1.0.0-alpha+3 - Add settings view for editing wallet categories - Change code according to more aggressive linting diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..18d512d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,5 @@ +# Localization + +[![Translation status](https://hosted.weblate.org/widget/prasule/287x66-grey.png)](https://hosted.weblate.org/engage/prasule/) + +You can help with localization through Weblate, join the translation project on https://hosted.weblate.org/engage/prasule/ \ No newline at end of file diff --git a/README.md b/README.md index cef9b77..bcf9222 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # prasule -[![Codemagic build status](https://api.codemagic.io/apps/64faee78aae8c48abc70dbc6/64faee78aae8c48abc70dbc5/status_badge.svg)](https://codemagic.io/apps/64faee78aae8c48abc70dbc6/64faee78aae8c48abc70dbc5/latest_build) [![Bug issue count](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgit.mnau.xyz%2Fapi%2Fv1%2Frepos%2Fhernik%2Fprasule%2Fissues%3Flabels%3DKind%2FBug&query=%24.length&logo=forgejo&label=bug%20issues&color=red)](https://git.mnau.xyz/hernik/prasule/issues?q=&type=all&sort=&state=open&labels=144&milestone=0&project=0&assignee=0&poster=0) [![wakatime](https://wakatime.com/badge/user/17178fab-a33c-430f-a764-7b3f26c7b966/project/bf1f40b0-c8c0-4f72-8ad6-c861ecdcc90c.svg)](https://wakatime.com/badge/user/17178fab-a33c-430f-a764-7b3f26c7b966/project/bf1f40b0-c8c0-4f72-8ad6-c861ecdcc90c) [![Commit Style: Conventional Commits](https://img.shields.io/badge/commit%20style-conventional%20commits-pink)](https://www.conventionalcommits.org/en/v1.0.0/) [![Please don't upload to GitHub](https://nogithub.codeberg.page/badge.svg)](https://nogithub.codeberg.page) +[![Codemagic build status](https://api.codemagic.io/apps/64faee78aae8c48abc70dbc6/64faee78aae8c48abc70dbc5/status_badge.svg)](https://codemagic.io/apps/64faee78aae8c48abc70dbc6/64faee78aae8c48abc70dbc5/latest_build) [![Bug issue count](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgit.mnau.xyz%2Fapi%2Fv1%2Frepos%2Fhernik%2Fprasule%2Fissues%3Flabels%3DKind%2FBug&query=%24.length&logo=forgejo&label=bug%20issues&color=red)](https://git.mnau.xyz/hernik/prasule/issues?q=&type=all&sort=&state=open&labels=144&milestone=0&project=0&assignee=0&poster=0) [![wakatime](https://wakatime.com/badge/user/17178fab-a33c-430f-a764-7b3f26c7b966/project/bf1f40b0-c8c0-4f72-8ad6-c861ecdcc90c.svg)](https://wakatime.com/badge/user/17178fab-a33c-430f-a764-7b3f26c7b966/project/bf1f40b0-c8c0-4f72-8ad6-c861ecdcc90c) [![Translation status](https://hosted.weblate.org/widget/prasule/svg-badge.svg)](https://hosted.weblate.org/engage/prasule/) [![Translation status](https://hosted.weblate.org/widget/prasule/svg-badge.svg)](https://hosted.weblate.org/engage/prasule/) Expense manager +- [Apple Testflight](https://testflight.apple.com/join/C22pcnPc) +- [Google Play beta testing](https://play.google.com/store/apps/details?id=cafe.caras.prasule) + ## License ``` Prašule - simple, private & open-source expense tracker Copyright (C) 2023 Matyáš Caras diff --git a/lib/network/tessdata.dart b/lib/network/tessdata.dart index 20e1c32..a8dcca2 100644 --- a/lib/network/tessdata.dart +++ b/lib/network/tessdata.dart @@ -11,21 +11,22 @@ class TessdataApi { static final Dio _client = Dio( BaseOptions( validateStatus: (status) => true, + headers: {"User-Agent": "prasule/1.0.0"}, ), ); /// Gets available languages from the repo static Future> getAvailableData() async { - final res = await _client.get>>( + final res = await _client.get>( "https://git.mnau.xyz/api/v1/repos/hernik/tessdata_fast/contents", options: Options(headers: {"Accept": "application/json"}), ); if ((res.statusCode ?? 500) > 399) { return Future.error("The server returned status code ${res.statusCode}"); } - final data = res.data; + final data = List>.from(res.data ?? []); final dataFiles = []; - for (final file in data ?? >[]) { + for (final file in data) { if (!(file["name"] as String).endsWith(".traineddata")) continue; dataFiles.add((file["name"] as String).replaceAll(".traineddata", "")); } diff --git a/lib/views/home.dart b/lib/views/home.dart index 20f4f65..be5637a 100644 --- a/lib/views/home.dart +++ b/lib/views/home.dart @@ -501,12 +501,13 @@ class _HomeViewState extends State { PlatformButton( text: AppLocalizations.of(context).download, onPressed: () { - Navigator.of(context).push( - platformRoute( - (c) => const TessdataListView(), - ), - ); - Navigator.of(c).pop(); + Navigator.of(context) + .push( + platformRoute( + (c) => const TessdataListView(), + ), + ) + .then((value) => Navigator.of(c).pop()); }, ), PlatformButton( diff --git a/pubspec.yaml b/pubspec.yaml index f79b64d..cd1ca24 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: prasule description: Open-source private expense tracker -version: 1.0.0-alpha+3 +version: 1.0.0-alpha+4 environment: sdk: '>=3.1.0-262.2.beta <4.0.0' @@ -84,8 +84,8 @@ flutter: # the material Icons class. uses-material-design: true assets: - - assets/ - - assets/tessdata/ + - assets/tessdata_config.json + - assets/tessdata/eng.traineddata # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg