|
|
|
@ -25,6 +25,12 @@ class SettingsView extends StatelessWidget {
|
|
|
|
|
final showChatBackupBanner = controller.showChatBackupBanner;
|
|
|
|
|
final activeRoute =
|
|
|
|
|
GoRouter.of(context).routeInformationProvider.value.uri.path;
|
|
|
|
|
final accountManageUrl = Matrix.of(context)
|
|
|
|
|
.client
|
|
|
|
|
.wellKnown
|
|
|
|
|
?.additionalProperties
|
|
|
|
|
.tryGetMap<String, Object?>('org.matrix.msc2965.authentication')
|
|
|
|
|
?.tryGet<String>('account');
|
|
|
|
|
return Row(
|
|
|
|
|
children: [
|
|
|
|
|
if (FluffyThemes.isColumnMode(context)) ...[
|
|
|
|
@ -52,11 +58,7 @@ class SettingsView extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
body: ListTileTheme(
|
|
|
|
|
iconColor: theme.colorScheme.onSurface,
|
|
|
|
|
child: FutureBuilder(
|
|
|
|
|
future: controller.getOidcAccountManageUrl(),
|
|
|
|
|
builder: (context, snapshot) {
|
|
|
|
|
final accountManageUrl = snapshot.data;
|
|
|
|
|
return ListView(
|
|
|
|
|
child: ListView(
|
|
|
|
|
key: const Key('SettingsListViewContent'),
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
FutureBuilder<Profile>(
|
|
|
|
@ -100,8 +102,7 @@ class SettingsView extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
TextButton.icon(
|
|
|
|
|
onPressed:
|
|
|
|
|
controller.setDisplaynameAction,
|
|
|
|
|
onPressed: controller.setDisplaynameAction,
|
|
|
|
|
icon: const Icon(
|
|
|
|
|
Icons.edit_outlined,
|
|
|
|
|
size: 16,
|
|
|
|
@ -177,8 +178,7 @@ class SettingsView extends StatelessWidget {
|
|
|
|
|
ListTile(
|
|
|
|
|
leading: const Icon(Icons.format_paint_outlined),
|
|
|
|
|
title: Text(L10n.of(context).changeTheme),
|
|
|
|
|
tileColor:
|
|
|
|
|
activeRoute.startsWith('/rooms/settings/style')
|
|
|
|
|
tileColor: activeRoute.startsWith('/rooms/settings/style')
|
|
|
|
|
? theme.colorScheme.surfaceContainerHigh
|
|
|
|
|
: null,
|
|
|
|
|
onTap: () => context.go('/rooms/settings/style'),
|
|
|
|
@ -186,19 +186,17 @@ class SettingsView extends StatelessWidget {
|
|
|
|
|
ListTile(
|
|
|
|
|
leading: const Icon(Icons.notifications_outlined),
|
|
|
|
|
title: Text(L10n.of(context).notifications),
|
|
|
|
|
tileColor: activeRoute
|
|
|
|
|
.startsWith('/rooms/settings/notifications')
|
|
|
|
|
tileColor:
|
|
|
|
|
activeRoute.startsWith('/rooms/settings/notifications')
|
|
|
|
|
? theme.colorScheme.surfaceContainerHigh
|
|
|
|
|
: null,
|
|
|
|
|
onTap: () =>
|
|
|
|
|
context.go('/rooms/settings/notifications'),
|
|
|
|
|
onTap: () => context.go('/rooms/settings/notifications'),
|
|
|
|
|
),
|
|
|
|
|
ListTile(
|
|
|
|
|
leading: const Icon(Icons.devices_outlined),
|
|
|
|
|
title: Text(L10n.of(context).devices),
|
|
|
|
|
onTap: () => context.go('/rooms/settings/devices'),
|
|
|
|
|
tileColor:
|
|
|
|
|
activeRoute.startsWith('/rooms/settings/devices')
|
|
|
|
|
tileColor: activeRoute.startsWith('/rooms/settings/devices')
|
|
|
|
|
? theme.colorScheme.surfaceContainerHigh
|
|
|
|
|
: null,
|
|
|
|
|
),
|
|
|
|
@ -206,8 +204,7 @@ class SettingsView extends StatelessWidget {
|
|
|
|
|
leading: const Icon(Icons.forum_outlined),
|
|
|
|
|
title: Text(L10n.of(context).chat),
|
|
|
|
|
onTap: () => context.go('/rooms/settings/chat'),
|
|
|
|
|
tileColor:
|
|
|
|
|
activeRoute.startsWith('/rooms/settings/chat')
|
|
|
|
|
tileColor: activeRoute.startsWith('/rooms/settings/chat')
|
|
|
|
|
? theme.colorScheme.surfaceContainerHigh
|
|
|
|
|
: null,
|
|
|
|
|
),
|
|
|
|
@ -252,8 +249,6 @@ class SettingsView extends StatelessWidget {
|
|
|
|
|
onTap: controller.logoutAction,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|