From 306a38a36a3d9b11c76c0b5e4940253638cfae23 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 21 Jan 2026 14:30:25 +0100 Subject: [PATCH 1/4] revert workflow to a working state --- .gitea/workflows/android_build.yml | 114 +++-------------------------- 1 file changed, 12 insertions(+), 102 deletions(-) diff --git a/.gitea/workflows/android_build.yml b/.gitea/workflows/android_build.yml index db3e2d5..be0a2ec 100644 --- a/.gitea/workflows/android_build.yml +++ b/.gitea/workflows/android_build.yml @@ -9,76 +9,15 @@ on: - main workflow_dispatch: + permissions: contents: write - actions: read + actions: read jobs: - calculate-version: - name: Calculate Version - runs-on: ubuntu-latest - outputs: - new_version: ${{ steps.version.outputs.new_version }} - bump_type: ${{ steps.version.outputs.bump_type }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Get commit message and determine version bump - id: version - run: | - COMMIT_MSG=$(git log -1 --pretty=%B) - HEAD_REF="${{ github.head_ref }}" - echo "DEBUG: Commit message: '$COMMIT_MSG'" - echo "DEBUG: Head ref: '$HEAD_REF'" - - if [[ $COMMIT_MSG == [fix]* ]]; then - BUMP_TYPE="patch" - elif [[ $COMMIT_MSG == [feature]* ]]; then - BUMP_TYPE="minor" - elif [[ $COMMIT_MSG == [release]* ]]; then - BUMP_TYPE="major" - elif [[ $HEAD_REF == fix/* ]]; then - BUMP_TYPE="patch" - elif [[ $HEAD_REF == feature/* ]] || [[ $HEAD_REF == feat/* ]]; then - BUMP_TYPE="minor" - elif [[ $HEAD_REF == release/* ]] || [[ $HEAD_REF == hotfix/* ]]; then - BUMP_TYPE="major" - else - BUMP_TYPE="none" - fi - - - LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") - LATEST_TAG=${LATEST_TAG#v} - - IFS='.' read -r MAJOR MINOR PATCH <<< "$LATEST_TAG" - MAJOR=${MAJOR:-0} - MINOR=${MINOR:-0} - PATCH=${PATCH:-0} - - if [ "$BUMP_TYPE" == "major" ]; then - ((MAJOR++)) - MINOR=0 - PATCH=0 - elif [ "$BUMP_TYPE" == "minor" ]; then - ((MINOR++)) - PATCH=0 - elif [ "$BUMP_TYPE" == "patch" ]; then - ((PATCH++)) - fi - - NEW_VERSION="$MAJOR.$MINOR.$PATCH" - echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT - echo "bump_type=$BUMP_TYPE" >> $GITHUB_OUTPUT - build_apk: name: Build Flutter APK runs-on: ubuntu-latest - needs: calculate-version steps: - name: Checkout code @@ -94,68 +33,39 @@ jobs: uses: android-actions/setup-android@v3 with: packages: "platform-tools platforms;android-36 build-tools;36.0.0" - + - name: Setup Flutter uses: subosito/flutter-action@v2 with: channel: stable - - run: flutter --version - run: flutter doctor - + - name: Get dependencies run: flutter pub get - - - name: Update pubspec.yaml with new version - run: | - sed -i "s/^version: .*/version: ${{ needs.calculate-version.outputs.new_version }}+${{ github.run_number }}/" pubspec.yaml - cat pubspec.yaml | grep version - + - name: Build APK run: flutter build apk --release - + - name: Upload APK artifact uses: actions/upload-artifact@v3 with: name: flutter-apk path: build/app/outputs/flutter-apk/app-release.apk retention-days: 30 - - create-release: - name: Create Release - runs-on: ubuntu-latest - needs: [calculate-version, build_apk] - if: needs.calculate-version.outputs.bump_type != 'none' - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Download APK artifact - uses: actions/download-artifact@v3 - with: - name: flutter-apk - - - name: Create Git tag - run: | - NEW_TAG="v${{ needs.calculate-version.outputs.new_version }}" - git config --local user.name "GitHub Actions" - git config --local user.email "actions@github.com" - git tag -a "$NEW_TAG" -m "Release ${{ needs.calculate-version.outputs.new_version }}" - git push origin "$NEW_TAG" - + - name: Create Gitea release uses: akkuman/gitea-release-action@v1 env: - GITEA_TOKEN: ${{ secrets.RUNNER_CREATE_RELEASE }} + GITEA_TOKEN: ${{ secrets.RUNNER_CREATE_RELEASE }} with: - tag_name: "v${{ needs.calculate-version.outputs.new_version }}" - name: "Flutter Android v${{ needs.calculate-version.outputs.new_version }}" - body: "Automated build from CI\n\nVersion bump type: ${{ needs.calculate-version.outputs.bump_type }}" + tag_name: "v0.1.${{ github.run_number }}" + name: "Flutter Android v0.1.${{ github.run_number }}" + body: "Automated build from CI" draft: false prerelease: false files: | build/app/outputs/flutter-apk/app-release.apk gitea_url: "https://git.skup.in" owner: "marco" - repo: "maps_bookmarks" + repo: "maps_bookmarks" \ No newline at end of file -- 2.49.1 From 5eb58d7cf2a2df9565426f8d1fb6080a6efed299 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 21 Jan 2026 14:43:02 +0100 Subject: [PATCH 2/4] Changed theme to globally enable rounded borders for textfields --- lib/theme.dart | 25 +++++++++++-------- .../create_bookmark_collection_dialog.dart | 2 -- lib/widgets/create_bookmark_dialog.dart | 9 ------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/lib/theme.dart b/lib/theme.dart index 7ec97aa..a14ff0f 100644 --- a/lib/theme.dart +++ b/lib/theme.dart @@ -1,15 +1,20 @@ import 'package:flutter/material.dart'; -ThemeData get lightTheme => ThemeData.from(colorScheme: _lightColorScheme); +const _seed = Colors.deepPurple; -ThemeData get darkTheme => ThemeData.from(colorScheme: _darkColorScheme); +ColorScheme get _lightColorScheme => + ColorScheme.fromSeed(seedColor: _seed, brightness: Brightness.light); -ColorScheme get _darkColorScheme => ColorScheme.fromSeed( - seedColor: Colors.deepPurple, - brightness: Brightness.dark, -); +ColorScheme get _darkColorScheme => + ColorScheme.fromSeed(seedColor: _seed, brightness: Brightness.dark); -ColorScheme get _lightColorScheme => ColorScheme.fromSeed( - seedColor: Colors.deepPurple, - brightness: Brightness.light, -); +ThemeData get lightTheme => _baseTheme(_lightColorScheme); + +ThemeData get darkTheme => _baseTheme(_darkColorScheme); + +ThemeData _baseTheme(ColorScheme scheme) => + ThemeData.from(colorScheme: scheme, useMaterial3: true).copyWith( + inputDecorationTheme: InputDecorationTheme( + border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)), + ), + ); diff --git a/lib/widgets/create_bookmark_collection_dialog.dart b/lib/widgets/create_bookmark_collection_dialog.dart index 1db9165..48763f4 100644 --- a/lib/widgets/create_bookmark_collection_dialog.dart +++ b/lib/widgets/create_bookmark_collection_dialog.dart @@ -41,9 +41,7 @@ class CreateBookmarkCollectionDialog extends StatelessWidget { FilteringTextInputFormatter.deny(RegExp(r'\s\s+')), ], decoration: InputDecoration( - // TODO: Localize labelText: AppLocalizations.of(context)!.collectionName, - border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)), ), ), actions: [ diff --git a/lib/widgets/create_bookmark_dialog.dart b/lib/widgets/create_bookmark_dialog.dart index d74aaa6..20218e1 100644 --- a/lib/widgets/create_bookmark_dialog.dart +++ b/lib/widgets/create_bookmark_dialog.dart @@ -61,9 +61,6 @@ class CreateBookmarkDialog extends StatelessWidget { ], decoration: InputDecoration( labelText: AppLocalizations.of(context)!.bookmarkTitle, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - ), ), ), TextField( @@ -78,9 +75,6 @@ class CreateBookmarkDialog extends StatelessWidget { ], decoration: InputDecoration( labelText: AppLocalizations.of(context)!.url, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - ), ), ), TextField( @@ -95,9 +89,6 @@ class CreateBookmarkDialog extends StatelessWidget { ], decoration: InputDecoration( labelText: AppLocalizations.of(context)!.description, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - ), ), ), ], -- 2.49.1 From be6020d6c57e13632f63e388acaebe7061aa4bf6 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 21 Jan 2026 14:44:36 +0100 Subject: [PATCH 3/4] added label text --- lib/widgets/search_widgets/search_bar_widget.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/widgets/search_widgets/search_bar_widget.dart b/lib/widgets/search_widgets/search_bar_widget.dart index 9b02652..5846f11 100644 --- a/lib/widgets/search_widgets/search_bar_widget.dart +++ b/lib/widgets/search_widgets/search_bar_widget.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import '../../l10n/app_localizations.dart'; + class SearchBarWidget extends StatelessWidget { const SearchBarWidget({ super.key, @@ -28,6 +30,7 @@ class SearchBarWidget extends StatelessWidget { }, icon: Icon(Icons.delete_outline_outlined), ), + labelText: AppLocalizations.of(context)!.search, ), ); } -- 2.49.1 From c80606b7d019d326013439d1f4de9ee6b6428826 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 21 Jan 2026 15:04:24 +0100 Subject: [PATCH 4/4] changed appearance of lists --- lib/pages/collection_page.dart | 14 +++++++++---- lib/pages/collections_list_page.dart | 16 +++++++++----- lib/pages/search_page.dart | 21 ++++++++++++------- lib/theme.dart | 6 ++++++ .../search_widgets/search_results_widget.dart | 3 ++- 5 files changed, 43 insertions(+), 17 deletions(-) diff --git a/lib/pages/collection_page.dart b/lib/pages/collection_page.dart index 5a0b66c..087de80 100644 --- a/lib/pages/collection_page.dart +++ b/lib/pages/collection_page.dart @@ -102,10 +102,16 @@ class _CollectionPageState extends State { ), ], ), - body: ListView.builder( - itemBuilder: (context, index) => - bookmarksListItemBuilder(context, bookmarks.elementAt(index)), - itemCount: bookmarks.length, + body: Center( + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.9, + child: ListView.separated( + itemBuilder: (context, index) => + bookmarksListItemBuilder(context, bookmarks.elementAt(index)), + itemCount: bookmarks.length, + separatorBuilder: (context, index) => SizedBox(height: 10), + ), + ), ), floatingActionButton: FloatingActionButton( onPressed: onAddButtonPressed, diff --git a/lib/pages/collections_list_page.dart b/lib/pages/collections_list_page.dart index 7834f16..63f553c 100644 --- a/lib/pages/collections_list_page.dart +++ b/lib/pages/collections_list_page.dart @@ -110,12 +110,18 @@ class _CollectionsListPageState extends State { child: Icon(Icons.add), ), body: collections.isNotEmpty - ? ListView.builder( - itemBuilder: (context, index) => collectionsListItemBuilder( - context, - collections.elementAt(index), + ? Center( + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.9, + child: ListView.separated( + itemBuilder: (context, index) => collectionsListItemBuilder( + context, + collections.elementAt(index), + ), + itemCount: collections.length, + separatorBuilder: (context, index) => SizedBox(height: 10), + ), ), - itemCount: collections.length, ) : Center( child: Text(AppLocalizations.of(context)!.tipCreateCollections), diff --git a/lib/pages/search_page.dart b/lib/pages/search_page.dart index d77ac66..db56c21 100644 --- a/lib/pages/search_page.dart +++ b/lib/pages/search_page.dart @@ -14,14 +14,21 @@ class SearchPage extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text(AppLocalizations.of(context)!.search)), - body: Column( - children: [ - SearchBarWidget( - onEditingComplete: context.read().setSearchText, - onResetSearch: context.read().removeSearchText, + body: Center( + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.9, + child: Column( + children: [ + Padding(padding: EdgeInsetsGeometry.only(top: 10)), + SearchBarWidget( + onEditingComplete: context.read().setSearchText, + onResetSearch: context.read().removeSearchText, + ), + Padding(padding: EdgeInsetsGeometry.only(top: 10)), + Expanded(child: SearchResultsWidget()), + ], ), - Expanded(child: SearchResultsWidget()), - ], + ), ), ); } diff --git a/lib/theme.dart b/lib/theme.dart index a14ff0f..47289ac 100644 --- a/lib/theme.dart +++ b/lib/theme.dart @@ -17,4 +17,10 @@ ThemeData _baseTheme(ColorScheme scheme) => inputDecorationTheme: InputDecorationTheme( border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)), ), + listTileTheme: ListTileThemeData( + tileColor: scheme.surfaceContainer, + shape: RoundedRectangleBorder( + borderRadius: BorderRadiusGeometry.circular(12), + ), + ), ); diff --git a/lib/widgets/search_widgets/search_results_widget.dart b/lib/widgets/search_widgets/search_results_widget.dart index d71b711..a1231c4 100644 --- a/lib/widgets/search_widgets/search_results_widget.dart +++ b/lib/widgets/search_widgets/search_results_widget.dart @@ -47,9 +47,10 @@ class _SearchResultsWidgetState extends State { @override Widget build(BuildContext context) { if (filteredBookmarks.isNotEmpty) { - return ListView.builder( + return ListView.separated( itemBuilder: bookmarkListItemBuilder, itemCount: filteredBookmarks.length, + separatorBuilder: (context, index) => SizedBox(height: 10), ); } return Center(child: Text(AppLocalizations.of(context)!.tipNoResults)); -- 2.49.1