Remove impossible space hierarchy size string
This commit is contained in:
parent
1c2dc13fa3
commit
d74e9c4f90
3 changed files with 9 additions and 17 deletions
|
@ -70,6 +70,12 @@ limitations under the License.
|
||||||
font-size: $font-15px;
|
font-size: $font-15px;
|
||||||
line-height: $font-24px;
|
line-height: $font-24px;
|
||||||
color: $primary-fg-color;
|
color: $primary-fg-color;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
|
||||||
|
> h4 {
|
||||||
|
font-weight: $font-semi-bold;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_AccessibleButton {
|
.mx_AccessibleButton {
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
|
|
|
@ -444,18 +444,6 @@ const SpaceHierarchy = ({
|
||||||
if (loading) {
|
if (loading) {
|
||||||
content = <Spinner />;
|
content = <Spinner />;
|
||||||
} else {
|
} else {
|
||||||
const numRooms = Array.from(filteredRoomSet).filter(r => !r.room_type).length;
|
|
||||||
const numSpaces = filteredRoomSet.size - numRooms - 1; // -1 at the end to exclude the space we are looking at
|
|
||||||
|
|
||||||
let countsStr;
|
|
||||||
if (numSpaces > 1) {
|
|
||||||
countsStr = _t("%(count)s rooms and %(numSpaces)s spaces", { count: numRooms, numSpaces });
|
|
||||||
} else if (numSpaces > 0) {
|
|
||||||
countsStr = _t("%(count)s rooms and 1 space", { count: numRooms, numSpaces });
|
|
||||||
} else {
|
|
||||||
countsStr = _t("%(count)s rooms", { count: numRooms, numSpaces });
|
|
||||||
}
|
|
||||||
|
|
||||||
let manageButtons;
|
let manageButtons;
|
||||||
if (space.getMyMembership() === "join" && space.currentState.maySendStateEvent(EventType.SpaceChild, userId)) {
|
if (space.getMyMembership() === "join" && space.currentState.maySendStateEvent(EventType.SpaceChild, userId)) {
|
||||||
const selectedRelations = Array.from(selected.keys()).flatMap(parentId => {
|
const selectedRelations = Array.from(selected.keys()).flatMap(parentId => {
|
||||||
|
@ -582,7 +570,7 @@ const SpaceHierarchy = ({
|
||||||
|
|
||||||
content = <>
|
content = <>
|
||||||
<div className="mx_SpaceHierarchy_listHeader">
|
<div className="mx_SpaceHierarchy_listHeader">
|
||||||
{ countsStr }
|
<h4>{ query.trim() ? _t("Results") : _t("Rooms and spaces") }</h4>
|
||||||
<span>
|
<span>
|
||||||
{ additionalButtons }
|
{ additionalButtons }
|
||||||
{ manageButtons }
|
{ manageButtons }
|
||||||
|
|
|
@ -2811,10 +2811,6 @@
|
||||||
"This room is suggested as a good one to join": "This room is suggested as a good one to join",
|
"This room is suggested as a good one to join": "This room is suggested as a good one to join",
|
||||||
"Suggested": "Suggested",
|
"Suggested": "Suggested",
|
||||||
"Your server does not support showing space hierarchies.": "Your server does not support showing space hierarchies.",
|
"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",
|
"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",
|
"Failed to remove some rooms. Try again later": "Failed to remove some rooms. Try again later",
|
||||||
"Removing...": "Removing...",
|
"Removing...": "Removing...",
|
||||||
|
@ -2822,6 +2818,8 @@
|
||||||
"Mark as suggested": "Mark as suggested",
|
"Mark as suggested": "Mark as suggested",
|
||||||
"No results found": "No results found",
|
"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.",
|
"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",
|
"Search names and descriptions": "Search names and descriptions",
|
||||||
"Private space": "Private space",
|
"Private space": "Private space",
|
||||||
"<inviter/> invites you": "<inviter/> invites you",
|
"<inviter/> invites you": "<inviter/> invites you",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue