mirror of https://github.com/vector-im/riot-web
Decorate room avatars with publicity in add existing to space flow
parent
f6e8d38b87
commit
6aa477f0f5
|
@ -54,7 +54,8 @@ limitations under the License.
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
|
|
||||||
.mx_BaseAvatar {
|
// we can't target .mx_BaseAvatar here as it'll break the decorated avatar styling
|
||||||
|
.mx_DecoratedRoomAvatar {
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +76,10 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_AddExistingToSpace_section_spaces {
|
.mx_AddExistingToSpace_section_spaces {
|
||||||
|
.mx_BaseAvatar {
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_BaseAvatar_image {
|
.mx_BaseAvatar_image {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||||
import {sortRooms} from "../../../stores/room-list/algorithms/tag-sorting/RecentAlgorithm";
|
import {sortRooms} from "../../../stores/room-list/algorithms/tag-sorting/RecentAlgorithm";
|
||||||
import ProgressBar from "../elements/ProgressBar";
|
import ProgressBar from "../elements/ProgressBar";
|
||||||
import {SpaceFeedbackPrompt} from "../../structures/SpaceRoomView";
|
import {SpaceFeedbackPrompt} from "../../structures/SpaceRoomView";
|
||||||
|
import DecoratedRoomAvatar from "../avatars/DecoratedRoomAvatar";
|
||||||
|
|
||||||
interface IProps extends IDialogProps {
|
interface IProps extends IDialogProps {
|
||||||
matrixClient: MatrixClient;
|
matrixClient: MatrixClient;
|
||||||
|
@ -46,7 +47,10 @@ interface IProps extends IDialogProps {
|
||||||
|
|
||||||
const Entry = ({ room, checked, onChange }) => {
|
const Entry = ({ room, checked, onChange }) => {
|
||||||
return <label className="mx_AddExistingToSpace_entry">
|
return <label className="mx_AddExistingToSpace_entry">
|
||||||
<RoomAvatar room={room} height={32} width={32} />
|
{ room?.isSpaceRoom()
|
||||||
|
? <RoomAvatar room={room} height={32} width={32} />
|
||||||
|
: <DecoratedRoomAvatar room={room} avatarSize={32} />
|
||||||
|
}
|
||||||
<span className="mx_AddExistingToSpace_entry_name">{ room.name }</span>
|
<span className="mx_AddExistingToSpace_entry_name">{ room.name }</span>
|
||||||
<StyledCheckbox
|
<StyledCheckbox
|
||||||
onChange={onChange ? (e) => onChange(e.target.checked) : null}
|
onChange={onChange ? (e) => onChange(e.target.checked) : null}
|
||||||
|
|
Loading…
Reference in New Issue