Skip to content

Commit

Permalink
Improved /settings/your-profile page. TL/TM logic inside main menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
tima101 committed Sep 24, 2018
1 parent cf139bd commit 345f801
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/lib/withLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ Router.onRouteChangeComplete = url => {

Router.onRouteChangeError = () => NProgress.done();

const getTeamOptionsMenuWithLinksLeft = teams =>
const getTeamOptionsMenuWithLinksLeft = (teams, currentUserId) =>
teams.map(t => ({
text: t.name,
text: t.teamLeaderId === currentUserId ? `${t.name} ( You're TL )` : `${t.name} ( You're TM )`,
avatarUrl: t.avatarUrl,
href: `/discussion?teamSlug=${t.slug}`,
as: `/team/${t.slug}/d`,
Expand Down Expand Up @@ -276,7 +276,7 @@ function withLayout(BaseComponent, { teamRequired = true } = {}) {
style={{ display: 'flex', justifyContent: 'space-between', margin: '0px 10px' }}
>
<MenuWithLinks
options={getTeamOptionsMenuWithLinksLeft(store.teams).concat(
options={getTeamOptionsMenuWithLinksLeft(store.teams, currentUser._id).concat(
this.state.isTL
? menuUnderTeamListLeftTL(currentTeam)
: menuUnderTeamListLeft(),
Expand Down
14 changes: 14 additions & 0 deletions app/pages/settings/your-profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ class YourProfile extends React.Component<MyProps, MyState> {
<Grid container style={styleGrid}>
<Grid item sm={12} xs={12} style={{ padding: '0px 20px' }}>
<h3>Your Profile</h3>
<h4 style={{ marginTop: '40px' }}>Your account</h4>
<p>
<i className="material-icons" color="action" style={{ verticalAlign: 'text-bottom' }}>
done
</i>{' '}
You signed up on Async using your Google account.
<li>
{' '}
Your Google/Async email: <b>{currentUser.email}</b>
</li>
<li>
Your Google/Async username: <b>{currentUser.displayName}</b>
</li>
</p>
<form onSubmit={this.onSubmit} autoComplete="off">
<h4>Your name</h4>
<TextField
Expand Down

0 comments on commit 345f801

Please sign in to comment.