diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index 13e90b6..fed2336 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,6 +1,9 @@ { "@@locale": "de", - "@@last_modified": "2021-06-24T18:24:27+02:00", + "@@last_modified": "2021-06-24T23:32:06+02:00", + "tooltipHidePassword": "Hide Password", + "tooltipShowPassword": "Show Password", + "serverNotSynced": "Syncing New Messages (This can take some time)...", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", @@ -155,7 +158,6 @@ "inviteToGroupLabel": "In die Gruppe einladen", "groupNameLabel": "Gruppenname", "viewServerInfo": "Server Info", - "serverNotSynced": "Out of Sync", "serverSynced": "Synced", "serverConnectivityDisconnected": "Server getrennt", "serverConnectivityConnected": "Server verbunden", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 4258f85..9c5a22a 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,6 +1,9 @@ { "@@locale": "en", - "@@last_modified": "2021-06-24T18:24:27+02:00", + "@@last_modified": "2021-06-24T23:32:06+02:00", + "tooltipHidePassword": "Hide Password", + "tooltipShowPassword": "Show Password", + "serverNotSynced": "Syncing New Messages (This can take some time)...", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", @@ -155,7 +158,6 @@ "inviteToGroupLabel": "Invite to group", "groupNameLabel": "Group Name", "viewServerInfo": "Server Info", - "serverNotSynced": "Out of Sync", "serverSynced": "Synced", "serverConnectivityDisconnected": "Server Disconnected", "serverConnectivityConnected": "Server Connected", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index 7a9fa72..0d42ec4 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -1,6 +1,9 @@ { "@@locale": "es", - "@@last_modified": "2021-06-24T18:24:27+02:00", + "@@last_modified": "2021-06-24T23:32:06+02:00", + "tooltipHidePassword": "Hide Password", + "tooltipShowPassword": "Show Password", + "serverNotSynced": "Fuera de sincronización con el servidor", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", @@ -155,7 +158,6 @@ "inviteToGroupLabel": "Invitar al grupo", "groupNameLabel": "Nombre del grupo", "viewServerInfo": "Información del servidor", - "serverNotSynced": "Fuera de sincronización con el servidor", "serverSynced": "Sincronizado", "serverConnectivityDisconnected": "Servidor desconectado", "serverConnectivityConnected": "Servidor conectado", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index fa6ae03..cd9c93f 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,6 +1,9 @@ { "@@locale": "fr", - "@@last_modified": "2021-06-24T18:24:27+02:00", + "@@last_modified": "2021-06-24T23:32:06+02:00", + "tooltipHidePassword": "Hide Password", + "tooltipShowPassword": "Show Password", + "serverNotSynced": "Syncing New Messages (This can take some time)...", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", @@ -155,7 +158,6 @@ "inviteToGroupLabel": "Inviter quelqu'un", "groupNameLabel": "Nom du groupe", "viewServerInfo": "Server Info", - "serverNotSynced": "Out of Sync", "serverSynced": "Synced", "serverConnectivityDisconnected": "Server Disconnected", "serverConnectivityConnected": "Server Connected", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index 4fa8b15..a66d843 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -1,6 +1,9 @@ { "@@locale": "it", - "@@last_modified": "2021-06-24T18:24:27+02:00", + "@@last_modified": "2021-06-24T23:32:06+02:00", + "tooltipHidePassword": "Hide Password", + "tooltipShowPassword": "Show Password", + "serverNotSynced": "Non sincronizzato", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", @@ -155,7 +158,6 @@ "inviteToGroupLabel": "Invitare nel gruppo", "groupNameLabel": "Nome del gruppo", "viewServerInfo": "Informazioni sul server", - "serverNotSynced": "Non sincronizzato", "serverSynced": "Sincronizzato", "serverConnectivityDisconnected": "Server disconnesso", "serverConnectivityConnected": "Server connesso", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index fed1c6c..e94df9f 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -1,6 +1,9 @@ { "@@locale": "pt", - "@@last_modified": "2021-06-24T18:24:27+02:00", + "@@last_modified": "2021-06-24T23:32:06+02:00", + "tooltipHidePassword": "Hide Password", + "tooltipShowPassword": "Show Password", + "serverNotSynced": "Syncing New Messages (This can take some time)...", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", @@ -155,7 +158,6 @@ "inviteToGroupLabel": "Convidar ao grupo", "groupNameLabel": "Nome do Grupo", "viewServerInfo": "Server Info", - "serverNotSynced": "Out of Sync", "serverSynced": "Synced", "serverConnectivityDisconnected": "Server Disconnected", "serverConnectivityConnected": "Server Connected", diff --git a/lib/licenses.dart b/lib/licenses.dart index a06b816..36a9f57 100644 --- a/lib/licenses.dart +++ b/lib/licenses.dart @@ -114,4 +114,7 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'''); + + + yield LicenseEntryWithLineBreaks(["flaticons"], "Icons made by Freepik (https://www.freepik.com) from Flaticon (www.flaticon.com)"); } diff --git a/lib/model.dart b/lib/model.dart index 68a3fa2..566ab5e 100644 --- a/lib/model.dart +++ b/lib/model.dart @@ -437,7 +437,8 @@ class ContactInfoState extends ChangeNotifier { bool isOnline() { if (this.isGroup == true) { - return this.status == "Synced"; + // We now have an out of sync warning so we will mark these as online... + return this.status == "Authenticated" || this.status == "Synced"; } else { return this.status == "Authenticated"; } diff --git a/lib/views/globalsettingsview.dart b/lib/views/globalsettingsview.dart index 9380965..2329ea8 100644 --- a/lib/views/globalsettingsview.dart +++ b/lib/views/globalsettingsview.dart @@ -64,7 +64,7 @@ class _GlobalSettingsViewState extends State { }).toList())), SwitchListTile( title: Text(AppLocalizations.of(context)!.settingTheme, style: TextStyle(color: settings.current().mainTextColor())), - value: settings.current() == "light", + value: settings.current().identifier() == "light", onChanged: (bool value) { if (value) { settings.setLight(); @@ -169,13 +169,7 @@ class _GlobalSettingsViewState extends State { )), AboutListTile( icon: Icon(Icons.info, color: settings.current().mainTextColor()), - applicationIcon: Padding( - padding: EdgeInsets.all(20), - child: Image( - image: AssetImage("assets/knott.png"), - width: 128, - height: 128, - )), + applicationIcon: Padding(padding:EdgeInsets.all(5), child: Icon(CwtchIcons.cwtch_knott)), applicationName: "Cwtch (Flutter UI)", applicationVersion: AppLocalizations.of(context)!.versionBuilddate.replaceAll("%1", EnvironmentConfig.BUILD_VER).replaceAll("%2", EnvironmentConfig.BUILD_DATE), applicationLegalese: '\u{a9} 2021 Open Privacy Research Society', diff --git a/lib/views/peersettingsview.dart b/lib/views/peersettingsview.dart index 892d4cf..cdcfc70 100644 --- a/lib/views/peersettingsview.dart +++ b/lib/views/peersettingsview.dart @@ -77,7 +77,6 @@ class _PeerSettingsViewState extends State { }; final setPeerAttributeJson = jsonEncode(setPeerAttribute); Provider.of(context, listen: false).cwtch.SendProfileEvent(profileOnion, setPeerAttributeJson); - // todo translations final snackBar = SnackBar(content: Text(AppLocalizations.of(context)!.nickChangeSuccess)); ScaffoldMessenger.of(context).showSnackBar(snackBar); }, diff --git a/lib/views/splashView.dart b/lib/views/splashView.dart index 78ffaf3..a5642f2 100644 --- a/lib/views/splashView.dart +++ b/lib/views/splashView.dart @@ -13,7 +13,7 @@ class SplashView extends StatelessWidget { body: Center( child: Column(mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Image( - image: AssetImage("assets/knott.png"), + image: AssetImage("assets/core/knott-white.png"), filterQuality: FilterQuality.medium, isAntiAlias: true, width: 200, diff --git a/lib/widgets/invitationbubble.dart b/lib/widgets/invitationbubble.dart index 1781b18..ff86ffc 100644 --- a/lib/widgets/invitationbubble.dart +++ b/lib/widgets/invitationbubble.dart @@ -14,7 +14,6 @@ import 'messagebubbledecorations.dart'; // Like MessageBubble but for displaying chat overlay 100/101 invitations // Offers the user an accept/reject button if they don't have a matching contact already -// todo: Reject buttons currently aren't tracked and will reset when the message is reloaded class InvitationBubble extends StatefulWidget { @override InvitationBubbleState createState() => InvitationBubbleState(); diff --git a/lib/widgets/messagelist.dart b/lib/widgets/messagelist.dart index 5a8fc0f..a6b2e26 100644 --- a/lib/widgets/messagelist.dart +++ b/lib/widgets/messagelist.dart @@ -19,6 +19,8 @@ class _MessageListState extends State { bool showEphemeralWarning = (Provider.of(context).isGroup == false && Provider.of(context).savePeerHistory != "SaveHistory"); bool showOfflineWarning = Provider.of(context).isOnline() == false; bool showMessageWarning = showEphemeralWarning || showOfflineWarning; + bool showSyncing = Provider.of(context).isGroup == true && Provider.of(context).status != "Synced"; + return RepaintBoundary( child: Container( child: Column(children: [ @@ -27,7 +29,10 @@ class _MessageListState extends State { child: Container( padding: EdgeInsets.all(5.0), color: Provider.of(context).theme.defaultButtonActiveColor(), - child: showOfflineWarning + child: showSyncing ? + Text(AppLocalizations.of(context)!.serverNotSynced, + textAlign: TextAlign.center) + : showOfflineWarning ? Text(Provider.of(context).isGroup ? AppLocalizations.of(context)!.serverConnectivityDisconnected : AppLocalizations.of(context)!.peerOfflineMessage, textAlign: TextAlign.center) // Only show the ephemeral status for peer conversations, not for groups... @@ -50,6 +55,7 @@ class _MessageListState extends State { alignment: Alignment.center, image: AssetImage("assets/core/negative_heart_512px.png"), colorFilter: ColorFilter.mode(Provider.of(context).theme.hilightElementTextColor(), BlendMode.srcIn))), + // Don't load messages for syncing server... child: ListView.builder( controller: ctrlr1, itemCount: Provider.of(outerContext).totalMessages, diff --git a/lib/widgets/passwordfield.dart b/lib/widgets/passwordfield.dart index 64b4404..c48b5ef 100644 --- a/lib/widgets/passwordfield.dart +++ b/lib/widgets/passwordfield.dart @@ -2,6 +2,7 @@ import 'package:cwtch/cwtch_icons_icons.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../settings.dart'; +import 'package:flutter_gen/gen_l10n/app_localizations.dart'; // Provides a styled Password Input Field for use in Form Widgets. // Callers must provide a text controller, label helper text and a validator. @@ -22,9 +23,9 @@ class _CwtchTextFieldState extends State { @override Widget build(BuildContext context) { // todo: translations - var label = "View Password"; + var label = AppLocalizations.of(context)!.tooltipShowPassword; if (!obscureText) { - label = "Hide Password"; + label = AppLocalizations.of(context)!.tooltipHidePassword; } return Consumer(builder: (context, theme, child) {