mirror of https://github.com/vector-im/riot-web
Tweak spaces copy
parent
d1a75885a7
commit
d9a801910a
|
@ -22,7 +22,7 @@ import MultiInviter from './utils/MultiInviter';
|
||||||
import Modal from './Modal';
|
import Modal from './Modal';
|
||||||
import * as sdk from './';
|
import * as sdk from './';
|
||||||
import { _t } from './languageHandler';
|
import { _t } from './languageHandler';
|
||||||
import InviteDialog, {KIND_DM, KIND_INVITE, KIND_SPACE_INVITE} from "./components/views/dialogs/InviteDialog";
|
import InviteDialog, {KIND_DM, KIND_INVITE} from "./components/views/dialogs/InviteDialog";
|
||||||
import CommunityPrototypeInviteDialog from "./components/views/dialogs/CommunityPrototypeInviteDialog";
|
import CommunityPrototypeInviteDialog from "./components/views/dialogs/CommunityPrototypeInviteDialog";
|
||||||
import {CommunityPrototypeStore} from "./stores/CommunityPrototypeStore";
|
import {CommunityPrototypeStore} from "./stores/CommunityPrototypeStore";
|
||||||
|
|
||||||
|
@ -50,11 +50,10 @@ export function showStartChatInviteDialog(initialText) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function showRoomInviteDialog(roomId) {
|
export function showRoomInviteDialog(roomId) {
|
||||||
const isSpace = MatrixClientPeg.get()?.getRoom(roomId)?.isSpaceRoom();
|
|
||||||
// This dialog handles the room creation internally - we don't need to worry about it.
|
// This dialog handles the room creation internally - we don't need to worry about it.
|
||||||
Modal.createTrackedDialog(
|
Modal.createTrackedDialog(
|
||||||
"Invite Users", isSpace ? "Space" : "Room", InviteDialog, {
|
"Invite Users", "", InviteDialog, {
|
||||||
kind: isSpace ? KIND_SPACE_INVITE : KIND_INVITE,
|
kind: KIND_INVITE,
|
||||||
roomId,
|
roomId,
|
||||||
},
|
},
|
||||||
/*className=*/null, /*isPriority=*/false, /*isStatic=*/true,
|
/*className=*/null, /*isPriority=*/false, /*isStatic=*/true,
|
||||||
|
|
|
@ -557,7 +557,7 @@ export default class SpaceRoomView extends React.PureComponent<IProps, IState> {
|
||||||
case Phase.PublicCreateRooms:
|
case Phase.PublicCreateRooms:
|
||||||
return <SpaceSetupFirstRooms
|
return <SpaceSetupFirstRooms
|
||||||
space={this.props.space}
|
space={this.props.space}
|
||||||
title={_t("What discussions do you want to have?")}
|
title={_t("What are some things you want to discuss?")}
|
||||||
description={_t("We'll create rooms for each topic.")}
|
description={_t("We'll create rooms for each topic.")}
|
||||||
onFinished={() => this.setState({ phase: Phase.PublicShare })}
|
onFinished={() => this.setState({ phase: Phase.PublicShare })}
|
||||||
/>;
|
/>;
|
||||||
|
|
|
@ -48,7 +48,6 @@ import { MatrixCall } from 'matrix-js-sdk/src/webrtc/call';
|
||||||
|
|
||||||
export const KIND_DM = "dm";
|
export const KIND_DM = "dm";
|
||||||
export const KIND_INVITE = "invite";
|
export const KIND_INVITE = "invite";
|
||||||
export const KIND_SPACE_INVITE = "space_invite";
|
|
||||||
export const KIND_CALL_TRANSFER = "call_transfer";
|
export const KIND_CALL_TRANSFER = "call_transfer";
|
||||||
|
|
||||||
const INITIAL_ROOMS_SHOWN = 3; // Number of rooms to show at first
|
const INITIAL_ROOMS_SHOWN = 3; // Number of rooms to show at first
|
||||||
|
@ -310,7 +309,7 @@ interface IInviteDialogProps {
|
||||||
// not provided.
|
// not provided.
|
||||||
kind: string,
|
kind: string,
|
||||||
|
|
||||||
// The room ID this dialog is for. Only required for KIND_INVITE and KIND_SPACE_INVITE.
|
// The room ID this dialog is for. Only required for KIND_INVITE.
|
||||||
roomId: string,
|
roomId: string,
|
||||||
|
|
||||||
// The call to transfer. Only required for KIND_CALL_TRANSFER.
|
// The call to transfer. Only required for KIND_CALL_TRANSFER.
|
||||||
|
@ -349,8 +348,8 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
if ((props.kind === KIND_INVITE || props.kind === KIND_SPACE_INVITE) && !props.roomId) {
|
if ((props.kind === KIND_INVITE) && !props.roomId) {
|
||||||
throw new Error("When using KIND_INVITE or KIND_SPACE_INVITE a roomId is required for an InviteDialog");
|
throw new Error("When using KIND_INVITE a roomId is required for an InviteDialog");
|
||||||
} else if (props.kind === KIND_CALL_TRANSFER && !props.call) {
|
} else if (props.kind === KIND_CALL_TRANSFER && !props.call) {
|
||||||
throw new Error("When using KIND_CALL_TRANSFER a call is required for an InviteDialog");
|
throw new Error("When using KIND_CALL_TRANSFER a call is required for an InviteDialog");
|
||||||
}
|
}
|
||||||
|
@ -1027,7 +1026,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
||||||
sectionSubname = _t("May include members not in %(communityName)s", {communityName});
|
sectionSubname = _t("May include members not in %(communityName)s", {communityName});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.kind === KIND_INVITE || this.props.kind === KIND_SPACE_INVITE) {
|
if (this.props.kind === KIND_INVITE) {
|
||||||
sectionName = kind === 'recents' ? _t("Recently Direct Messaged") : _t("Suggestions");
|
sectionName = kind === 'recents' ? _t("Recently Direct Messaged") : _t("Suggestions");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1248,25 +1247,31 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
||||||
}
|
}
|
||||||
buttonText = _t("Go");
|
buttonText = _t("Go");
|
||||||
goButtonFn = this._startDm;
|
goButtonFn = this._startDm;
|
||||||
} else if (this.props.kind === KIND_INVITE || this.props.kind === KIND_SPACE_INVITE) {
|
} else if (this.props.kind === KIND_INVITE) {
|
||||||
title = this.props.kind === KIND_INVITE ? _t("Invite to this room") : _t("Invite to this space");
|
const room = MatrixClientPeg.get()?.getRoom(this.props.roomId);
|
||||||
|
const isSpace = room?.isSpaceRoom();
|
||||||
|
title = isSpace
|
||||||
|
? _t("Invite to %(spaceName)s", {
|
||||||
|
spaceName: room.name || _t("Unnamed Space"),
|
||||||
|
})
|
||||||
|
: _t("Invite to this room");
|
||||||
|
|
||||||
let helpTextUntranslated;
|
let helpTextUntranslated;
|
||||||
if (this.props.kind === KIND_INVITE) {
|
if (isSpace) {
|
||||||
if (identityServersEnabled) {
|
if (identityServersEnabled) {
|
||||||
helpTextUntranslated = _td("Invite someone using their name, email address, username " +
|
helpTextUntranslated = _td("Invite someone using their name, email address, username " +
|
||||||
"(like <userId/>) or <a>share this room</a>.");
|
"(like <userId/>) or <a>share this space</a>.");
|
||||||
} else {
|
} else {
|
||||||
helpTextUntranslated = _td("Invite someone using their name, username " +
|
helpTextUntranslated = _td("Invite someone using their name, username " +
|
||||||
"(like <userId/>) or <a>share this room</a>.");
|
"(like <userId/>) or <a>share this space</a>.");
|
||||||
}
|
}
|
||||||
} else { // KIND_SPACE_INVITE
|
} else {
|
||||||
if (identityServersEnabled) {
|
if (identityServersEnabled) {
|
||||||
helpTextUntranslated = _td("Invite someone using their name, email address, username " +
|
helpTextUntranslated = _td("Invite someone using their name, email address, username " +
|
||||||
"(like <userId/>) or <a>share this space</a>.");
|
"(like <userId/>) or <a>share this room</a>.");
|
||||||
} else {
|
} else {
|
||||||
helpTextUntranslated = _td("Invite someone using their name, username " +
|
helpTextUntranslated = _td("Invite someone using their name, username " +
|
||||||
"(like <userId/>) or <a>share this space</a>.");
|
"(like <userId/>) or <a>share this room</a>.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,8 @@ const SpaceCreateMenu = ({ onFinished }) => {
|
||||||
if (visibility === null) {
|
if (visibility === null) {
|
||||||
body = <React.Fragment>
|
body = <React.Fragment>
|
||||||
<h2>{ _t("Create a space") }</h2>
|
<h2>{ _t("Create a space") }</h2>
|
||||||
<p>{ _t("Organise rooms into spaces, for just you or anyone") }</p>
|
<p>{ _t("Spaces are new ways to group rooms and people. " +
|
||||||
|
"To join an existing space you’ll need an invite") }</p>
|
||||||
|
|
||||||
<SpaceCreateMenuType
|
<SpaceCreateMenuType
|
||||||
title={_t("Public")}
|
title={_t("Public")}
|
||||||
|
@ -117,12 +118,12 @@ const SpaceCreateMenu = ({ onFinished }) => {
|
||||||
/>
|
/>
|
||||||
<SpaceCreateMenuType
|
<SpaceCreateMenuType
|
||||||
title={_t("Private")}
|
title={_t("Private")}
|
||||||
description={_t("Invite only space, best for yourself or teams")}
|
description={_t("Invite only, best for yourself or teams")}
|
||||||
className="mx_SpaceCreateMenuType_private"
|
className="mx_SpaceCreateMenuType_private"
|
||||||
onClick={() => setVisibility(Visibility.Private)}
|
onClick={() => setVisibility(Visibility.Private)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/*<p>{ _t("Looking to join an existing space?") }</p>*/}
|
<p>{ _t("You can change this later") }</p>
|
||||||
</React.Fragment>;
|
</React.Fragment>;
|
||||||
} else {
|
} else {
|
||||||
body = <React.Fragment>
|
body = <React.Fragment>
|
||||||
|
@ -134,9 +135,7 @@ const SpaceCreateMenu = ({ onFinished }) => {
|
||||||
|
|
||||||
<h2>
|
<h2>
|
||||||
{
|
{
|
||||||
visibility === Visibility.Public
|
visibility === Visibility.Public ? _t("Your public space") : _t("Your private space")
|
||||||
? _t("Personalise your public space")
|
|
||||||
: _t("Personalise your private space")
|
|
||||||
}
|
}
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -983,14 +983,15 @@
|
||||||
"Name": "Name",
|
"Name": "Name",
|
||||||
"Description": "Description",
|
"Description": "Description",
|
||||||
"Create a space": "Create a space",
|
"Create a space": "Create a space",
|
||||||
"Organise rooms into spaces, for just you or anyone": "Organise rooms into spaces, for just you or anyone",
|
"Spaces are new ways to group rooms and people. To join an existing space you’ll need an invite": "Spaces are new ways to group rooms and people. To join an existing space you’ll need an invite",
|
||||||
"Public": "Public",
|
"Public": "Public",
|
||||||
"Open space for anyone, best for communities": "Open space for anyone, best for communities",
|
"Open space for anyone, best for communities": "Open space for anyone, best for communities",
|
||||||
"Private": "Private",
|
"Private": "Private",
|
||||||
"Invite only space, best for yourself or teams": "Invite only space, best for yourself or teams",
|
"Invite only, best for yourself or teams": "Invite only, best for yourself or teams",
|
||||||
|
"You can change this later": "You can change this later",
|
||||||
"Go back": "Go back",
|
"Go back": "Go back",
|
||||||
"Personalise your public space": "Personalise your public space",
|
"Your public space": "Your public space",
|
||||||
"Personalise your private space": "Personalise your private space",
|
"Your private space": "Your private space",
|
||||||
"Give it a photo, name and description to help you identify it.": "Give it a photo, name and description to help you identify it.",
|
"Give it a photo, name and description to help you identify it.": "Give it a photo, name and description to help you identify it.",
|
||||||
"You can change these at any point.": "You can change these at any point.",
|
"You can change these at any point.": "You can change these at any point.",
|
||||||
"Creating...": "Creating...",
|
"Creating...": "Creating...",
|
||||||
|
@ -2190,10 +2191,12 @@
|
||||||
"Start a conversation with someone using their name or username (like <userId/>).": "Start a conversation with someone using their name or username (like <userId/>).",
|
"Start a conversation with someone using their name or username (like <userId/>).": "Start a conversation with someone using their name or username (like <userId/>).",
|
||||||
"This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click <a>here</a>": "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click <a>here</a>",
|
"This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click <a>here</a>": "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click <a>here</a>",
|
||||||
"Go": "Go",
|
"Go": "Go",
|
||||||
"Invite someone using their name, email address, username (like <userId/>) or <a>share this room</a>.": "Invite someone using their name, email address, username (like <userId/>) or <a>share this room</a>.",
|
"Invite to %(spaceName)s": "Invite to %(spaceName)s",
|
||||||
"Invite someone using their name, username (like <userId/>) or <a>share this room</a>.": "Invite someone using their name, username (like <userId/>) or <a>share this room</a>.",
|
"Unnamed Space": "Unnamed Space",
|
||||||
"Invite someone using their name, email address, username (like <userId/>) or <a>share this space</a>.": "Invite someone using their name, email address, username (like <userId/>) or <a>share this space</a>.",
|
"Invite someone using their name, email address, username (like <userId/>) or <a>share this space</a>.": "Invite someone using their name, email address, username (like <userId/>) or <a>share this space</a>.",
|
||||||
"Invite someone using their name, username (like <userId/>) or <a>share this space</a>.": "Invite someone using their name, username (like <userId/>) or <a>share this space</a>.",
|
"Invite someone using their name, username (like <userId/>) or <a>share this space</a>.": "Invite someone using their name, username (like <userId/>) or <a>share this space</a>.",
|
||||||
|
"Invite someone using their name, email address, username (like <userId/>) or <a>share this room</a>.": "Invite someone using their name, email address, username (like <userId/>) or <a>share this room</a>.",
|
||||||
|
"Invite someone using their name, username (like <userId/>) or <a>share this room</a>.": "Invite someone using their name, username (like <userId/>) or <a>share this room</a>.",
|
||||||
"Transfer": "Transfer",
|
"Transfer": "Transfer",
|
||||||
"a new master key signature": "a new master key signature",
|
"a new master key signature": "a new master key signature",
|
||||||
"a new cross-signing key signature": "a new cross-signing key signature",
|
"a new cross-signing key signature": "a new cross-signing key signature",
|
||||||
|
@ -2587,7 +2590,6 @@
|
||||||
"Failed to reject invite": "Failed to reject invite",
|
"Failed to reject invite": "Failed to reject invite",
|
||||||
"You have %(count)s unread notifications in a prior version of this room.|other": "You have %(count)s unread notifications in a prior version of this room.",
|
"You have %(count)s unread notifications in a prior version of this room.|other": "You have %(count)s unread notifications in a prior version of this room.",
|
||||||
"You have %(count)s unread notifications in a prior version of this room.|one": "You have %(count)s unread notification in a prior version of this room.",
|
"You have %(count)s unread notifications in a prior version of this room.|one": "You have %(count)s unread notification in a prior version of this room.",
|
||||||
"Unnamed Space": "Unnamed Space",
|
|
||||||
"Undo": "Undo",
|
"Undo": "Undo",
|
||||||
"Remove from Space": "Remove from Space",
|
"Remove from Space": "Remove from Space",
|
||||||
"No permissions": "No permissions",
|
"No permissions": "No permissions",
|
||||||
|
@ -2626,7 +2628,7 @@
|
||||||
"Invite your teammates": "Invite your teammates",
|
"Invite your teammates": "Invite your teammates",
|
||||||
"Invite by username": "Invite by username",
|
"Invite by username": "Invite by username",
|
||||||
"Inviting...": "Inviting...",
|
"Inviting...": "Inviting...",
|
||||||
"What discussions do you want to have?": "What discussions do you want to have?",
|
"What are some things you want to discuss?": "What are some things you want to discuss?",
|
||||||
"We'll create rooms for each topic.": "We'll create rooms for each topic.",
|
"We'll create rooms for each topic.": "We'll create rooms for each topic.",
|
||||||
"What projects are you working on?": "What projects are you working on?",
|
"What projects are you working on?": "What projects are you working on?",
|
||||||
"We'll create rooms for each of them. You can add existing rooms after setup.": "We'll create rooms for each of them. You can add existing rooms after setup.",
|
"We'll create rooms for each of them. You can add existing rooms after setup.": "We'll create rooms for each of them. You can add existing rooms after setup.",
|
||||||
|
|
Loading…
Reference in New Issue