mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 02:19:08 +00:00
modernization; add newlines and link catches to relevant places.
This commit is contained in:
parent
5a1fc526db
commit
005bc44bc1
11 changed files with 254 additions and 186 deletions
|
@ -11,7 +11,8 @@ class OauthCallback extends Component {
|
|||
state = {
|
||||
notReady: true,
|
||||
message: 'chotto matte kudasai...',
|
||||
redirect: '/s'
|
||||
redirect: '/s',
|
||||
url: null
|
||||
}
|
||||
|
||||
async fetchUser () {
|
||||
|
@ -59,13 +60,13 @@ class OauthCallback extends Component {
|
|||
const nUrl = new URL(url)
|
||||
|
||||
nUrl.searchParams.set('state', state)
|
||||
|
||||
this.setState({ url: nUrl.toString() })
|
||||
window.location.href = nUrl.toString()
|
||||
}
|
||||
}
|
||||
|
||||
render () {
|
||||
return (this.state.notReady) ? this.state.message : <Redirect to={this.state.redirect} />
|
||||
return (this.state.notReady) ? this.state.message : <><Redirect to={this.state.redirect} /><a style={{zIndex: 10000}} href={this.state.url}>Something oopsed, click me to get to where you meant.</a></>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import { Prompt } from 'react-router-dom'
|
|||
import superagent from 'superagent'
|
||||
import * as Actions from './actions'
|
||||
import * as UIActions from '../../actions/ui'
|
||||
import { msgToReal } from '../../utils'
|
||||
import './RolePicker.sass'
|
||||
|
||||
import Category from './Category'
|
||||
|
@ -75,7 +76,7 @@ class RolePicker extends Component {
|
|||
if (!roleManager && msg !== '') {
|
||||
return <section>
|
||||
<h3>Server Message</h3>
|
||||
<p>{msg}</p>
|
||||
<p>{msgToReal(msg)}</p>
|
||||
</section>
|
||||
}
|
||||
|
||||
|
@ -85,7 +86,7 @@ class RolePicker extends Component {
|
|||
<h3>Server Message</h3>
|
||||
<div uk-tooltip='' title='Edit Server Message' uk-icon="icon: pencil" onClick={this.openMessageEditor} />
|
||||
</div>
|
||||
<p>{msg || <i>no server message</i>}</p>
|
||||
<p dangerouslySetInnerHTML={{__html: msgToReal(msg) || '<i>no server message</i>'}}></p>
|
||||
</section>
|
||||
}
|
||||
|
||||
|
|
1
UI/src/utils.js
Normal file
1
UI/src/utils.js
Normal file
|
@ -0,0 +1 @@
|
|||
export const msgToReal = (msg) => (msg.replace('<', '<').replace('\n', '<br />'))
|
Loading…
Add table
Add a link
Reference in a new issue