diff --git a/LIBCWTCH-GO.version b/LIBCWTCH-GO.version index f5ff63c0..5e60f32c 100644 --- a/LIBCWTCH-GO.version +++ b/LIBCWTCH-GO.version @@ -1 +1 @@ -v1.2.1-2021-08-30-22-14 \ No newline at end of file +v1.2.1-2-ga8e7bba-2021-09-14-21-04 diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index 31060f4e..caf5fd94 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,6 +1,8 @@ { "@@locale": "de", - "@@last_modified": "2021-08-29T18:35:41+02:00", + "@@last_modified": "2021-09-14T22:34:57+02:00", + "descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact onions", + "streamerModeLabel": "Streamer\/Presentation Mode", "archiveConversation": "Archive this Conversation", "profileOnionLabel": "Senden Sie diese Adresse an Peers, mit denen Sie sich verbinden möchten", "addPeerTab": "Einen anderen Nutzer hinzufügen", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 53e4971d..389e91cf 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,6 +1,8 @@ { "@@locale": "en", - "@@last_modified": "2021-08-29T18:35:41+02:00", + "@@last_modified": "2021-09-14T22:34:57+02:00", + "descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact onions", + "streamerModeLabel": "Streamer\/Presentation Mode", "archiveConversation": "Archive this Conversation", "profileOnionLabel": "Send this address to people you want to connect with", "addPeerTab": "Add a contact", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index 02922d43..a3c80388 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -1,6 +1,8 @@ { "@@locale": "es", - "@@last_modified": "2021-08-29T18:35:41+02:00", + "@@last_modified": "2021-09-14T22:34:57+02:00", + "descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact onions", + "streamerModeLabel": "Streamer\/Presentation Mode", "archiveConversation": "Archive this Conversation", "profileOnionLabel": "Envía esta dirección a los contactos con los que quieras conectarte", "addPeerTab": "Agregar Contacto", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index 764feeb4..6bc3fb27 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,6 +1,8 @@ { "@@locale": "fr", - "@@last_modified": "2021-08-29T18:35:41+02:00", + "@@last_modified": "2021-09-14T22:34:57+02:00", + "descriptionStreamerMode": "Si elle est activée, cette option donne un rendu visuel plus privé à l'application pour la diffusion ou la présentation, par exemple en masquant les profils et les contacts.", + "streamerModeLabel": "Mode Streamer\/Présentation", "archiveConversation": "Archiver cette conversation", "profileOnionLabel": "Envoyez cette adresse aux personnes avec lesquelles vous souhaitez entrer en contact.", "addPeerTab": "Ajouter un contact", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index 3ae0cbf8..a7348ca0 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -1,6 +1,8 @@ { "@@locale": "it", - "@@last_modified": "2021-08-29T18:35:41+02:00", + "@@last_modified": "2021-09-14T22:34:57+02:00", + "descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact onions", + "streamerModeLabel": "Streamer\/Presentation Mode", "archiveConversation": "Archive this Conversation", "profileOnionLabel": "Inviare questo indirizzo ai peer con cui si desidera connettersi", "addPeerTab": "Aggiungi un peer", diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index 4fec7193..13756057 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -1,6 +1,8 @@ { "@@locale": "pl", - "@@last_modified": "2021-08-29T18:35:41+02:00", + "@@last_modified": "2021-09-14T22:34:57+02:00", + "descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact onions", + "streamerModeLabel": "Streamer\/Presentation Mode", "archiveConversation": "Archive this Conversation", "profileOnionLabel": "Send this address to contacts you want to connect with", "addPeerTab": "Add a contact", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index b52abf99..6851374b 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -1,6 +1,8 @@ { "@@locale": "pt", - "@@last_modified": "2021-08-29T18:35:41+02:00", + "@@last_modified": "2021-09-14T22:34:57+02:00", + "descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact onions", + "streamerModeLabel": "Streamer\/Presentation Mode", "archiveConversation": "Archive this Conversation", "profileOnionLabel": "Send this address to contacts you want to connect with", "addPeerTab": "Add a contact", diff --git a/lib/settings.dart b/lib/settings.dart index df42b083..fa2d965a 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -31,6 +31,7 @@ class Settings extends ChangeNotifier { DualpaneMode _uiColumnModeLandscape = DualpaneMode.CopyPortrait; bool blockUnknownConnections = false; + bool streamerMode = false; /// Set the dark theme. void setDark() { @@ -74,11 +75,11 @@ class Settings extends ChangeNotifier { // Set Locale and notify listeners switchLocale(Locale(settings["Locale"])); - // Decide whether to enable Experiments - blockUnknownConnections = settings["BlockUnknownConnections"]; + blockUnknownConnections = settings["BlockUnknownConnections"] ?? false; + streamerMode = settings["StreamerMode"] ?? false; // Decide whether to enable Experiments - experimentsEnabled = settings["ExperimentsEnabled"]; + experimentsEnabled = settings["ExperimentsEnabled"] ?? false; // Set the internal experiments map. Casting from the Map that we get from JSON experiments = new HashMap.from(settings["Experiments"]); @@ -105,6 +106,11 @@ class Settings extends ChangeNotifier { notifyListeners(); } + setStreamerMode(bool newSteamerMode) { + streamerMode = newSteamerMode; + notifyListeners(); + } + /// Block Unknown Connections will autoblock connections if they authenticate with public key not in our contacts list. /// This is one of the best tools we have to combat abuse, while it isn't ideal it does allow a user to curate their contacts /// list without being bothered by spurious requests (either permanently, or as a short term measure). @@ -227,6 +233,7 @@ class Settings extends ChangeNotifier { "Theme": themeString, "PreviousPid": -1, "BlockUnknownConnections": blockUnknownConnections, + "StreamerMode": streamerMode, "ExperimentsEnabled": this.experimentsEnabled, "Experiments": experiments, "StateRootPane": 0, diff --git a/lib/views/globalsettingsview.dart b/lib/views/globalsettingsview.dart index ce655ed3..fa7b1619 100644 --- a/lib/views/globalsettingsview.dart +++ b/lib/views/globalsettingsview.dart @@ -137,6 +137,19 @@ class _GlobalSettingsViewState extends State { inactiveTrackColor: settings.theme.defaultButtonDisabledColor(), secondary: Icon(CwtchIcons.block_unknown, color: settings.current().mainTextColor()), ), + SwitchListTile( + title: Text(AppLocalizations.of(context)!.streamerModeLabel, style: TextStyle(color: settings.current().mainTextColor())), + subtitle: Text(AppLocalizations.of(context)!.descriptionStreamerMode), + value: settings.streamerMode, + onChanged: (bool value) { + settings.setStreamerMode(value); + // Save Settings... + saveSettings(context); + }, + activeTrackColor: settings.theme.defaultButtonActiveColor(), + inactiveTrackColor: settings.theme.defaultButtonDisabledColor(), + secondary: Icon(CwtchIcons.block_unknown, color: settings.current().mainTextColor()), + ), SwitchListTile( title: Text(AppLocalizations.of(context)!.experimentsEnabled, style: TextStyle(color: settings.current().mainTextColor())), subtitle: Text(AppLocalizations.of(context)!.descriptionExperiments), diff --git a/lib/widgets/contactrow.dart b/lib/widgets/contactrow.dart index 140e3703..9514e0ec 100644 --- a/lib/widgets/contactrow.dart +++ b/lib/widgets/contactrow.dart @@ -65,9 +65,11 @@ class _ContactRowState extends State { child: LinearProgressIndicator( color: Provider.of(context).theme.defaultButtonActiveColor(), )), - Text(contact.onion, + Visibility( + visible: !Provider.of(context).streamerMode, + child: Text(contact.onion, style: TextStyle(color: contact.isBlocked ? Provider.of(context).theme.portraitBlockedTextColor() : Provider.of(context).theme.mainTextColor())), - ], + )], ))), Padding( padding: const EdgeInsets.all(5.0), diff --git a/lib/widgets/profilerow.dart b/lib/widgets/profilerow.dart index 0c987820..3782195e 100644 --- a/lib/widgets/profilerow.dart +++ b/lib/widgets/profilerow.dart @@ -46,12 +46,14 @@ class _ProfileRowState extends State { softWrap: true, overflow: TextOverflow.ellipsis, ), - ExcludeSemantics( - child: Text( - profile.onion, - softWrap: true, - overflow: TextOverflow.ellipsis, - )) + Visibility( + visible: !Provider.of(context).streamerMode, + child: ExcludeSemantics( + child: Text( + profile.onion, + softWrap: true, + overflow: TextOverflow.ellipsis, + ))) ], )), IconButton(