Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Commit 2bca65e

Browse files
committed
Makes online users available in anonymous mode and for private rooms, fixes private room creation description and custom fields bug, refactors code
1 parent 7a52e80 commit 2bca65e

8 files changed

Lines changed: 176 additions & 105 deletions

File tree

client/src/components/CreateChannel/index.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ Embed this room
167167
`);
168168
await axios({
169169
method: "post",
170-
url: `${rcApiDomain}/api/v1/channels.setDescription`,
170+
url: `${rcApiDomain}/api/v1/${
171+
publicChannel ? "channels" : "groups"
172+
}.setDescription`,
171173
headers: {
172174
"X-Auth-Token": Cookies.get("rc_token"),
173175
"X-User-Id": Cookies.get("rc_uid"),
@@ -223,7 +225,7 @@ Embed this room
223225
maxWidth="sm"
224226
fullWidth={true}
225227
>
226-
<DialogTitle >Create Room</DialogTitle>
228+
<DialogTitle>Create Room</DialogTitle>
227229
<DialogContent>
228230
<p className="create-dialog-description">
229231
Rooms are where your teams communicate.
@@ -260,42 +262,40 @@ Embed this room
260262
)}
261263
<br />
262264
<div className="form-switch">
263-
<p>Show All Repositories</p>
264-
<FormControlLabel
265-
className="form-control-label"
266-
control={
267-
<RCSwitch
268-
checked={this.state.includePrivateRepositories}
269-
onChange={this.handleAllRepositories}
270-
name="includePrivateRepositories"
271-
/>
272-
}
273-
/>
265+
<p>Show All Repositories</p>
266+
<FormControlLabel
267+
className="form-control-label"
268+
control={
269+
<RCSwitch
270+
checked={this.state.includePrivateRepositories}
271+
onChange={this.handleAllRepositories}
272+
name="includePrivateRepositories"
273+
/>
274+
}
275+
/>
274276
</div>
275-
277+
276278
<p className="create-dialog-description">
277-
{includePrivateRepositories ? "Both public and private " : "Only public "}
279+
{includePrivateRepositories
280+
? "Both public and private "
281+
: "Only public "}
278282
repositories are visible.
279283
</p>
280284
<br />
281285
<div className="form-switch">
282-
283-
<p>
284-
Public Room
285-
</p>
286-
<FormControlLabel
287-
className="form-control-label"
288-
control={
289-
<RCSwitch
290-
checked={publicChannel}
291-
onChange={() =>
292-
this.setState({ publicChannel: !publicChannel })
293-
}
294-
name="publicChannel"
295-
296-
/>
297-
}
298-
/>
286+
<p>Public Room</p>
287+
<FormControlLabel
288+
className="form-control-label"
289+
control={
290+
<RCSwitch
291+
checked={publicChannel}
292+
onChange={() =>
293+
this.setState({ publicChannel: !publicChannel })
294+
}
295+
name="publicChannel"
296+
/>
297+
}
298+
/>
299299
</div>
300300
<p className="create-dialog-description">
301301
{publicChannel

client/src/components/RightSidebar/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import ChannelInfo from '../ChannelInfo';
1+
import RoomInfo from '../RoomInfo';
22
import ActivityPane from './../ActivityPane';
33

44
import './index.css';
55

66
export default function RightSidebar(props) {
77
return (
88
<div className="rightSidebar-wrapper">
9-
<ChannelInfo {...props} />
9+
<RoomInfo {...props} />
1010
<ActivityPane {...props}/>
1111
</div>
1212
);

client/src/components/ChannelInfo/index.css renamed to client/src/components/RoomInfo/index.css

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
margin-bottom: 20px;
1818
}
1919

20+
.repo-info-owner {
21+
margin-top: 10px;
22+
}
23+
2024
.repo-info-stats {
2125
display: flex;
2226
justify-content: space-between;
@@ -37,7 +41,7 @@
3741
line-height: 25px;
3842
}
3943

40-
.channel-info-tab {
44+
.roominfo-tab {
4145
width: 50%;
4246
color: #70747b !important;
4347
}
@@ -50,7 +54,7 @@
5054
color: #9a9ea4 !important;
5155
}
5256

53-
.channel-info-wrapper {
57+
.roominfo-wrapper {
5458
max-height: 50%;
5559
overflow-wrap: break-word;
5660
overflow-y: auto;
@@ -86,12 +90,30 @@
8690
margin-left: 5px;
8791
}
8892

89-
.channel-member-grid {
93+
.room-member-grid {
9094
margin: 10px 0px !important;
9195
}
9296

93-
.channel-member-grid-item {
97+
.room-member-grid-item {
9498
display: flex;
9599
align-items: flex-start;
96100
position: relative;
97101
}
102+
103+
.room-member-grid-avatar {
104+
width: 30px;
105+
}
106+
107+
.room-member-grid-name-wrapper {
108+
display: flex;
109+
flex-direction: column;
110+
margin-left: 5px;
111+
}
112+
113+
.room-member-grid-name {
114+
font-weight: bold;
115+
}
116+
117+
.room-member-grid-username {
118+
font-size: x-small;
119+
}

0 commit comments

Comments
 (0)