diff --git a/.github/actions/setup-android-signing-config/action.yml b/.github/actions/setup-android-signing-config/action.yml index 1a226505..ad14d145 100644 --- a/.github/actions/setup-android-signing-config/action.yml +++ b/.github/actions/setup-android-signing-config/action.yml @@ -16,6 +16,10 @@ inputs: keystore-store-password: description: 'key.properties storePassword' required: true + output-directory: + description: The directory of the project + required: true + runs: using: "composite" steps: @@ -26,5 +30,7 @@ runs: echo "keyAlias=${{ inputs.keystore-key-alias }}" >> key.properties echo "storePassword=${{ inputs.keystore-store-password }}" >> key.properties echo "keyPassword=${{ inputs.keystore-key-password }}" >> key.properties + cp key.properties ${{ inputs.output-directory }}/key.properties + cp app/${{ inputs.keystore-key-alias }}-keystore.jks ${{ inputs.output-directory }}/app shell: bash working-directory: android \ No newline at end of file diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index 127baaa8..06def2ec 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -17,22 +17,30 @@ jobs: runs-on: ubuntu-latest steps: # Setup Ruby, Bundler, and Gemfile dependencies - + - name: Create build directory + run: mkdir -p /tmp/build + - name: Extract branch name shell: bash run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT id: extract_branch - + - name: Checkout repository uses: actions/checkout@v3 - - - name: Clone flutter repository - uses: subosito/flutter-action@v2 with: - flutter-version: '3.13.3' - channel: stable - - run: flutter doctor -v + fetch-depth: 0 + submodules: recursive + - name: Copy files to build directory + run: | + mkdir -p /tmp/build + cp -R . /tmp/build + + - name: Set FLUTTER_ROOT environment variable and build dir + run: echo "FLUTTER_ROOT=/tmp/build/flutter/bin" >> $GITHUB_ENV + + - run: $FLUTTER_ROOT/flutter doctor -v + - name: Setup signing config uses: ./.github/actions/setup-android-signing-config with: @@ -41,21 +49,23 @@ jobs: keystore-store-password: ${{ secrets.KEYSTORE_STORE_PASSWORD }} release-keystore: ${{ secrets.RELEASE_KEYSTORE }} release-keystore-passphrase: ${{ secrets.RELEASE_KEYSTORE_PASSPHRASE }} - + output-directory: /tmp/build/android + - name: Get packages and run codegen run: | - bash install_dependencies.sh - bash update_changelogs.sh - working-directory: scripts + bash /tmp/build/scripts/install_dependencies_with_submodule.sh + bash /tmp/build/scripts/update_changelogs.sh - name: Setup Fastlane uses: ruby/setup-ruby@v1 with: ruby-version: "2.6" bundler-cache: true - working-directory: android - - - run: bundle exec fastlane github branch:${{ steps.extract_branch.outputs.branch }} is_draft:${{ github.event.inputs.is_draft }} + working-directory: /tmp/build/android + + - name: Build and publish GitHub release + run: | + cd /tmp/build/android + bundle exec fastlane github branch:${{ steps.extract_branch.outputs.branch }} is_draft:${{ github.event.inputs.is_draft }} env: GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} - working-directory: android diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 311f992d..2676a065 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -29,7 +29,6 @@ jobs: name: "Deploy to Stores and create GitHub release" runs-on: ubuntu-latest steps: - - name: Extract branch name shell: bash @@ -38,13 +37,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - - name: Clone flutter repository - uses: subosito/flutter-action@v2 with: - flutter-version: '3.13.3' - channel: stable - - run: flutter doctor -v + fetch-depth: 0 + submodules: recursive + + - name: Set FLUTTER_ROOT environment variable + run: echo "FLUTTER_ROOT=$(pwd)/flutter/bin" >> $GITHUB_ENV + + - run: $FLUTTER_ROOT/flutter doctor -v - name: Setup signing config uses: ./.github/actions/setup-android-signing-config @@ -57,7 +57,7 @@ jobs: - name: Get packages and run codegen run: | - bash install_dependencies.sh + bash install_dependencies_with_submodule.sh bash update_changelogs.sh working-directory: scripts diff --git a/.github/workflows/release-deploy-play-store.yml b/.github/workflows/release-deploy-play-store.yml index 2e127be5..079d7535 100644 --- a/.github/workflows/release-deploy-play-store.yml +++ b/.github/workflows/release-deploy-play-store.yml @@ -32,13 +32,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - - name: Clone flutter repository - uses: subosito/flutter-action@v2 with: - flutter-version: '3.13.3' - channel: stable - - run: flutter doctor -v + fetch-depth: 0 + submodules: recursive + + - name: Set FLUTTER_ROOT environment variable + run: echo "FLUTTER_ROOT=$(pwd)/flutter/bin" >> $GITHUB_ENV + + - run: $FLUTTER_ROOT/flutter doctor -v - name: Setup signing config uses: ./.github/actions/setup-android-signing-config @@ -51,7 +52,7 @@ jobs: - name: Get packages and run codegen run: | - bash install_dependencies.sh + bash install_dependencies_with_submodule.sh bash update_changelogs.sh working-directory: scripts diff --git a/.gitmodules b/.gitmodules index 3013a172..7c80cd8a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,3 @@ [submodule "flutter"] path = flutter url = https://github.com/flutter/flutter - branch = stable diff --git a/android/app/build.gradle b/android/app/build.gradle index cc8c7cc1..5edab163 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -94,5 +94,16 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' // Required for flutter_local_notifications coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' - } + +ext.abiCodes = ["x86_64": 1, "armeabi-v7a": 2, "arm64-v8a": 3] +import com.android.build.OutputFile +android.applicationVariants.all { variant -> + variant.outputs.each { output -> + def abiName = output.getFilter(OutputFile.ABI) + def abiVersionCode = project.ext.abiCodes.get(abiName) + if (abiVersionCode != null) { + output.versionCodeOverride = variant.versionCode * 10 + abiVersionCode + } + } +} \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 6572cbe8..b4bc1004 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.7.0' + ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' + classpath 'com.android.tools.build:gradle:7.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // implementation 'androidx.window:window:1.0.0' // implementation 'androidx.window:window-java:1.0.0' diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index b0774e06..78a7ce86 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -25,7 +25,7 @@ platform :android do |options| lane :publish_in_play_store do |options| release_status = (options[:is_draft] ? "draft" : "completed") track = (options[:track]) - sh "flutter build appbundle -v" + sh "$FLUTTER_ROOT/flutter build appbundle -v" upload_to_play_store( track: track, release_status: release_status, @@ -47,8 +47,8 @@ platform :android do |options| desc "Builds apks and creates a new release on GitHub" lane :github do |options| - sh "flutter build apk --split-per-abi --release" - sh "flutter build apk --release" + sh "$FLUTTER_ROOT/flutter build apk --split-per-abi --release" + sh "$FLUTTER_ROOT/flutter build apk --release" set_github_release( repository_name: "astubenbord/paperless-mobile", api_token: ENV["GH_ACCESS_TOKEN"], diff --git a/android/fastlane/metadata/android/de-DE/changelogs/55.txt b/android/fastlane/metadata/android/de-DE/changelogs/55.txt new file mode 100644 index 00000000..505ca1bf --- /dev/null +++ b/android/fastlane/metadata/android/de-DE/changelogs/55.txt @@ -0,0 +1 @@ +* Hinzufügen von Build-Skript für F-Droid \ No newline at end of file diff --git a/android/fastlane/metadata/android/de-DE/changelogs/56.txt b/android/fastlane/metadata/android/de-DE/changelogs/56.txt new file mode 100644 index 00000000..9205ae2d --- /dev/null +++ b/android/fastlane/metadata/android/de-DE/changelogs/56.txt @@ -0,0 +1 @@ +* F-Droid build \ No newline at end of file diff --git a/android/fastlane/metadata/android/en-US/changelogs/55.txt b/android/fastlane/metadata/android/en-US/changelogs/55.txt new file mode 100644 index 00000000..dc032ddb --- /dev/null +++ b/android/fastlane/metadata/android/en-US/changelogs/55.txt @@ -0,0 +1 @@ +* Add build script for F-Droid \ No newline at end of file diff --git a/android/fastlane/metadata/android/en-US/changelogs/56.txt b/android/fastlane/metadata/android/en-US/changelogs/56.txt new file mode 100644 index 00000000..9205ae2d --- /dev/null +++ b/android/fastlane/metadata/android/en-US/changelogs/56.txt @@ -0,0 +1 @@ +* F-Droid build \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 6b665338..8049c684 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/assets/images/bmc-logo.svg b/assets/images/bmc-logo.svg deleted file mode 100644 index 5ba6db99..00000000 --- a/assets/images/bmc-logo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/images/documents_headache.png b/assets/images/documents_headache.png deleted file mode 100644 index 9df6a188..00000000 Binary files a/assets/images/documents_headache.png and /dev/null differ diff --git a/assets/images/empty-state.svg b/assets/images/empty-state.svg deleted file mode 100644 index 17d6e035..00000000 --- a/assets/images/empty-state.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/empty_inbox.png b/assets/images/empty_inbox.png deleted file mode 100644 index b398276c..00000000 Binary files a/assets/images/empty_inbox.png and /dev/null differ diff --git a/assets/images/organize_documents.png b/assets/images/organize_documents.png deleted file mode 100644 index 937b8795..00000000 Binary files a/assets/images/organize_documents.png and /dev/null differ diff --git a/assets/images/secure_documents.png b/assets/images/secure_documents.png deleted file mode 100644 index 0926b139..00000000 Binary files a/assets/images/secure_documents.png and /dev/null differ diff --git a/assets/images/splash.png b/assets/images/splash.png deleted file mode 100644 index ead6da8e..00000000 Binary files a/assets/images/splash.png and /dev/null differ diff --git a/assets/images/success.png b/assets/images/success.png deleted file mode 100644 index 1957870b..00000000 Binary files a/assets/images/success.png and /dev/null differ diff --git a/flutter b/flutter index 796c8ef7..25240523 160000 --- a/flutter +++ b/flutter @@ -1 +1 @@ -Subproject commit 796c8ef79279f9c774545b3771238c3098dbefab +Subproject commit 2524052335ec76bb03e04ede244b071f1b86d190 diff --git a/lib/features/app_drawer/view/app_drawer.dart b/lib/features/app_drawer/view/app_drawer.dart index 28e38773..9f5e047c 100644 --- a/lib/features/app_drawer/view/app_drawer.dart +++ b/lib/features/app_drawer/view/app_drawer.dart @@ -4,20 +4,17 @@ import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:paperless_mobile/constants.dart'; import 'package:paperless_mobile/core/database/tables/local_user_account.dart'; -import 'package:paperless_mobile/features/logging/view/app_logs_page.dart'; import 'package:paperless_mobile/core/extensions/flutter_extensions.dart'; import 'package:paperless_mobile/features/documents/cubit/documents_cubit.dart'; import 'package:paperless_mobile/features/saved_view/cubit/saved_view_cubit.dart'; import 'package:paperless_mobile/features/sharing/cubit/receive_share_cubit.dart'; import 'package:paperless_mobile/generated/assets.gen.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/saved_views_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/upload_queue_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/app_logs_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/changelog_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/settings_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/saved_views_route.dart'; +import 'package:paperless_mobile/routing/routes/settings_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/upload_queue_route.dart'; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher_string.dart'; diff --git a/lib/features/changelogs/view/changelog_dialog.dart b/lib/features/changelogs/view/changelog_dialog.dart index bad8155a..77bccc82 100644 --- a/lib/features/changelogs/view/changelog_dialog.dart +++ b/lib/features/changelogs/view/changelog_dialog.dart @@ -63,7 +63,9 @@ class ChangelogDialog extends StatelessWidget { } const _versionNumbers = { - "54": "3.0.7", + "56": "3.1.2", + "55": "3.1.1", + "54": "3.1.0", "53": "3.0.6", "52": "3.0.5", "51": "3.0.4", diff --git a/lib/features/document_details/view/pages/document_details_page.dart b/lib/features/document_details/view/pages/document_details_page.dart index fff3bbe3..fa483d1a 100644 --- a/lib/features/document_details/view/pages/document_details_page.dart +++ b/lib/features/document_details/view/pages/document_details_page.dart @@ -22,8 +22,8 @@ import 'package:paperless_mobile/features/similar_documents/view/similar_documen import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/connectivity_aware_action_wrapper.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; import 'package:paperless_mobile/theme.dart'; class DocumentDetailsPage extends StatefulWidget { diff --git a/lib/features/document_edit/view/document_edit_page.dart b/lib/features/document_edit/view/document_edit_page.dart index 18a7e32b..3821cd95 100644 --- a/lib/features/document_edit/view/document_edit_page.dart +++ b/lib/features/document_edit/view/document_edit_page.dart @@ -20,8 +20,8 @@ import 'package:paperless_mobile/features/labels/tags/view/widgets/tags_form_fie import 'package:paperless_mobile/features/labels/view/widgets/label_form_field.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; -import 'package:paperless_mobile/routes/typed/branches/labels_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/labels_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class DocumentEditPage extends StatefulWidget { const DocumentEditPage({ diff --git a/lib/features/document_scan/view/scanner_page.dart b/lib/features/document_scan/view/scanner_page.dart index a0317be6..8cfb32b8 100644 --- a/lib/features/document_scan/view/scanner_page.dart +++ b/lib/features/document_scan/view/scanner_page.dart @@ -25,8 +25,8 @@ import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/connectivity_aware_action_wrapper.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; import 'package:paperless_mobile/helpers/permission_helpers.dart'; -import 'package:paperless_mobile/routes/typed/branches/scanner_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/scanner_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; import 'package:path/path.dart' as p; import 'package:pdf/pdf.dart'; import 'package:pdf/widgets.dart' as pw; diff --git a/lib/features/document_search/view/document_search_page.dart b/lib/features/document_search/view/document_search_page.dart index 83b96dc2..d555189d 100644 --- a/lib/features/document_search/view/document_search_page.dart +++ b/lib/features/document_search/view/document_search_page.dart @@ -11,8 +11,8 @@ import 'package:paperless_mobile/features/document_search/view/remove_history_en import 'package:paperless_mobile/features/documents/view/widgets/adaptive_documents_view.dart'; import 'package:paperless_mobile/features/documents/view/widgets/selection/view_type_selection_widget.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class DocumentSearchPage extends StatefulWidget { const DocumentSearchPage({super.key}); diff --git a/lib/features/document_upload/view/document_upload_preparation_page.dart b/lib/features/document_upload/view/document_upload_preparation_page.dart index 07f4c415..8791c07a 100644 --- a/lib/features/document_upload/view/document_upload_preparation_page.dart +++ b/lib/features/document_upload/view/document_upload_preparation_page.dart @@ -22,8 +22,8 @@ import 'package:paperless_mobile/features/logging/data/logger.dart'; import 'package:paperless_mobile/features/sharing/view/widgets/file_thumbnail.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; -import 'package:paperless_mobile/routes/typed/branches/labels_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/labels_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class DocumentUploadResult { final bool success; diff --git a/lib/features/documents/view/pages/documents_page.dart b/lib/features/documents/view/pages/documents_page.dart index addcfadd..ea519a6d 100644 --- a/lib/features/documents/view/pages/documents_page.dart +++ b/lib/features/documents/view/pages/documents_page.dart @@ -25,8 +25,8 @@ import 'package:paperless_mobile/features/saved_view/cubit/saved_view_cubit.dart import 'package:paperless_mobile/features/tasks/model/pending_tasks_notifier.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; import 'package:sliver_tools/sliver_tools.dart'; class DocumentFilterIntent { diff --git a/lib/features/documents/view/widgets/document_preview.dart b/lib/features/documents/view/widgets/document_preview.dart index c3633b51..cd260d37 100644 --- a/lib/features/documents/view/widgets/document_preview.dart +++ b/lib/features/documents/view/widgets/document_preview.dart @@ -3,8 +3,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:paperless_api/paperless_api.dart'; import 'package:paperless_mobile/helpers/connectivity_aware_action_wrapper.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; import 'package:provider/provider.dart'; import 'package:shimmer/shimmer.dart'; diff --git a/lib/features/documents/view/widgets/saved_views/saved_view_chip.dart b/lib/features/documents/view/widgets/saved_views/saved_view_chip.dart index 56f4dea6..08103b68 100644 --- a/lib/features/documents/view/widgets/saved_views/saved_view_chip.dart +++ b/lib/features/documents/view/widgets/saved_views/saved_view_chip.dart @@ -3,8 +3,8 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:paperless_api/paperless_api.dart'; import 'package:paperless_mobile/core/extensions/flutter_extensions.dart'; -import 'package:paperless_mobile/routes/typed/branches/saved_views_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/saved_views_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class SavedViewChip extends StatefulWidget { final SavedView view; diff --git a/lib/features/documents/view/widgets/saved_views/saved_views_widget.dart b/lib/features/documents/view/widgets/saved_views/saved_views_widget.dart index 8df10749..aae2c337 100644 --- a/lib/features/documents/view/widgets/saved_views/saved_views_widget.dart +++ b/lib/features/documents/view/widgets/saved_views/saved_views_widget.dart @@ -7,8 +7,8 @@ import 'package:paperless_mobile/features/documents/view/widgets/saved_views/sav import 'package:paperless_mobile/features/saved_view/cubit/saved_view_cubit.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/connectivity_aware_action_wrapper.dart'; -import 'package:paperless_mobile/routes/typed/branches/saved_views_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/saved_views_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class SavedViewsWidget extends StatefulWidget { final void Function(SavedView view) onViewSelected; diff --git a/lib/features/documents/view/widgets/selection/document_selection_sliver_app_bar.dart b/lib/features/documents/view/widgets/selection/document_selection_sliver_app_bar.dart index 4f5457c3..f06af49b 100644 --- a/lib/features/documents/view/widgets/selection/document_selection_sliver_app_bar.dart +++ b/lib/features/documents/view/widgets/selection/document_selection_sliver_app_bar.dart @@ -6,8 +6,8 @@ import 'package:paperless_mobile/features/documents/cubit/documents_cubit.dart'; import 'package:paperless_mobile/features/documents/view/widgets/selection/bulk_delete_confirmation_dialog.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class DocumentSelectionSliverAppBar extends StatelessWidget { final DocumentsState state; diff --git a/lib/features/inbox/view/widgets/inbox_item.dart b/lib/features/inbox/view/widgets/inbox_item.dart index 3b4c569b..1b74cc9e 100644 --- a/lib/features/inbox/view/widgets/inbox_item.dart +++ b/lib/features/inbox/view/widgets/inbox_item.dart @@ -16,8 +16,8 @@ import 'package:paperless_mobile/features/labels/tags/view/widgets/tags_widget.d import 'package:paperless_mobile/features/labels/view/widgets/label_text.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/connectivity_aware_action_wrapper.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class InboxItemPlaceholder extends StatelessWidget { const InboxItemPlaceholder({super.key}); diff --git a/lib/features/labels/tags/view/widgets/fullscreen_tags_form.dart b/lib/features/labels/tags/view/widgets/fullscreen_tags_form.dart index 40d0c1c0..e8af4387 100644 --- a/lib/features/labels/tags/view/widgets/fullscreen_tags_form.dart +++ b/lib/features/labels/tags/view/widgets/fullscreen_tags_form.dart @@ -4,8 +4,8 @@ import 'package:paperless_api/paperless_api.dart'; import 'package:paperless_mobile/core/extensions/flutter_extensions.dart'; import 'package:paperless_mobile/features/edit_label/view/impl/add_tag_page.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/branches/labels_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/labels_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class FullscreenTagsForm extends StatefulWidget { final TagsQuery? initialValue; diff --git a/lib/features/labels/view/pages/labels_page.dart b/lib/features/labels/view/pages/labels_page.dart index 1fbcdf34..0c644edb 100644 --- a/lib/features/labels/view/pages/labels_page.dart +++ b/lib/features/labels/view/pages/labels_page.dart @@ -15,8 +15,8 @@ import 'package:paperless_mobile/features/labels/cubit/label_cubit.dart'; import 'package:paperless_mobile/features/labels/view/widgets/label_tab_view.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/connectivity_aware_action_wrapper.dart'; -import 'package:paperless_mobile/routes/typed/branches/labels_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/labels_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class LabelsPage extends StatefulWidget { const LabelsPage({Key? key}) : super(key: key); diff --git a/lib/features/labels/view/widgets/label_item.dart b/lib/features/labels/view/widgets/label_item.dart index edc22147..76f2a365 100644 --- a/lib/features/labels/view/widgets/label_item.dart +++ b/lib/features/labels/view/widgets/label_item.dart @@ -3,8 +3,8 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:paperless_api/paperless_api.dart'; import 'package:paperless_mobile/core/database/tables/local_user_account.dart'; import 'package:paperless_mobile/helpers/format_helpers.dart'; -import 'package:paperless_mobile/routes/typed/branches/labels_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/labels_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class LabelItem extends StatelessWidget { final T label; diff --git a/lib/features/landing/view/landing_page.dart b/lib/features/landing/view/landing_page.dart index 4df3007a..f3d4b4db 100644 --- a/lib/features/landing/view/landing_page.dart +++ b/lib/features/landing/view/landing_page.dart @@ -11,11 +11,11 @@ import 'package:paperless_mobile/features/landing/view/widgets/mime_types_pie_ch import 'package:paperless_mobile/features/saved_view/cubit/saved_view_cubit.dart'; import 'package:paperless_mobile/features/saved_view_details/view/saved_view_preview.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/inbox_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/saved_views_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/changelog_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/inbox_route.dart'; +import 'package:paperless_mobile/routing/routes/saved_views_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/changelog_route.dart'; import 'package:shared_preferences/shared_preferences.dart'; class LandingPage extends StatefulWidget { diff --git a/lib/features/linked_documents/view/linked_documents_page.dart b/lib/features/linked_documents/view/linked_documents_page.dart index 4068b13f..84368feb 100644 --- a/lib/features/linked_documents/view/linked_documents_page.dart +++ b/lib/features/linked_documents/view/linked_documents_page.dart @@ -7,8 +7,8 @@ import 'package:paperless_mobile/features/documents/view/widgets/selection/view_ import 'package:paperless_mobile/features/linked_documents/cubit/linked_documents_cubit.dart'; import 'package:paperless_mobile/features/paged_document_view/view/document_paging_view_mixin.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class LinkedDocumentsPage extends StatefulWidget { const LinkedDocumentsPage({super.key}); diff --git a/lib/features/login/view/login_page.dart b/lib/features/login/view/login_page.dart index fe92a88b..020ce8fb 100644 --- a/lib/features/login/view/login_page.dart +++ b/lib/features/login/view/login_page.dart @@ -2,19 +2,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hive_flutter/adapters.dart'; import 'package:paperless_api/paperless_api.dart'; -import 'package:paperless_mobile/core/database/hive/hive_config.dart'; import 'package:paperless_mobile/core/database/hive/hive_extensions.dart'; -import 'package:paperless_mobile/core/database/tables/global_settings.dart'; import 'package:paperless_mobile/core/model/info_message_exception.dart'; -import 'package:paperless_mobile/features/app_intro/application_intro_slideshow.dart'; import 'package:paperless_mobile/features/login/cubit/authentication_cubit.dart'; import 'package:paperless_mobile/features/login/model/client_certificate.dart'; import 'package:paperless_mobile/features/login/model/login_form_credentials.dart'; import 'package:paperless_mobile/features/login/view/add_account_page.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/login_route.dart'; +import 'package:paperless_mobile/routing/routes/login_route.dart'; class LoginPage extends StatelessWidget { final String? initialServerUrl; @@ -68,21 +64,7 @@ class LoginPage extends StatelessWidget { serverUrl: serverUrl, clientCertificate: clientCertificate, ); - // Show onboarding after first login! - final globalSettings = - Hive.box(HiveBoxes.globalSettings).getValue()!; - if (globalSettings.showOnboarding) { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => const ApplicationIntroSlideshow(), - fullscreenDialog: true, - ), - ).then((value) { - globalSettings.showOnboarding = false; - globalSettings.save(); - }); - } + // DocumentsRoute().go(context); } on PaperlessApiException catch (error, stackTrace) { showErrorMessage(context, error, stackTrace); diff --git a/lib/features/login/view/login_to_existing_account_page.dart b/lib/features/login/view/login_to_existing_account_page.dart index c4aa7dea..17984bdb 100644 --- a/lib/features/login/view/login_to_existing_account_page.dart +++ b/lib/features/login/view/login_to_existing_account_page.dart @@ -5,8 +5,8 @@ import 'package:paperless_mobile/core/database/hive/hive_extensions.dart'; import 'package:paperless_mobile/features/login/cubit/authentication_cubit.dart'; import 'package:paperless_mobile/features/users/view/widgets/user_account_list_tile.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/login_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/login_route.dart'; class LoginToExistingAccountPage extends StatelessWidget { const LoginToExistingAccountPage({super.key}); diff --git a/lib/features/login/view/verify_identity_page.dart b/lib/features/login/view/verify_identity_page.dart index 00ed75c9..c9e52953 100644 --- a/lib/features/login/view/verify_identity_page.dart +++ b/lib/features/login/view/verify_identity_page.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:paperless_mobile/core/extensions/flutter_extensions.dart'; import 'package:paperless_mobile/features/login/cubit/authentication_cubit.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/login_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/login_route.dart'; import 'package:provider/provider.dart'; class VerifyIdentityPage extends StatelessWidget { diff --git a/lib/features/saved_view_details/view/saved_view_preview.dart b/lib/features/saved_view_details/view/saved_view_preview.dart index 324a15bd..c10bf663 100644 --- a/lib/features/saved_view_details/view/saved_view_preview.dart +++ b/lib/features/saved_view_details/view/saved_view_preview.dart @@ -8,8 +8,8 @@ import 'package:paperless_mobile/features/documents/view/widgets/items/document_ import 'package:paperless_mobile/features/landing/view/widgets/expansion_card.dart'; import 'package:paperless_mobile/features/saved_view_details/cubit/saved_view_preview_cubit.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; import 'package:provider/provider.dart'; class SavedViewPreview extends StatelessWidget { diff --git a/lib/features/settings/view/manage_accounts_page.dart b/lib/features/settings/view/manage_accounts_page.dart index 1c0ac866..c34474bd 100644 --- a/lib/features/settings/view/manage_accounts_page.dart +++ b/lib/features/settings/view/manage_accounts_page.dart @@ -7,8 +7,8 @@ import 'package:paperless_mobile/features/settings/view/dialogs/switch_account_d import 'package:paperless_mobile/features/settings/view/widgets/global_settings_builder.dart'; import 'package:paperless_mobile/features/users/view/widgets/user_account_list_tile.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/add_account_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/add_account_route.dart'; import 'package:provider/provider.dart'; class ManageAccountsPage extends StatelessWidget { diff --git a/lib/features/settings/view/widgets/app_logs_tile.dart b/lib/features/settings/view/widgets/app_logs_tile.dart index aee7d556..928a353a 100644 --- a/lib/features/settings/view/widgets/app_logs_tile.dart +++ b/lib/features/settings/view/widgets/app_logs_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/top_level/app_logs_route.dart'; +import 'package:paperless_mobile/routing/routes/app_logs_route.dart'; class AppLogsTile extends StatelessWidget { const AppLogsTile({super.key}); diff --git a/lib/features/settings/view/widgets/changelogs_tile.dart b/lib/features/settings/view/widgets/changelogs_tile.dart index 747b5302..b0da22e8 100644 --- a/lib/features/settings/view/widgets/changelogs_tile.dart +++ b/lib/features/settings/view/widgets/changelogs_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/typed/top_level/changelog_route.dart'; +import 'package:paperless_mobile/routing/routes/changelog_route.dart'; class ChangelogsTile extends StatelessWidget { const ChangelogsTile({super.key}); diff --git a/lib/features/sharing/view/widgets/event_listener_shell.dart b/lib/features/sharing/view/widgets/event_listener_shell.dart index 1566e760..19f1aed4 100644 --- a/lib/features/sharing/view/widgets/event_listener_shell.dart +++ b/lib/features/sharing/view/widgets/event_listener_shell.dart @@ -22,8 +22,8 @@ import 'package:paperless_mobile/features/sharing/view/dialog/discard_shared_fil import 'package:paperless_mobile/features/tasks/model/pending_tasks_notifier.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; -import 'package:paperless_mobile/routes/typed/branches/scanner_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/scanner_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; import 'package:path/path.dart' as p; import 'package:receive_sharing_intent/receive_sharing_intent.dart'; diff --git a/lib/features/similar_documents/view/similar_documents_view.dart b/lib/features/similar_documents/view/similar_documents_view.dart index 4f9c14ba..21ccd2c9 100644 --- a/lib/features/similar_documents/view/similar_documents_view.dart +++ b/lib/features/similar_documents/view/similar_documents_view.dart @@ -9,8 +9,8 @@ import 'package:paperless_mobile/features/paged_document_view/view/document_pagi import 'package:paperless_mobile/features/similar_documents/cubit/similar_documents_cubit.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; class SimilarDocumentsView extends StatefulWidget { final ScrollController pagingScrollController; diff --git a/lib/main.dart b/lib/main.dart index ce8b75b8..e6573899 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -41,14 +41,14 @@ import 'package:paperless_mobile/features/login/services/authentication_service. import 'package:paperless_mobile/features/notifications/services/local_notification_service.dart'; import 'package:paperless_mobile/features/settings/view/widgets/global_settings_builder.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/typed/branches/landing_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/authenticated_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/add_account_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/app_logs_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/changelog_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/logging_out_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/login_route.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; +import 'package:paperless_mobile/routing/routes/landing_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/authenticated_route.dart'; +import 'package:paperless_mobile/routing/routes/add_account_route.dart'; +import 'package:paperless_mobile/routing/routes/app_logs_route.dart'; +import 'package:paperless_mobile/routing/routes/changelog_route.dart'; +import 'package:paperless_mobile/routing/routes/logging_out_route.dart'; +import 'package:paperless_mobile/routing/routes/login_route.dart'; import 'package:paperless_mobile/theme.dart'; import 'package:path_provider/path_provider.dart'; import 'package:pretty_dio_logger/pretty_dio_logger.dart'; @@ -104,7 +104,6 @@ Future performMigrations() async { Future _initHive() async { await Hive.initFlutter(); - await performMigrations(); registerHiveAdapters(); await Hive.openBox(HiveBoxes.localUserAccount); diff --git a/lib/routes/navigation_keys.dart b/lib/routing/navigation_keys.dart similarity index 100% rename from lib/routes/navigation_keys.dart rename to lib/routing/navigation_keys.dart diff --git a/lib/routes/routes.dart b/lib/routing/routes.dart similarity index 100% rename from lib/routes/routes.dart rename to lib/routing/routes.dart diff --git a/lib/routes/typed/top_level/add_account_route.dart b/lib/routing/routes/add_account_route.dart similarity index 96% rename from lib/routes/typed/top_level/add_account_route.dart rename to lib/routing/routes/add_account_route.dart index 335e6b80..9f7d700f 100644 --- a/lib/routes/typed/top_level/add_account_route.dart +++ b/lib/routing/routes/add_account_route.dart @@ -10,8 +10,8 @@ import 'package:paperless_mobile/features/login/view/add_account_page.dart'; import 'package:paperless_mobile/features/settings/view/dialogs/switch_account_dialog.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:paperless_mobile/helpers/message_helpers.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/routes.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; +import 'package:paperless_mobile/routing/routes.dart'; part 'add_account_route.g.dart'; diff --git a/lib/routes/typed/top_level/app_logs_route.dart b/lib/routing/routes/app_logs_route.dart similarity index 93% rename from lib/routes/typed/top_level/app_logs_route.dart rename to lib/routing/routes/app_logs_route.dart index 75121ad7..1a614f14 100644 --- a/lib/routes/typed/top_level/app_logs_route.dart +++ b/lib/routing/routes/app_logs_route.dart @@ -3,7 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; import 'package:paperless_mobile/features/logging/cubit/app_logs_cubit.dart'; import 'package:paperless_mobile/features/logging/view/app_logs_page.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; import 'package:paperless_mobile/theme.dart'; part 'app_logs_route.g.dart'; diff --git a/lib/routes/typed/top_level/changelog_route.dart b/lib/routing/routes/changelog_route.dart similarity index 79% rename from lib/routes/typed/top_level/changelog_route.dart rename to lib/routing/routes/changelog_route.dart index ad56cf55..cb912257 100644 --- a/lib/routes/typed/top_level/changelog_route.dart +++ b/lib/routing/routes/changelog_route.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:paperless_mobile/features/changelogs/view/changelog_dialog.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/utils/dialog_page.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; +import 'package:paperless_mobile/routing/utils/dialog_page.dart'; part 'changelog_route.g.dart'; diff --git a/lib/routes/typed/branches/documents_route.dart b/lib/routing/routes/documents_route.dart similarity index 99% rename from lib/routes/typed/branches/documents_route.dart rename to lib/routing/routes/documents_route.dart index 755bc25c..1de12b69 100644 --- a/lib/routes/typed/branches/documents_route.dart +++ b/lib/routing/routes/documents_route.dart @@ -13,7 +13,7 @@ import 'package:paperless_mobile/features/document_edit/view/document_edit_page. import 'package:paperless_mobile/features/documents/view/pages/document_view.dart'; import 'package:paperless_mobile/features/documents/view/pages/documents_page.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; import 'package:paperless_mobile/theme.dart'; class DocumentsBranch extends StatefulShellBranchData { diff --git a/lib/routes/typed/branches/inbox_route.dart b/lib/routing/routes/inbox_route.dart similarity index 87% rename from lib/routes/typed/branches/inbox_route.dart rename to lib/routing/routes/inbox_route.dart index 9eb1f3c0..600b73f3 100644 --- a/lib/routes/typed/branches/inbox_route.dart +++ b/lib/routing/routes/inbox_route.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:paperless_mobile/features/inbox/view/pages/inbox_page.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; class InboxBranch extends StatefulShellBranchData { static final GlobalKey $navigatorKey = inboxNavigatorKey; diff --git a/lib/routes/typed/branches/labels_route.dart b/lib/routing/routes/labels_route.dart similarity index 98% rename from lib/routes/typed/branches/labels_route.dart rename to lib/routing/routes/labels_route.dart index c42b04f4..b931d2a0 100644 --- a/lib/routes/typed/branches/labels_route.dart +++ b/lib/routing/routes/labels_route.dart @@ -13,8 +13,7 @@ import 'package:paperless_mobile/features/edit_label/view/impl/edit_tag_page.dar import 'package:paperless_mobile/features/labels/view/pages/labels_page.dart'; import 'package:paperless_mobile/features/linked_documents/cubit/linked_documents_cubit.dart'; import 'package:paperless_mobile/features/linked_documents/view/linked_documents_page.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; - +import 'package:paperless_mobile/routing/navigation_keys.dart'; class LabelsBranch extends StatefulShellBranchData { static final GlobalKey $navigatorKey = labelsNavigatorKey; const LabelsBranch(); diff --git a/lib/routes/typed/branches/landing_route.dart b/lib/routing/routes/landing_route.dart similarity index 80% rename from lib/routes/typed/branches/landing_route.dart rename to lib/routing/routes/landing_route.dart index 1411760f..4ded8c13 100644 --- a/lib/routes/typed/branches/landing_route.dart +++ b/lib/routing/routes/landing_route.dart @@ -1,8 +1,7 @@ import 'package:flutter/widgets.dart'; import 'package:go_router/go_router.dart'; import 'package:paperless_mobile/features/landing/view/landing_page.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/routes.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; class LandingBranch extends StatefulShellBranchData { static final GlobalKey $navigatorKey = landingNavigatorKey; diff --git a/lib/routes/typed/top_level/logging_out_route.dart b/lib/routing/routes/logging_out_route.dart similarity index 84% rename from lib/routes/typed/top_level/logging_out_route.dart rename to lib/routing/routes/logging_out_route.dart index d2151cdf..077a8a9f 100644 --- a/lib/routes/typed/top_level/logging_out_route.dart +++ b/lib/routing/routes/logging_out_route.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/routes.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; +import 'package:paperless_mobile/routing/routes.dart'; part 'logging_out_route.g.dart'; diff --git a/lib/routes/typed/top_level/login_route.dart b/lib/routing/routes/login_route.dart similarity index 97% rename from lib/routes/typed/top_level/login_route.dart rename to lib/routing/routes/login_route.dart index 5da96da5..835ba586 100644 --- a/lib/routes/typed/top_level/login_route.dart +++ b/lib/routing/routes/login_route.dart @@ -12,8 +12,8 @@ import 'package:paperless_mobile/features/login/view/login_to_existing_account_p import 'package:paperless_mobile/features/login/view/verify_identity_page.dart'; import 'package:paperless_mobile/features/login/view/widgets/login_transition_page.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/routes.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; +import 'package:paperless_mobile/routing/routes.dart'; part 'login_route.g.dart'; @TypedGoRoute( diff --git a/lib/routes/typed/branches/saved_views_route.dart b/lib/routing/routes/saved_views_route.dart similarity index 100% rename from lib/routes/typed/branches/saved_views_route.dart rename to lib/routing/routes/saved_views_route.dart diff --git a/lib/routes/typed/branches/scanner_route.dart b/lib/routing/routes/scanner_route.dart similarity index 93% rename from lib/routes/typed/branches/scanner_route.dart rename to lib/routing/routes/scanner_route.dart index be7f59e1..c2f3dde1 100644 --- a/lib/routes/typed/branches/scanner_route.dart +++ b/lib/routing/routes/scanner_route.dart @@ -7,8 +7,8 @@ import 'package:go_router/go_router.dart'; import 'package:paperless_mobile/features/document_scan/view/scanner_page.dart'; import 'package:paperless_mobile/features/document_upload/cubit/document_upload_cubit.dart'; import 'package:paperless_mobile/features/document_upload/view/document_upload_preparation_page.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/routes.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; +import 'package:paperless_mobile/routing/routes.dart'; class ScannerBranch extends StatefulShellBranchData { static final GlobalKey $navigatorKey = scannerNavigatorKey; diff --git a/lib/routes/typed/top_level/settings_route.dart b/lib/routing/routes/settings_route.dart similarity index 85% rename from lib/routes/typed/top_level/settings_route.dart rename to lib/routing/routes/settings_route.dart index c9926956..7f2b79c2 100644 --- a/lib/routes/typed/top_level/settings_route.dart +++ b/lib/routing/routes/settings_route.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:go_router/go_router.dart'; import 'package:paperless_mobile/features/settings/view/settings_page.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/routes.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; +import 'package:paperless_mobile/routing/routes.dart'; import 'package:paperless_mobile/theme.dart'; class SettingsRoute extends GoRouteData { diff --git a/lib/routes/typed/shells/authenticated_route.dart b/lib/routing/routes/shells/authenticated_route.dart similarity index 85% rename from lib/routes/typed/shells/authenticated_route.dart rename to lib/routing/routes/shells/authenticated_route.dart index 3762cbe9..136932f5 100644 --- a/lib/routes/typed/shells/authenticated_route.dart +++ b/lib/routing/routes/shells/authenticated_route.dart @@ -12,17 +12,17 @@ import 'package:paperless_mobile/core/factory/paperless_api_factory.dart'; import 'package:paperless_mobile/features/home/view/home_shell_widget.dart'; import 'package:paperless_mobile/features/sharing/cubit/receive_share_cubit.dart'; import 'package:paperless_mobile/features/sharing/view/widgets/event_listener_shell.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/routes.dart'; -import 'package:paperless_mobile/routes/typed/branches/documents_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/inbox_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/labels_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/landing_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/saved_views_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/scanner_route.dart'; -import 'package:paperless_mobile/routes/typed/branches/upload_queue_route.dart'; -import 'package:paperless_mobile/routes/typed/shells/scaffold_shell_route.dart'; -import 'package:paperless_mobile/routes/typed/top_level/settings_route.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; +import 'package:paperless_mobile/routing/routes.dart'; +import 'package:paperless_mobile/routing/routes/documents_route.dart'; +import 'package:paperless_mobile/routing/routes/inbox_route.dart'; +import 'package:paperless_mobile/routing/routes/labels_route.dart'; +import 'package:paperless_mobile/routing/routes/landing_route.dart'; +import 'package:paperless_mobile/routing/routes/saved_views_route.dart'; +import 'package:paperless_mobile/routing/routes/scanner_route.dart'; +import 'package:paperless_mobile/routing/routes/upload_queue_route.dart'; +import 'package:paperless_mobile/routing/routes/shells/scaffold_shell_route.dart'; +import 'package:paperless_mobile/routing/routes/settings_route.dart'; import 'package:provider/provider.dart'; /// Key used to access diff --git a/lib/routes/typed/shells/scaffold_shell_route.dart b/lib/routing/routes/shells/scaffold_shell_route.dart similarity index 100% rename from lib/routes/typed/shells/scaffold_shell_route.dart rename to lib/routing/routes/shells/scaffold_shell_route.dart diff --git a/lib/routes/typed/branches/upload_queue_route.dart b/lib/routing/routes/upload_queue_route.dart similarity index 78% rename from lib/routes/typed/branches/upload_queue_route.dart rename to lib/routing/routes/upload_queue_route.dart index 0c3ebb2a..05b5980e 100644 --- a/lib/routes/typed/branches/upload_queue_route.dart +++ b/lib/routing/routes/upload_queue_route.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:paperless_mobile/features/sharing/view/consumption_queue_view.dart'; -import 'package:paperless_mobile/routes/navigation_keys.dart'; -import 'package:paperless_mobile/routes/routes.dart'; +import 'package:paperless_mobile/routing/navigation_keys.dart'; +import 'package:paperless_mobile/routing/routes.dart'; class UploadQueueRoute extends GoRouteData { static final GlobalKey $parentNavigatorKey = diff --git a/lib/routes/utils/dialog_page.dart b/lib/routing/utils/dialog_page.dart similarity index 100% rename from lib/routes/utils/dialog_page.dart rename to lib/routing/utils/dialog_page.dart diff --git a/pubspec.lock b/pubspec.lock index a19acba2..85b55f77 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -645,10 +645,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: f185ac890306b5779ecbd611f52502d8d4d63d27703ef73161ca0407e815f02c + sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da url: "https://pub.dev" source: hosted - version: "2.0.16" + version: "2.0.17" flutter_secure_storage: dependency: "direct main" description: @@ -701,10 +701,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338" + sha256: bfc7cc3c75fe1282e8ce2e056d8fd1533f1a6848b65c379b4a5e7a9b623d3371 url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.0.8" flutter_test: dependency: "direct dev" description: flutter @@ -1175,10 +1175,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" + sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" path_provider_foundation: dependency: transitive description: @@ -1748,42 +1748,42 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" + sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba url: "https://pub.dev" source: hosted - version: "6.1.14" + version: "6.2.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330 + sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.2.0" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f" + sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" url: "https://pub.dev" source: hosted - version: "6.1.5" + version: "6.2.0" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e + sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88 + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: @@ -1796,18 +1796,18 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "043a0d5b83bb7a6f4f0040763dd7b23e75c8e1979cc1109a545054b6dcf56d17" + sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.0" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069" + sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" url: "https://pub.dev" source: hosted - version: "3.0.8" + version: "3.1.0" uuid: dependency: "direct main" description: @@ -1820,26 +1820,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: b16dadf7eb610e20da044c141b4a0199a5e8082ca21daba68322756f953ce714 + sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" url: "https://pub.dev" source: hosted - version: "1.1.9" + version: "1.1.9+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: a4b01403d5c613db115e30e71eca33f7e9e09f2d3c52c3fb84e16333ecddc539 + sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" url: "https://pub.dev" source: hosted - version: "1.1.9" + version: "1.1.9+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: d26c0e2f237476426523eb25512e4c09fa27c6d33ed659a0e69d79e20b5dc47f + sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 url: "https://pub.dev" source: hosted - version: "1.1.9" + version: "1.1.9+1" vector_math: dependency: transitive description: @@ -1924,10 +1924,10 @@ packages: dependency: transitive description: name: webview_flutter_wkwebview - sha256: "30b9af6bdd457b44c08748b9190d23208b5165357cc2eb57914fee1366c42974" + sha256: b4b42295b3aa91ed22ba6d3dd7de56efbb8f3ab3d6e41d8b1615d13537c7801d url: "https://pub.dev" source: hosted - version: "3.9.1" + version: "3.9.2" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 28cd598a..15072747 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 3.1.0+54 +version: 3.1.2+56 environment: sdk: ">=3.0.0 <4.0.0" @@ -53,7 +53,6 @@ dependencies: equatable: ^2.0.5 flutter_form_builder: ^8.0.0 package_info_plus: ^4.0.1 - font_awesome_flutter: ^10.1.0 local_auth: ^2.1.2 connectivity_plus: ^4.0.0 flutter_native_splash: ^2.2.11 @@ -101,6 +100,7 @@ dependencies: logger: ^2.0.2+1 synchronized: ^3.1.0 extended_masked_text: ^2.3.1 + font_awesome_flutter: ^10.6.0 # camerawesome: ^2.0.0-dev.1 dependency_overrides: diff --git a/scripts/install_dependencies_fdroid.sh b/scripts/install_dependencies_fdroid.sh new file mode 100644 index 00000000..e0713682 --- /dev/null +++ b/scripts/install_dependencies_fdroid.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +__script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + +readonly __script_dir + +pushd "$__script_dir/../" + +pushd packages/paperless_api +$$flutter$$/bin/flutter packages pub get +$$flutter$$/bin/dart run build_runner build --delete-conflicting-outputs +popd + +pushd packages/mock_server +$$flutter$$/bin/flutter packages pub get +popd + +$$flutter$$/bin/flutter packages pub get +$$flutter$$/bin/flutter gen-l10n +$$flutter$$/bin/dart run build_runner build --delete-conflicting-outputs + +popd + diff --git a/scripts/install_dependencies_with_submodule.sh b/scripts/install_dependencies_with_submodule.sh new file mode 100644 index 00000000..402cf0c6 --- /dev/null +++ b/scripts/install_dependencies_with_submodule.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +__script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + +readonly __script_dir + +pushd "$__script_dir/../" + +pushd packages/paperless_api +$FLUTTER_ROOT/flutter packages pub get +$FLUTTER_ROOT/dart run build_runner build --delete-conflicting-outputs +popd + +pushd packages/mock_server +$FLUTTER_ROOT/flutter packages pub get +popd + +$FLUTTER_ROOT/flutter packages pub get +$FLUTTER_ROOT/dart run build_runner build --delete-conflicting-outputs +$FLUTTER_ROOT/flutter gen-l10n +popd +