Skip to content

Commit

Permalink
Updated distrust instruction on Android, added a feedback button.
Browse files Browse the repository at this point in the history
  • Loading branch information
certaintls committed Dec 7, 2020
1 parent fb8f30f commit 2023382
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 34 deletions.
10 changes: 5 additions & 5 deletions lib/certificate_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ class CertificateDetail extends StatelessWidget {
builder: (_) => AlertDialog(
title: Text('Disable ' + getTitle(cert.data) + '?'),
content: Text(Platform.isAndroid
? 'Disabling certificate on Android through third party is not supported by the system.\n\n'
'However, CertainTLS cannot detect if you have disabled any certificates on Android.'
: 'Confirm?'),
? 'On the next screen, scroll to the "${getTitle(cert.data)}" certificate and disable it.'
: 'Confirm'),
actions: [
FlatButton(
onPressed: () => {Navigator.pop(ctx)}, child: Text('No')),
FlatButton(onPressed: () => _distrust(ctx), child: Text('Yes'))
onPressed: () => {Navigator.pop(ctx)},
child: Text('Cancel')),
FlatButton(onPressed: () => _distrust(ctx), child: Text('OK'))
],
),
barrierDismissible: false);
Expand Down
19 changes: 17 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ class _MyAppState extends State<MyApp> {
actions: <Widget>[
IconButton(
icon: Icon(Icons.settings),
onPressed: () => _showAboutDialog(context))
onPressed: () => _showAboutDialog(context)),
FlatButton(
textColor: Colors.white,
onPressed: () => _contactUs(),
child: Text("Feedback"),
shape: CircleBorder(side: BorderSide(color: Colors.transparent)),
)
],
),
body: bodies[_selectedIndex],
Expand Down Expand Up @@ -111,7 +117,7 @@ class _MyAppState extends State<MyApp> {
return StatefulBuilder(builder: (context, setState) {
String userName = prefs.getString('user_name');
return AboutDialog(
applicationVersion: '1.4.2',
applicationVersion: '1.4.3',
applicationIcon: Image.asset('images/logo.png'),
children: [
Text(
Expand Down Expand Up @@ -169,6 +175,15 @@ class _MyAppState extends State<MyApp> {
throw 'Could not launch $url';
}
}

void _contactUs() async {
const url = 'https://certaintls.app/contact/certaintls_app_feedback';
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
}

class DeviceCerts extends StatelessWidget {
Expand Down
52 changes: 26 additions & 26 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0-nullsafety.3"
basic_utils:
dependency: "direct main"
description:
Expand All @@ -56,21 +56,21 @@ packages:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0-nullsafety.3"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0-nullsafety.5"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0-nullsafety.3"
cli_util:
dependency: transitive
description:
Expand All @@ -84,14 +84,14 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0-nullsafety.3"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0-nullsafety.5"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -126,7 +126,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0-nullsafety.3"
faker:
dependency: "direct main"
description:
Expand Down Expand Up @@ -225,7 +225,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.1"
version: "0.6.3-nullsafety.3"
json_annotation:
dependency: transitive
description:
Expand Down Expand Up @@ -253,14 +253,14 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10-nullsafety.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.4"
version: "1.3.0-nullsafety.6"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -316,7 +316,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
version: "1.8.0-nullsafety.3"
path_provider_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -344,7 +344,7 @@ packages:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.3"
pem:
dependency: "direct main"
description:
Expand Down Expand Up @@ -386,7 +386,7 @@ packages:
name: pool
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.0-nullsafety.1"
version: "1.5.0-nullsafety.3"
process:
dependency: transitive
description:
Expand Down Expand Up @@ -489,77 +489,77 @@ packages:
name: source_map_stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.2"
version: "2.1.0-nullsafety.4"
source_maps:
dependency: transitive
description:
name: source_maps
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.10-nullsafety.1"
version: "0.10.10-nullsafety.3"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.0-nullsafety.4"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.2"
version: "1.10.0-nullsafety.6"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0-nullsafety.3"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0-nullsafety.3"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0-nullsafety.3"
test:
dependency: "direct dev"
description:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0-nullsafety.5"
version: "1.16.0-nullsafety.12"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19-nullsafety.6"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.12-nullsafety.5"
version: "0.3.12-nullsafety.11"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.5"
url_launcher:
dependency: "direct main"
description:
Expand Down Expand Up @@ -608,7 +608,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0-nullsafety.5"
vm_service:
dependency: transitive
description:
Expand Down Expand Up @@ -659,5 +659,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0-110 <=2.11.0-213.0.dev"
dart: ">=2.12.0-0.0 <3.0.0"
flutter: ">=1.22.0 <2.0.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: A new Flutter project.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.4.2+8
version: 1.4.3+9

environment:
sdk: ">=2.2.0 <3.0.0"
Expand Down

0 comments on commit 2023382

Please sign in to comment.