From 131f499c25828b0c52401ca7556c14b78f23bbbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
+ " It’s not recommended to make end-to-end encrypted rooms public. It " +
+ "means anyone can find and join this room, so anyone can read messages. You’ll " +
+ "get none of the benefits of encryption. Encrypting messages in a public room " +
+ "will also likely make receiving and sending messages slower than necessary.",
+ null,
+ { "b": (sub) => { sub } },
+ )} { _t(
+ "To avoid these issues, create a new public room for the conversation " +
+ "you plan to have.",
+ null,
+ { "a": (sub) => {
+ dialog.close();
+ this.createNewRoom(true);
+ }}> {sub} },
+ )} { _t(
+ " It’s not recommended to turn on encryption on for public rooms. " +
+ "Anyone can find and join public rooms, so anyone can read messages. You’ll " +
+ "get none of the benefits of encryption, and you won't be able to turn it " +
+ "off later. Encrypting messages in a public room will also likely make " +
+ "receiving and sending messages slower than necessary.",
+ null,
+ { "b": (sub) => { sub } },
+ )} { _t(
+ "To avoid these issues, create a new private encrypted room for " +
+ "the conversation you plan to have.",
+ null,
+ { "a": (sub) => {
+ dialog.close();
+ this.createNewRoom(false, true);
+ }}> {sub} },
+ )}
{ _t( - " It’s not recommended to turn on encryption on for public rooms. " + - "Anyone can find and join public rooms, so anyone can read messages. You’ll " + - "get none of the benefits of encryption, and you won't be able to turn it " + - "off later. Encrypting messages in a public room will also likely make " + - "receiving and sending messages slower than necessary.", + " It’s not recommended to add encryption to public rooms. " + + "Anyone can find and join public rooms, so anyone can read messages in them. " + + "You’ll get none of the benefits of encryption, and you won’t be able to turn it " + + "off later. Encrypting messages in a public room will make receiving and sending " + + "messages slower.", null, { "b": (sub) => { sub } }, ) }
@@ -236,10 +236,10 @@ export default class SecurityRoomSettingsTab extends React.Component{ _t( - " It’s not recommended to make end-to-end encrypted rooms public. It " + - "means anyone can find and join this room, so anyone can read messages. You’ll " + - "get none of the benefits of encryption. Encrypting messages in a public room " + - "will also likely make receiving and sending messages slower than necessary.", + " It’s not recommended to make encrypted rooms public. It " + + "It will mean anyone can find and join the room, so anyone can read messages. " + + "You’ll get none of the benefits of encryption. Encrypting messages in a public " + + "room will make receiving and sending messages slower.", null, { "b": (sub) => { sub } }, ) }
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 2ab0ea56a4..fc97f9d0ec 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1427,13 +1427,13 @@ "Permissions": "Permissions", "Select the roles required to change various parts of the room": "Select the roles required to change various parts of the room", "Are you sure you want to add encryption to this public room?": "Are you sure you want to add encryption to this public room?", - " It’s not recommended to turn on encryption on for public rooms. Anyone can find and join public rooms, so anyone can read messages. You’ll get none of the benefits of encryption, and you won't be able to turn it off later. Encrypting messages in a public room will also likely make receiving and sending messages slower than necessary.": " It’s not recommended to turn on encryption on for public rooms. Anyone can find and join public rooms, so anyone can read messages. You’ll get none of the benefits of encryption, and you won't be able to turn it off later. Encrypting messages in a public room will also likely make receiving and sending messages slower than necessary.", + " It’s not recommended to add encryption to public rooms. Anyone can find and join public rooms, so anyone can read messages in them. You’ll get none of the benefits of encryption, and you won’t be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to add encryption to public rooms. Anyone can find and join public rooms, so anyone can read messages in them. You’ll get none of the benefits of encryption, and you won’t be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.", "To avoid these issues, create a new private encrypted room for the conversation you plan to have.": "To avoid these issues, create a new private encrypted room for the conversation you plan to have.", "Enable encryption?": "Enable encryption?", "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.": "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.", "This upgrade will allow members of selected spaces access to this room without an invite.": "This upgrade will allow members of selected spaces access to this room without an invite.", "Are you sure you want to make this encrypted room public?": "Are you sure you want to make this encrypted room public?", - " It’s not recommended to make end-to-end encrypted rooms public. It means anyone can find and join this room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will also likely make receiving and sending messages slower than necessary.": " It’s not recommended to make end-to-end encrypted rooms public. It means anyone can find and join this room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will also likely make receiving and sending messages slower than necessary.", + " It’s not recommended to make encrypted rooms public. It It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to make encrypted rooms public. It It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.", "To avoid these issues, create a new public room for the conversation you plan to have.": "To avoid these issues, create a new public room for the conversation you plan to have.", "To link to this room, please add an address.": "To link to this room, please add an address.", "Private (invite only)": "Private (invite only)", From 168a32902e8da185184fef34722936e144c45076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- "To avoid these issues, create a new private encrypted room for " +
+ "To avoid these issues, create a new encrypted room for " +
"the conversation you plan to have.",
null,
{ "a": (sub) => {
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index fc97f9d0ec..a00a8e1c9b 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1428,7 +1428,7 @@
"Select the roles required to change various parts of the room": "Select the roles required to change various parts of the room",
"Are you sure you want to add encryption to this public room?": "Are you sure you want to add encryption to this public room?",
" It’s not recommended to add encryption to public rooms. Anyone can find and join public rooms, so anyone can read messages in them. You’ll get none of the benefits of encryption, and you won’t be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to add encryption to public rooms. Anyone can find and join public rooms, so anyone can read messages in them. You’ll get none of the benefits of encryption, and you won’t be able to turn it off later. Encrypting messages in a public room will make receiving and sending messages slower.",
- "To avoid these issues, create a new private encrypted room for the conversation you plan to have.": "To avoid these issues, create a new private encrypted room for the conversation you plan to have.",
+ "To avoid these issues, create a new encrypted room for the conversation you plan to have.": "To avoid these issues, create a new encrypted room for the conversation you plan to have.",
"Enable encryption?": "Enable encryption?",
"Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.": "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.",
"This upgrade will allow members of selected spaces access to this room without an invite.": "This upgrade will allow members of selected spaces access to this room without an invite.",
From e0762827feac962267fa8f59e18d9b8a81d126b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- " It’s not recommended to make encrypted rooms public. It " +
+ " It’s not recommended to make encrypted rooms public. " +
"It will mean anyone can find and join the room, so anyone can read messages. " +
"You’ll get none of the benefits of encryption. Encrypting messages in a public " +
"room will make receiving and sending messages slower.",
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index a00a8e1c9b..f20d7db6c8 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1433,7 +1433,7 @@
"Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.": "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.",
"This upgrade will allow members of selected spaces access to this room without an invite.": "This upgrade will allow members of selected spaces access to this room without an invite.",
"Are you sure you want to make this encrypted room public?": "Are you sure you want to make this encrypted room public?",
- " It’s not recommended to make encrypted rooms public. It It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to make encrypted rooms public. It It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.",
+ " It’s not recommended to make encrypted rooms public. It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.": " It’s not recommended to make encrypted rooms public. It will mean anyone can find and join the room, so anyone can read messages. You’ll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.",
"To avoid these issues, create a new public room for the conversation you plan to have.": "To avoid these issues, create a new public room for the conversation you plan to have.",
"To link to this room, please add an address.": "To link to this room, please add an address.",
"Private (invite only)": "Private (invite only)",
From 6f37e8b223cb99fa7a36fab883b5f411e184e2f4 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 29 Jul 2021 12:16:59 +0100
Subject: [PATCH 016/159] Use getChildren instead of getSpaceSummary as MSC2946
has moved on
---
.../structures/SpaceRoomDirectory.tsx | 51 ++++++++++---------
src/stores/SpaceStore.tsx | 22 ++++----
test/test-utils.js | 4 +-
3 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/src/components/structures/SpaceRoomDirectory.tsx b/src/components/structures/SpaceRoomDirectory.tsx
index 038c1df514..195c31e959 100644
--- a/src/components/structures/SpaceRoomDirectory.tsx
+++ b/src/components/structures/SpaceRoomDirectory.tsx
@@ -18,7 +18,7 @@ import React, { ReactNode, useMemo, useState } from "react";
import { Room } from "matrix-js-sdk/src/models/room";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { EventType, RoomType } from "matrix-js-sdk/src/@types/event";
-import { ISpaceSummaryRoom, ISpaceSummaryEvent } from "matrix-js-sdk/src/@types/spaces";
+import { IRoomChild, IRoomChildState } from "matrix-js-sdk/src/@types/spaces";
import classNames from "classnames";
import { sortBy } from "lodash";
@@ -50,11 +50,11 @@ interface IHierarchyProps {
initialText?: string;
refreshToken?: any;
additionalButtons?: ReactNode;
- showRoom(room: ISpaceSummaryRoom, viaServers?: string[], autoJoin?: boolean): void;
+ showRoom(room: IRoomChild, viaServers?: string[], autoJoin?: boolean): void;
}
interface ITileProps {
- room: ISpaceSummaryRoom;
+ room: IRoomChild;
suggested?: boolean;
selected?: boolean;
numChildRooms?: number;
@@ -205,7 +205,7 @@ const Tile: React.FC { _t("Your server does not support showing space hierarchies.") } { _t("Your server does not support showing space hierarchies.") } { _t("Your server does not support showing space hierarchies.") } { _t("Your server does not support showing space hierarchies.") } { _t(
"To avoid these issues, create a new encrypted room for " +
From 67062dab88707b4c1fe26553969c08efb1cfed20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- " It’s not recommended to add encryption to public rooms. " +
+ "It's not recommended to add encryption to public rooms." +
"Anyone can find and join public rooms, so anyone can read messages in them. " +
"You’ll get none of the benefits of encryption, and you won’t be able to turn it " +
"off later. Encrypting messages in a public room will make receiving and sending " +
From 94f915a4363dc4379e9e92b0ba02881581951fc6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- "To avoid these issues, create a new encrypted room for " +
+ "To avoid these issues, create a new encrypted room for " +
"the conversation you plan to have.",
null,
{ "a": (sub) => {
From 1e9437db7bd17c686cec55cd2b69551542243e9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t(
- " It’s not recommended to make encrypted rooms public. " +
+ "It's not recommended to make encrypted rooms public. " +
"It will mean anyone can find and join the room, so anyone can read messages. " +
- "You’ll get none of the benefits of encryption. Encrypting messages in a public " +
+ "You'll get none of the benefits of encryption. Encrypting messages in a public " +
"room will make receiving and sending messages slower.",
null,
- { "b": (sub) => { sub } },
+ { "b": (sub) => { sub } },
) } { _t(
- "To avoid these issues, create a new public room for the conversation " +
+ "To avoid these issues, create a new public room for the conversation " +
"you plan to have.",
null,
{
From 1b8aae9556814e977e776d8cb8bbed3429af554f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= { _t("Your server does not support showing space hierarchies.") } \n Use the long description to introduce new members to the community, or distribute\n some important links\n \n You can even use 'img' tags\n \n Gebruik de lange beschrijving om nieuwe leden in de gemeenschap te introduceren of om belangrijke koppelingen aan te bieden.\n \n U kunt zelfs ‘img’-tags gebruiken.\n
}
@@ -571,8 +569,6 @@ export const SpaceHierarchy: React.FC
}
>;
} else {
- results = { _t("No results found") }
{ _t("Explore rooms") }
- { _t("No results found") }
From a3ca2abae386eb921c54f0f528219c8584bbb59d Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Fri, 30 Jul 2021 11:11:21 +0100
Subject: [PATCH 020/159] i18n
---
src/i18n/strings/en_EN.json | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index ef4537bddf..a960af9f79 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -2812,8 +2812,6 @@
"No results found": "No results found",
"You may want to try a different search or check for typos.": "You may want to try a different search or check for typos.",
"Search names and descriptions": "Search names and descriptions",
- "If you can't find the room you're looking for, ask for an invite or create a new room.": "If you can't find the room you're looking for, ask for an invite or create a new room.",
- "Create room": "Create room",
"Spaces are a beta feature.": "Spaces are a beta feature.",
"Public space": "Public space",
"Private space": "Private space",
From 1c2dc13fa330fe2de05d6bfabaaf1028428e8c66 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Fri, 30 Jul 2021 12:12:49 +0100
Subject: [PATCH 021/159] factor our observer hook
---
src/components/structures/SpaceHierarchy.tsx | 48 +++++++++++---------
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a/src/components/structures/SpaceHierarchy.tsx b/src/components/structures/SpaceHierarchy.tsx
index f1f5d70fa6..f13fc7f208 100644
--- a/src/components/structures/SpaceHierarchy.tsx
+++ b/src/components/structures/SpaceHierarchy.tsx
@@ -365,6 +365,31 @@ export const useSpaceSummary = (space: Room): {
return { loading, rooms, hierarchy, loadMore };
};
+const useIntersectionObserver = (callback: () => void) => {
+ const handleObserver = (entries: IntersectionObserverEntry[]) => {
+ const target = entries[0];
+ if (target.isIntersecting) {
+ callback();
+ }
+ };
+
+ const observerRef = useRef{ query.trim() ? _t("Results") : _t("Rooms and spaces") }
{ additionalButtons }
{ manageButtons }
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 64a3fe2951..9f41542007 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -2811,10 +2811,6 @@
"This room is suggested as a good one to join": "This room is suggested as a good one to join",
"Suggested": "Suggested",
"Your server does not support showing space hierarchies.": "Your server does not support showing space hierarchies.",
- "%(count)s rooms and %(numSpaces)s spaces|other": "%(count)s rooms and %(numSpaces)s spaces",
- "%(count)s rooms and %(numSpaces)s spaces|one": "%(count)s room and %(numSpaces)s spaces",
- "%(count)s rooms and 1 space|other": "%(count)s rooms and 1 space",
- "%(count)s rooms and 1 space|one": "%(count)s room and 1 space",
"Select a room below first": "Select a room below first",
"Failed to remove some rooms. Try again later": "Failed to remove some rooms. Try again later",
"Removing...": "Removing...",
@@ -2822,6 +2818,8 @@
"Mark as suggested": "Mark as suggested",
"No results found": "No results found",
"You may want to try a different search or check for typos.": "You may want to try a different search or check for typos.",
+ "Results": "Results",
+ "Rooms and spaces": "Rooms and spaces",
"Search names and descriptions": "Search names and descriptions",
"Private space": "Private space",
"{ _t("No results found") }
From 8216a35a56d8962f1d172ff43fe2a467a7677b6e Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Wed, 11 Aug 2021 21:02:30 +0100
Subject: [PATCH 030/159] remove spurious mxclient stub
---
test/test-utils.js | 3 ---
1 file changed, 3 deletions(-)
diff --git a/test/test-utils.js b/test/test-utils.js
index b337828b68..11a3400fbb 100644
--- a/test/test-utils.js
+++ b/test/test-utils.js
@@ -84,9 +84,6 @@ export function createTestClient() {
generateClientSecret: () => "t35tcl1Ent5ECr3T",
isGuest: () => false,
isCryptoEnabled: () => false,
- getSpaceSummary: jest.fn().mockReturnValue({
- rooms: [],
- }),
getRoomHierarchy: jest.fn().mockReturnValue({
rooms: [],
}),
From 7265874217e7841ea1acc455026f0896c91facb8 Mon Sep 17 00:00:00 2001
From: Szimszon { query.trim() ? _t("Results") : _t("Rooms and spaces") }
{ additionalButtons }
- { manageButtons }
+ { hasPermissions && (
+
+
{ results }
{ loader }
@@ -674,7 +700,7 @@ const SpaceHierarchy = ({
return <>
HTML for your community's page
\nHTML voor uw gemeenschapspagina
\n@bot:*
would ignore all users that have the name 'bot' on any server.": "Voeg hier gebruikers en servers toe die u wilt negeren. Gebruik asterisken om %(brand)s met alle tekens te laten overeenkomen. Bijvoorbeeld, @bot:*
zou alle gebruikers negeren die de naam 'bot' hebben op elke server.",
+ "Add users and servers you want to ignore here. Use asterisks to have %(brand)s match any characters. For example, @bot:*
would ignore all users that have the name 'bot' on any server.": "Voeg hier personen en servers toe die u wilt negeren. Gebruik asterisken om %(brand)s met alle tekens te laten overeenkomen. Bijvoorbeeld, @bot:*
zou alle personen negeren die de naam 'bot' hebben op elke server.",
"Please verify the room ID or address and try again.": "Controleer het gesprek-ID of het adres en probeer het opnieuw.",
"Message layout": "Berichtlayout",
"Custom theme URL": "Aangepaste thema-URL",
@@ -2920,9 +2920,9 @@
"well formed": "goed gevormd",
"%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use }
-
-
}
-
{ this.state?.lpImage !== 'data:,' &&
}
diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx
index 55731eb2ca..4d0c82e0b8 100644
--- a/src/components/structures/LoggedInView.tsx
+++ b/src/components/structures/LoggedInView.tsx
@@ -645,16 +645,21 @@ class LoggedInView extends React.Component