From f98fe7fa877c43884cec9f5c7fe50c6c6d637bb1 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 19 Oct 2017 15:37:35 +0100 Subject: [PATCH 1/2] Add warning when adding group rooms/users --- src/GroupAddressPicker.js | 18 ++++++++++++++++-- src/i18n/strings/en_EN.json | 10 +++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/GroupAddressPicker.js b/src/GroupAddressPicker.js index 2e3c276f658..34a5489348a 100644 --- a/src/GroupAddressPicker.js +++ b/src/GroupAddressPicker.js @@ -22,10 +22,17 @@ import MatrixClientPeg from './MatrixClientPeg'; import GroupStoreCache from './stores/GroupStoreCache'; export function showGroupInviteDialog(groupId) { + const description =
+
{_t("Who would you like to add to this community?")}
+
+ {_t("Warning: any person you add to a community will be publicly visible to anyone who knows the community ID")} +
+
; + const AddressPickerDialog = sdk.getComponent("dialogs.AddressPickerDialog"); Modal.createTrackedDialog('Group Invite', '', AddressPickerDialog, { title: _t("Invite new community members"), - description: _t("Who would you like to add to this community?"), + description: description, placeholder: _t("Name or matrix ID"), button: _t("Invite to Community"), validAddressTypes: ['mx-user-id'], @@ -39,10 +46,17 @@ export function showGroupInviteDialog(groupId) { export function showGroupAddRoomDialog(groupId) { return new Promise((resolve, reject) => { + const description =
+
{_t("Which rooms would you like to add to this community?")}
+
+ {_t("Warning: any room you add to a community will be publicly visible to anyone who knows the community ID")} +
+
; + const AddressPickerDialog = sdk.getComponent("dialogs.AddressPickerDialog"); Modal.createTrackedDialog('Add Rooms to Group', '', AddressPickerDialog, { title: _t("Add rooms to the community"), - description: _t("Which rooms would you like to add to this community?"), + description: description, placeholder: _t("Room name or alias"), button: _t("Add to community"), pickerType: 'room', diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b3bbd4eb9a3..9fbf16e5da6 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -43,18 +43,20 @@ "%(weekDayName)s %(time)s": "%(weekDayName)s %(time)s", "%(weekDayName)s, %(monthName)s %(day)s %(time)s": "%(weekDayName)s, %(monthName)s %(day)s %(time)s", "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s": "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s", - "Invite new community members": "Invite new community members", "Who would you like to add to this community?": "Who would you like to add to this community?", + "Warning: any person you add to a community will be publicly visible to anyone who knows the community ID": "Warning: any person you add to a community will be publicly visible to anyone who knows the community ID", + "Invite new community members": "Invite new community members", "Name or matrix ID": "Name or matrix ID", "Invite to Community": "Invite to Community", - "Add rooms to the community": "Add rooms to the community", "Which rooms would you like to add to this community?": "Which rooms would you like to add to this community?", + "Warning: any room you add to a community will be publicly visible to anyone who knows the community ID": "Warning: any room you add to a community will be publicly visible to anyone who knows the community ID", + "Add rooms to the community": "Add rooms to the community", "Room name or alias": "Room name or alias", "Add to community": "Add to community", "Failed to invite the following users to %(groupId)s:": "Failed to invite the following users to %(groupId)s:", "Invites sent": "Invites sent", "Your community invitations have been sent.": "Your community invitations have been sent.", - "Failed to invite users community": "Failed to invite users community", + "Failed to invite users to community": "Failed to invite users to community", "Failed to invite users to %(groupId)s": "Failed to invite users to %(groupId)s", "Failed to add the following rooms to %(groupId)s:": "Failed to add the following rooms to %(groupId)s:", "Riot does not have permission to send you notifications - please check your browser settings": "Riot does not have permission to send you notifications - please check your browser settings", @@ -684,7 +686,6 @@ "Community Member Settings": "Community Member Settings", "Publish this community on your profile": "Publish this community on your profile", "Long Description (HTML)": "Long Description (HTML)", - "Community Name": "Community Name", "Description": "Description", "Community Settings": "Community Settings", "Community %(groupId)s not found": "Community %(groupId)s not found", @@ -700,7 +701,6 @@ "Logout": "Logout", "You are a member of these communities:": "You are a member of these communities:", "Error whilst fetching joined communities": "Error whilst fetching joined communities", - "Communities": "Communities", "Create a new community": "Create a new community", "Create a community to represent your community! Define a set of rooms and your own custom homepage to mark out your space in the Matrix universe.": "Create a community to represent your community! Define a set of rooms and your own custom homepage to mark out your space in the Matrix universe.", "Join an existing community": "Join an existing community", From 9141ba280ad27d07b38568867bbbb25a107d685c Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 19 Oct 2017 15:55:57 +0100 Subject: [PATCH 2/2] Lint --- src/GroupAddressPicker.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/GroupAddressPicker.js b/src/GroupAddressPicker.js index 34a5489348a..0b039074f06 100644 --- a/src/GroupAddressPicker.js +++ b/src/GroupAddressPicker.js @@ -23,9 +23,12 @@ import GroupStoreCache from './stores/GroupStoreCache'; export function showGroupInviteDialog(groupId) { const description =
-
{_t("Who would you like to add to this community?")}
+
{ _t("Who would you like to add to this community?") }
- {_t("Warning: any person you add to a community will be publicly visible to anyone who knows the community ID")} + { _t( + "Warning: any person you add to a community will be publicly "+ + "visible to anyone who knows the community ID", + ) }
; @@ -47,9 +50,12 @@ export function showGroupInviteDialog(groupId) { export function showGroupAddRoomDialog(groupId) { return new Promise((resolve, reject) => { const description =
-
{_t("Which rooms would you like to add to this community?")}
+
{ _t("Which rooms would you like to add to this community?") }
- {_t("Warning: any room you add to a community will be publicly visible to anyone who knows the community ID")} + { _t( + "Warning: any room you add to a community will be publicly "+ + "visible to anyone who knows the community ID", + ) }
;