feat: Account settings displays current matrix ID

This commit is contained in:
Krille Fear 2021-10-10 12:57:28 +02:00
parent fc4dbc1eda
commit 741d4ddba3
2 changed files with 18 additions and 0 deletions

View File

@ -398,6 +398,7 @@
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}
}, },
"yourUserId": "Your user ID:",
"setupChatBackup": "Set up chat backup", "setupChatBackup": "Set up chat backup",
"iWroteDownTheKey": "I wrote down the key", "iWroteDownTheKey": "I wrote down the key",
"yourChatBackupHasBeenSetUp": "Your chat backup has been set up.", "yourChatBackupHasBeenSetUp": "Your chat backup has been set up.",

View File

@ -1,4 +1,5 @@
import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/utils/fluffy_share.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart'; import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/matrix.dart'; import 'package:fluffychat/widgets/matrix.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -20,6 +21,21 @@ class SettingsAccountView extends StatelessWidget {
withScrolling: true, withScrolling: true,
child: Column( child: Column(
children: [ children: [
ListTile(
leading: CircleAvatar(
foregroundColor: Theme.of(context).primaryColor,
backgroundColor: Theme.of(context).secondaryHeaderColor,
child: Icon(Icons.account_box_outlined),
),
title: Text(L10n.of(context).yourUserId),
subtitle: Text(Matrix.of(context).client.userID),
trailing: Icon(Icons.copy_outlined),
onTap: () => FluffyShare.share(
Matrix.of(context).client.userID,
context,
),
),
Divider(height: 1),
ListTile( ListTile(
trailing: Icon(Icons.add_box_outlined), trailing: Icon(Icons.add_box_outlined),
title: Text(L10n.of(context).addAccount), title: Text(L10n.of(context).addAccount),
@ -51,6 +67,7 @@ class SettingsAccountView extends StatelessWidget {
title: Text(L10n.of(context).logout), title: Text(L10n.of(context).logout),
onTap: controller.logoutAction, onTap: controller.logoutAction,
), ),
Divider(height: 1),
ListTile( ListTile(
trailing: Icon(Icons.delete_forever_outlined), trailing: Icon(Icons.delete_forever_outlined),
title: Text( title: Text(