11 Commits

Author SHA1 Message Date
06a76afc42 Merge pull request 'Theme changes' (#4) from development into main
All checks were successful
Flutter APK Build / Build Flutter APK (push) Successful in 6m46s
Reviewed-on: #4
2026-01-21 16:38:03 +01:00
3032e13dc9 Added dismiss button
Some checks failed
Flutter APK Build / Build Flutter APK (pull_request) Has been cancelled
2026-01-21 16:37:03 +01:00
d0492b2f79 changed snackbar styling 2026-01-21 16:31:43 +01:00
c2506fab7a refactored code so change in bookmark count is visible immediately 2026-01-21 16:30:30 +01:00
dca8c64555 Merge pull request 'small theme changes' (#3) from development into main
All checks were successful
Flutter APK Build / Build Flutter APK (push) Successful in 6m48s
Reviewed-on: #3
2026-01-21 15:05:11 +01:00
c80606b7d0 changed appearance of lists
All checks were successful
Flutter APK Build / Build Flutter APK (pull_request) Successful in 6m44s
2026-01-21 15:04:24 +01:00
be6020d6c5 added label text 2026-01-21 14:44:36 +01:00
5eb58d7cf2 Changed theme to globally enable rounded borders for textfields 2026-01-21 14:43:02 +01:00
306a38a36a revert workflow to a working state 2026-01-21 14:30:25 +01:00
1aaea5f6d9 Merge pull request '[fix] Added basic locatlization' (#2) from development into main
All checks were successful
Flutter APK Build / Calculate Version (push) Successful in 13s
Flutter APK Build / Build Flutter APK (push) Successful in 6m34s
Flutter APK Build / Create Release (push) Has been skipped
Reviewed-on: #2
2026-01-21 14:12:41 +01:00
3a54a077f3 Merge pull request '[fix] added bookmark count number to collections page' (#1) from development into main
All checks were successful
Flutter APK Build / Calculate Version (push) Successful in 15s
Flutter APK Build / Build Flutter APK (push) Successful in 6m37s
Flutter APK Build / Create Release (push) Has been skipped
Reviewed-on: #1
2026-01-21 13:20:49 +01:00
10 changed files with 102 additions and 149 deletions

View File

@@ -9,76 +9,15 @@ on:
- main
workflow_dispatch:
permissions:
contents: write
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
@@ -99,18 +38,12 @@ jobs:
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
@@ -121,37 +54,14 @@ jobs:
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 }}
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: |

View File

@@ -102,10 +102,16 @@ class _CollectionPageState extends State<CollectionPage> {
),
],
),
body: ListView.builder(
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,

View File

@@ -21,7 +21,7 @@ class CollectionsListPage extends StatefulWidget {
class _CollectionsListPageState extends State<CollectionsListPage> {
bool addingNewBookmark = false;
final bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
var bookmarkCountMap = <int, int>{};
Widget bottomSheetBuilder(BuildContext context) {
final titleTextFieldController = TextEditingController(
@@ -84,8 +84,9 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
@override
Widget build(BuildContext context) {
final collections = Storage.loadCollections();
final provider = context.watch<SharedLinkProvider>();
addingNewBookmark = provider.currentMapsLinkMetadata != null;
bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
addingNewBookmark =
context.watch<SharedLinkProvider>().currentMapsLinkMetadata != null;
return Scaffold(
appBar: AppBar(
title: addingNewBookmark
@@ -94,7 +95,8 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
actions: [
if (addingNewBookmark)
TextButton(
onPressed: () => provider.removeCurrentMapsLink(),
onPressed: () =>
context.read<SharedLinkProvider>().removeCurrentMapsLink(),
child: Text(AppLocalizations.of(context)!.cancel),
)
else
@@ -110,12 +112,18 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
child: Icon(Icons.add),
),
body: collections.isNotEmpty
? ListView.builder(
? 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),
),
),
)
: Center(
child: Text(AppLocalizations.of(context)!.tipCreateCollections),

View File

@@ -14,15 +14,22 @@ class SearchPage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(AppLocalizations.of(context)!.search)),
body: Column(
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<SearchProvider>().setSearchText,
onResetSearch: context.read<SearchProvider>().removeSearchText,
),
Padding(padding: EdgeInsetsGeometry.only(top: 10)),
Expanded(child: SearchResultsWidget()),
],
),
),
),
);
}
}

View File

@@ -8,14 +8,32 @@ class Notifying {
required String text,
bool isError = false,
}) {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
backgroundColor: Theme.of(context).colorScheme.error,
content: SizedBox(
height: 30,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
text,
style: isError
? TextStyle(color: Theme.of(context).colorScheme.error)
? TextStyle(color: Theme.of(context).colorScheme.onError)
: null,
),
IconButton(
onPressed: () =>
ScaffoldMessenger.of(context).hideCurrentSnackBar(),
icon: Icon(
Icons.close_rounded,
color: Theme.of(context).colorScheme.onError,
),
),
],
),
),
),
);
}

View File

@@ -1,15 +1,26 @@
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 _lightColorScheme => ColorScheme.fromSeed(
seedColor: Colors.deepPurple,
brightness: Brightness.light,
ColorScheme get _darkColorScheme =>
ColorScheme.fromSeed(seedColor: _seed, brightness: Brightness.dark);
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)),
),
listTileTheme: ListTileThemeData(
tileColor: scheme.surfaceContainer,
shape: RoundedRectangleBorder(
borderRadius: BorderRadiusGeometry.circular(12),
),
),
);

View File

@@ -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: [

View File

@@ -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),
),
),
),
],

View File

@@ -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,
),
);
}

View File

@@ -47,9 +47,10 @@ class _SearchResultsWidgetState extends State<SearchResultsWidget> {
@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));