feat: Implement sentry

This commit is contained in:
Christian Pauly 2020-09-08 10:55:32 +02:00
parent a16e258737
commit 705ced844b
14 changed files with 625 additions and 6 deletions

View File

@ -1 +1 @@
14bfb9c7e87ce172994e49cbda14b122 9cd9a74565170b55c5402198d76f5fb8

View File

@ -87,6 +87,9 @@ PODS:
- Flutter - Flutter
- flutter_local_notifications (0.0.1): - flutter_local_notifications (0.0.1):
- Flutter - Flutter
- flutter_olm (0.0.1):
- Flutter
- OLMKit
- flutter_plugin_android_lifecycle (0.0.1): - flutter_plugin_android_lifecycle (0.0.1):
- Flutter - Flutter
- flutter_secure_storage (3.3.1): - flutter_secure_storage (3.3.1):
@ -130,6 +133,13 @@ PODS:
- nanopb/encode (= 1.30906.0) - nanopb/encode (= 1.30906.0)
- nanopb/decode (1.30906.0) - nanopb/decode (1.30906.0)
- nanopb/encode (1.30906.0) - nanopb/encode (1.30906.0)
- native_imaging (0.0.1):
- Flutter
- OLMKit (3.1.0):
- OLMKit/olmc (= 3.1.0)
- OLMKit/olmcpp (= 3.1.0)
- OLMKit/olmc (3.1.0)
- OLMKit/olmcpp (3.1.0)
- open_file (0.0.1): - open_file (0.0.1):
- Flutter - Flutter
- path_provider (0.0.1): - path_provider (0.0.1):
@ -175,10 +185,12 @@ DEPENDENCIES:
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_olm (from `.symlinks/plugins/flutter_olm/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`) - flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- flutter_sound (from `.symlinks/plugins/flutter_sound/ios`) - flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`) - image_picker (from `.symlinks/plugins/image_picker/ios`)
- native_imaging (from `.symlinks/plugins/native_imaging/ios`)
- open_file (from `.symlinks/plugins/open_file/ios`) - open_file (from `.symlinks/plugins/open_file/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
@ -210,6 +222,7 @@ SPEC REPOS:
- GoogleDataTransport - GoogleDataTransport
- GoogleUtilities - GoogleUtilities
- nanopb - nanopb
- OLMKit
- PromisesObjC - PromisesObjC
- Protobuf - Protobuf
- SDWebImage - SDWebImage
@ -227,6 +240,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios" :path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
flutter_local_notifications: flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios" :path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_olm:
:path: ".symlinks/plugins/flutter_olm/ios"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios" :path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
flutter_secure_storage: flutter_secure_storage:
@ -235,6 +250,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_sound/ios" :path: ".symlinks/plugins/flutter_sound/ios"
image_picker: image_picker:
:path: ".symlinks/plugins/image_picker/ios" :path: ".symlinks/plugins/image_picker/ios"
native_imaging:
:path: ".symlinks/plugins/native_imaging/ios"
open_file: open_file:
:path: ".symlinks/plugins/open_file/ios" :path: ".symlinks/plugins/open_file/ios"
path_provider: path_provider:
@ -276,6 +293,7 @@ SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186 flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186
flutter_olm: be36ebeb6388f7d7b3097d39feaf459a3cad2091
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35 flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec
flutter_sound: 0e8163ceac1e00eb6d894e2ae4641ba726a2c479 flutter_sound: 0e8163ceac1e00eb6d894e2ae4641ba726a2c479
@ -285,6 +303,8 @@ SPEC CHECKSUMS:
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
native_imaging: 633687fc14422729cc67ed80c3435e359ef7a92b
OLMKit: 4ee0159d63feeb86d836fdcfefe418e163511639
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4

View File

@ -2,6 +2,7 @@ import 'package:fluffychat/l10n/l10n.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:famedlysdk/famedlysdk.dart'; import 'package:famedlysdk/famedlysdk.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:matrix_link_text/link_text.dart';
class SimpleDialogs { class SimpleDialogs {
final BuildContext context; final BuildContext context;
@ -84,7 +85,7 @@ class SimpleDialogs {
context: context, context: context,
builder: (c) => AlertDialog( builder: (c) => AlertDialog(
title: Text(titleText ?? L10n.of(context).areYouSure), title: Text(titleText ?? L10n.of(context).areYouSure),
content: contentText != null ? Text(contentText) : null, content: contentText != null ? LinkText(text: contentText) : null,
actions: <Widget>[ actions: <Widget>[
FlatButton( FlatButton(
child: Text( child: Text(

View File

@ -1,5 +1,5 @@
{ {
"@@last_modified": "2020-08-16T12:43:17.825046", "@@last_modified": "2020-09-09T13:52:07.398547",
"About": "About", "About": "About",
"@About": { "@About": {
"type": "text", "type": "text",
@ -1151,6 +1151,26 @@
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}
}, },
"Allow sending bug reports with sentry.io": "Allow sending bug reports with sentry.io",
"@Allow sending bug reports with sentry.io": {
"type": "text",
"placeholders": {}
},
"Informations about your privacy: https://sentry.io/security/": "Informations about your privacy: https://sentry.io/security/",
"@Informations about your privacy: https://sentry.io/security/": {
"type": "text",
"placeholders": {}
},
"Changes have been saved": "Changes have been saved",
"@Changes have been saved": {
"type": "text",
"placeholders": {}
},
"No": "No",
"@No": {
"type": "text",
"placeholders": {}
},
"seenByUser": "Seen by {username}", "seenByUser": "Seen by {username}",
"@seenByUser": { "@seenByUser": {
"type": "text", "type": "text",

View File

@ -712,6 +712,16 @@ class L10n extends MatrixLocalizations {
String get lastSeenLongTimeAgo => Intl.message('Seen a long time ago'); String get lastSeenLongTimeAgo => Intl.message('Seen a long time ago');
String get sendBugReports =>
Intl.message('Allow sending bug reports with sentry.io');
String get sentryInfo => Intl.message(
'Informations about your privacy: https://sentry.io/security/');
String get changesHaveBeenSaved => Intl.message('Changes have been saved');
String get no => Intl.message('No');
String seenByUser(String username) => Intl.message( String seenByUser(String username) => Intl.message(
"Seen by $username", "Seen by $username",
name: "seenByUser", name: "seenByUser",

View File

@ -18,6 +18,7 @@ import 'package:intl/src/intl_helpers.dart';
import 'messages_cs.dart' as messages_cs; import 'messages_cs.dart' as messages_cs;
import 'messages_de.dart' as messages_de; import 'messages_de.dart' as messages_de;
import 'messages_es.dart' as messages_es; import 'messages_es.dart' as messages_es;
import 'messages_et.dart' as messages_et;
import 'messages_fr.dart' as messages_fr; import 'messages_fr.dart' as messages_fr;
import 'messages_gl.dart' as messages_gl; import 'messages_gl.dart' as messages_gl;
import 'messages_hr.dart' as messages_hr; import 'messages_hr.dart' as messages_hr;
@ -37,6 +38,7 @@ Map<String, LibraryLoader> _deferredLibraries = {
'cs': () => new Future.value(null), 'cs': () => new Future.value(null),
'de': () => new Future.value(null), 'de': () => new Future.value(null),
'es': () => new Future.value(null), 'es': () => new Future.value(null),
'et': () => new Future.value(null),
'fr': () => new Future.value(null), 'fr': () => new Future.value(null),
'gl': () => new Future.value(null), 'gl': () => new Future.value(null),
'hr': () => new Future.value(null), 'hr': () => new Future.value(null),
@ -60,6 +62,8 @@ MessageLookupByLibrary _findExact(String localeName) {
return messages_de.messages; return messages_de.messages;
case 'es': case 'es':
return messages_es.messages; return messages_es.messages;
case 'et':
return messages_et.messages;
case 'fr': case 'fr':
return messages_fr.messages; return messages_fr.messages;
case 'gl': case 'gl':

477
lib/l10n/messages_et.dart Normal file
View File

@ -0,0 +1,477 @@
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that provides messages for a et locale. All the
// messages from the main program should be duplicated here with the same
// function name.
// Ignore issues from commonly used lints in this file.
// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
// ignore_for_file:unused_import, file_names
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
final messages = new MessageLookup();
typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'et';
static m0(username) => "";
static m1(username) => "";
static m2(senderName) => "";
static m3(username) => "";
static m4(username, targetName) => "";
static m5(homeserver) => "";
static m6(username) => "";
static m7(username, description) => "";
static m8(username, chatname) => "";
static m9(username) => "";
static m10(username, displayname) => "";
static m11(username) => "";
static m12(username, rules) => "";
static m13(username) => "";
static m14(username, rules) => "";
static m15(username) => "";
static m16(username, joinRules) => "";
static m17(username) => "";
static m18(username) => "";
static m19(username) => "";
static m20(error) => "";
static m21(count) => "";
static m22(username) => "";
static m23(date, timeOfDay) => "";
static m24(year, month, day) => "";
static m25(month, day) => "";
static m26(senderName) => "";
static m27(displayname) => "";
static m28(username, targetName) => "";
static m29(groupName) => "";
static m30(username, link) => "";
static m31(username, targetName) => "";
static m32(username) => "";
static m33(username, targetName) => "";
static m34(username, targetName) => "";
static m35(localizedTimeShort) => "";
static m36(count) => "";
static m37(homeserver) => "";
static m38(number) => "";
static m39(fileName) => "";
static m40(username) => "";
static m41(username) => "";
static m42(username) => "";
static m43(username) => "";
static m44(username, count) => "";
static m45(username, username2) => "";
static m46(username) => "";
static m47(username) => "";
static m48(username) => "";
static m49(username) => "";
static m50(username) => "";
static m51(senderName) => "";
static m52(username) => "";
static m53(senderName) => "";
static m54(hours12, hours24, minutes, suffix) => "";
static m55(username, targetName) => "";
static m56(type) => "";
static m57(unreadCount) => "";
static m58(unreadEvents) => "";
static m59(unreadEvents, unreadChats) => "";
static m60(username, count) => "";
static m61(username, username2) => "";
static m62(username) => "";
static m63(username) => "";
static m64(username, type) => "";
final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function>{
"(Optional) Group name": MessageLookupByLibrary.simpleMessage(""),
"About": MessageLookupByLibrary.simpleMessage(""),
"Accept": MessageLookupByLibrary.simpleMessage(""),
"Account": MessageLookupByLibrary.simpleMessage(""),
"Account informations": MessageLookupByLibrary.simpleMessage(""),
"Add a group description": MessageLookupByLibrary.simpleMessage(""),
"Admin": MessageLookupByLibrary.simpleMessage(""),
"Already have an account?": MessageLookupByLibrary.simpleMessage(""),
"Anyone can join": MessageLookupByLibrary.simpleMessage(""),
"Archive": MessageLookupByLibrary.simpleMessage(""),
"Archived Room": MessageLookupByLibrary.simpleMessage(""),
"Are guest users allowed to join":
MessageLookupByLibrary.simpleMessage(""),
"Are you sure?": MessageLookupByLibrary.simpleMessage(""),
"Authentication": MessageLookupByLibrary.simpleMessage(""),
"Avatar has been changed": MessageLookupByLibrary.simpleMessage(""),
"Ban from chat": MessageLookupByLibrary.simpleMessage(""),
"Banned": MessageLookupByLibrary.simpleMessage(""),
"Block Device": MessageLookupByLibrary.simpleMessage(""),
"Cancel": MessageLookupByLibrary.simpleMessage(""),
"Change the homeserver": MessageLookupByLibrary.simpleMessage(""),
"Change the name of the group":
MessageLookupByLibrary.simpleMessage(""),
"Change the server": MessageLookupByLibrary.simpleMessage(""),
"Change wallpaper": MessageLookupByLibrary.simpleMessage(""),
"Change your style": MessageLookupByLibrary.simpleMessage(""),
"Changelog": MessageLookupByLibrary.simpleMessage(""),
"Chat": MessageLookupByLibrary.simpleMessage(""),
"Chat details": MessageLookupByLibrary.simpleMessage(""),
"Choose a strong password": MessageLookupByLibrary.simpleMessage(""),
"Choose a username": MessageLookupByLibrary.simpleMessage(""),
"Close": MessageLookupByLibrary.simpleMessage(""),
"Confirm": MessageLookupByLibrary.simpleMessage(""),
"Connect": MessageLookupByLibrary.simpleMessage(""),
"Connection attempt failed": MessageLookupByLibrary.simpleMessage(""),
"Contact has been invited to the group":
MessageLookupByLibrary.simpleMessage(""),
"Content viewer": MessageLookupByLibrary.simpleMessage(""),
"Copied to clipboard": MessageLookupByLibrary.simpleMessage(""),
"Copy": MessageLookupByLibrary.simpleMessage(""),
"Could not set avatar": MessageLookupByLibrary.simpleMessage(""),
"Could not set displayname": MessageLookupByLibrary.simpleMessage(""),
"Create": MessageLookupByLibrary.simpleMessage(""),
"Create account now": MessageLookupByLibrary.simpleMessage(""),
"Create new group": MessageLookupByLibrary.simpleMessage(""),
"Currently active": MessageLookupByLibrary.simpleMessage(""),
"Dark": MessageLookupByLibrary.simpleMessage(""),
"Delete": MessageLookupByLibrary.simpleMessage(""),
"Delete message": MessageLookupByLibrary.simpleMessage(""),
"Deny": MessageLookupByLibrary.simpleMessage(""),
"Device": MessageLookupByLibrary.simpleMessage(""),
"Devices": MessageLookupByLibrary.simpleMessage(""),
"Discard picture": MessageLookupByLibrary.simpleMessage(""),
"Displayname has been changed":
MessageLookupByLibrary.simpleMessage(""),
"Donate": MessageLookupByLibrary.simpleMessage(""),
"Download file": MessageLookupByLibrary.simpleMessage(""),
"Edit Jitsi instance": MessageLookupByLibrary.simpleMessage(""),
"Edit displayname": MessageLookupByLibrary.simpleMessage(""),
"Emote Settings": MessageLookupByLibrary.simpleMessage(""),
"Emote shortcode": MessageLookupByLibrary.simpleMessage(""),
"Empty chat": MessageLookupByLibrary.simpleMessage(""),
"Encryption": MessageLookupByLibrary.simpleMessage(""),
"Encryption algorithm": MessageLookupByLibrary.simpleMessage(""),
"Encryption is not enabled": MessageLookupByLibrary.simpleMessage(""),
"End to end encryption is currently in Beta! Use at your own risk!":
MessageLookupByLibrary.simpleMessage(""),
"End-to-end encryption settings":
MessageLookupByLibrary.simpleMessage(""),
"Enter a group name": MessageLookupByLibrary.simpleMessage(""),
"Enter a username": MessageLookupByLibrary.simpleMessage(""),
"Enter your homeserver": MessageLookupByLibrary.simpleMessage(""),
"File name": MessageLookupByLibrary.simpleMessage(""),
"File size": MessageLookupByLibrary.simpleMessage(""),
"FluffyChat": MessageLookupByLibrary.simpleMessage(""),
"Forward": MessageLookupByLibrary.simpleMessage(""),
"Friday": MessageLookupByLibrary.simpleMessage(""),
"From joining": MessageLookupByLibrary.simpleMessage(""),
"From the invitation": MessageLookupByLibrary.simpleMessage(""),
"Group": MessageLookupByLibrary.simpleMessage(""),
"Group description": MessageLookupByLibrary.simpleMessage(""),
"Group description has been changed":
MessageLookupByLibrary.simpleMessage(""),
"Group is public": MessageLookupByLibrary.simpleMessage(""),
"Guests are forbidden": MessageLookupByLibrary.simpleMessage(""),
"Guests can join": MessageLookupByLibrary.simpleMessage(""),
"Help": MessageLookupByLibrary.simpleMessage(""),
"Homeserver is not compatible":
MessageLookupByLibrary.simpleMessage(""),
"How are you today?": MessageLookupByLibrary.simpleMessage(""),
"ID": MessageLookupByLibrary.simpleMessage(""),
"Identity": MessageLookupByLibrary.simpleMessage(""),
"Invite contact": MessageLookupByLibrary.simpleMessage(""),
"Invited": MessageLookupByLibrary.simpleMessage(""),
"Invited users only": MessageLookupByLibrary.simpleMessage(""),
"It seems that you have no google services on your phone. That\'s a good decision for your privacy! To receive push notifications in FluffyChat we recommend using microG: https://microg.org/":
MessageLookupByLibrary.simpleMessage(""),
"Join room": MessageLookupByLibrary.simpleMessage(""),
"Kick from chat": MessageLookupByLibrary.simpleMessage(""),
"Last seen IP": MessageLookupByLibrary.simpleMessage(""),
"Leave": MessageLookupByLibrary.simpleMessage(""),
"Left the chat": MessageLookupByLibrary.simpleMessage(""),
"License": MessageLookupByLibrary.simpleMessage(""),
"Light": MessageLookupByLibrary.simpleMessage(""),
"Load more...": MessageLookupByLibrary.simpleMessage(""),
"Loading... Please wait": MessageLookupByLibrary.simpleMessage(""),
"Login": MessageLookupByLibrary.simpleMessage(""),
"Logout": MessageLookupByLibrary.simpleMessage(""),
"Make a moderator": MessageLookupByLibrary.simpleMessage(""),
"Make an admin": MessageLookupByLibrary.simpleMessage(""),
"Make sure the identifier is valid":
MessageLookupByLibrary.simpleMessage(""),
"Message will be removed for all participants":
MessageLookupByLibrary.simpleMessage(""),
"Moderator": MessageLookupByLibrary.simpleMessage(""),
"Monday": MessageLookupByLibrary.simpleMessage(""),
"Mute chat": MessageLookupByLibrary.simpleMessage(""),
"New message in FluffyChat": MessageLookupByLibrary.simpleMessage(""),
"New private chat": MessageLookupByLibrary.simpleMessage(""),
"No emotes found. 😕": MessageLookupByLibrary.simpleMessage(""),
"No permission": MessageLookupByLibrary.simpleMessage(""),
"No rooms found...": MessageLookupByLibrary.simpleMessage(""),
"None": MessageLookupByLibrary.simpleMessage(""),
"Not supported in web": MessageLookupByLibrary.simpleMessage(""),
"Oops something went wrong...":
MessageLookupByLibrary.simpleMessage(""),
"Open app to read messages": MessageLookupByLibrary.simpleMessage(""),
"Open camera": MessageLookupByLibrary.simpleMessage(""),
"Participating user devices": MessageLookupByLibrary.simpleMessage(""),
"Password": MessageLookupByLibrary.simpleMessage(""),
"Pick image": MessageLookupByLibrary.simpleMessage(""),
"Pin": MessageLookupByLibrary.simpleMessage(""),
"Please be aware that you need Pantalaimon to use end-to-end encryption for now.":
MessageLookupByLibrary.simpleMessage(""),
"Please choose a username": MessageLookupByLibrary.simpleMessage(""),
"Please enter a matrix identifier":
MessageLookupByLibrary.simpleMessage(""),
"Please enter your password": MessageLookupByLibrary.simpleMessage(""),
"Please enter your username": MessageLookupByLibrary.simpleMessage(""),
"Public Rooms": MessageLookupByLibrary.simpleMessage(""),
"Recording": MessageLookupByLibrary.simpleMessage(""),
"Reject": MessageLookupByLibrary.simpleMessage(""),
"Rejoin": MessageLookupByLibrary.simpleMessage(""),
"Remove": MessageLookupByLibrary.simpleMessage(""),
"Remove all other devices": MessageLookupByLibrary.simpleMessage(""),
"Remove device": MessageLookupByLibrary.simpleMessage(""),
"Remove exile": MessageLookupByLibrary.simpleMessage(""),
"Remove message": MessageLookupByLibrary.simpleMessage(""),
"Render rich message content": MessageLookupByLibrary.simpleMessage(""),
"Reply": MessageLookupByLibrary.simpleMessage(""),
"Request permission": MessageLookupByLibrary.simpleMessage(""),
"Request to read older messages":
MessageLookupByLibrary.simpleMessage(""),
"Revoke all permissions": MessageLookupByLibrary.simpleMessage(""),
"Room has been upgraded": MessageLookupByLibrary.simpleMessage(""),
"Saturday": MessageLookupByLibrary.simpleMessage(""),
"Search for a chat": MessageLookupByLibrary.simpleMessage(""),
"Seen a long time ago": MessageLookupByLibrary.simpleMessage(""),
"Send": MessageLookupByLibrary.simpleMessage(""),
"Send a message": MessageLookupByLibrary.simpleMessage(""),
"Send file": MessageLookupByLibrary.simpleMessage(""),
"Send image": MessageLookupByLibrary.simpleMessage(""),
"Set a profile picture": MessageLookupByLibrary.simpleMessage(""),
"Set group description": MessageLookupByLibrary.simpleMessage(""),
"Set invitation link": MessageLookupByLibrary.simpleMessage(""),
"Set status": MessageLookupByLibrary.simpleMessage(""),
"Settings": MessageLookupByLibrary.simpleMessage(""),
"Share": MessageLookupByLibrary.simpleMessage(""),
"Sign up": MessageLookupByLibrary.simpleMessage(""),
"Skip": MessageLookupByLibrary.simpleMessage(""),
"Source code": MessageLookupByLibrary.simpleMessage(""),
"Start your first chat :-)": MessageLookupByLibrary.simpleMessage(""),
"Submit": MessageLookupByLibrary.simpleMessage(""),
"Sunday": MessageLookupByLibrary.simpleMessage(""),
"System": MessageLookupByLibrary.simpleMessage(""),
"Tap to show menu": MessageLookupByLibrary.simpleMessage(""),
"The encryption has been corrupted":
MessageLookupByLibrary.simpleMessage(""),
"They Don\'t Match": MessageLookupByLibrary.simpleMessage(""),
"They Match": MessageLookupByLibrary.simpleMessage(""),
"This room has been archived.":
MessageLookupByLibrary.simpleMessage(""),
"Thursday": MessageLookupByLibrary.simpleMessage(""),
"Try to send again": MessageLookupByLibrary.simpleMessage(""),
"Tuesday": MessageLookupByLibrary.simpleMessage(""),
"Unblock Device": MessageLookupByLibrary.simpleMessage(""),
"Unknown device": MessageLookupByLibrary.simpleMessage(""),
"Unknown encryption algorithm":
MessageLookupByLibrary.simpleMessage(""),
"Unmute chat": MessageLookupByLibrary.simpleMessage(""),
"Unpin": MessageLookupByLibrary.simpleMessage(""),
"Use Amoled compatible colors?":
MessageLookupByLibrary.simpleMessage(""),
"Username": MessageLookupByLibrary.simpleMessage(""),
"Verify": MessageLookupByLibrary.simpleMessage(""),
"Verify User": MessageLookupByLibrary.simpleMessage(""),
"Video call": MessageLookupByLibrary.simpleMessage(""),
"Visibility of the chat history":
MessageLookupByLibrary.simpleMessage(""),
"Visible for all participants":
MessageLookupByLibrary.simpleMessage(""),
"Visible for everyone": MessageLookupByLibrary.simpleMessage(""),
"Voice message": MessageLookupByLibrary.simpleMessage(""),
"Wallpaper": MessageLookupByLibrary.simpleMessage(""),
"Wednesday": MessageLookupByLibrary.simpleMessage(""),
"Welcome to the cutest instant messenger in the matrix network.":
MessageLookupByLibrary.simpleMessage(""),
"Who is allowed to join this group":
MessageLookupByLibrary.simpleMessage(""),
"Write a message...": MessageLookupByLibrary.simpleMessage(""),
"Yes": MessageLookupByLibrary.simpleMessage(""),
"You": MessageLookupByLibrary.simpleMessage(""),
"You are invited to this chat":
MessageLookupByLibrary.simpleMessage(""),
"You are no longer participating in this chat":
MessageLookupByLibrary.simpleMessage(""),
"You cannot invite yourself": MessageLookupByLibrary.simpleMessage(""),
"You have been banned from this chat":
MessageLookupByLibrary.simpleMessage(""),
"You won\'t be able to disable the encryption anymore. Are you sure?":
MessageLookupByLibrary.simpleMessage(""),
"Your own username": MessageLookupByLibrary.simpleMessage(""),
"acceptedTheInvitation": m0,
"activatedEndToEndEncryption": m1,
"alias": MessageLookupByLibrary.simpleMessage(""),
"answeredTheCall": m2,
"askSSSSCache": MessageLookupByLibrary.simpleMessage(""),
"askSSSSSign": MessageLookupByLibrary.simpleMessage(""),
"askSSSSVerify": MessageLookupByLibrary.simpleMessage(""),
"askVerificationRequest": m3,
"bannedUser": m4,
"byDefaultYouWillBeConnectedTo": m5,
"cachedKeys": MessageLookupByLibrary.simpleMessage(""),
"changedTheChatAvatar": m6,
"changedTheChatDescriptionTo": m7,
"changedTheChatNameTo": m8,
"changedTheChatPermissions": m9,
"changedTheDisplaynameTo": m10,
"changedTheGuestAccessRules": m11,
"changedTheGuestAccessRulesTo": m12,
"changedTheHistoryVisibility": m13,
"changedTheHistoryVisibilityTo": m14,
"changedTheJoinRules": m15,
"changedTheJoinRulesTo": m16,
"changedTheProfileAvatar": m17,
"changedTheRoomAliases": m18,
"changedTheRoomInvitationLink": m19,
"compareEmojiMatch": MessageLookupByLibrary.simpleMessage(""),
"compareNumbersMatch": MessageLookupByLibrary.simpleMessage(""),
"couldNotDecryptMessage": m20,
"countParticipants": m21,
"createdTheChat": m22,
"crossSigningDisabled": MessageLookupByLibrary.simpleMessage(""),
"crossSigningEnabled": MessageLookupByLibrary.simpleMessage(""),
"dateAndTimeOfDay": m23,
"dateWithYear": m24,
"dateWithoutYear": m25,
"emoteExists": MessageLookupByLibrary.simpleMessage(""),
"emoteInvalid": MessageLookupByLibrary.simpleMessage(""),
"emoteWarnNeedToPick": MessageLookupByLibrary.simpleMessage(""),
"endedTheCall": m26,
"groupWith": m27,
"hasWithdrawnTheInvitationFor": m28,
"incorrectPassphraseOrKey": MessageLookupByLibrary.simpleMessage(""),
"inviteContactToGroup": m29,
"inviteText": m30,
"invitedUser": m31,
"is typing...": MessageLookupByLibrary.simpleMessage(""),
"isDeviceKeyCorrect": MessageLookupByLibrary.simpleMessage(""),
"joinedTheChat": m32,
"keysCached": MessageLookupByLibrary.simpleMessage(""),
"keysMissing": MessageLookupByLibrary.simpleMessage(""),
"kicked": m33,
"kickedAndBanned": m34,
"lastActiveAgo": m35,
"loadCountMoreParticipants": m36,
"logInTo": m37,
"newVerificationRequest": MessageLookupByLibrary.simpleMessage(""),
"noCrossSignBootstrap": MessageLookupByLibrary.simpleMessage(""),
"noMegolmBootstrap": MessageLookupByLibrary.simpleMessage(""),
"numberSelected": m38,
"ok": MessageLookupByLibrary.simpleMessage(""),
"onlineKeyBackupDisabled": MessageLookupByLibrary.simpleMessage(""),
"onlineKeyBackupEnabled": MessageLookupByLibrary.simpleMessage(""),
"passphraseOrKey": MessageLookupByLibrary.simpleMessage(""),
"play": m39,
"redactedAnEvent": m40,
"rejectedTheInvitation": m41,
"removedBy": m42,
"seenByUser": m43,
"seenByUserAndCountOthers": m44,
"seenByUserAndUser": m45,
"sentAFile": m46,
"sentAPicture": m47,
"sentASticker": m48,
"sentAVideo": m49,
"sentAnAudio": m50,
"sentCallInformations": m51,
"sessionVerified": MessageLookupByLibrary.simpleMessage(""),
"sharedTheLocation": m52,
"startedACall": m53,
"timeOfDay": m54,
"title": MessageLookupByLibrary.simpleMessage(""),
"unbannedUser": m55,
"unknownEvent": m56,
"unknownSessionVerify": MessageLookupByLibrary.simpleMessage(""),
"unreadChats": m57,
"unreadMessages": m58,
"unreadMessagesInChats": m59,
"userAndOthersAreTyping": m60,
"userAndUserAreTyping": m61,
"userIsTyping": m62,
"userLeftTheChat": m63,
"userSentUnknownEvent": m64,
"verifiedSession": MessageLookupByLibrary.simpleMessage(""),
"verifyManual": MessageLookupByLibrary.simpleMessage(""),
"verifyStart": MessageLookupByLibrary.simpleMessage(""),
"verifySuccess": MessageLookupByLibrary.simpleMessage(""),
"verifyTitle": MessageLookupByLibrary.simpleMessage(""),
"waitingPartnerAcceptRequest": MessageLookupByLibrary.simpleMessage(""),
"waitingPartnerEmoji": MessageLookupByLibrary.simpleMessage(""),
"waitingPartnerNumbers": MessageLookupByLibrary.simpleMessage("")
};
}

View File

@ -174,6 +174,9 @@ class MessageLookup extends MessageLookupByLibrary {
"Add a group description": "Add a group description":
MessageLookupByLibrary.simpleMessage("Add a group description"), MessageLookupByLibrary.simpleMessage("Add a group description"),
"Admin": MessageLookupByLibrary.simpleMessage("Admin"), "Admin": MessageLookupByLibrary.simpleMessage("Admin"),
"Allow sending bug reports with sentry.io":
MessageLookupByLibrary.simpleMessage(
"Allow sending bug reports with sentry.io"),
"Already have an account?": "Already have an account?":
MessageLookupByLibrary.simpleMessage("Already have an account?"), MessageLookupByLibrary.simpleMessage("Already have an account?"),
"Anyone can join": "Anyone can join":
@ -202,6 +205,8 @@ class MessageLookup extends MessageLookupByLibrary {
"Change your style": "Change your style":
MessageLookupByLibrary.simpleMessage("Change your style"), MessageLookupByLibrary.simpleMessage("Change your style"),
"Changelog": MessageLookupByLibrary.simpleMessage("Changelog"), "Changelog": MessageLookupByLibrary.simpleMessage("Changelog"),
"Changes have been saved":
MessageLookupByLibrary.simpleMessage("Changes have been saved"),
"Chat": MessageLookupByLibrary.simpleMessage("Chat"), "Chat": MessageLookupByLibrary.simpleMessage("Chat"),
"Chat details": MessageLookupByLibrary.simpleMessage("Chat details"), "Chat details": MessageLookupByLibrary.simpleMessage("Chat details"),
"Choose a strong password": "Choose a strong password":
@ -297,6 +302,9 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("How are you today?"), MessageLookupByLibrary.simpleMessage("How are you today?"),
"ID": MessageLookupByLibrary.simpleMessage("ID"), "ID": MessageLookupByLibrary.simpleMessage("ID"),
"Identity": MessageLookupByLibrary.simpleMessage("Identity"), "Identity": MessageLookupByLibrary.simpleMessage("Identity"),
"Informations about your privacy: https://sentry.io/security/":
MessageLookupByLibrary.simpleMessage(
"Informations about your privacy: https://sentry.io/security/"),
"Invite contact": "Invite contact":
MessageLookupByLibrary.simpleMessage("Invite contact"), MessageLookupByLibrary.simpleMessage("Invite contact"),
"Invited": MessageLookupByLibrary.simpleMessage("Invited"), "Invited": MessageLookupByLibrary.simpleMessage("Invited"),
@ -334,6 +342,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("New message in FluffyChat"), MessageLookupByLibrary.simpleMessage("New message in FluffyChat"),
"New private chat": "New private chat":
MessageLookupByLibrary.simpleMessage("New private chat"), MessageLookupByLibrary.simpleMessage("New private chat"),
"No": MessageLookupByLibrary.simpleMessage("No"),
"No emotes found. 😕": "No emotes found. 😕":
MessageLookupByLibrary.simpleMessage("No emotes found. 😕"), MessageLookupByLibrary.simpleMessage("No emotes found. 😕"),
"No permission": MessageLookupByLibrary.simpleMessage("No permission"), "No permission": MessageLookupByLibrary.simpleMessage("No permission"),

View File

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'package:famedlysdk/famedlysdk.dart'; import 'package:famedlysdk/famedlysdk.dart';
@ -13,11 +14,29 @@ import 'components/theme_switcher.dart';
import 'components/matrix.dart'; import 'components/matrix.dart';
import 'views/chat_list.dart'; import 'views/chat_list.dart';
import 'package:universal_html/prefer_universal/html.dart' as html; import 'package:universal_html/prefer_universal/html.dart' as html;
import 'package:sentry/sentry.dart';
import 'package:localstorage/localstorage.dart';
final sentry = SentryClient(dsn: '8591d0d863b646feb4f3dda7e5dcab38');
void main() { void main() {
SystemChrome.setSystemUIOverlayStyle( SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent)); SystemUiOverlayStyle(statusBarColor: Colors.transparent));
runApp(App()); runZonedGuarded(
() => runApp(App()),
(error, stackTrace) async {
final storage = LocalStorage('LocalStorage');
await storage.ready;
debugPrint(error.toString());
debugPrint(stackTrace.toString());
if (storage.getItem('sentry') == true) {
await sentry.captureException(
exception: error,
stackTrace: stackTrace,
);
}
},
);
} }
class App extends StatelessWidget { class App extends StatelessWidget {

View File

@ -0,0 +1,26 @@
import 'package:bot_toast/bot_toast.dart';
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
import 'package:fluffychat/l10n/l10n.dart';
import 'package:flutter/material.dart';
import 'package:localstorage/localstorage.dart';
abstract class SentryController {
static LocalStorage storage = LocalStorage('LocalStorage');
static Future<void> toggleSentryAction(BuildContext context) async {
final enableSentry = await SimpleDialogs(context).askConfirmation(
titleText: L10n.of(context).sendBugReports,
contentText: L10n.of(context).sentryInfo,
confirmText: L10n.of(context).ok,
cancelText: L10n.of(context).no,
);
await storage.ready;
await storage.setItem('sentry', enableSentry);
BotToast.showText(text: L10n.of(context).changesHaveBeenSaved);
return;
}
static Future<bool> getSentryStatus() async {
await storage.ready;
return storage.getItem('sentry') as bool;
}
}

View File

@ -4,6 +4,7 @@ import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
import 'package:fluffychat/components/matrix.dart'; import 'package:fluffychat/components/matrix.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/views/sign_up.dart'; import 'package:fluffychat/views/sign_up.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -19,6 +20,10 @@ class HomeserverPicker extends StatelessWidget {
} }
void _checkHomeserverAction(String homeserver, BuildContext context) async { void _checkHomeserverAction(String homeserver, BuildContext context) async {
if (await SentryController.getSentryStatus() == null || true) {
await SentryController.toggleSentryAction(context);
}
if (!homeserver.startsWith('https://')) { if (!homeserver.startsWith('https://')) {
homeserver = 'https://$homeserver'; homeserver = 'https://$homeserver';
} }

View File

@ -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/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';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -341,6 +342,11 @@ class _SettingsState extends State<Settings> {
), ),
), ),
), ),
ListTile(
trailing: Icon(Icons.bug_report),
title: Text(L10n.of(context).sendBugReports),
onTap: () => SentryController.toggleSentryAction(context),
),
ListTile( ListTile(
trailing: Icon(Icons.exit_to_app), trailing: Icon(Icons.exit_to_app),
title: Text(L10n.of(context).logout), title: Text(L10n.of(context).logout),

View File

@ -248,6 +248,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.5.0" version: "0.5.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.1"
flutter_keyboard_visibility: flutter_keyboard_visibility:
dependency: transitive dependency: transitive
description: description:
@ -479,7 +486,7 @@ packages:
name: matrix_link_text name: matrix_link_text
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4" version: "0.1.5"
memoryfilepicker: memoryfilepicker:
dependency: "direct main" dependency: "direct main"
description: description:
@ -720,6 +727,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.24.1" version: "0.24.1"
sentry:
dependency: "direct main"
description:
name: sentry
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
share: share:
dependency: "direct main" dependency: "direct main"
description: description:
@ -921,6 +935,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.2" version: "0.1.2"
usage:
dependency: transitive
description:
name: usage
url: "https://pub.dartlang.org"
source: hosted
version: "3.4.2"
uuid: uuid:
dependency: transitive dependency: transitive
description: description:
@ -1000,4 +1021,4 @@ packages:
version: "0.1.2" version: "0.1.2"
sdks: sdks:
dart: ">=2.10.0-0.0.dev <2.10.0" dart: ">=2.10.0-0.0.dev <2.10.0"
flutter: ">=1.18.0-6.0.pre <2.0.0" flutter: ">=1.20.0 <2.0.0"

View File

@ -70,6 +70,7 @@ dependencies:
url: https://gitlab.com/famedly/libraries/native_imaging.git url: https://gitlab.com/famedly/libraries/native_imaging.git
ref: master ref: master
flutter_blurhash: ^0.5.0 flutter_blurhash: ^0.5.0
sentry: ">=3.0.0 <4.0.0"
dev_dependencies: dev_dependencies: