chore: Nicer message info dialog

This commit is contained in:
Krille Fear 2021-11-22 19:27:40 +01:00
parent 69b7359b96
commit effea76139
2 changed files with 16 additions and 9 deletions

View File

@ -83,7 +83,10 @@ class ChatView extends StatelessWidget {
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
const Icon(Icons.report_outlined), const Icon(
Icons.shield_outlined,
color: Colors.red,
),
const SizedBox(width: 12), const SizedBox(width: 12),
Text(L10n.of(context).reportMessage), Text(L10n.of(context).reportMessage),
], ],

View File

@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart'; import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/utils/date_time_extension.dart'; import 'package:fluffychat/utils/date_time_extension.dart';
import 'package:fluffychat/widgets/avatar.dart'; import 'package:fluffychat/widgets/avatar.dart';
@ -52,7 +53,7 @@ class EventInfoDialog extends StatelessWidget {
), ),
title: Text(L10n.of(context).sender), title: Text(L10n.of(context).sender),
subtitle: subtitle:
Text('${event.sender.calcDisplayname()} <${event.senderId}>'), Text('${event.sender.calcDisplayname()} [${event.senderId}]'),
), ),
ListTile( ListTile(
title: Text(L10n.of(context).time), title: Text(L10n.of(context).time),
@ -62,14 +63,17 @@ class EventInfoDialog extends StatelessWidget {
title: Text(L10n.of(context).messageType), title: Text(L10n.of(context).messageType),
subtitle: Text(event.humanreadableType), subtitle: Text(event.humanreadableType),
), ),
ListTile( ListTile(title: Text('${L10n.of(context).sourceCode}:')),
title: Text(L10n.of(context).sourceCode),
),
Padding( Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: Material(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
color: Theme.of(context).colorScheme.surface,
child: SingleChildScrollView( child: SingleChildScrollView(
padding: const EdgeInsets.all(8),
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: Text(prettyJson), child: SelectableText(prettyJson),
),
), ),
), ),
], ],