@@ -156,11 +156,11 @@ export default class CreateChannel extends Component {
156156 } ) ;
157157 if ( rcCreateChannelResponse . data . data . success ) {
158158 let room = rcCreateChannelResponse . data . data . channel ;
159- //Add embeddable code for community to description
159+ //Add embeddable code for room to description
160160 description = description . concat ( `
161161
162162-----
163- Embed this community
163+ Embed this room
164164<pre><code><a href="${ rc4gitDomain } /channel/${ room . name } ">
165165<img src="${ rcApiDomain } /images/join-chat.svg"/>
166166</a></code></pre>
@@ -180,7 +180,7 @@ Embed this community
180180 } ) ;
181181
182182 addRoom ( room ) ;
183- setSnackbar ( true , "success" , "Community created successfully!" ) ;
183+ setSnackbar ( true , "success" , "Room created successfully!" ) ;
184184 this . setState ( {
185185 loading : false ,
186186 room : room ,
@@ -189,12 +189,12 @@ Embed this community
189189 } ) ;
190190 } else {
191191 this . setState ( { loading : false } ) ;
192- setSnackbar ( true , "error" , "Error Creating Community !" ) ;
192+ setSnackbar ( true , "error" , "Error Creating Room !" ) ;
193193 }
194194 } catch ( error ) {
195195 console . log ( error ) ;
196196 this . setState ( { loading : false } ) ;
197- setSnackbar ( true , "error" , "Error Creating Community !" ) ;
197+ setSnackbar ( true , "error" , "Error Creating Room !" ) ;
198198 }
199199 } ;
200200
@@ -223,52 +223,20 @@ Embed this community
223223 maxWidth = "sm"
224224 fullWidth = { true }
225225 >
226- < DialogTitle > Create a New Community </ DialogTitle >
226+ < DialogTitle > Create Room </ DialogTitle >
227227 < DialogContent >
228228 < p className = "create-dialog-description" >
229- Communities are where your teams communicate.
229+ Rooms are where your teams communicate.
230230 </ p >
231231 < div >
232232 < br />
233- < FormControlLabel
234- control = {
235- < RCSwitch
236- checked = { publicChannel }
237- onChange = { ( ) =>
238- this . setState ( { publicChannel : ! publicChannel } )
239- }
240- name = "publicChannel"
241- />
242- }
243- label = "Public Community"
244- />
245- < p className = "create-dialog-description" >
246- { publicChannel
247- ? "Everyone can access this community."
248- : "Just invited people can access this community." }
249- </ p >
250- < br />
251- < FormControlLabel
252- control = {
253- < RCSwitch
254- checked = { this . state . includePrivateRepositories }
255- onChange = { this . handleAllRepositories }
256- name = "includePrivateRepositories"
257- />
258- }
259- label = "Show All Repositories"
260- />
261- < p className = "create-dialog-description" >
262- Show public { includePrivateRepositories ? "and private " : "" }
263- repositories.
264- </ p >
265- < br />
266- < p > Select a repository</ p >
233+ < p className = "repository-select-label" > Select Repository</ p >
267234 < Autocomplete
268235 id = "combo-box-repo"
269- className = "repository-autocomplete"
236+ fullWidth
270237 options = { repositories . sort ( ) }
271- getOptionLabel = { ( option ) => option . split ( "/" ) [ 1 ] }
238+ renderOption = { ( option ) => option . split ( "/" ) [ 1 ] }
239+ getOptionLabel = { ( option ) => option }
272240 groupBy = { ( option ) => option . split ( "/" ) [ 0 ] }
273241 onChange = { ( event , value ) => {
274242 this . setState ( { channel : value } ) ;
@@ -285,12 +253,56 @@ Embed this community
285253 { channel && (
286254 < >
287255 < p className = "create-dialog-description" >
288- Your community would be created as{ " " }
256+ Your room would be created as{ " " }
289257 < strong > { channel . replace ( "/" , "_" ) } </ strong >
290258 </ p >
291259 </ >
292260 ) }
293261 < br />
262+ < 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+ />
274+ </ div >
275+
276+ < p className = "create-dialog-description" >
277+ { includePrivateRepositories ? "Both public and private " : "Only public " }
278+ repositories are visible.
279+ </ p >
280+ < br />
281+ < 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+ />
299+ </ div >
300+ < p className = "create-dialog-description" >
301+ { publicChannel
302+ ? "Everyone can access this room."
303+ : "Just invited people can access this room." }
304+ </ p >
305+ < br />
294306 < Button
295307 className = "create-button"
296308 disabled = { ! channel || loading }
0 commit comments