Compare commits
3 Commits
bc20593661
...
v0.1.24
| Author | SHA1 | Date | |
|---|---|---|---|
| dca8c64555 | |||
| 1aaea5f6d9 | |||
| 3a54a077f3 |
@@ -23,7 +23,5 @@
|
|||||||
"collectionName": "Name der Sammlung",
|
"collectionName": "Name der Sammlung",
|
||||||
"bookmarkTitle": "Titel des Lesezeichens",
|
"bookmarkTitle": "Titel des Lesezeichens",
|
||||||
"url": "Url",
|
"url": "Url",
|
||||||
"description": "Beschreibung",
|
"description": "Beschreibung"
|
||||||
"settings": "Einstellungen",
|
|
||||||
"activateJsonExport": "Json-Export aktivieren"
|
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,5 @@
|
|||||||
"collectionName": "Collection Name",
|
"collectionName": "Collection Name",
|
||||||
"bookmarkTitle": "Bookmark Title",
|
"bookmarkTitle": "Bookmark Title",
|
||||||
"url": "Url",
|
"url": "Url",
|
||||||
"description": "Description",
|
"description": "Description"
|
||||||
"settings": "Settings",
|
|
||||||
"activateJsonExport": "Activate json export"
|
|
||||||
}
|
}
|
||||||
@@ -199,18 +199,6 @@ abstract class AppLocalizations {
|
|||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Description'**
|
/// **'Description'**
|
||||||
String get description;
|
String get description;
|
||||||
|
|
||||||
/// No description provided for @settings.
|
|
||||||
///
|
|
||||||
/// In en, this message translates to:
|
|
||||||
/// **'Settings'**
|
|
||||||
String get settings;
|
|
||||||
|
|
||||||
/// No description provided for @activateJsonExport.
|
|
||||||
///
|
|
||||||
/// In en, this message translates to:
|
|
||||||
/// **'Activate json export'**
|
|
||||||
String get activateJsonExport;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AppLocalizationsDelegate
|
class _AppLocalizationsDelegate
|
||||||
|
|||||||
@@ -60,10 +60,4 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String get description => 'Beschreibung';
|
String get description => 'Beschreibung';
|
||||||
|
|
||||||
@override
|
|
||||||
String get settings => 'Einstellungen';
|
|
||||||
|
|
||||||
@override
|
|
||||||
String get activateJsonExport => 'Json-Export aktivieren';
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,10 +61,4 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String get description => 'Description';
|
String get description => 'Description';
|
||||||
|
|
||||||
@override
|
|
||||||
String get settings => 'Settings';
|
|
||||||
|
|
||||||
@override
|
|
||||||
String get activateJsonExport => 'Activate json export';
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import 'l10n/app_localizations.dart';
|
|||||||
import 'pages/collection_page.dart';
|
import 'pages/collection_page.dart';
|
||||||
import 'pages/collections_list_page.dart';
|
import 'pages/collections_list_page.dart';
|
||||||
import 'pages/search_page.dart';
|
import 'pages/search_page.dart';
|
||||||
import 'pages/settings_page.dart';
|
|
||||||
import 'service/search_provider.dart';
|
import 'service/search_provider.dart';
|
||||||
import 'service/shared_link_provider.dart';
|
import 'service/shared_link_provider.dart';
|
||||||
import 'service/storage.dart';
|
import 'service/storage.dart';
|
||||||
@@ -84,7 +83,6 @@ class _MapsBookmarksState extends State<MapsBookmarks>
|
|||||||
CollectionsListPage.routeName: (context) => const CollectionsListPage(),
|
CollectionsListPage.routeName: (context) => const CollectionsListPage(),
|
||||||
CollectionPage.routeName: (context) => const CollectionPage(),
|
CollectionPage.routeName: (context) => const CollectionPage(),
|
||||||
SearchPage.routeName: (context) => const SearchPage(),
|
SearchPage.routeName: (context) => const SearchPage(),
|
||||||
SettingsPage.routeName: (context) => const SettingsPage(),
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import '../service/storage.dart';
|
|||||||
import '../widgets/create_bookmark_collection_dialog.dart';
|
import '../widgets/create_bookmark_collection_dialog.dart';
|
||||||
import 'collection_page.dart';
|
import 'collection_page.dart';
|
||||||
import 'search_page.dart' show SearchPage;
|
import 'search_page.dart' show SearchPage;
|
||||||
import 'settings_page.dart';
|
|
||||||
|
|
||||||
class CollectionsListPage extends StatefulWidget {
|
class CollectionsListPage extends StatefulWidget {
|
||||||
const CollectionsListPage({super.key});
|
const CollectionsListPage({super.key});
|
||||||
@@ -22,7 +21,7 @@ class CollectionsListPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _CollectionsListPageState extends State<CollectionsListPage> {
|
class _CollectionsListPageState extends State<CollectionsListPage> {
|
||||||
bool addingNewBookmark = false;
|
bool addingNewBookmark = false;
|
||||||
var bookmarkCountMap = <int, int>{};
|
final bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
|
||||||
|
|
||||||
Widget bottomSheetBuilder(BuildContext context) {
|
Widget bottomSheetBuilder(BuildContext context) {
|
||||||
final titleTextFieldController = TextEditingController(
|
final titleTextFieldController = TextEditingController(
|
||||||
@@ -85,9 +84,8 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final collections = Storage.loadCollections();
|
final collections = Storage.loadCollections();
|
||||||
bookmarkCountMap = Storage.loadPerCollectionBookmarkCount();
|
final provider = context.watch<SharedLinkProvider>();
|
||||||
addingNewBookmark =
|
addingNewBookmark = provider.currentMapsLinkMetadata != null;
|
||||||
context.watch<SharedLinkProvider>().currentMapsLinkMetadata != null;
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: addingNewBookmark
|
title: addingNewBookmark
|
||||||
@@ -96,21 +94,15 @@ class _CollectionsListPageState extends State<CollectionsListPage> {
|
|||||||
actions: [
|
actions: [
|
||||||
if (addingNewBookmark)
|
if (addingNewBookmark)
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () =>
|
onPressed: () => provider.removeCurrentMapsLink(),
|
||||||
context.read<SharedLinkProvider>().removeCurrentMapsLink(),
|
|
||||||
child: Text(AppLocalizations.of(context)!.cancel),
|
child: Text(AppLocalizations.of(context)!.cancel),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
Navigator.of(context).pushNamed(SearchPage.routeName),
|
Navigator.of(context).pushNamed(SearchPage.routeName),
|
||||||
icon: Icon(Icons.search_rounded),
|
icon: Icon(Icons.search),
|
||||||
),
|
),
|
||||||
IconButton(
|
|
||||||
onPressed: () =>
|
|
||||||
Navigator.of(context).pushNamed(SettingsPage.routeName),
|
|
||||||
icon: Icon(Icons.settings_rounded),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import '../l10n/app_localizations.dart';
|
|
||||||
|
|
||||||
class SettingsPage extends StatelessWidget {
|
|
||||||
static const routeName = '/settings';
|
|
||||||
const SettingsPage({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBar(title: Text(AppLocalizations.of(context)!.settings)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8,31 +8,13 @@ class Notifying {
|
|||||||
required String text,
|
required String text,
|
||||||
bool isError = false,
|
bool isError = false,
|
||||||
}) {
|
}) {
|
||||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
backgroundColor: Theme.of(context).colorScheme.error,
|
content: Text(
|
||||||
content: SizedBox(
|
text,
|
||||||
height: 30,
|
style: isError
|
||||||
child: Row(
|
? TextStyle(color: Theme.of(context).colorScheme.error)
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
: null,
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
text,
|
|
||||||
style: isError
|
|
||||||
? 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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user