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