chore: Add privacy informations to app
This commit is contained in:
parent
b6d2ddaf7d
commit
e569be7c07
|
@ -1,4 +1,9 @@
|
||||||
abstract class AppConfig {
|
abstract class AppConfig {
|
||||||
static const String applicationName = 'FluffyChat';
|
static const String applicationName = 'FluffyChat';
|
||||||
static const String defaultHomeserver = 'matrix.tchncs.de';
|
static const String defaultHomeserver = 'matrix.tchncs.de';
|
||||||
|
static const String privacyUrl = 'https://fluffychat.im/en/privacy.html';
|
||||||
|
static const String sourceCodeUrl =
|
||||||
|
'https://gitlab.com/ChristianPauly/fluffychat-flutter';
|
||||||
|
static const String supportUrl =
|
||||||
|
'https://gitlab.com/ChristianPauly/fluffychat-flutter/issues';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1059,6 +1059,11 @@
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
|
"privacy": "Privacy",
|
||||||
|
"@privacy": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
"publicRooms": "Public Rooms",
|
"publicRooms": "Public Rooms",
|
||||||
"@publicRooms": {
|
"@publicRooms": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
|
|
@ -3,11 +3,12 @@ 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/config/app_config.dart';
|
||||||
|
import 'package:flutter_gen/gen_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';
|
||||||
import 'package:fluffychat/views/sign_up.dart';
|
import 'package:fluffychat/views/sign_up.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
class HomeserverPicker extends StatelessWidget {
|
class HomeserverPicker extends StatelessWidget {
|
||||||
Future<void> _setHomeserverAction(BuildContext context) async {
|
Future<void> _setHomeserverAction(BuildContext context) async {
|
||||||
|
@ -54,7 +55,21 @@ class HomeserverPicker extends StatelessWidget {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Hero(
|
Hero(
|
||||||
tag: 'loginBanner',
|
tag: 'loginBanner',
|
||||||
child: Image.asset('assets/fluffychat-banner.png'),
|
child: InkWell(
|
||||||
|
onTap: () => showAboutDialog(
|
||||||
|
context: context,
|
||||||
|
children: [
|
||||||
|
RaisedButton(
|
||||||
|
child: Text(L10n.of(context).privacy),
|
||||||
|
onPressed: () => launch(AppConfig.privacyUrl),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
applicationIcon:
|
||||||
|
Image.asset('assets/logo.png', width: 100, height: 100),
|
||||||
|
applicationName: AppConfig.applicationName,
|
||||||
|
),
|
||||||
|
child: Image.asset('assets/fluffychat-banner.png'),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
@ -91,15 +106,12 @@ class HomeserverPicker extends StatelessWidget {
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.only(left: 16.0, right: 16.0, top: 16.0),
|
const EdgeInsets.only(left: 16.0, right: 16.0, top: 16.0),
|
||||||
child: Opacity(
|
child: Text(
|
||||||
opacity: 0.75,
|
L10n.of(context).byDefaultYouWillBeConnectedTo(
|
||||||
child: Text(
|
AppConfig.defaultHomeserver),
|
||||||
L10n.of(context).byDefaultYouWillBeConnectedTo(
|
textAlign: TextAlign.center,
|
||||||
AppConfig.defaultHomeserver),
|
style: TextStyle(
|
||||||
textAlign: TextAlign.center,
|
fontSize: 16,
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -544,8 +544,12 @@ class _SettingsState extends State<Settings> {
|
||||||
ListTile(
|
ListTile(
|
||||||
trailing: Icon(Icons.help),
|
trailing: Icon(Icons.help),
|
||||||
title: Text(L10n.of(context).help),
|
title: Text(L10n.of(context).help),
|
||||||
onTap: () => launch(
|
onTap: () => launch(AppConfig.supportUrl),
|
||||||
'https://gitlab.com/ChristianPauly/fluffychat-flutter/issues'),
|
),
|
||||||
|
ListTile(
|
||||||
|
trailing: Icon(Icons.privacy_tip_rounded),
|
||||||
|
title: Text(L10n.of(context).privacy),
|
||||||
|
onTap: () => launch(AppConfig.privacyUrl),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
trailing: Icon(Icons.link),
|
trailing: Icon(Icons.link),
|
||||||
|
@ -560,8 +564,7 @@ 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: () => launch(AppConfig.sourceCodeUrl),
|
||||||
'https://gitlab.com/ChristianPauly/fluffychat-flutter'),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -1053,5 +1053,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.2"
|
version: "0.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.10.0-110 <=2.11.0-161.0.dev"
|
dart: ">=2.10.0-110 <2.11.0"
|
||||||
flutter: ">=1.20.0 <2.0.0"
|
flutter: ">=1.20.0 <2.0.0"
|
||||||
|
|
Loading…
Reference in a new issue