@@ -26,6 +26,13 @@ const FavoriteIssueFilters = ({ issueFilters }) => ( | |||
<h2 className="spacer-bottom"> | |||
{translate('my_account.favorite_issue_filters')} | |||
</h2> | |||
{!issueFilters.length && ( | |||
<p className="note"> | |||
{translate('my_account.no_favorite_issue_filters')} | |||
</p> | |||
)} | |||
<table id="favorite-issue-filters" className="data"> | |||
<tbody> | |||
{issueFilters.map(f => ( |
@@ -26,6 +26,13 @@ const FavoriteMeasureFilters = ({ measureFilters }) => ( | |||
<h2 className="spacer-bottom"> | |||
{translate('my_account.favorite_measure_filters')} | |||
</h2> | |||
{!measureFilters.length && ( | |||
<p className="note"> | |||
{translate('my_account.no_favorite_measure_filters')} | |||
</p> | |||
)} | |||
<table id="favorite-measure-filters" className="data"> | |||
<tbody> | |||
{measureFilters.map(f => ( |
@@ -29,6 +29,13 @@ const Favorites = ({ favorites }) => ( | |||
<h2 className="spacer-bottom"> | |||
{translate('my_account.favorite_components')} | |||
</h2> | |||
{!favorites.length && ( | |||
<p className="note"> | |||
{translate('my_account.no_favorite_components')} | |||
</p> | |||
)} | |||
<table id="favorite-components" className="data"> | |||
<tbody> | |||
{favorites.map(f => ( |
@@ -25,7 +25,7 @@ import FavoriteMeasureFilters from './FavoriteMeasureFilters'; | |||
import { translate } from '../../../helpers/l10n'; | |||
const Home = ({ user, favorites, issueFilters, measureFilters }) => ( | |||
<div> | |||
<div className="page page-limited"> | |||
<div className="columns"> | |||
<div className="column-third"> | |||
<Favorites favorites={favorites}/> |
@@ -27,8 +27,8 @@ export default function Notifications ({ globalNotifications, projectNotificatio | |||
const channels = globalNotifications[0].channels.map(c => c.id); | |||
return ( | |||
<div> | |||
<p className="spacer-top big-spacer-bottom"> | |||
<div className="page page-limited"> | |||
<p className="big-spacer-bottom"> | |||
{translate('notification.dispatcher.information')} | |||
</p> | |||
<form id="notif_form" method="post" action={`${window.baseUrl}/account/update_notifications`}> |
@@ -26,7 +26,7 @@ export default class Password extends Component { | |||
state = { | |||
success: false, | |||
errors: null | |||
} | |||
}; | |||
handleSuccessfulChange () { | |||
this.refs.oldPassword.value = ''; |
@@ -26,7 +26,7 @@ import { translate } from '../../../helpers/l10n'; | |||
export default class ProjectNotification extends Component { | |||
state = { | |||
toDelete: false | |||
} | |||
}; | |||
handleRemoveProject (e) { | |||
e.preventDefault(); | |||
@@ -49,7 +49,7 @@ export default class ProjectNotification extends Component { | |||
<thead> | |||
<tr> | |||
<th> | |||
<h3 className="display-inline-block">{data.project.name}</h3> | |||
<h4 className="display-inline-block">{data.project.name}</h4> | |||
<button | |||
onClick={this.handleRemoveProject.bind(this)} | |||
className={buttonClassName}> |
@@ -24,16 +24,18 @@ import Tokens from './Tokens'; | |||
export default function Security ({ user }) { | |||
return ( | |||
<div className="columns"> | |||
<div className="column-half"> | |||
<Tokens user={user}/> | |||
</div> | |||
<div className="page page-limited"> | |||
<div className="columns"> | |||
<div className="column-half"> | |||
<Tokens user={user}/> | |||
</div> | |||
{user.canChangePassword && ( | |||
<div className="column-half"> | |||
<Password user={user}/> | |||
</div> | |||
)} | |||
{user.canChangePassword && ( | |||
<div className="column-half"> | |||
<Password user={user}/> | |||
</div> | |||
)} | |||
</div> | |||
</div> | |||
); | |||
} |
@@ -18,6 +18,7 @@ | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
import React from 'react'; | |||
import { IndexLink } from 'react-router'; | |||
import Avatar from '../../../components/shared/avatar'; | |||
@@ -25,10 +26,14 @@ export default function UserCard ({ user }) { | |||
return ( | |||
<section className="account-user clearfix"> | |||
<div id="avatar" className="account-nav-avatar"> | |||
<Avatar email={user.email} size={48}/> | |||
<IndexLink to="/" className="link-no-underline"> | |||
<Avatar email={user.email} size={48}/> | |||
</IndexLink> | |||
</div> | |||
<div> | |||
<h1 id="name" className="display-inline-block">{user.name}</h1> | |||
<IndexLink to="/" className="link-no-underline"> | |||
<h1 id="name" className="display-inline-block">{user.name}</h1> | |||
</IndexLink> | |||
<span id="login" className="note big-spacer-left">{user.login}</span> | |||
</div> | |||
<div id="email" className="little-spacer-top">{user.email}</div> |
@@ -23,7 +23,7 @@ import Nav from '../components/Nav'; | |||
import { getIssueFilters } from '../../../api/issues'; | |||
export default class AccountApp extends Component { | |||
state = {} | |||
state = {}; | |||
componentDidMount () { | |||
this.fetchFavoriteIssueFilters(); | |||
@@ -31,7 +31,8 @@ export default class AccountApp extends Component { | |||
fetchFavoriteIssueFilters () { | |||
getIssueFilters().then(issueFilters => { | |||
this.setState({ issueFilters }); | |||
const favoriteIssueFilters = issueFilters.filter(f => f.favorite); | |||
this.setState({ issueFilters: favoriteIssueFilters }); | |||
}); | |||
} | |||
@@ -49,9 +50,7 @@ export default class AccountApp extends Component { | |||
return ( | |||
<div> | |||
<Nav user={user}/> | |||
<div className="page"> | |||
{children} | |||
</div> | |||
{children} | |||
</div> | |||
); | |||
} |
@@ -43,7 +43,7 @@ | |||
</div> | |||
{{/notNull}} | |||
<h3 class="big-spacer-top spacer-bottom">Generate Tokens</h3> | |||
<h4 class="big-spacer-top spacer-bottom">Generate Tokens</h4> | |||
{{#each errors}} | |||
<div class="alert alert-danger">{{msg}}</div> |
@@ -34,6 +34,14 @@ body { | |||
padding: 10px 20px; | |||
} | |||
.page-limited { | |||
max-width: 1440px; | |||
margin-left: auto; | |||
margin-right: auto; | |||
padding-top: 20px; | |||
padding-bottom: 20px; | |||
} | |||
.page-container { | |||
min-width: 1080px; | |||
} |
@@ -2157,8 +2157,11 @@ my_profile.favorites.title=Favorites | |||
my_account.page=My Account | |||
my_account.favorite_components=Favorite Components | |||
my_account.no_favorite_components=You do not have favorite components yet. | |||
my_account.favorite_issue_filters=Favorite Issue Filters | |||
my_account.no_favorite_issue_filters=You do not have favorite issue filters yet. | |||
my_account.favorite_measure_filters=Favorite Measure Filters | |||
my_account.no_favorite_measure_filters=You do not have favorite measure filters yet. | |||
my_account.notifications=Notifications | |||
my_account.no_project_notifications=You have not set project notifications yet. | |||
my_account.security=Security |