feat: Handy-Chatliste als Messenger-Kachel (Vorschau, Uhrzeit, Ungelesen) + deutsche Beschriftungen

- rooms_mobile_tile.dart: auf dem Handy grosser Avatar, Name + Uhrzeit der
  letzten Nachricht, Vorschau (gleiche Texte wie Push: Medien-Labels,
  Antwort-Zitat entfernt; "Du:" bzw. Absender in Gruppen), Ungelesen-Zaehler.
  PC behaelt die kompakte Liste, Voice-Kanaele ihre Darstellung.
- utils/date_labels.dart: chatListTime (heute Uhrzeit, Gestern, Wochentag,
  Datum; sicher an Zeitumstellungs-Tagen) + 5 Tests.
- Sichtbare englische Texte eingedeutscht (Chats durchsuchen,
  Direktnachrichten, Raeume, Nachricht..., Mitglieder, Suchen, ...).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Bernd Steckmeister
2026-10-07 17:21:33 +02:00
co-authored by Claude Opus 5.5
parent c5f10901e6
commit c38e9c18b0
13 changed files with 267 additions and 26 deletions
+12 -11
View File
@@ -3,7 +3,8 @@ part of '../rooms_panel.dart';
class _DmAvatar extends ConsumerStatefulWidget {
final Room room;
final PyramidTheme pt;
const _DmAvatar({required this.room, required this.pt});
final double size;
const _DmAvatar({required this.room, required this.pt, this.size = 22});
@override
ConsumerState<_DmAvatar> createState() => _DmAvatarState();
@@ -69,13 +70,13 @@ class _DmAvatarState extends ConsumerState<_DmAvatar> {
avatar = MxcAvatar(
mxcUri: widget.room.avatar,
client: client,
size: 22,
borderRadius: BorderRadius.circular(11),
size: widget.size,
borderRadius: BorderRadius.circular(widget.size / 2),
placeholder: (_) =>
_InitialCircle(initial: initial, color: color, size: 22),
_InitialCircle(initial: initial, color: color, size: widget.size),
);
} else {
avatar = _InitialCircle(initial: initial, color: color, size: 22);
avatar = _InitialCircle(initial: initial, color: color, size: widget.size);
}
final dot = _dotColor();
@@ -83,11 +84,11 @@ class _DmAvatarState extends ConsumerState<_DmAvatar> {
return Stack(clipBehavior: Clip.none, children: [
avatar,
Positioned(
right: -2,
bottom: -2,
right: widget.size > 30 ? 0 : -2,
bottom: widget.size > 30 ? 0 : -2,
child: Container(
width: 9,
height: 9,
width: widget.size > 30 ? 13 : 9,
height: widget.size > 30 ? 13 : 9,
decoration: BoxDecoration(
color: dot,
shape: BoxShape.circle,
@@ -123,9 +124,9 @@ class _InitialCircle extends StatelessWidget {
decoration: BoxDecoration(color: color, shape: BoxShape.circle),
child: Center(
child: Text(initial,
style: const TextStyle(
style: TextStyle(
color: Colors.white,
fontSize: 10,
fontSize: size * 0.45,
fontWeight: FontWeight.w600))),
);
}