diff --git a/lib/controllers/filesharing.dart b/lib/controllers/filesharing.dart index 8696af29..cbfdaa20 100644 --- a/lib/controllers/filesharing.dart +++ b/lib/controllers/filesharing.dart @@ -4,7 +4,7 @@ import 'package:file_picker/file_picker.dart'; import 'package:flutter/widgets.dart'; import 'package:provider/provider.dart'; -void showFilePicker(BuildContext ctx, int maxBytes, Function(File) onSuccess, Function onCancel, Function onError) async { +void showFilePicker(BuildContext ctx, int maxBytes, Function(File) onSuccess, Function onError, Function onCancel) async { // only allow one file picker at a time // note: ideally we would destroy file picker when leaving a conversation // but we don't currently have that option. diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index 5ac7c7d8..cbea3bfd 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,6 +1,7 @@ { "@@locale": "de", - "@@last_modified": "2022-01-28T19:57:41+01:00", + "@@last_modified": "2022-02-07T21:17:01+01:00", + "tooltipSelectACustomProfileImage": "Select a Custom Profile Image", "torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.", "torSettingsEnableCache": "Cache Tor Consensus", "labelTorNetwork": "Tor Network", @@ -162,7 +163,7 @@ "newPassword": "Neues Passwort", "yesLeave": "Ja, diese Unterhaltung beenden", "reallyLeaveThisGroupPrompt": "Bist du sicher, dass du diese Unterhaltung beenden möchtest? Alle Nachrichten und Attribute werden gelöscht.", - "leaveGroup": "Unterhaltung beenden", + "leaveConversation": "Unterhaltung beenden", "inviteToGroup": "Du wurdest eingeladen einer Gruppe beizutreten:", "titleManageServers": "Server verwalten", "dateNever": "Nie", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index df6497f1..6f481895 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,6 +1,7 @@ { "@@locale": "en", - "@@last_modified": "2022-01-28T19:57:41+01:00", + "@@last_modified": "2022-02-07T21:17:01+01:00", + "tooltipSelectACustomProfileImage": "Select a Custom Profile Image", "editProfile": "Edit Profile", "torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.", "torSettingsEnableCache": "Cache Tor Consensus", @@ -164,7 +165,7 @@ "newPassword": "New Password", "yesLeave": "Yes, Leave This Conversation", "reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.", - "leaveGroup": "Leave This Conversation", + "leaveConversation": "Leave This Conversation", "inviteToGroup": "You have been invited to join a group:", "pasteAddressToAddContact": "Paste a cwtch address, invitation or key bundle here to add a new conversation", "tooltipAddContact": "Add a new contact or conversation", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index 5f418b75..ff93defc 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -1,6 +1,7 @@ { "@@locale": "es", - "@@last_modified": "2022-01-28T19:57:41+01:00", + "@@last_modified": "2022-02-07T21:17:01+01:00", + "tooltipSelectACustomProfileImage": "Select a Custom Profile Image", "torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.", "torSettingsEnableCache": "Cache Tor Consensus", "labelTorNetwork": "Tor Network", @@ -148,7 +149,7 @@ "newPassword": "New Password", "yesLeave": "Yes, Leave This Conversation", "reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.", - "leaveGroup": "Leave This Conversation", + "leaveConversation": "Leave This Conversation", "inviteToGroup": "You have been invited to join a group:", "titleManageServers": "Manage Servers", "dateNever": "Never", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index dd2c0544..7e8e365b 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,6 +1,7 @@ { "@@locale": "fr", - "@@last_modified": "2022-01-28T19:57:41+01:00", + "@@last_modified": "2022-02-07T21:17:01+01:00", + "tooltipSelectACustomProfileImage": "Select a Custom Profile Image", "editProfile": "Modifier le profil", "settingTheme": "Utilisez des thèmes clairs", "torSettingsUseCustomTorServiceConfiguration": "Utiliser une configuration personnalisée du service Tor (torrc)", @@ -213,7 +214,7 @@ "dateNever": "Jamais", "titleManageServers": "Gérer les serveurs", "inviteToGroup": "Vous avez été invité à rejoindre un groupe :", - "leaveGroup": "Quittez cette conversation", + "leaveConversation": "Quittez cette conversation", "reallyLeaveThisGroupPrompt": "Êtes-vous sûr de vouloir quitter cette conversation ? Tous les messages et attributs seront supprimés.", "yesLeave": "Oui, quittez cette conversation", "noPasswordWarning": "Ne pas utiliser de mot de passe sur ce compte signifie que toutes les données stockées localement ne seront pas chiffrées.", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index b94f3e24..ac17d6b7 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -1,6 +1,7 @@ { "@@locale": "it", - "@@last_modified": "2022-01-28T19:57:41+01:00", + "@@last_modified": "2022-02-07T21:17:01+01:00", + "tooltipSelectACustomProfileImage": "Select a Custom Profile Image", "torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.", "torSettingsEnableCache": "Cache Tor Consensus", "labelTorNetwork": "Tor Network", @@ -38,7 +39,7 @@ "copiedToClipboardNotification": "Copiato negli Appunti", "groupNameLabel": "Nome del gruppo", "titleManageServers": "Gestisci i Server", - "leaveGroup": "Lascia Questa Conversazione", + "leaveConversation": "Lascia Questa Conversazione", "yesLeave": "Sì, Lascia Questa Conversazione", "newPassword": "Nuova Password", "sendMessage": "Invia Messaggio", diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index 3866a59b..cf32bf98 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -1,6 +1,7 @@ { "@@locale": "pl", - "@@last_modified": "2022-01-28T19:57:41+01:00", + "@@last_modified": "2022-02-07T21:17:01+01:00", + "tooltipSelectACustomProfileImage": "Select a Custom Profile Image", "torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.", "torSettingsEnableCache": "Cache Tor Consensus", "labelTorNetwork": "Tor Network", @@ -209,7 +210,7 @@ "chatHistoryDefault": "Ta konwersacja zostanie usunięta gdy zamkniesz Cwtch! Możesz włączyć zapisywanie wiadomości dla każdej konwersacji osobno w menu w prawym górnym rogu.", "yesLeave": "Opuść", "reallyLeaveThisGroupPrompt": "Na pewno chcesz opuścić tę grupę? Wszystkie wiadomości i atrybuty zostaną usunięte.", - "leaveGroup": "Opuść grupę", + "leaveConversation": "Opuść grupę", "inviteToGroup": "Zaproszono Cię do grupy:", "dateNever": "Nigdy", "dateLastYear": "Rok temu", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index 41142267..a8350528 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -1,6 +1,7 @@ { "@@locale": "pt", - "@@last_modified": "2022-01-28T19:57:41+01:00", + "@@last_modified": "2022-02-07T21:17:01+01:00", + "tooltipSelectACustomProfileImage": "Select a Custom Profile Image", "torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.", "torSettingsEnableCache": "Cache Tor Consensus", "labelTorNetwork": "Tor Network", @@ -148,7 +149,7 @@ "newPassword": "New Password", "yesLeave": "Yes, Leave This Conversation", "reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.", - "leaveGroup": "Leave This Conversation", + "leaveConversation": "Leave This Conversation", "inviteToGroup": "You have been invited to join a group:", "titleManageServers": "Manage Servers", "dateNever": "Never", diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index 5357f2cb..be2172b4 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -1,6 +1,7 @@ { "@@locale": "ru", - "@@last_modified": "2022-01-28T19:57:41+01:00", + "@@last_modified": "2022-02-07T21:17:01+01:00", + "tooltipSelectACustomProfileImage": "Select a Custom Profile Image", "torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.", "torSettingsEnableCache": "Cache Tor Consensus", "labelTorNetwork": "Tor Network", @@ -164,7 +165,7 @@ "newPassword": "Новый пароль", "yesLeave": "Да, оставить этот чат", "reallyLeaveThisGroupPrompt": "Вы уверены, что хотите закончить этот разговор? Все сообщения будут удалены.", - "leaveGroup": "Да, оставить этот чат", + "leaveConversation": "Да, оставить этот чат", "inviteToGroup": "Вас пригласили присоединиться к группе:", "titleManageServers": "Управление серверами", "dateNever": "Никогда", diff --git a/lib/views/addeditprofileview.dart b/lib/views/addeditprofileview.dart index b707f52f..3a054f4f 100644 --- a/lib/views/addeditprofileview.dart +++ b/lib/views/addeditprofileview.dart @@ -91,9 +91,10 @@ class _AddEditProfileViewState extends State { visible: Provider.of(context).onion.isNotEmpty, child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [ MouseRegion( - cursor: SystemMouseCursors.click, + cursor: Provider.of(context).isExperimentEnabled(ImagePreviewsExperiment) ? SystemMouseCursors.click : SystemMouseCursors.basic, child: GestureDetector( - onTap: Provider.of(context).disableFilePicker + // don't allow setting of profile images if the image previews experiment is disabled. + onTap: Provider.of(context).disableFilePicker || !Provider.of(context).isExperimentEnabled(ImagePreviewsExperiment) ? null : () { filesharing.showFilePicker(context, MaxImageFileSharingSize, (File file) { @@ -113,6 +114,7 @@ class _AddEditProfileViewState extends State { child: ProfileImage( imagePath: Provider.of(context).imagePath, diameter: 120, + tooltip: Provider.of(context).isExperimentEnabled(ImagePreviewsExperiment) ? AppLocalizations.of(context)!.tooltipSelectACustomProfileImage : "", maskOut: false, border: theme.theme.portraitOnlineBorderColor, badgeTextColor: Colors.red, diff --git a/lib/views/groupsettingsview.dart b/lib/views/groupsettingsview.dart index 18855e7e..1026bf05 100644 --- a/lib/views/groupsettingsview.dart +++ b/lib/views/groupsettingsview.dart @@ -159,7 +159,7 @@ class _GroupSettingsViewState extends State { ), Row(crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.end, children: [ Tooltip( - message: AppLocalizations.of(context)!.leaveGroup, + message: AppLocalizations.of(context)!.leaveConversation, child: TextButton.icon( onPressed: () { showAlertDialog(context); @@ -167,7 +167,7 @@ class _GroupSettingsViewState extends State { style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.transparent)), icon: Icon(CwtchIcons.leave_group), label: Text( - AppLocalizations.of(context)!.leaveGroup, + AppLocalizations.of(context)!.leaveConversation, style: TextStyle(decoration: TextDecoration.underline), ), ))