From fa21a4f719c8c0f32b4051f8433f3cc74947b24f Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 20 Sep 2023 12:28:49 -0700 Subject: [PATCH 1/3] New Icons, New Translations, More Complete Profile Menu --- assets/fonts/Cwtch.ttf | Bin 24952 -> 25244 bytes lib/cwtch_icons_icons.dart | 5 +- lib/l10n/intl_cy.arb | 7 +- lib/l10n/intl_da.arb | 7 +- lib/l10n/intl_de.arb | 7 +- lib/l10n/intl_el.arb | 7 +- lib/l10n/intl_en.arb | 7 +- lib/l10n/intl_es.arb | 7 +- lib/l10n/intl_fr.arb | 7 +- lib/l10n/intl_it.arb | 7 +- lib/l10n/intl_ja.arb | 7 +- lib/l10n/intl_ko.arb | 7 +- lib/l10n/intl_lb.arb | 7 +- lib/l10n/intl_nl.arb | 7 +- lib/l10n/intl_no.arb | 7 +- lib/l10n/intl_pl.arb | 7 +- lib/l10n/intl_pt.arb | 7 +- lib/l10n/intl_pt_BR.arb | 7 +- lib/l10n/intl_ro.arb | 7 +- lib/l10n/intl_ru.arb | 7 +- lib/l10n/intl_sk.arb | 7 +- lib/l10n/intl_sv.arb | 7 +- lib/l10n/intl_sw.arb | 7 +- lib/l10n/intl_tr.arb | 7 +- lib/l10n/intl_uk.arb | 7 +- lib/views/addeditprofileview.dart | 2 + lib/views/contactsview.dart | 126 +++++++++++++++++++++++++++--- lib/views/filesharingview.dart | 2 +- lib/views/globalsettingsview.dart | 2 +- lib/views/messageview.dart | 4 +- lib/widgets/filebubble.dart | 8 +- 31 files changed, 268 insertions(+), 42 deletions(-) diff --git a/assets/fonts/Cwtch.ttf b/assets/fonts/Cwtch.ttf index 1ea9d0400eeb894edb64ecf83b9daa19c63ce059..9cd1c4679e74ff3bcbbe40ff5b6fa1962e8d4347 100644 GIT binary patch delta 981 zcmZ8fUuauZ82`T9dvnv=yQWF=r%7hgG|d`wlaMY;ic*pmWG+=lx6v)uv2sb1=B~L( zut6rMd2qu$OsQV=L55EveG%NEFtF}nY=}=Sv*L@01Ht<+VHAYD^j^QD`r!uc&hSj(Fh!fVmF9*VYkJ|X1d(dxnJ05lgbgGM!IzfSR>s& z1W*cX&%VQ5jNLt!?`;VOB~3ZMJ;?x=Uo&+kPBmRH4=@_@j5<%u?pxrmeIv7Gkf zQo0+xj?hS*SWCr?En^3NR&XJlFXY3CS;-j~NlLScfh(2Dr9{&5tZ5p4%&7AVo`=TX z!MBAatQ)t(`7kY94@pwU*b$vh5#7e)P$Ch+>G9k+E#niZB+|8u>fF@Vf#$E4qV0M-W+diRFie10Ju}|{ z@nHEyq)MXrviFzs~h^15jgINl2QW{X3^ zrHP-;JaCeA|GBZLmL3blG2`ass!FnP*Ei^jWCnBbcQ^id*L8Es7bVX5O87jM&Fizo z26{k+YMmaD7*ztjlITy_d%u2+_0LT0?20BBM-=4c}(VH!8=Jpu9th| zK^d0`dDdh8GvdB|xPo!q!Ckx*nmSYcr0S%pzy8+cs^1<3jJbF_2+j_yc6cqV}rc zOxrV{TGN*f1$hJazLHeh`It3`0fDw)K#YZU2Sy1a(SBoVr!(%%(@aN{y2V_mDYU=c z*WtR(7TOU_7(wzm3rm&egzz_YiCW@`*m>eB86rIJl#J@^z)>PgY(G_hcsjEp+-R0c bX39zrMl!j4I%4Q%p_GdZ7fm}E^;Z84EO((1 diff --git a/lib/cwtch_icons_icons.dart b/lib/cwtch_icons_icons.dart index 107ddca8..8885a17b 100644 --- a/lib/cwtch_icons_icons.dart +++ b/lib/cwtch_icons_icons.dart @@ -1,5 +1,5 @@ /// Flutter icons Cwtch -/// Copyright (C) 2021-2022 by Open Privacy Research Society +/// Copyright (C) 2021-2023 by Open Privacy Research Society /// This font was generated by FlutterIcon.com, which is derived from Fontello. /// /// To use this font, place it in your fonts/ directory and include the @@ -124,6 +124,7 @@ class CwtchIcons { static const IconData view_replies = IconData(0xe869, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData anti_spam_2 = IconData(0xe86b, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData manage_files = IconData(0xe86c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData attached_file_2 = IconData(0xe86d, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData anti_spam_3 = IconData(0xe86e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData attached_file_3 = IconData(0xe86f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData disconnect_from_contact = IconData(0xe870, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/l10n/intl_cy.arb b/lib/l10n/intl_cy.arb index 5052dcb5..a1b2c7d1 100644 --- a/lib/l10n/intl_cy.arb +++ b/lib/l10n/intl_cy.arb @@ -1,6 +1,11 @@ { "@@locale": "cy", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_da.arb b/lib/l10n/intl_da.arb index 0bf6babd..55d7b3e4 100644 --- a/lib/l10n/intl_da.arb +++ b/lib/l10n/intl_da.arb @@ -1,6 +1,11 @@ { "@@locale": "da", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index 2d1e98dc..db53a16e 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,6 +1,11 @@ { "@@locale": "de", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_el.arb b/lib/l10n/intl_el.arb index e134909d..1d40cbeb 100644 --- a/lib/l10n/intl_el.arb +++ b/lib/l10n/intl_el.arb @@ -1,6 +1,11 @@ { "@@locale": "el", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index b55b54f7..05dd078b 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,6 +1,11 @@ { "@@locale": "en", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index a5987e20..04b92305 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -1,6 +1,11 @@ { "@@locale": "es", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index c990831d..c2bee3f3 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,6 +1,11 @@ { "@@locale": "fr", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index 88756a23..f6132f35 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -1,6 +1,11 @@ { "@@locale": "it", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_ja.arb b/lib/l10n/intl_ja.arb index fa5713b7..5db032af 100644 --- a/lib/l10n/intl_ja.arb +++ b/lib/l10n/intl_ja.arb @@ -1,6 +1,11 @@ { "@@locale": "ja", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_ko.arb b/lib/l10n/intl_ko.arb index 88fc28cc..9d743b79 100644 --- a/lib/l10n/intl_ko.arb +++ b/lib/l10n/intl_ko.arb @@ -1,6 +1,11 @@ { "@@locale": "ko", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_lb.arb b/lib/l10n/intl_lb.arb index e93bd626..6ccf0b30 100644 --- a/lib/l10n/intl_lb.arb +++ b/lib/l10n/intl_lb.arb @@ -1,6 +1,11 @@ { "@@locale": "lb", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_nl.arb b/lib/l10n/intl_nl.arb index 1bc7cb2e..63ebc263 100644 --- a/lib/l10n/intl_nl.arb +++ b/lib/l10n/intl_nl.arb @@ -1,6 +1,11 @@ { "@@locale": "nl", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_no.arb b/lib/l10n/intl_no.arb index e5bb5b1d..d713afa5 100644 --- a/lib/l10n/intl_no.arb +++ b/lib/l10n/intl_no.arb @@ -1,6 +1,11 @@ { "@@locale": "no", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index 99cacc4a..8aa8a2a0 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -1,6 +1,11 @@ { "@@locale": "pl", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index 5294fdae..dbb7628e 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -1,6 +1,11 @@ { "@@locale": "pt", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_pt_BR.arb b/lib/l10n/intl_pt_BR.arb index 66e6c12a..fcb5cabf 100644 --- a/lib/l10n/intl_pt_BR.arb +++ b/lib/l10n/intl_pt_BR.arb @@ -1,6 +1,11 @@ { "@@locale": "pt_BR", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_ro.arb b/lib/l10n/intl_ro.arb index 9059473f..38b71a44 100644 --- a/lib/l10n/intl_ro.arb +++ b/lib/l10n/intl_ro.arb @@ -1,6 +1,11 @@ { "@@locale": "ro", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index 345e9a55..13c05e9e 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -1,6 +1,11 @@ { "@@locale": "ru", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_sk.arb b/lib/l10n/intl_sk.arb index 74787043..fe5f0d78 100644 --- a/lib/l10n/intl_sk.arb +++ b/lib/l10n/intl_sk.arb @@ -1,6 +1,11 @@ { "@@locale": "sk", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_sv.arb b/lib/l10n/intl_sv.arb index 444128b6..5ba55bdf 100644 --- a/lib/l10n/intl_sv.arb +++ b/lib/l10n/intl_sv.arb @@ -1,6 +1,11 @@ { "@@locale": "sv", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_sw.arb b/lib/l10n/intl_sw.arb index c1aa47f9..976dca1f 100644 --- a/lib/l10n/intl_sw.arb +++ b/lib/l10n/intl_sw.arb @@ -1,6 +1,11 @@ { "@@locale": "sw", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_tr.arb b/lib/l10n/intl_tr.arb index cbb6310f..f6086e38 100644 --- a/lib/l10n/intl_tr.arb +++ b/lib/l10n/intl_tr.arb @@ -1,6 +1,11 @@ { "@@locale": "tr", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/l10n/intl_uk.arb b/lib/l10n/intl_uk.arb index d2bf1d2d..9a9633da 100644 --- a/lib/l10n/intl_uk.arb +++ b/lib/l10n/intl_uk.arb @@ -1,6 +1,11 @@ { "@@locale": "uk", - "@@last_modified": "2023-09-13T18:51:59+02:00", + "@@last_modified": "2023-09-20T21:00:37+02:00", + "profileAllowUnknownContacts": "Allow Unknown Contacts", + "profileBlockUnknownContacts": "Block Unknown Contacts", + "profileDisableProfile": "Disable Profile", + "profileEnableProfile": "Enable Profile", + "profileAppearOnline": "Appear Online", "contactDisconnect": "Disconnect from Contact (if you do not have Appear Offline set this contact may still be able to reestablish a connection to you)", "profileAppearOfflineDescription": "By default, when Cwtch profile is enabled it automatically attempts to connect to know contacts, and allows inbound connections. This settings disables those actions and allows you to choose, manually, which contacts to connect to.", "profileAppearOffline": "Appear Offline", diff --git a/lib/views/addeditprofileview.dart b/lib/views/addeditprofileview.dart index c4c68ba9..60341d9c 100644 --- a/lib/views/addeditprofileview.dart +++ b/lib/views/addeditprofileview.dart @@ -286,6 +286,8 @@ class _AddEditProfileViewState extends State { if (value == true && Provider.of(context, listen: false).enabled) { Provider.of(context, listen: false).deactivatePeerEngine(context); Provider.of(context, listen: false).cwtch.ConfigureConnections(onion, false, false, false); + } else { + Provider.of(context, listen: false).cwtch.ConfigureConnections(onion, true, true, true); } } }, diff --git a/lib/views/contactsview.dart b/lib/views/contactsview.dart index e82328b0..97e9a305 100644 --- a/lib/views/contactsview.dart +++ b/lib/views/contactsview.dart @@ -8,6 +8,7 @@ import 'package:cwtch/models/contactlist.dart'; import 'package:cwtch/models/profile.dart'; import 'package:cwtch/models/profilelist.dart'; import 'package:cwtch/models/search.dart'; +import 'package:cwtch/views/globalsettingsview.dart'; import 'package:cwtch/views/profileserversview.dart'; import 'package:flutter/material.dart'; import 'package:cwtch/widgets/contactrow.dart'; @@ -30,7 +31,7 @@ import 'messageview.dart'; enum ShareMenu { copyCode, qrcode } -enum ProfileStatusMenu { available, away, busy, appearOffline, editProfile } +enum ProfileStatusMenu { available, away, busy, appearOnline, appearOffline, allowUnknownContacts, blockUnknownContacts, enableProfile, disableProfile, editProfile } class ContactsView extends StatefulWidget { const ContactsView({Key? key}) : super(key: key); @@ -117,6 +118,9 @@ class _ContactsViewState extends State { @override Widget build(BuildContext context) { + var enabled = Provider.of(context, listen: false).enabled; + var appearOffline = Provider.of(context, listen: false).appearOffline; + var settings = Provider.of(context, listen: false); return ScaffoldMessenger( key: scaffoldKey, child: Scaffold( @@ -181,6 +185,8 @@ class _ContactsViewState extends State { Provider.of(context, listen: false).cwtch.SetProfileAttribute(onion, "profile.profile-status", "busy"); break; case ProfileStatusMenu.appearOffline: + Provider.of(context, listen: false).appearOffline = true; + Provider.of(context, listen: false).cwtch.SetProfileAttribute(onion, "profile.appear-offline", "true"); Provider.of(context, listen: false).deactivatePeerEngine(context); Provider.of(context, listen: false).cwtch.ConfigureConnections(onion, false, false, false); break; @@ -199,29 +205,131 @@ class _ContactsViewState extends State { transitionDuration: Duration(milliseconds: 200), ), ); + break; + case ProfileStatusMenu.appearOnline: + Provider.of(context, listen: false).appearOffline = false; + Provider.of(context, listen: false).cwtch.SetProfileAttribute(onion, "profile.appear-offline", "false"); + // we only need to toggle all connections on here.. + Provider.of(context, listen: false).cwtch.ConfigureConnections(onion, true, true, true); + break; + case ProfileStatusMenu.allowUnknownContacts: + settings.blockUnknownConnections = false; + saveSettings(context); + break; + case ProfileStatusMenu.blockUnknownContacts: + settings.blockUnknownConnections = true; + saveSettings(context); + break; + case ProfileStatusMenu.enableProfile: + Provider.of(context, listen: false).enabled = true; + if (Provider.of(context, listen: false).appearOffline) { + Provider.of(context, listen: false).cwtch.ConfigureConnections(onion, false, false, false); + } else { + Provider.of(context, listen: false).cwtch.ConfigureConnections(onion, true, true, true); + } + break; + case ProfileStatusMenu.disableProfile: + Provider.of(context, listen: false).enabled = false; + Provider.of(context, listen: false).cwtch.DeactivatePeerEngine(onion); + break; } }, itemBuilder: (BuildContext context) => >[ PopupMenuItem( value: ProfileStatusMenu.available, - child: Text(AppLocalizations.of(context)!.availabilityStatusAvailable!, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle)), + enabled: enabled, + child: Row(children: [ + Icon( + CwtchIcons.account_circle_24px, + color: Colors.white, + ), + Expanded( + child: Text(AppLocalizations.of(context)!.availabilityStatusAvailable!, + textAlign: TextAlign.right, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle))) + ]), ), PopupMenuItem( value: ProfileStatusMenu.away, - child: Text(AppLocalizations.of(context)!.availabilityStatusAway!, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle)), + enabled: enabled, + child: Row(children: [ + Icon( + CwtchIcons.account_circle_24px, + color: Colors.yellowAccent, + ), + Expanded( + child: Text(AppLocalizations.of(context)!.availabilityStatusAway!, + textAlign: TextAlign.right, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle))) + ]), ), PopupMenuItem( value: ProfileStatusMenu.busy, - child: Text(AppLocalizations.of(context)!.availabilityStatusBusy!, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle)), - ), - PopupMenuItem( - value: ProfileStatusMenu.appearOffline, - child: Text(AppLocalizations.of(context)!.profileAppearOffline!, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle)), + enabled: enabled, + child: Row(children: [ + Icon( + CwtchIcons.account_circle_24px, + color: Colors.redAccent, + ), + Expanded( + child: Text(AppLocalizations.of(context)!.availabilityStatusBusy!, + textAlign: TextAlign.right, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle))) + ]), ), PopupMenuDivider(), + PopupMenuItem( + value: ProfileStatusMenu.appearOffline, + enabled: enabled && !appearOffline, + child: Row(children: [ + Icon(CwtchIcons.disconnect_from_contact), + Expanded( + child: Text(AppLocalizations.of(context)!.profileAppearOffline!, + textAlign: TextAlign.right, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle))) + ]), + ), + PopupMenuItem( + value: ProfileStatusMenu.appearOnline, + enabled: enabled && appearOffline, + child: Row(children: [ + Icon(CwtchIcons.disconnect_from_contact), + Expanded( + child: Text(AppLocalizations.of(context)!.profileAppearOnline!, + textAlign: TextAlign.right, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle))) + ]), + ), + PopupMenuDivider(), + PopupMenuItem( + value: !settings.blockUnknownConnections ? ProfileStatusMenu.blockUnknownContacts : ProfileStatusMenu.allowUnknownContacts, + child: Row(children: [ + Icon( + CwtchIcons.block_unknown, + color: settings.theme.mainTextColor, + ), + Expanded( + child: Text((settings.blockUnknownConnections ? AppLocalizations.of(context)!.profileAllowUnknownContacts! : AppLocalizations.of(context)!.profileBlockUnknownContacts!), + textAlign: TextAlign.right, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle))) + ]), + ), + PopupMenuDivider(), + PopupMenuItem( + value: enabled ? ProfileStatusMenu.disableProfile : ProfileStatusMenu.enableProfile, + child: Row(children: [ + Icon(CwtchIcons.favorite_24dp, color: settings.theme.mainTextColor), + Expanded( + child: Text((enabled ? AppLocalizations.of(context)!.profileDisableProfile! : AppLocalizations.of(context)!.profileEnableProfile!), + textAlign: TextAlign.right, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle))) + ]), + ), PopupMenuItem( value: ProfileStatusMenu.editProfile, - child: Text(AppLocalizations.of(context)!.editProfile!, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle)), + enabled: true, + child: Row(children: [ + Icon( + CwtchIcons.edit_24px, + color: settings.theme.mainTextColor, + ), + Expanded( + child: + Text(AppLocalizations.of(context)!.editProfile!, textAlign: TextAlign.right, style: Provider.of(context, listen: false).scaleFonts(defaultTextButtonStyle))) + ]), ), ], ), diff --git a/lib/views/filesharingview.dart b/lib/views/filesharingview.dart index 3c6a567b..d6399ccf 100644 --- a/lib/views/filesharingview.dart +++ b/lib/views/filesharingview.dart @@ -60,7 +60,7 @@ class _FileSharingViewState extends State { value: sharedFiles[index]["Active"], activeTrackColor: Provider.of(context).theme.defaultButtonColor, inactiveTrackColor: Provider.of(context).theme.defaultButtonDisabledColor, - secondary: Icon(CwtchIcons.attached_file_2, color: Provider.of(context).current().mainTextColor), + secondary: Icon(CwtchIcons.attached_file_3, color: Provider.of(context).current().mainTextColor), onChanged: (newValue) { setState(() { if (newValue) { diff --git a/lib/views/globalsettingsview.dart b/lib/views/globalsettingsview.dart index bc34aa1a..180bc5fc 100644 --- a/lib/views/globalsettingsview.dart +++ b/lib/views/globalsettingsview.dart @@ -455,7 +455,7 @@ class _GlobalSettingsViewState extends State { }, activeTrackColor: settings.theme.defaultButtonColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor, - secondary: Icon(CwtchIcons.attached_file_2, color: settings.current().mainTextColor), + secondary: Icon(CwtchIcons.attached_file_3, color: settings.current().mainTextColor), ), Visibility( visible: settings.isExperimentEnabled(FileSharingExperiment), diff --git a/lib/views/messageview.dart b/lib/views/messageview.dart index 89a355a1..a4a43d3f 100644 --- a/lib/views/messageview.dart +++ b/lib/views/messageview.dart @@ -109,7 +109,7 @@ class _MessageViewState extends State { if (Provider.of(context, listen: false).isOnline()) { appBarButtons.add(IconButton( splashRadius: Material.defaultSplashRadius / 2, - icon: Icon(Icons.speaker_notes_off), + icon: Icon(CwtchIcons.disconnect_from_contact), tooltip: AppLocalizations.of(context)!.contactDisconnect, onPressed: () { if (Provider.of(context, listen: false).isGroup) { @@ -146,7 +146,7 @@ class _MessageViewState extends State { if (showFileSharing) { appBarButtons.add(IconButton( splashRadius: Material.defaultSplashRadius / 2, - icon: Icon(CwtchIcons.attached_file_2, size: 26, color: Provider.of(context).theme.mainTextColor), + icon: Icon(CwtchIcons.attached_file_3, size: 26, color: Provider.of(context).theme.mainTextColor), tooltip: AppLocalizations.of(context)!.tooltipSendFile, onPressed: Provider.of(context).disableFilePicker ? null diff --git a/lib/widgets/filebubble.dart b/lib/widgets/filebubble.dart index 1127d7ef..ff3a2fe9 100644 --- a/lib/widgets/filebubble.dart +++ b/lib/widgets/filebubble.dart @@ -139,7 +139,7 @@ class FileBubbleState extends State { } else if (widget.isPreview && myFile == null) { return Row( children: [ - Icon(CwtchIcons.attached_file_2, size: 32, color: Provider.of(context).theme.messageFromMeTextColor), + Icon(CwtchIcons.attached_file_3, size: 32, color: Provider.of(context).theme.messageFromMeTextColor), Flexible(child: Text(widget.nameSuggestion, style: TextStyle(fontWeight: FontWeight.bold, fontFamily: "Inter", color: Provider.of(context).theme.messageFromMeTextColor))) ], ); @@ -340,7 +340,7 @@ class FileBubbleState extends State { maxLines: 4, textWidthBasis: TextWidthBasis.parent, ), - leading: Icon(CwtchIcons.attached_file_2, size: 32, color: Provider.of(context).theme.messageFromMeTextColor)); + leading: Icon(CwtchIcons.attached_file_3, size: 32, color: Provider.of(context).theme.messageFromMeTextColor)); } // Construct an file chrome @@ -378,7 +378,7 @@ class FileBubbleState extends State { maxLines: 4, textWidthBasis: TextWidthBasis.parent, ), - leading: Icon(CwtchIcons.attached_file_2, size: 32, color: Provider.of(context).theme.messageFromOtherTextColor), + leading: Icon(CwtchIcons.attached_file_3, size: 32, color: Provider.of(context).theme.messageFromOtherTextColor), trailing: Visibility( visible: speed != "0 B/s", child: SelectableText( @@ -402,7 +402,7 @@ class FileBubbleState extends State { padding: EdgeInsets.all(10), child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ ListTile( - leading: Icon(CwtchIcons.attached_file_2), + leading: Icon(CwtchIcons.attached_file_3), title: Text(meta), trailing: IconButton( icon: Icon(Icons.close), From 8ff0cfe5b1407eb185cb5d5857602558e6a6d7ab Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 20 Sep 2023 12:28:49 -0700 Subject: [PATCH 2/3] New Icons, New Translations, More Complete Profile Menu --- lib/cwtch/cwtch.dart | 2 +- lib/cwtch/ffi.dart | 2 +- lib/cwtch/gomobile.dart | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/cwtch/cwtch.dart b/lib/cwtch/cwtch.dart index c93b54d7..811e8abd 100644 --- a/lib/cwtch/cwtch.dart +++ b/lib/cwtch/cwtch.dart @@ -155,5 +155,5 @@ abstract class Cwtch { Future SearchConversations(String profile, String pattern); void DeleteServerInfo(String profile, String handle); - void ConfigureConnections(String onion, bool listen, bool peers, bool servers); + Future ConfigureConnections(String onion, bool listen, bool peers, bool servers); } diff --git a/lib/cwtch/ffi.dart b/lib/cwtch/ffi.dart index 47479ce9..3b1cfe9a 100644 --- a/lib/cwtch/ffi.dart +++ b/lib/cwtch/ffi.dart @@ -1102,7 +1102,7 @@ class CwtchFfi implements Cwtch { } @override - void ConfigureConnections(String profile, bool listen, bool peers, bool servers) { + Future ConfigureConnections(String profile, bool listen, bool peers, bool servers) async { var configureConnections = library.lookup>("c_ConfigureConnections"); // ignore: non_constant_identifier_names final ConfigureConnections = configureConnections.asFunction(); diff --git a/lib/cwtch/gomobile.dart b/lib/cwtch/gomobile.dart index dd06c280..476cf7c7 100644 --- a/lib/cwtch/gomobile.dart +++ b/lib/cwtch/gomobile.dart @@ -460,7 +460,8 @@ class CwtchGomobile implements Cwtch { } @override - void ConfigureConnections(String profile, bool listen, bool peers, bool servers) { + Future ConfigureConnections(String profile, bool listen, bool peers, bool servers) async { cwtchPlatform.invokeMethod("ConfigureConnections", {"ProfileOnion": profile, "listen": listen, "peers": peers, "servers": servers}); + return; } } From deab06bedaa5055b3f42f058c37b85ca18d9ea5f Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 20 Sep 2023 15:30:33 -0700 Subject: [PATCH 3/3] Format --- integration_test/steps/text.dart | 4 ++-- lib/views/contactsview.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integration_test/steps/text.dart b/integration_test/steps/text.dart index 1a78f10e..d31b0f85 100644 --- a/integration_test/steps/text.dart +++ b/integration_test/steps/text.dart @@ -40,14 +40,14 @@ StepDefinitionGeneric TorVersionPresent() { context.expect(versionString, "#.#.#", reason: "error reading version string from fetch-tor.sh"); return; } - context.world.attach( versionString.substring(0,4), "text/plain", "Then I expect the Tor version to be present"); + context.world.attach(versionString.substring(0, 4), "text/plain", "Then I expect the Tor version to be present"); //context.reporter.message("test!!!", MessageLevel.info); print("looking for version string $versionString"); return await context.world.appDriver.waitUntil(() async { context.world.appDriver.waitForAppToSettle(); final finder = context.world.appDriver.findBy( - versionString.substring(0,4), + versionString.substring(0, 4), FindType.text, ); return await context.world.appDriver.isPresent(finder); diff --git a/lib/views/contactsview.dart b/lib/views/contactsview.dart index 97e9a305..d950ef69 100644 --- a/lib/views/contactsview.dart +++ b/lib/views/contactsview.dart @@ -230,7 +230,7 @@ class _ContactsViewState extends State { break; case ProfileStatusMenu.disableProfile: Provider.of(context, listen: false).enabled = false; - Provider.of(context, listen: false).cwtch.DeactivatePeerEngine(onion); + Provider.of(context, listen: false).deactivatePeerEngine(context); break; } },