mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-05 19:49:29 +01:00
style: Use robotomono to display device keys
This commit is contained in:
parent
799bec5ad9
commit
e08f601bfd
BIN
fonts/Roboto/RobotoMono-Regular.ttf
Normal file
BIN
fonts/Roboto/RobotoMono-Regular.ttf
Normal file
Binary file not shown.
@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -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';
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user