Erweiterungen

This commit is contained in:
Sven committed 2026-02-25 10:40:29 +01:00
1 parent 955d7b3cb4
commit e9811da904
25 files changed
+1505 -128

No files matched your search

+22 -21
View File
@@ -15,6 +15,7 @@ import 'package:stadtbote/model/chat_message.dart';
import 'package:stadtbote/model/session_status.dart';
import 'package:stadtbote/network_messages/logout_message.dart';
import 'package:stadtbote/popups/infos_popup.dart';
import 'package:stadtbote/tools/app_localizations.dart';
import 'package:stadtbote/tools/constants.dart';
import 'package:stadtbote/tools/messages/job_received_message.dart';
import 'package:stadtbote/tools/messages/publish_payload_message.dart';
@@ -104,7 +105,7 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
elevation: 0,
),
child: getDefaultButton(
'Zugewiesene Aufträge',
'assigned_jobs'.tr,
image: Image.asset('assets/zugewiesene_auftraege.png',
width: 30, height: 30),
() async => {
@@ -144,7 +145,7 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
elevation: 0,
),
child: getDefaultButton(
'Angenommene Aufträge',
'accepted_jobs'.tr,
image: Image.asset(
'assets/angenommene_auftraege.png',
width: 30,
@@ -163,7 +164,7 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
Visibility(
visible: !_loggedOut,
child: getDefaultButton(
'Erledigte Aufträge',
'finished_jobs'.tr,
image: Image.asset('assets/erledigte_auftraege.png',
width: 30, height: 30),
() async => {
@@ -199,7 +200,7 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
elevation: 0,
),
child: getDefaultButton(
'Nachrichten',
'messages'.tr,
image: Image.asset('assets/nachrichten.png',
width: 30, height: 30),
() async => {
@@ -216,7 +217,7 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
Visibility(
visible: !_loggedOut,
child: getDefaultButton(
'Anfahrtsbereich',
'approach_area'.tr,
image: Image.asset('assets/anfahrtsbereich.png',
width: 30, height: 30),
() async => {
@@ -230,7 +231,7 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
Visibility(
visible: !_loggedOut && _showBWVButton,
child: getDefaultButton(
'Wunschziel für heute',
'desired_zip'.tr,
image: Image.asset('assets/wunsch_plz.png',
width: 30, height: 30),
() async => {
@@ -241,7 +242,7 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
}),
),
SizedBox(height: _loggedOut == true ? 0 : 20),
getDefaultButton(_loggedOut ? 'Anmelden' : 'Abmelden',
getDefaultButton(_loggedOut ? 'login'.tr : 'logout'.tr,
image: Image.asset(
_loggedOut
? 'assets/anmelden.png'
@@ -360,12 +361,12 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
showLogoutAlertDialog(BuildContext context) async {
Widget yesButton = TextButton(
child: const Text("Ja"),
child: Text('yes'.tr),
onPressed: () async {
Navigator.of(context).pop();
showMessageDialog(
context, "Information", "Sie werden abgemeldet.\nBitte warten...");
context, 'information'.tr, 'logging_out'.tr);
_sendLogoutMessage();
@@ -394,7 +395,7 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
);
Widget noButton = TextButton(
child: const Text("Nein"),
child: Text('no'.tr),
onPressed: () {
Navigator.of(context).pop();
},
@@ -402,8 +403,8 @@ class _MainPageState extends State<MainPage> with ConsumerMixin, ProducerMixin {
// set up the AlertDialog
AlertDialog alert = AlertDialog(
title: const Text("Warnung"),
content: const Text("Wollen Sie sich wirklich abmelden?"),
title: Text('warning'.tr),
content: Text('logout_confirm'.tr),
actions: [
yesButton,
noButton,
@@ -547,18 +548,18 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ConsumerMixin {
children: <Widget>[
SizedBox(
width: cellWidth,
child: const Text(
'Meldung',
child: Text(
'message'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11, color: Colors.white),
style: const TextStyle(fontSize: 11, color: Colors.white),
),
),
SizedBox(
width: cellWidth,
child: const Text(
'Ortung',
child: Text(
'location'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11, color: Colors.white),
style: const TextStyle(fontSize: 11, color: Colors.white),
),
),
],
@@ -602,10 +603,10 @@ class _HeaderWidgetState extends State<_HeaderWidget> with ConsumerMixin {
),
Column(
children: [
const Text(
'Kurierkennung',
Text(
'courier_id'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11, color: Colors.white),
style: const TextStyle(fontSize: 11, color: Colors.white),
),
ValueListenableBuilder<String>(
valueListenable: _sidValueNotifier,