From e78c8fe04ec358cf3c94c2b00ea465692233844d Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 28 Jan 2016 10:00:29 +0100 Subject: [PATCH] SONAR-7227 SONAR-7230 SONAR-7231 apply ui feedback --- .../components/FavoriteIssueFilters.js | 7 +++++++ .../components/FavoriteMeasureFilters.js | 7 +++++++ .../js/apps/account/components/Favorites.js | 7 +++++++ .../main/js/apps/account/components/Home.js | 2 +- .../apps/account/components/Notifications.js | 4 ++-- .../js/apps/account/components/Password.js | 2 +- .../account/components/ProjectNotification.js | 4 ++-- .../js/apps/account/components/Security.js | 20 ++++++++++--------- .../js/apps/account/components/UserCard.js | 9 +++++++-- .../js/apps/account/containers/AccountApp.js | 9 ++++----- .../apps/account/templates/account-tokens.hbs | 2 +- .../src/main/less/components/page.less | 8 ++++++++ .../resources/org/sonar/l10n/core.properties | 3 +++ 13 files changed, 61 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 }) => (

{translate('my_account.favorite_issue_filters')}

+ + {!issueFilters.length && ( +

+ {translate('my_account.no_favorite_issue_filters')} +

+ )} + {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 }) => (

{translate('my_account.favorite_measure_filters')}

+ + {!measureFilters.length && ( +

+ {translate('my_account.no_favorite_measure_filters')} +

+ )} +
{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 }) => (

{translate('my_account.favorite_components')}

+ + {!favorites.length && ( +

+ {translate('my_account.no_favorite_components')} +

+ )} +
{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 }) => ( -
+
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 ( -
-

+

+

{translate('notification.dispatcher.information')}

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 {
-

{data.project.name}

+

{data.project.name}