Merge pull request 'streamerMode' (#183) from streamerMode into trunk
continuous-integration/drone/push Build is pending
Details
continuous-integration/drone/push Build is pending
Details
Reviewed-on: #183 Reviewed-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
This commit is contained in:
commit
3a34044f8e
|
@ -1 +1 @@
|
||||||
v1.2.1-2021-08-30-22-14
|
v1.2.1-2-ga8e7bba-2021-09-14-21-04
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@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",
|
"archiveConversation": "Archive this Conversation",
|
||||||
"profileOnionLabel": "Senden Sie diese Adresse an Peers, mit denen Sie sich verbinden möchten",
|
"profileOnionLabel": "Senden Sie diese Adresse an Peers, mit denen Sie sich verbinden möchten",
|
||||||
"addPeerTab": "Einen anderen Nutzer hinzufügen",
|
"addPeerTab": "Einen anderen Nutzer hinzufügen",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@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",
|
"archiveConversation": "Archive this Conversation",
|
||||||
"profileOnionLabel": "Send this address to people you want to connect with",
|
"profileOnionLabel": "Send this address to people you want to connect with",
|
||||||
"addPeerTab": "Add a contact",
|
"addPeerTab": "Add a contact",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "es",
|
"@@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",
|
"archiveConversation": "Archive this Conversation",
|
||||||
"profileOnionLabel": "Envía esta dirección a los contactos con los que quieras conectarte",
|
"profileOnionLabel": "Envía esta dirección a los contactos con los que quieras conectarte",
|
||||||
"addPeerTab": "Agregar Contacto",
|
"addPeerTab": "Agregar Contacto",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@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",
|
"archiveConversation": "Archiver cette conversation",
|
||||||
"profileOnionLabel": "Envoyez cette adresse aux personnes avec lesquelles vous souhaitez entrer en contact.",
|
"profileOnionLabel": "Envoyez cette adresse aux personnes avec lesquelles vous souhaitez entrer en contact.",
|
||||||
"addPeerTab": "Ajouter un contact",
|
"addPeerTab": "Ajouter un contact",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "it",
|
"@@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",
|
"archiveConversation": "Archive this Conversation",
|
||||||
"profileOnionLabel": "Inviare questo indirizzo ai peer con cui si desidera connettersi",
|
"profileOnionLabel": "Inviare questo indirizzo ai peer con cui si desidera connettersi",
|
||||||
"addPeerTab": "Aggiungi un peer",
|
"addPeerTab": "Aggiungi un peer",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pl",
|
"@@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",
|
"archiveConversation": "Archive this Conversation",
|
||||||
"profileOnionLabel": "Send this address to contacts you want to connect with",
|
"profileOnionLabel": "Send this address to contacts you want to connect with",
|
||||||
"addPeerTab": "Add a contact",
|
"addPeerTab": "Add a contact",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pt",
|
"@@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",
|
"archiveConversation": "Archive this Conversation",
|
||||||
"profileOnionLabel": "Send this address to contacts you want to connect with",
|
"profileOnionLabel": "Send this address to contacts you want to connect with",
|
||||||
"addPeerTab": "Add a contact",
|
"addPeerTab": "Add a contact",
|
||||||
|
|
|
@ -31,6 +31,7 @@ class Settings extends ChangeNotifier {
|
||||||
DualpaneMode _uiColumnModeLandscape = DualpaneMode.CopyPortrait;
|
DualpaneMode _uiColumnModeLandscape = DualpaneMode.CopyPortrait;
|
||||||
|
|
||||||
bool blockUnknownConnections = false;
|
bool blockUnknownConnections = false;
|
||||||
|
bool streamerMode = false;
|
||||||
|
|
||||||
/// Set the dark theme.
|
/// Set the dark theme.
|
||||||
void setDark() {
|
void setDark() {
|
||||||
|
@ -74,11 +75,11 @@ class Settings extends ChangeNotifier {
|
||||||
// Set Locale and notify listeners
|
// Set Locale and notify listeners
|
||||||
switchLocale(Locale(settings["Locale"]));
|
switchLocale(Locale(settings["Locale"]));
|
||||||
|
|
||||||
// Decide whether to enable Experiments
|
blockUnknownConnections = settings["BlockUnknownConnections"] ?? false;
|
||||||
blockUnknownConnections = settings["BlockUnknownConnections"];
|
streamerMode = settings["StreamerMode"] ?? false;
|
||||||
|
|
||||||
// Decide whether to enable Experiments
|
// Decide whether to enable Experiments
|
||||||
experimentsEnabled = settings["ExperimentsEnabled"];
|
experimentsEnabled = settings["ExperimentsEnabled"] ?? false;
|
||||||
|
|
||||||
// Set the internal experiments map. Casting from the Map<dynamic, dynamic> that we get from JSON
|
// Set the internal experiments map. Casting from the Map<dynamic, dynamic> that we get from JSON
|
||||||
experiments = new HashMap<String, bool>.from(settings["Experiments"]);
|
experiments = new HashMap<String, bool>.from(settings["Experiments"]);
|
||||||
|
@ -105,6 +106,11 @@ class Settings extends ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setStreamerMode(bool newSteamerMode) {
|
||||||
|
streamerMode = newSteamerMode;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
/// Block Unknown Connections will autoblock connections if they authenticate with public key not in our contacts list.
|
/// 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
|
/// 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).
|
/// 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,
|
"Theme": themeString,
|
||||||
"PreviousPid": -1,
|
"PreviousPid": -1,
|
||||||
"BlockUnknownConnections": blockUnknownConnections,
|
"BlockUnknownConnections": blockUnknownConnections,
|
||||||
|
"StreamerMode": streamerMode,
|
||||||
"ExperimentsEnabled": this.experimentsEnabled,
|
"ExperimentsEnabled": this.experimentsEnabled,
|
||||||
"Experiments": experiments,
|
"Experiments": experiments,
|
||||||
"StateRootPane": 0,
|
"StateRootPane": 0,
|
||||||
|
|
|
@ -137,6 +137,19 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
||||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
||||||
secondary: Icon(CwtchIcons.block_unknown, color: settings.current().mainTextColor()),
|
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(
|
SwitchListTile(
|
||||||
title: Text(AppLocalizations.of(context)!.experimentsEnabled, style: TextStyle(color: settings.current().mainTextColor())),
|
title: Text(AppLocalizations.of(context)!.experimentsEnabled, style: TextStyle(color: settings.current().mainTextColor())),
|
||||||
subtitle: Text(AppLocalizations.of(context)!.descriptionExperiments),
|
subtitle: Text(AppLocalizations.of(context)!.descriptionExperiments),
|
||||||
|
|
|
@ -65,9 +65,11 @@ class _ContactRowState extends State<ContactRow> {
|
||||||
child: LinearProgressIndicator(
|
child: LinearProgressIndicator(
|
||||||
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
|
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
|
||||||
)),
|
)),
|
||||||
Text(contact.onion,
|
Visibility(
|
||||||
|
visible: !Provider.of<Settings>(context).streamerMode,
|
||||||
|
child: Text(contact.onion,
|
||||||
style: TextStyle(color: contact.isBlocked ? Provider.of<Settings>(context).theme.portraitBlockedTextColor() : Provider.of<Settings>(context).theme.mainTextColor())),
|
style: TextStyle(color: contact.isBlocked ? Provider.of<Settings>(context).theme.portraitBlockedTextColor() : Provider.of<Settings>(context).theme.mainTextColor())),
|
||||||
],
|
)],
|
||||||
))),
|
))),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(5.0),
|
padding: const EdgeInsets.all(5.0),
|
||||||
|
|
|
@ -46,12 +46,14 @@ class _ProfileRowState extends State<ProfileRow> {
|
||||||
softWrap: true,
|
softWrap: true,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
ExcludeSemantics(
|
Visibility(
|
||||||
child: Text(
|
visible: !Provider.of<Settings>(context).streamerMode,
|
||||||
profile.onion,
|
child: ExcludeSemantics(
|
||||||
softWrap: true,
|
child: Text(
|
||||||
overflow: TextOverflow.ellipsis,
|
profile.onion,
|
||||||
))
|
softWrap: true,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
)))
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
|
Loading…
Reference in New Issue