style: Use robotomono to display device keys

This commit is contained in:
Christian Pauly 2023-02-17 08:45:49 +01:00
parent 799bec5ad9
commit e08f601bfd
4 changed files with 10 additions and 6 deletions

Binary file not shown.

View File

@ -7,6 +7,7 @@ import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pages/chat_encryption_settings/chat_encryption_settings.dart';
import 'package:fluffychat/utils/beautify_string_extension.dart';
class ChatEncryptionSettingsView extends StatelessWidget {
final ChatEncryptionSettingsController controller;
@ -164,13 +165,13 @@ class ChatEncryptionSettingsView extends StatelessWidget {
],
),
subtitle: Text(
deviceKeys[i].ed25519Key?.replaceAllMapped(
RegExp(r'.{4}'),
(s) => '${s.group(0)} ') ??
deviceKeys[i].ed25519Key?.beautified ??
L10n.of(context)!
.unknownEncryptionAlgorithm,
style: const TextStyle(
fontFamily: 'monospace',
style: TextStyle(
fontFamily: 'RobotoMono',
color:
Theme.of(context).colorScheme.secondary,
),
),
),

View File

@ -4,7 +4,7 @@ extension BeautifyStringExtension on String {
for (var i = 0; i < length; i++) {
beautifiedStr += substring(i, i + 1);
if (i % 4 == 3) {
beautifiedStr += ' ';
beautifiedStr += ' ';
}
if (i % 16 == 15) {
beautifiedStr += '\n';

View File

@ -124,6 +124,9 @@ flutter:
style: italic
- asset: fonts/Roboto/Roboto-Bold.ttf
weight: 700
- family: RobotoMono
fonts:
- asset: fonts/Roboto/RobotoMono-Regular.ttf
- family: NotoEmoji
fonts:
- asset: fonts/NotoEmoji/NotoColorEmoji.ttf