From 1331b10fb10b2e3fe807ea3ae241c32fca1b4996 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 27 Feb 2021 09:10:08 +0100 Subject: [PATCH 1/7] fix: Bootstrap hint --- lib/components/dialogs/bootstrap_dialog.dart | 74 +++++++++++--------- lib/l10n/intl_en.arb | 7 +- lib/views/settings.dart | 28 ++++++++ 3 files changed, 74 insertions(+), 35 deletions(-) diff --git a/lib/components/dialogs/bootstrap_dialog.dart b/lib/components/dialogs/bootstrap_dialog.dart index 19af1312..89faca99 100644 --- a/lib/components/dialogs/bootstrap_dialog.dart +++ b/lib/components/dialogs/bootstrap_dialog.dart @@ -91,6 +91,7 @@ class _BootstrapDialogState extends State { style: TextStyle( fontSize: 18, wordSpacing: 38, + fontFamily: 'monospace', ), ), ); @@ -129,8 +130,8 @@ class _BootstrapDialogState extends State { _recoveryKeyInputError ?? L10n.of(context).pleaseEnterSecurityKey; body = PlatformInfos.isCupertinoStyle ? CupertinoTextField( - minLines: 2, - maxLines: 2, + minLines: 1, + maxLines: 1, autofocus: true, autocorrect: false, autofillHints: _recoveryKeyInputLoading @@ -139,46 +140,22 @@ class _BootstrapDialogState extends State { controller: _recoveryKeyTextEditingController, ) : TextField( - minLines: 2, - maxLines: 2, + minLines: 1, + maxLines: 1, autofocus: true, autocorrect: false, autofillHints: _recoveryKeyInputLoading ? null : [AutofillHints.password], controller: _recoveryKeyTextEditingController, + decoration: InputDecoration( + border: UnderlineInputBorder(), + filled: false, + hintText: L10n.of(context).securityKey, + ), ); buttons.add(AdaptiveFlatButton( - textColor: Colors.red, - label: 'Lost security key', - onPressed: () async { - if (OkCancelResult.ok == - await showOkCancelAlertDialog( - context: context, - useRootNavigator: false, - title: L10n.of(context).securityKeyLost, - message: L10n.of(context).wipeChatBackup, - okLabel: L10n.of(context).ok, - cancelLabel: L10n.of(context).cancel, - isDestructiveAction: true, - )) { - _createBootstrap(true); - } - }, - )); - buttons.add(AdaptiveFlatButton( - label: L10n.of(context).transferFromAnotherDevice, - onPressed: () async { - final req = await Matrix.of(context) - .client - .userDeviceKeys[Matrix.of(context).client.userID] - .startVerification(); - await KeyVerificationDialog(request: req).show(context); - Navigator.of(context, rootNavigator: false).pop(); - }, - )); - buttons.add(AdaptiveFlatButton( - label: L10n.of(context).next, + label: L10n.of(context).unlockChatBackup, onPressed: () async { setState(() { _recoveryKeyInputError = null; @@ -197,6 +174,35 @@ class _BootstrapDialogState extends State { setState(() => _recoveryKeyInputLoading = false); } })); + buttons.add(AdaptiveFlatButton( + label: L10n.of(context).transferFromAnotherDevice, + onPressed: () async { + final req = await Matrix.of(context) + .client + .userDeviceKeys[Matrix.of(context).client.userID] + .startVerification(); + await KeyVerificationDialog(request: req).show(context); + Navigator.of(context, rootNavigator: false).pop(); + }, + )); + buttons.add(AdaptiveFlatButton( + textColor: Colors.red, + label: L10n.of(context).securityKeyLost, + onPressed: () async { + if (OkCancelResult.ok == + await showOkCancelAlertDialog( + context: context, + useRootNavigator: false, + title: L10n.of(context).securityKeyLost, + message: L10n.of(context).wipeChatBackup, + okLabel: L10n.of(context).ok, + cancelLabel: L10n.of(context).cancel, + isDestructiveAction: true, + )) { + _createBootstrap(true); + } + }, + )); break; case BootstrapState.askWipeCrossSigning: WidgetsBinding.instance.addPostFrameCallback( diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 8267bc90..d65e21d8 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -498,7 +498,7 @@ "type": "text", "placeholders": {} }, - "pleaseEnterSecurityKey": "Please enter your security key", + "pleaseEnterSecurityKey": "Please enter your security key:", "@pleaseEnterSecurityKey": { "type": "text", "placeholders": {} @@ -2006,6 +2006,11 @@ "unreadChats": {} } }, + "unlockChatBackup": "Unlock chat backup", + "@unlockChatBackup": { + "type": "text", + "placeholders": {} + }, "yourPublicKey": "Your public key", "@yourPublicKey": { "type": "text", diff --git a/lib/views/settings.dart b/lib/views/settings.dart index 66dc070c..a9126b57 100644 --- a/lib/views/settings.dart +++ b/lib/views/settings.dart @@ -378,6 +378,34 @@ class _SettingsState extends State { .textTheme .headline6 .color)), + actions: [ + FutureBuilder( + future: crossSigningCachedFuture, + builder: (context, snapshot) { + final needsBootstrap = Matrix.of(context) + .client + .encryption + .crossSigning + .enabled == + false || + snapshot.data == false; + final isUnknownSession = + Matrix.of(context).client.isUnknownSession; + final displayHeader = needsBootstrap || isUnknownSession; + if (!displayHeader) return Container(); + return TextButton.icon( + icon: Icon(Icons.cloud, color: Colors.red), + label: Text( + L10n.of(context).chatBackup, + style: TextStyle(color: Colors.red), + ), + onPressed: () async { + await BootstrapDialog().show(context); + AdaptivePageLayout.of(context).popUntilIsFirst(); + }, + ); + }), + ], backgroundColor: Theme.of(context).appBarTheme.color, flexibleSpace: FlexibleSpaceBar( background: ContentBanner(profile?.avatarUrl, From caf7ecbb51ba37482e8963015f292efb1979c336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 25 Feb 2021 16:17:38 +0000 Subject: [PATCH 2/7] Translated using Weblate (Estonian) Currently translated at 100.0% (416 of 416 strings) Translation: FluffyChat/Translations Translate-URL: https://hosted.weblate.org/projects/fluffychat/translations/et/ --- lib/l10n/intl_et.arb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/l10n/intl_et.arb b/lib/l10n/intl_et.arb index 03f2a954..e8962313 100644 --- a/lib/l10n/intl_et.arb +++ b/lib/l10n/intl_et.arb @@ -2247,5 +2247,17 @@ "@verified": { "type": "text", "placeholders": {} + }, + "xMoreEvents": "Veel {count} sündmust", + "@xMoreEvents": { + "type": "text", + "placeholders": { + "count": {} + } + }, + "oneMoreEvent": "Veel 1 sündmus", + "@oneMoreEvent": { + "type": "text", + "placeholders": {} } } From f9256a6218b3a922fd9fb9f821400957abfc60d7 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Sat, 27 Feb 2021 00:57:46 +0000 Subject: [PATCH 3/7] Translated using Weblate (French) Currently translated at 100.0% (416 of 416 strings) Translation: FluffyChat/Translations Translate-URL: https://hosted.weblate.org/projects/fluffychat/translations/fr/ --- lib/l10n/intl_fr.arb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index 670cad86..2987f495 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1743,12 +1743,12 @@ "type": "text", "placeholders": {} }, - "hideUnknownEvents": "Cacher les événements inconnus", + "hideUnknownEvents": "Cacher les évènements inconnus", "@hideUnknownEvents": { "type": "text", "placeholders": {} }, - "hideRedactedEvents": "Cacher les événements supprimés", + "hideRedactedEvents": "Cacher les évènements supprimés", "@hideRedactedEvents": { "type": "text", "placeholders": {} @@ -2248,14 +2248,14 @@ "type": "text", "placeholders": {} }, - "xMoreEvents": "{count} événements en plus", + "xMoreEvents": "{count} évènements en plus", "@xMoreEvents": { "type": "text", "placeholders": { "count": {} } }, - "oneMoreEvent": "1 événement en plus", + "oneMoreEvent": "1 évènement en plus", "@oneMoreEvent": { "type": "text", "placeholders": {} From 7a99893832bc4fa4bede6932aacb20f603181e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xos=C3=A9=20M?= Date: Fri, 26 Feb 2021 04:24:12 +0000 Subject: [PATCH 4/7] Translated using Weblate (Galician) Currently translated at 99.7% (415 of 416 strings) Translation: FluffyChat/Translations Translate-URL: https://hosted.weblate.org/projects/fluffychat/translations/gl/ --- lib/l10n/intl_gl.arb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/l10n/intl_gl.arb b/lib/l10n/intl_gl.arb index 21bf5903..1ed36427 100644 --- a/lib/l10n/intl_gl.arb +++ b/lib/l10n/intl_gl.arb @@ -2247,5 +2247,17 @@ "@verified": { "type": "text", "placeholders": {} + }, + "xMoreEvents": "{count} eventos máis", + "@xMoreEvents": { + "type": "text", + "placeholders": { + "count": {} + } + }, + "oneMoreEvent": "Un evento máis", + "@oneMoreEvent": { + "type": "text", + "placeholders": {} } } From 52fc48a9bb505e0c790db3146bfa65330acc7cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Thu, 25 Feb 2021 14:38:43 +0000 Subject: [PATCH 5/7] Translated using Weblate (Turkish) Currently translated at 100.0% (416 of 416 strings) Translation: FluffyChat/Translations Translate-URL: https://hosted.weblate.org/projects/fluffychat/translations/tr/ --- lib/l10n/intl_tr.arb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/l10n/intl_tr.arb b/lib/l10n/intl_tr.arb index 3214308e..bf00fe76 100644 --- a/lib/l10n/intl_tr.arb +++ b/lib/l10n/intl_tr.arb @@ -2247,5 +2247,17 @@ "@verified": { "type": "text", "placeholders": {} + }, + "xMoreEvents": "{count} etkinlik daha", + "@xMoreEvents": { + "type": "text", + "placeholders": { + "count": {} + } + }, + "oneMoreEvent": "1 etkinlik daha", + "@oneMoreEvent": { + "type": "text", + "placeholders": {} } } From 66ecfa35a95e813dc4c8aca258dd7bf3dc67e6a9 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Sat, 27 Feb 2021 00:56:36 +0000 Subject: [PATCH 6/7] Translated using Weblate (Italian) Currently translated at 100.0% (416 of 416 strings) Translation: FluffyChat/Translations Translate-URL: https://hosted.weblate.org/projects/fluffychat/translations/it/ --- lib/l10n/intl_it.arb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index 1d253d68..e206a0f7 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -2245,5 +2245,17 @@ "@verified": { "type": "text", "placeholders": {} + }, + "xMoreEvents": "{count} altri eventi", + "@xMoreEvents": { + "type": "text", + "placeholders": { + "count": {} + } + }, + "oneMoreEvent": "1 altro evento", + "@oneMoreEvent": { + "type": "text", + "placeholders": {} } } From fafa60ada3ef162d865a503ce4b03f23656c6694 Mon Sep 17 00:00:00 2001 From: SuperSonic Date: Fri, 26 Feb 2021 11:47:18 +0000 Subject: [PATCH 7/7] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (416 of 416 strings) Translation: FluffyChat/Translations Translate-URL: https://hosted.weblate.org/projects/fluffychat/translations/zh_Hant/ --- lib/l10n/intl_zh_Hant.arb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/l10n/intl_zh_Hant.arb b/lib/l10n/intl_zh_Hant.arb index 9185e159..a3e2e981 100644 --- a/lib/l10n/intl_zh_Hant.arb +++ b/lib/l10n/intl_zh_Hant.arb @@ -1,10 +1,10 @@ { - "noMegolmBootstrap": "FluffyChat 目前不支援啟用線上金鑰備份。請在 Riot 中啟用。", + "noMegolmBootstrap": "FluffyChat目前不支援啟用線上金鑰備份。請在Riot中啟用。", "@noMegolmBootstrap": { "type": "text", "placeholders": {} }, - "noCrossSignBootstrap": "FluffyChat 目前不支援啟用 Cross-Signing。請在 Riot 中啟用。", + "noCrossSignBootstrap": "FluffyChat目前不支援啟用Cross-Signing。請在Riot中啟用。", "@noCrossSignBootstrap": { "type": "text", "placeholders": {} @@ -34,12 +34,12 @@ "type": "text", "placeholders": {} }, - "newMessageInFluffyChat": "來自 FluffyChat 的新訊息", + "newMessageInFluffyChat": "來自FluffyChat的新訊息", "@newMessageInFluffyChat": { "type": "text", "placeholders": {} }, - "needPantalaimonWarning": "請注意您需要 Pantalaimon 才能使用點對點加密功能。", + "needPantalaimonWarning": "請注意您需要Pantalaimon才能使用點對點加密功能。", "@needPantalaimonWarning": { "type": "text", "placeholders": {} @@ -118,7 +118,7 @@ "type": "text", "placeholders": {} }, - "lastSeenIp": "最後使用的 IP", + "lastSeenIp": "最後使用的IP", "@lastSeenIp": { "type": "text", "placeholders": {} @@ -401,7 +401,7 @@ "type": "text", "placeholders": {} }, - "deviceId": "裝置 ID", + "deviceId": "裝置ID", "@deviceId": { "type": "text", "placeholders": {} @@ -921,7 +921,7 @@ "type": "text", "placeholders": {} }, - "compareEmojiMatch": "對比並確認這些表情符合其他那些裝置:", + "compareEmojiMatch": "對比並確認這些表情符合其他那些裝置:", "@compareEmojiMatch": { "type": "text", "placeholders": {} @@ -990,7 +990,7 @@ "username": {} } }, - "changedTheProfileAvatar": "{username}變更了他們的頭貼", + "changedTheProfileAvatar": "{username}變更了頭貼", "@changedTheProfileAvatar": { "type": "text", "placeholders": { @@ -1287,7 +1287,7 @@ "type": "text", "placeholders": {} }, - "sendBugReports": "允許向 sentry.io 回報錯誤", + "sendBugReports": "允許向sentry.io回報錯誤", "@sendBugReports": { "type": "text", "placeholders": {} @@ -1530,7 +1530,7 @@ "type": "text", "placeholders": {} }, - "pleaseEnterAMatrixIdentifier": "請輸入 Matrix ID。", + "pleaseEnterAMatrixIdentifier": "請輸入Matrix ID。", "@pleaseEnterAMatrixIdentifier": { "type": "text", "placeholders": {} @@ -1674,12 +1674,12 @@ "type": "text", "placeholders": {} }, - "noGoogleServicesWarning": "看起來您手機上沒有 Google 服務框架。這對於保護您的隱私而言是個好決定!但為了收到 FluffyChat 的推播通知,我們推薦您使用microG:https://microg.org/", + "noGoogleServicesWarning": "看起來您手機上沒有Google服務框架。這對於保護您的隱私而言是個好決定!但為了收到FluffyChat的推播通知,我們推薦您使用microG:https://microg.org/", "@noGoogleServicesWarning": { "type": "text", "placeholders": {} }, - "useAmoledTheme": "使用適合 AMOLED 螢幕的顏色?", + "useAmoledTheme": "使用適合AMOLED螢幕的顏色?", "@useAmoledTheme": { "type": "text", "placeholders": {}