mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 10:19:10 +00:00
hangover sync
This commit is contained in:
parent
667666e53f
commit
e763058ece
8 changed files with 48 additions and 15 deletions
|
@ -3,7 +3,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes'
|
|||
import PropTypes from 'prop-types'
|
||||
import ServerCard from './ServerCard'
|
||||
import UserCard from './UserCard'
|
||||
import { Scrollbars } from 'react-custom-scrollbars';
|
||||
import { Scrollbars } from 'react-custom-scrollbars'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
|
||||
class ServersNavigation extends Component {
|
||||
static propTypes = {
|
||||
|
@ -24,6 +25,12 @@ class ServersNavigation extends Component {
|
|||
return acc
|
||||
}, [])
|
||||
}
|
||||
<NavLink className='server-list__item add-new' activeClassName='active' to={`/s/add`}>
|
||||
<div className='server-list__item__info'>
|
||||
<i uk-icon="icon: plus; ratio: 0.9"></i>
|
||||
Add to your server
|
||||
</div>
|
||||
</NavLink>
|
||||
</Scrollbars>
|
||||
</div>
|
||||
</Fragment>
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
padding-right: 0
|
||||
align-items: center
|
||||
/* justify-content: center */
|
||||
|
||||
|
||||
&.add-new
|
||||
color: var(--c-7)
|
||||
|
||||
&.active
|
||||
background-color: var(--c-3)
|
||||
|
@ -44,5 +48,3 @@ a.server-list__item
|
|||
|
||||
.active
|
||||
cursor: default
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react'
|
||||
import { Route } from 'react-router-dom'
|
||||
import { Route, Switch } from 'react-router-dom'
|
||||
import { Scrollbars } from 'react-custom-scrollbars'
|
||||
import { connect } from 'react-redux'
|
||||
import { withRouter } from 'react-router'
|
||||
|
@ -8,6 +8,7 @@ import './index.sass'
|
|||
import Navigation from './Navigation'
|
||||
import RolePicker from '../role-picker'
|
||||
import RoleEditor from '../role-editor'
|
||||
import AddServer from '../add-server'
|
||||
|
||||
// import mockData from './mockData'
|
||||
|
||||
|
@ -25,10 +26,17 @@ class Servers extends Component {
|
|||
return <div className="servers">
|
||||
<Navigation className="servers__nav" servers={this.props.servers} user={this.props.user} />
|
||||
<div className='servers__content'>
|
||||
<Scrollbars className={`fade-element ${(this.props.fade) ? 'fade' : ''}`} autoHeight autoHeightMax='calc(100vh - 80px)'>
|
||||
<Route path='/s/:server' component={RolePicker} exact />
|
||||
</Scrollbars>
|
||||
<Route path='/s/:server/edit' component={RoleEditor} />
|
||||
<Switch>
|
||||
<Route path='/s/:server/edit' component={RoleEditor} />
|
||||
<Route path='/s/:server' render={() =>
|
||||
<Scrollbars className={`fade-element ${(this.props.fade) ? 'fade' : ''}`} autoHeight autoHeightMax='calc(100vh - 80px)'>
|
||||
<Switch>
|
||||
<Route path='/s/add' component={AddServer} exact />
|
||||
<Route path='/s/:server' component={RolePicker} exact />
|
||||
</Switch>
|
||||
</Scrollbars>
|
||||
} />
|
||||
</Switch>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue