feat: Add license page
This commit is contained in:
parent
b1fb03e101
commit
dcf4c4cd00
|
@ -19,7 +19,6 @@ import '../utils/app_route.dart';
|
||||||
|
|
||||||
class Matrix extends StatefulWidget {
|
class Matrix extends StatefulWidget {
|
||||||
static const String callNamespace = 'chat.fluffy.jitsi_call';
|
static const String callNamespace = 'chat.fluffy.jitsi_call';
|
||||||
static const String defaultHomeserver = 'tchncs.de';
|
|
||||||
|
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
||||||
|
|
4
lib/config/app_config.dart
Normal file
4
lib/config/app_config.dart
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
abstract class AppConfig {
|
||||||
|
static const String applicationName = 'FluffyChat';
|
||||||
|
static const String defaultHomeserver = 'matrix.tchncs.de';
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ import 'dart:math';
|
||||||
|
|
||||||
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
|
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
|
||||||
import 'package:fluffychat/components/matrix.dart';
|
import 'package:fluffychat/components/matrix.dart';
|
||||||
|
import 'package:fluffychat/config/app_config.dart';
|
||||||
import 'package:fluffychat/l10n/l10n.dart';
|
import 'package:fluffychat/l10n/l10n.dart';
|
||||||
import 'package:fluffychat/utils/app_route.dart';
|
import 'package:fluffychat/utils/app_route.dart';
|
||||||
import 'package:fluffychat/utils/sentry_controller.dart';
|
import 'package:fluffychat/utils/sentry_controller.dart';
|
||||||
|
@ -12,7 +13,7 @@ class HomeserverPicker extends StatelessWidget {
|
||||||
Future<void> _setHomeserverAction(BuildContext context) async {
|
Future<void> _setHomeserverAction(BuildContext context) async {
|
||||||
final homeserver = await SimpleDialogs(context).enterText(
|
final homeserver = await SimpleDialogs(context).enterText(
|
||||||
titleText: L10n.of(context).enterYourHomeserver,
|
titleText: L10n.of(context).enterYourHomeserver,
|
||||||
hintText: Matrix.defaultHomeserver,
|
hintText: AppConfig.defaultHomeserver,
|
||||||
prefixText: 'https://',
|
prefixText: 'https://',
|
||||||
keyboardType: TextInputType.url);
|
keyboardType: TextInputType.url);
|
||||||
if (homeserver?.isEmpty ?? true) return;
|
if (homeserver?.isEmpty ?? true) return;
|
||||||
|
@ -83,7 +84,7 @@ class HomeserverPicker extends StatelessWidget {
|
||||||
style: TextStyle(color: Colors.white, fontSize: 16),
|
style: TextStyle(color: Colors.white, fontSize: 16),
|
||||||
),
|
),
|
||||||
onPressed: () => _checkHomeserverAction(
|
onPressed: () => _checkHomeserverAction(
|
||||||
Matrix.defaultHomeserver, context),
|
AppConfig.defaultHomeserver, context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -94,7 +95,7 @@ class HomeserverPicker extends StatelessWidget {
|
||||||
opacity: 0.75,
|
opacity: 0.75,
|
||||||
child: Text(
|
child: Text(
|
||||||
L10n.of(context).byDefaultYouWillBeConnectedTo(
|
L10n.of(context).byDefaultYouWillBeConnectedTo(
|
||||||
Matrix.defaultHomeserver),
|
AppConfig.defaultHomeserver),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:io';
|
||||||
|
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/settings_themes.dart';
|
import 'package:fluffychat/components/settings_themes.dart';
|
||||||
|
import 'package:fluffychat/config/app_config.dart';
|
||||||
import 'package:fluffychat/utils/sentry_controller.dart';
|
import 'package:fluffychat/utils/sentry_controller.dart';
|
||||||
import 'package:fluffychat/views/settings_devices.dart';
|
import 'package:fluffychat/views/settings_devices.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
@ -481,8 +482,12 @@ class _SettingsState extends State<Settings> {
|
||||||
ListTile(
|
ListTile(
|
||||||
trailing: Icon(Icons.code),
|
trailing: Icon(Icons.code),
|
||||||
title: Text(L10n.of(context).sourceCode),
|
title: Text(L10n.of(context).sourceCode),
|
||||||
onTap: () => launch(
|
onTap: () => showLicensePage(
|
||||||
'https://gitlab.com/ChristianPauly/fluffychat-flutter'),
|
context: context,
|
||||||
|
applicationIcon:
|
||||||
|
Image.asset('assets/logo.png', width: 100, height: 100),
|
||||||
|
applicationName: AppConfig.applicationName,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
37
pubspec.lock
37
pubspec.lock
|
@ -220,13 +220,41 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.1"
|
||||||
|
firebase:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "7.3.0"
|
||||||
|
firebase_core:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_core
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.5.0"
|
||||||
|
firebase_core_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_core_platform_interface
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0"
|
||||||
|
firebase_core_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_core_web
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.0"
|
||||||
firebase_messaging:
|
firebase_messaging:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: firebase_messaging
|
name: firebase_messaging
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.16"
|
version: "7.0.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -683,6 +711,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.4"
|
version: "1.4.4"
|
||||||
|
quiver:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: quiver
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.3"
|
||||||
random_string:
|
random_string:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
Loading…
Reference in a new issue