mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 18:54:52 +00:00
Various UI improvements (#74)
This commit is contained in:
parent
da032364aa
commit
f4eb1ae4b0
@ -66,8 +66,17 @@ class About extends Component {
|
|||||||
<form onSubmit={this.handleReportAbuse.bind(this)}>
|
<form onSubmit={this.handleReportAbuse.bind(this)}>
|
||||||
{this.state.abuseReported && <div>Thank you!</div>}
|
{this.state.abuseReported && <div>Thank you!</div>}
|
||||||
<div>
|
<div>
|
||||||
<input placeholder='Room ID' onChange={this.handleUpdateRoomId.bind(this)} value={this.state.roomId} type="text"/>
|
<div className="input-group">
|
||||||
<button>Submit</button>
|
<input className='form-control' placeholder='Room ID' onChange={this.handleUpdateRoomId.bind(this)} value={this.state.roomId} type="text"/>
|
||||||
|
<div className="input-group-append">
|
||||||
|
<button
|
||||||
|
className="btn btn-secondary"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
|
@ -39,7 +39,7 @@ class RoomLink extends Component {
|
|||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<div className="input-group">
|
<div className="input-group">
|
||||||
<input id="room-url" className="form-control" type="text" readOnly value={this.state.roomUrl} />
|
<input id="room-url" className="form-control" type="text" readOnly value={this.state.roomUrl} />
|
||||||
<span className="input-group-btn">
|
<div className="input-group-append">
|
||||||
<button
|
<button
|
||||||
className="copy-room btn btn-secondary"
|
className="copy-room btn btn-secondary"
|
||||||
type="button"
|
type="button"
|
||||||
@ -48,9 +48,9 @@ class RoomLink extends Component {
|
|||||||
data-clipboard-text={this.state.roomUrl}
|
data-clipboard-text={this.state.roomUrl}
|
||||||
title="Copied!"
|
title="Copied!"
|
||||||
>
|
>
|
||||||
<Copy className="mt-1" />
|
<Copy />
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import RoomLink from 'components/RoomLink'
|
import RoomLink from 'components/RoomLink'
|
||||||
|
import {styles} from './styles.module.scss'
|
||||||
|
|
||||||
class Settings extends Component {
|
class Settings extends Component {
|
||||||
handleSoundToggle() {
|
handleSoundToggle() {
|
||||||
@ -9,9 +10,9 @@ class Settings extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className={styles}>
|
||||||
<div>
|
<section>
|
||||||
<h5>Sound</h5>
|
<h4>Sound</h4>
|
||||||
<form>
|
<form>
|
||||||
<div className="form-check">
|
<div className="form-check">
|
||||||
<label className="form-check-label" htmlFor="sound-control">
|
<label className="form-check-label" htmlFor="sound-control">
|
||||||
@ -20,28 +21,24 @@ class Settings extends Component {
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</section>
|
||||||
<br />
|
<section>
|
||||||
<div>
|
<h4 className='mb-3'>This room</h4>
|
||||||
<h5>This room</h5>
|
|
||||||
<RoomLink roomId={this.props.roomId} />
|
<RoomLink roomId={this.props.roomId} />
|
||||||
</div>
|
</section>
|
||||||
<br />
|
<section>
|
||||||
<div>
|
<h4>Room Ownership</h4>
|
||||||
<h5>Room Ownership</h5>
|
|
||||||
<p>The person who created the room is the room owner and has special privileges, like the ability to lock and unlock the room.
|
<p>The person who created the room is the room owner and has special privileges, like the ability to lock and unlock the room.
|
||||||
If the owner leaves the room, the second person to join assumes ownership. If they leave, the third person becomes owner, and so on.
|
If the owner leaves the room, the second person to join assumes ownership. If they leave, the third person becomes owner, and so on.
|
||||||
The room owner has a star icon next to their username in the participants dropdown.
|
The room owner has a star icon next to their username in the participants dropdown.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</section>
|
||||||
<br />
|
<section>
|
||||||
<div>
|
<h4>Lock Room</h4>
|
||||||
<h5>Lock Room</h5>
|
|
||||||
<p>If you are the room owner, you can lock and unlock the room by clicking the lock icon in the nav bar. When a room is locked, no other participants will be able to join.</p>
|
<p>If you are the room owner, you can lock and unlock the room by clicking the lock icon in the nav bar. When a room is locked, no other participants will be able to join.</p>
|
||||||
</div>
|
</section>
|
||||||
<br />
|
<section>
|
||||||
<div>
|
<h4>Slash Commands</h4>
|
||||||
<h5>Slash Commands</h5>
|
|
||||||
<p>The following slash commands are available:</p>
|
<p>The following slash commands are available:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>/nick [username] <span className="text-muted">changes username</span></li>
|
<li>/nick [username] <span className="text-muted">changes username</span></li>
|
||||||
@ -49,7 +46,7 @@ class Settings extends Component {
|
|||||||
<li>/clear <span className="text-muted">clears your message history</span></li>
|
<li>/clear <span className="text-muted">clears your message history</span></li>
|
||||||
<li>/help <span className="text-muted">lists all commands</span></li>
|
<li>/help <span className="text-muted">lists all commands</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
5
client/src/components/Settings/styles.module.scss
Normal file
5
client/src/components/Settings/styles.module.scss
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.styles {
|
||||||
|
section {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
}
|
@ -27,7 +27,7 @@ class Welcome extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<p>Others can join this room using the following URL:</p>
|
<p className='mb-2'>Others can join this room using the following URL:</p>
|
||||||
<RoomLink roomId={this.props.roomId} />
|
<RoomLink roomId={this.props.roomId} />
|
||||||
<div className="react-modal-footer">
|
<div className="react-modal-footer">
|
||||||
<button className="btn btn-primary btn-lg" onClick={this.props.close}>Ok</button>
|
<button className="btn btn-primary btn-lg" onClick={this.props.close}>Ok</button>
|
||||||
|
@ -182,9 +182,14 @@ textarea
|
|||||||
width: calc(100% - 30px)
|
width: calc(100% - 30px)
|
||||||
margin: 20px auto 0px auto
|
margin: 20px auto 0px auto
|
||||||
max-height: 75%
|
max-height: 75%
|
||||||
|
position: relative
|
||||||
.close-modal
|
.close-modal
|
||||||
float: right
|
padding: 7px
|
||||||
padding: 0px
|
position: absolute
|
||||||
|
right: 15px
|
||||||
|
top: 15px
|
||||||
|
&:hover
|
||||||
|
background-color: #333
|
||||||
.react-modal-header
|
.react-modal-header
|
||||||
overflow: auto
|
overflow: auto
|
||||||
margin-bottom: 20px
|
margin-bottom: 20px
|
||||||
@ -232,3 +237,13 @@ img.zoom-img
|
|||||||
|
|
||||||
img.zoomable
|
img.zoomable
|
||||||
cursor: zoom-in
|
cursor: zoom-in
|
||||||
|
|
||||||
|
.react-modal-content
|
||||||
|
opacity: 0
|
||||||
|
transition: opacity 150ms ease-in-out
|
||||||
|
|
||||||
|
.react-modal-content_after-open
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
|
.react-modal-content_before-close
|
||||||
|
opacity: 0
|
@ -78,8 +78,6 @@ button.lock-room
|
|||||||
.members-dropdown
|
.members-dropdown
|
||||||
margin-left: 10px
|
margin-left: 10px
|
||||||
.dropdown__trigger
|
.dropdown__trigger
|
||||||
position: relative
|
|
||||||
top: 3px
|
|
||||||
.members-action
|
.members-action
|
||||||
margin-right: 5px
|
margin-right: 5px
|
||||||
.dropdown__content
|
.dropdown__content
|
||||||
@ -88,7 +86,8 @@ button.lock-room
|
|||||||
border: 1px solid $inactive
|
border: 1px solid $inactive
|
||||||
padding: 15px
|
padding: 15px
|
||||||
width: 175px
|
width: 175px
|
||||||
left: -110px
|
left: -10px
|
||||||
|
top: 35px
|
||||||
ul
|
ul
|
||||||
li
|
li
|
||||||
overflow: auto
|
overflow: auto
|
||||||
|
Loading…
x
Reference in New Issue
Block a user