mirror of https://github.com/vector-im/riot-web
Minor copy addition to DM dialog for communities prototype
parent
52e095fa61
commit
cc2fc911af
|
@ -89,6 +89,13 @@ limitations under the License.
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_InviteDialog_subname {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
margin-top: -10px; // HACK: Positioning with margins is bad
|
||||||
|
font-size: $font-12px;
|
||||||
|
color: $muted-fg-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_InviteDialog_roomTile {
|
.mx_InviteDialog_roomTile {
|
||||||
|
|
|
@ -37,6 +37,8 @@ import {Key} from "../../../Keyboard";
|
||||||
import {Action} from "../../../dispatcher/actions";
|
import {Action} from "../../../dispatcher/actions";
|
||||||
import {DefaultTagID} from "../../../stores/room-list/models";
|
import {DefaultTagID} from "../../../stores/room-list/models";
|
||||||
import RoomListStore from "../../../stores/room-list/RoomListStore";
|
import RoomListStore from "../../../stores/room-list/RoomListStore";
|
||||||
|
import TagOrderStore from "../../../stores/TagOrderStore";
|
||||||
|
import GroupStore from "../../../stores/GroupStore";
|
||||||
|
|
||||||
// we have a number of types defined from the Matrix spec which can't reasonably be altered here.
|
// we have a number of types defined from the Matrix spec which can't reasonably be altered here.
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
|
@ -915,6 +917,13 @@ export default class InviteDialog extends React.PureComponent {
|
||||||
const showMoreFn = kind === 'recents' ? this._showMoreRecents.bind(this) : this._showMoreSuggestions.bind(this);
|
const showMoreFn = kind === 'recents' ? this._showMoreRecents.bind(this) : this._showMoreSuggestions.bind(this);
|
||||||
const lastActive = (m) => kind === 'recents' ? m.lastActive : null;
|
const lastActive = (m) => kind === 'recents' ? m.lastActive : null;
|
||||||
let sectionName = kind === 'recents' ? _t("Recent Conversations") : _t("Suggestions");
|
let sectionName = kind === 'recents' ? _t("Recent Conversations") : _t("Suggestions");
|
||||||
|
let sectionSubname = null;
|
||||||
|
|
||||||
|
if (kind === 'suggestions' && TagOrderStore.getSelectedPrototypeTag()) {
|
||||||
|
const summary = GroupStore.getSummary(TagOrderStore.getSelectedPrototypeTag());
|
||||||
|
const communityName = summary?.profile?.name || TagOrderStore.getSelectedPrototypeTag();
|
||||||
|
sectionSubname = _t("May include members not in %(communityName)s", {communityName});
|
||||||
|
}
|
||||||
|
|
||||||
if (this.props.kind === KIND_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");
|
||||||
|
@ -993,6 +1002,7 @@ export default class InviteDialog extends React.PureComponent {
|
||||||
return (
|
return (
|
||||||
<div className='mx_InviteDialog_section'>
|
<div className='mx_InviteDialog_section'>
|
||||||
<h3>{sectionName}</h3>
|
<h3>{sectionName}</h3>
|
||||||
|
{sectionSubname ? <p className="mx_InviteDialog_subname">{sectionSubname}</p> : null}
|
||||||
{tiles}
|
{tiles}
|
||||||
{showMore}
|
{showMore}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1709,6 +1709,7 @@
|
||||||
"The following users might not exist or are invalid, and cannot be invited: %(csvNames)s": "The following users might not exist or are invalid, and cannot be invited: %(csvNames)s",
|
"The following users might not exist or are invalid, and cannot be invited: %(csvNames)s": "The following users might not exist or are invalid, and cannot be invited: %(csvNames)s",
|
||||||
"Recent Conversations": "Recent Conversations",
|
"Recent Conversations": "Recent Conversations",
|
||||||
"Suggestions": "Suggestions",
|
"Suggestions": "Suggestions",
|
||||||
|
"May include members not in %(communityName)s": "May include members not in %(communityName)s",
|
||||||
"Recently Direct Messaged": "Recently Direct Messaged",
|
"Recently Direct Messaged": "Recently Direct Messaged",
|
||||||
"Direct Messages": "Direct Messages",
|
"Direct Messages": "Direct Messages",
|
||||||
"Start a conversation with someone using their name, username (like <userId/>) or email address.": "Start a conversation with someone using their name, username (like <userId/>) or email address.",
|
"Start a conversation with someone using their name, username (like <userId/>) or email address.": "Start a conversation with someone using their name, username (like <userId/>) or email address.",
|
||||||
|
|
Loading…
Reference in New Issue