import NotificationsContainer from './containers/NotificationsContainer';
import SecurityContainer from './containers/SecurityContainer';
+import './styles/account.css';
+
window.sonarqube.appStarted.then(options => {
const el = document.querySelector(options.el);
const store = configureStore();
- document.querySelector('html').classList.add('dashboard-page');
- document.querySelector('#container').classList.add('page-wrapper-context');
-
render((
<Provider store={store}>
<Router history={history}>
import { translate } from '../../../helpers/l10n';
const FavoriteIssueFilters = ({ issueFilters }) => (
- <section className="big-spacer-bottom">
+ <section className="huge-spacer-top">
<h2 className="spacer-bottom">
{translate('my_account.favorite_issue_filters')}
</h2>
import { translate } from '../../../helpers/l10n';
const FavoriteMeasureFilters = ({ measureFilters }) => (
- <section className="big-spacer-bottom">
+ <section className="huge-spacer-top">
<h2 className="spacer-bottom">
{translate('my_account.favorite_measure_filters')}
</h2>
import { getComponentUrl } from '../../../helpers/urls';
const Favorites = ({ favorites }) => (
- <section className="big-spacer-bottom">
+ <section>
<h2 className="spacer-bottom">
{translate('my_account.favorite_components')}
</h2>
*/
import React from 'react';
-import UserCard from './UserCard';
import Favorites from './Favorites';
import FavoriteIssueFilters from './FavoriteIssueFilters';
import FavoriteMeasureFilters from './FavoriteMeasureFilters';
+import { translate } from '../../../helpers/l10n';
const Home = ({ user, favorites, issueFilters, measureFilters }) => (
<div>
- <UserCard user={user}/>
- <div className="overflow-hidden">
- <Favorites favorites={favorites}/>
- {issueFilters && <FavoriteIssueFilters issueFilters={issueFilters}/>}
- {measureFilters && <FavoriteMeasureFilters measureFilters={measureFilters}/>}
+ <div className="columns">
+ <div className="column-third">
+ <Favorites favorites={favorites}/>
+ {issueFilters && <FavoriteIssueFilters issueFilters={issueFilters}/>}
+ {measureFilters && <FavoriteMeasureFilters measureFilters={measureFilters}/>}
+ </div>
+
+ <div className="column-third">
+ <section>
+ <h2 className="spacer-bottom">{translate('issues.page')}</h2>
+ <p>Some cool issue widgets go here...</p>
+ </section>
+ </div>
+
+ <div className="column-third">
+ <section>
+ <h2 className="spacer-bottom">{translate('my_profile.groups')}</h2>
+ <ul id="groups">
+ {user.groups.map(group => (
+ <li
+ key={group}
+ className="little-spacer-bottom text-ellipsis"
+ title={group}>
+ {group}
+ </li>
+ ))}
+ </ul>
+ </section>
+
+ <section className="huge-spacer-top">
+ <h2 className="spacer-bottom">{translate('my_profile.scm_accounts')}</h2>
+ <ul id="scm-accounts">
+ {user.scmAccounts.map(scmAccount => (
+ <li
+ key={scmAccount}
+ className="little-spacer-bottom text-ellipsis"
+ title={scmAccount}>
+ {scmAccount}
+ </li>
+ ))}
+ </ul>
+ </section>
+ </div>
</div>
</div>
);
import React from 'react';
import { IndexLink } from 'react-router';
+import UserCard from './UserCard';
import { translate } from '../../../helpers/l10n';
-const Nav = () => (
- <nav className="navbar navbar-context page-container">
- <div className="container">
- <ul className="nav navbar-nav nav-crumbs">
- <li>
- <IndexLink to="/" activeClassName="active">
- {translate('my_account.page')}
- </IndexLink>
- </li>
- </ul>
+const Nav = ({ user }) => (
+ <header className="account-header">
+ <UserCard user={user}/>
+
+ <nav className="account-nav clearfix">
<ul className="nav navbar-nav nav-tabs">
<li>
<IndexLink to="/" activeClassName="active">
</IndexLink>
</li>
</ul>
- </div>
- </nav>
+ </nav>
+ </header>
);
export default Nav;
return (
<div>
- <p className="big-spacer-bottom">
+ <p className="spacer-top big-spacer-bottom">
{translate('notification.dispatcher.information')}
</p>
<form id="notif_form" method="post" action={`${window.baseUrl}/account/update_notifications`}>
import React from 'react';
import Avatar from '../../../components/shared/avatar';
-import { translate } from '../../../helpers/l10n';
-const UserCard = ({ user }) => (
- <div className="pull-left big-spacer-right abs-width-240">
- <div className="panel panel-white">
- <div className="text-center">
- <div id="avatar" className="big-spacer-bottom">
- <Avatar email={user.email} size={100}/>
- </div>
- <h2 id="name" className="text-ellipsis" title={user.name}>{user.name}</h2>
- <p id="login" className="note text-ellipsis" title={user.login}>{user.login}</p>
- <div className="text-center spacer-top">
- <p id="email" className="text-ellipsis" title={user.email}>{user.email}</p>
- </div>
+export default function UserCard ({ user }) {
+ return (
+ <section className="account-user clearfix">
+ <div id="avatar" className="account-nav-avatar">
+ <Avatar email={user.email} size={48}/>
</div>
-
- <div className="big-spacer-top">
- <h3 className="text-center">{translate('my_profile.groups')}</h3>
- <ul id="groups">
- {user.groups.map(group => (
- <li key={group} className="text-ellipsis" title={group}>{group}</li>
- ))}
- </ul>
- </div>
-
- <div className="big-spacer-top">
- <h3 className="text-center">{translate('my_profile.scm_accounts')}</h3>
- <ul id="scm-accounts">
- {user.scmAccounts.map(scmAccount => (
- <li key={scmAccount} className="text-ellipsis" title={scmAccount}>{scmAccount}</li>
- ))}
- </ul>
+ <div>
+ <h1 id="name" className="display-inline-block">{user.name}</h1>
+ <span id="login" className="note big-spacer-left">{user.login}</span>
</div>
- </div>
- </div>
-);
-
-export default UserCard;
+ <div id="email" className="little-spacer-top">{user.email}</div>
+ </section>
+ );
+}
return (
<div>
- <Nav/>
+ <Nav user={user}/>
<div className="page">
{children}
</div>
--- /dev/null
+.account-header {
+ background-color: #f3f3f3;
+}
+
+.account-nav {
+
+}
+
+.account-nav .nav-tabs {
+ width: 100%;
+}
+
+.account-user {
+ padding: 10px;
+}
+
+.account-nav-avatar {
+ float: left;
+ margin-right: 20px;
+}