- Use the long description to introduce new members to the community, or distribute - some important links -
-- You can even add images with Matrix URLs -
-`); - -const RoomSummaryType = PropTypes.shape({ - room_id: PropTypes.string.isRequired, - profile: PropTypes.shape({ - name: PropTypes.string, - avatar_url: PropTypes.string, - canonical_alias: PropTypes.string, - }).isRequired, -}); - -const UserSummaryType = PropTypes.shape({ - summaryInfo: PropTypes.shape({ - user_id: PropTypes.string.isRequired, - role_id: PropTypes.string, - avatar_url: PropTypes.string, - displayname: PropTypes.string, - }).isRequired, -}); - -class CategoryRoomList extends React.Component { - static propTypes = { - rooms: PropTypes.arrayOf(RoomSummaryType).isRequired, - category: PropTypes.shape({ - profile: PropTypes.shape({ - name: PropTypes.string, - }).isRequired, - }), - groupId: PropTypes.string.isRequired, - - // Whether the list should be editable - editing: PropTypes.bool.isRequired, - }; - - onAddRoomsToSummaryClicked = (ev) => { - ev.preventDefault(); - const AddressPickerDialog = sdk.getComponent("dialogs.AddressPickerDialog"); - Modal.createTrackedDialog('Add Rooms to Group Summary', '', AddressPickerDialog, { - title: _t('Add rooms to the community summary'), - description: _t("Which rooms would you like to add to this summary?"), - placeholder: _t("Room name or address"), - button: _t("Add to summary"), - pickerType: 'room', - validAddressTypes: ['mx-room-id'], - groupId: this.props.groupId, - onFinished: (success, addrs) => { - if (!success) return; - const errorList = []; - Promise.allSettled(addrs.map((addr) => { - return GroupStore - .addRoomToGroupSummary(this.props.groupId, addr.address) - .catch(() => { errorList.push(addr.address); }); - })).then(() => { - if (errorList.length === 0) { - return; - } - const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog( - 'Failed to add the following room to the group summary', - '', - ErrorDialog, - { - title: _t( - "Failed to add the following rooms to the summary of %(groupId)s:", - { groupId: this.props.groupId }, - ), - description: errorList.join(", "), - }, - ); - }); - }, - }, /*className=*/null, /*isPriority=*/false, /*isStatic=*/true); - }; - - render() { - const addButton = this.props.editing ? - (- { _t("Spaces are a new way to make a community, with new features coming.") } - - { text } - - { _t("Communities won't receive further updates.") } -
-
+ { _t(
+ "You're trying to access a community link (%(groupId)s).
" +
+ "Communities are no longer supported and have been replaced by spaces.
,
+ br2: () =>
,
+ a: (sub) => { sub },
+ },
+ ) }
+
- { _t( - "Did you know: you can use communities to filter your %(brand)s experience!", - { brand }, - ) } -
-- { _t( - "You can click on an avatar in the " + - "filter panel at any time to see only the rooms and people associated " + - "with that community.", - ) } -
-
{ _t(
"Debug logs contain application usage data including your " +
- "username, the IDs or aliases of the rooms or groups you " +
+ "username, the IDs or aliases of the rooms you " +
"have visited, which UI elements you last interacted with, " +
"and the usernames of other users. They do not contain messages.",
) }
diff --git a/src/components/views/dialogs/CommunityPrototypeInviteDialog.tsx b/src/components/views/dialogs/CommunityPrototypeInviteDialog.tsx
deleted file mode 100644
index 5b47ea687a..0000000000
--- a/src/components/views/dialogs/CommunityPrototypeInviteDialog.tsx
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
-Copyright 2020 The Matrix.org Foundation C.I.C.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-import React, { ChangeEvent, FormEvent } from 'react';
-import { RoomMember } from "matrix-js-sdk/src/models/room-member";
-import { logger } from "matrix-js-sdk/src/logger";
-
-import BaseDialog from "./BaseDialog";
-import { _t } from "../../../languageHandler";
-import { IDialogProps } from "./IDialogProps";
-import Field from "../elements/Field";
-import AccessibleButton from "../elements/AccessibleButton";
-import { MatrixClientPeg } from "../../../MatrixClientPeg";
-import { arrayFastClone } from "../../../utils/arrays";
-import SdkConfig from "../../../SdkConfig";
-import InviteDialog from "./InviteDialog";
-import BaseAvatar from "../avatars/BaseAvatar";
-import { inviteMultipleToRoom, showAnyInviteErrors } from "../../../RoomInvite";
-import StyledCheckbox from "../elements/StyledCheckbox";
-import Modal from "../../../Modal";
-import ErrorDialog from "./ErrorDialog";
-import { replaceableComponent } from "../../../utils/replaceableComponent";
-import { mediaFromMxc } from "../../../customisations/Media";
-
-interface IProps extends IDialogProps {
- roomId: string;
- communityName: string;
-}
-
-interface IPerson {
- userId: string;
- user: RoomMember;
- lastActive: number;
-}
-
-interface IState {
- emailTargets: string[];
- userTargets: string[];
- showPeople: boolean;
- people: IPerson[];
- numPeople: number;
- busy: boolean;
-}
-
-@replaceableComponent("views.dialogs.CommunityPrototypeInviteDialog")
-export default class CommunityPrototypeInviteDialog extends React.PureComponent
- { _t(
- "Private rooms can be found and joined by invitation only. Public rooms can be " +
- "found and joined by anyone in this community.",
- ) }
-
{ _t(
"Everyone in
- { _t("
- { _t("To create a Space from another community, just pick the community in Preferences.") }
-
- { _t("A link to the Space will be put in your community description.") }
-
- { _t("All rooms will be added and all community members will be invited.") }
-
- { _t("Flair won't be available in Spaces for the foreseeable future.") }
- { _t("This description will be shown to people when they view your space") } { joinRule === JoinRule.Public
- ? _t("Open space for anyone, best for communities")
- : _t("Invite only, best for yourself or teams")
- } { sectionSubname }` +
- _t("This community has been upgraded into a Space") + `
`
- + groupSummary.profile.long_description,
- } as IGroupSummary["profile"]).catch(e => {
- logger.warn("Failed to update community profile during migration", e);
- });
-
- onFinished(roomId);
-
- const onSpaceClick = () => {
- dis.dispatch{ sectionName }
- { sectionSubname ?
{ text }
- extends React.Component { _t("Communities have been archived to make way for Spaces but you can convert your " +
- "communities into Spaces below. Converting will ensure your conversations get the latest " +
- "features.") } { _t("If a community isn't shown you may not have permission to convert it.") }
@@ -296,12 +285,6 @@ const SpaceCreateMenu = ({ onFinished }) => {
/>
- { _t("You can also make Spaces from communities.", {}, {
- a: sub =>
+ { _t(
+ "You're trying to access a community link (%(groupId)s). \n Use the long description to introduce new members to the community, or distribute\n some important links\n \n You can even add images with Matrix URLs \n \n Use the long description to introduce new members to the community, or distribute\n some important links\n \n You can even add images with Matrix URLs \n With paragraphs And also images: Evil image: With paragraphs{ _t("Show my Communities") }
- { _t("Create a space") }
{ _t("To join a space you'll need an invite.") }
" +
+ "Communities are no longer supported and have been replaced by spaces.
,
+ br2: () =>
,
+ a: (sub) => { sub },
+ },
+ ) }
+
Communities are no longer supported and have been replaced by spaces.
Communities are no longer supported and have been replaced by spaces.HTML for your community's page
\nHTML for your community's page
\n
Click here to open settings and give it one!": "Your community hasn't got a Long Description, a HTML page to show to community members.
Click here to open settings and give it one!",
- "Long Description (HTML)": "Long Description (HTML)",
- "Community %(groupId)s not found": "Community %(groupId)s not found",
- "This homeserver does not support communities": "This homeserver does not support communities",
- "Failed to load %(groupId)s": "Failed to load %(groupId)s",
"Great, that'll help people know it's you": "Great, that'll help people know it's you",
"Add a photo so people know it's you.": "Add a photo so people know it's you.",
"Welcome %(name)s": "Welcome %(name)s",
@@ -3096,16 +2933,12 @@
"Explore Public Rooms": "Explore Public Rooms",
"Create a Group Chat": "Create a Group Chat",
"Open dial pad": "Open dial pad",
- "Public community": "Public community",
- "Private community": "Private community",
- "To view %(communityName)s, swap to communities in your preferences": "To view %(communityName)s, swap to communities in your preferences",
- "To join %(communityName)s, swap to communities in your preferences": "To join %(communityName)s, swap to communities in your preferences",
"Wait!": "Wait!",
"If someone told you to copy/paste something here, there is a high likelihood you're being scammed!": "If someone told you to copy/paste something here, there is a high likelihood you're being scammed!",
"If you know what you're doing, Element is open-source, be sure to check out our GitHub (https://github.com/vector-im/element-web/) and contribute!": "If you know what you're doing, Element is open-source, be sure to check out our GitHub (https://github.com/vector-im/element-web/) and contribute!",
+ "Reject invitation": "Reject invitation",
+ "Are you sure you want to reject the invitation?": "Are you sure you want to reject the invitation?",
"Failed to reject invitation": "Failed to reject invitation",
- "Cannot create rooms in this community": "Cannot create rooms in this community",
- "You do not have permission to create rooms in this community.": "You do not have permission to create rooms in this community.",
"You are the only person here. If you leave, no one will be able to join in the future, including you.": "You are the only person here. If you leave, no one will be able to join in the future, including you.",
"This space is not public. You will not be able to rejoin without an invite.": "This space is not public. You will not be able to rejoin without an invite.",
"This room is not public. You will not be able to rejoin without an invite.": "This room is not public. You will not be able to rejoin without an invite.",
@@ -3131,12 +2964,6 @@
"Logout": "Logout",
"%(creator)s created this DM.": "%(creator)s created this DM.",
"%(creator)s created and configured the room.": "%(creator)s created and configured the room.",
- "Your Communities": "Your Communities",
- "Did you know: you can use communities to filter your %(brand)s experience!": "Did you know: you can use communities to filter your %(brand)s experience!",
- "You can click on an avatar in the filter panel at any time to see only the rooms and people associated with that community.": "You can click on an avatar in the filter panel at any time to see only the rooms and people associated with that community.",
- "Error whilst fetching joined communities": "Error whilst fetching joined communities",
- "Create a new community": "Create a new community",
- "Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.": "Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.",
"You're all caught up": "You're all caught up",
"You have no visible notifications.": "You have no visible notifications.",
"%(brand)s failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.": "%(brand)s failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.",
@@ -3161,7 +2988,6 @@
"Find a room…": "Find a room…",
"Find a room… (e.g. %(exampleRoom)s)": "Find a room… (e.g. %(exampleRoom)s)",
"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.",
- "Explore rooms in %(communityName)s": "Explore rooms in %(communityName)s",
"Filter": "Filter",
"Filter rooms and people": "Filter rooms and people",
"Clear filter": "Clear filter",
@@ -3202,10 +3028,7 @@
"Search names and descriptions": "Search names and descriptions",
"Private space": "Private space",
"This is a more complicated group page
-
-
-This is a more complicated group page
');
- expect(longDescElement.innerHTML).toContain('');
- expect(longDescElement.innerHTML).toContain('