aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/account
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-01-28 10:00:29 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-01-28 16:14:24 +0100
commite78c8fe04ec358cf3c94c2b00ea465692233844d (patch)
treef4d8d5e41f0115f59000fb67371b04a409c7cc07 /server/sonar-web/src/main/js/apps/account
parentd053e1bb231569114df401c26908e6fc24531f2f (diff)
downloadsonarqube-e78c8fe04ec358cf3c94c2b00ea465692233844d.tar.gz
sonarqube-e78c8fe04ec358cf3c94c2b00ea465692233844d.zip
SONAR-7227 SONAR-7230 SONAR-7231 apply ui feedback
Diffstat (limited to 'server/sonar-web/src/main/js/apps/account')
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js7
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js7
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Favorites.js7
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Home.js2
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Notifications.js4
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Password.js2
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/ProjectNotification.js4
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Security.js20
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/UserCard.js9
-rw-r--r--server/sonar-web/src/main/js/apps/account/containers/AccountApp.js9
-rw-r--r--server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs2
11 files changed, 50 insertions, 23 deletions
diff --git a/server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js b/server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js
index 2069cb15bc6..d3e8480c70f 100644
--- a/server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js
+++ b/server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js
@@ -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 => (
diff --git a/server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js b/server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js
index 30ade911282..1c12cc95821 100644
--- a/server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js
+++ b/server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js
@@ -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 => (
diff --git a/server/sonar-web/src/main/js/apps/account/components/Favorites.js b/server/sonar-web/src/main/js/apps/account/components/Favorites.js
index a4e4b044520..3cce3750a0b 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Favorites.js
+++ b/server/sonar-web/src/main/js/apps/account/components/Favorites.js
@@ -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 => (
diff --git a/server/sonar-web/src/main/js/apps/account/components/Home.js b/server/sonar-web/src/main/js/apps/account/components/Home.js
index 1c22bfb81a8..2561d8864af 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Home.js
+++ b/server/sonar-web/src/main/js/apps/account/components/Home.js
@@ -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}/>
diff --git a/server/sonar-web/src/main/js/apps/account/components/Notifications.js b/server/sonar-web/src/main/js/apps/account/components/Notifications.js
index 853d64d3c35..8eb4e437afb 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Notifications.js
+++ b/server/sonar-web/src/main/js/apps/account/components/Notifications.js
@@ -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`}>
diff --git a/server/sonar-web/src/main/js/apps/account/components/Password.js b/server/sonar-web/src/main/js/apps/account/components/Password.js
index eaf01092dc0..fb3641d676b 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Password.js
+++ b/server/sonar-web/src/main/js/apps/account/components/Password.js
@@ -26,7 +26,7 @@ export default class Password extends Component {
state = {
success: false,
errors: null
- }
+ };
handleSuccessfulChange () {
this.refs.oldPassword.value = '';
diff --git a/server/sonar-web/src/main/js/apps/account/components/ProjectNotification.js b/server/sonar-web/src/main/js/apps/account/components/ProjectNotification.js
index 1147830fac0..95fb143d8de 100644
--- a/server/sonar-web/src/main/js/apps/account/components/ProjectNotification.js
+++ b/server/sonar-web/src/main/js/apps/account/components/ProjectNotification.js
@@ -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}>
diff --git a/server/sonar-web/src/main/js/apps/account/components/Security.js b/server/sonar-web/src/main/js/apps/account/components/Security.js
index 93426874058..44938188c5c 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Security.js
+++ b/server/sonar-web/src/main/js/apps/account/components/Security.js
@@ -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>
);
}
diff --git a/server/sonar-web/src/main/js/apps/account/components/UserCard.js b/server/sonar-web/src/main/js/apps/account/components/UserCard.js
index 74d120e7942..0c848116e26 100644
--- a/server/sonar-web/src/main/js/apps/account/components/UserCard.js
+++ b/server/sonar-web/src/main/js/apps/account/components/UserCard.js
@@ -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>
diff --git a/server/sonar-web/src/main/js/apps/account/containers/AccountApp.js b/server/sonar-web/src/main/js/apps/account/containers/AccountApp.js
index 967e686843c..f9b06e63044 100644
--- a/server/sonar-web/src/main/js/apps/account/containers/AccountApp.js
+++ b/server/sonar-web/src/main/js/apps/account/containers/AccountApp.js
@@ -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>
);
}
diff --git a/server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs b/server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs
index 5450a14b6f5..7739f6511e9 100644
--- a/server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs
+++ b/server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs
@@ -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>