mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Fix user page display on mobile
This commit is contained in:
parent
c8e6fbc338
commit
b01b4b04d3
|
@ -27,6 +27,7 @@ export default class UserCard extends Component {
|
|||
const user = this.props.user;
|
||||
const controls = UserControls.controls(user, this).toArray();
|
||||
const color = user.color();
|
||||
const badges = user.badges().toArray();
|
||||
|
||||
return (
|
||||
<div className={'UserCard ' + (this.props.className || '')}
|
||||
|
@ -53,9 +54,11 @@ export default class UserCard extends Component {
|
|||
)}
|
||||
</h2>
|
||||
|
||||
<ul className="UserCard-badges badges">
|
||||
{listItems(user.badges().toArray())}
|
||||
</ul>
|
||||
{badges.length ? (
|
||||
<ul className="UserCard-badges badges">
|
||||
{listItems(badges)}
|
||||
</ul>
|
||||
) : ''}
|
||||
|
||||
<ul className="UserCard-info">
|
||||
{listItems(this.infoItems().toArray())}
|
||||
|
|
|
@ -89,8 +89,7 @@ export default class UserPage extends Component {
|
|||
* Given a username, load the user's profile from the store, or make a request
|
||||
* if we don't have it yet. Then initialize the profile page with that user.
|
||||
*
|
||||
* @param {[type]} username [description]
|
||||
* @return {[type]}
|
||||
* @param {String} username
|
||||
*/
|
||||
loadUser(username) {
|
||||
const lowercaseUsername = username.toLowerCase();
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
margin-left: -130px;
|
||||
|
||||
@media @phone {
|
||||
display: block;
|
||||
float: none;
|
||||
margin: 0 auto 20px;
|
||||
width: 64px + 8px;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
.UserPage {
|
||||
.UserCard-controls {
|
||||
float: right;
|
||||
|
|
Loading…
Reference in New Issue
Block a user