chore: Add privacy informations to app

This commit is contained in:
Christian Pauly 2020-10-03 11:11:28 +02:00
parent b6d2ddaf7d
commit e569be7c07
5 changed files with 41 additions and 16 deletions

View file

@ -1,4 +1,9 @@
abstract class AppConfig {
static const String applicationName = 'FluffyChat';
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';
}

View file

@ -1059,6 +1059,11 @@
"type": "text",
"placeholders": {}
},
"privacy": "Privacy",
"@privacy": {
"type": "text",
"placeholders": {}
},
"publicRooms": "Public Rooms",
"@publicRooms": {
"type": "text",

View file

@ -3,11 +3,12 @@ import 'dart:math';
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
import 'package:fluffychat/components/matrix.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/sentry_controller.dart';
import 'package:fluffychat/views/sign_up.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 {
Future<void> _setHomeserverAction(BuildContext context) async {
@ -54,8 +55,22 @@ class HomeserverPicker extends StatelessWidget {
children: <Widget>[
Hero(
tag: 'loginBanner',
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: const EdgeInsets.all(16.0),
child: Text(
@ -91,8 +106,6 @@ class HomeserverPicker extends StatelessWidget {
Padding(
padding:
const EdgeInsets.only(left: 16.0, right: 16.0, top: 16.0),
child: Opacity(
opacity: 0.75,
child: Text(
L10n.of(context).byDefaultYouWillBeConnectedTo(
AppConfig.defaultHomeserver),
@ -102,7 +115,6 @@ class HomeserverPicker extends StatelessWidget {
),
),
),
),
FlatButton(
child: Text(
L10n.of(context).changeTheHomeserver,

View file

@ -544,8 +544,12 @@ class _SettingsState extends State<Settings> {
ListTile(
trailing: Icon(Icons.help),
title: Text(L10n.of(context).help),
onTap: () => launch(
'https://gitlab.com/ChristianPauly/fluffychat-flutter/issues'),
onTap: () => launch(AppConfig.supportUrl),
),
ListTile(
trailing: Icon(Icons.privacy_tip_rounded),
title: Text(L10n.of(context).privacy),
onTap: () => launch(AppConfig.privacyUrl),
),
ListTile(
trailing: Icon(Icons.link),
@ -560,8 +564,7 @@ class _SettingsState extends State<Settings> {
ListTile(
trailing: Icon(Icons.code),
title: Text(L10n.of(context).sourceCode),
onTap: () => launch(
'https://gitlab.com/ChristianPauly/fluffychat-flutter'),
onTap: () => launch(AppConfig.sourceCodeUrl),
),
],
),

View file

@ -1053,5 +1053,5 @@ packages:
source: hosted
version: "0.1.2"
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"