chore: Follow up matrix native oidc
This commit is contained in:
parent
9c49141f9e
commit
aba8c3faf2
13 changed files with 63 additions and 58 deletions
|
|
@ -2,10 +2,9 @@ import 'package:flutter/material.dart';
|
|||
|
||||
import 'package:flutter_linkify/flutter_linkify.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:fluffychat/pages/intro/flows/restore_backup_flow.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
|
|
@ -58,7 +57,7 @@ class IntroPage extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
onTap: () => launchUrl(AppConfig.privacyUrl),
|
||||
onTap: () => launchUrlString(AppSettings.privacyPolicy.value),
|
||||
child: Row(
|
||||
mainAxisSize: .min,
|
||||
children: [
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ class _IntroPagePresenterState extends State<IntroPagePresenter> {
|
|||
final client = await Matrix.of(context).getLoginClient();
|
||||
await client.checkHomeserver(homeserverUrl);
|
||||
await client.oidcLogin(session: session, code: code, state: state);
|
||||
if (context.mounted) context.go('/backup');
|
||||
} catch (e, s) {
|
||||
Logs().w('Unable to login via OIDC', e, s);
|
||||
if (mounted) {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ import 'package:flutter/material.dart';
|
|||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:fluffychat/utils/fluffy_share.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
|
|
@ -200,7 +201,7 @@ class SettingsView extends StatelessWidget {
|
|||
ListTile(
|
||||
leading: const Icon(Icons.privacy_tip_outlined),
|
||||
title: Text(L10n.of(context).privacy),
|
||||
onTap: () => launchUrl(AppConfig.privacyUrl),
|
||||
onTap: () => launchUrlString(AppSettings.privacyPolicy.value),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.info_outline_rounded),
|
||||
|
|
|
|||
|
|
@ -98,19 +98,11 @@ class SignInPage extends StatelessWidget {
|
|||
final website = server.website;
|
||||
return Semantics(
|
||||
identifier: 'homeserver_tile_$i',
|
||||
child: RadioListTile.adaptive(
|
||||
child: RadioListTile(
|
||||
value: server,
|
||||
enabled:
|
||||
state.loginLoading.connectionState !=
|
||||
ConnectionState.waiting,
|
||||
radioScaleFactor:
|
||||
FluffyThemes.isColumnMode(context) ||
|
||||
{
|
||||
TargetPlatform.iOS,
|
||||
TargetPlatform.macOS,
|
||||
}.contains(theme.platform)
|
||||
? 2
|
||||
: 1,
|
||||
title: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue