]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7227 SONAR-7230 SONAR-7231 apply ui feedback
authorStas Vilchik <vilchiks@gmail.com>
Thu, 28 Jan 2016 09:00:29 +0000 (10:00 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 28 Jan 2016 15:14:24 +0000 (16:14 +0100)
13 files changed:
server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js
server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js
server/sonar-web/src/main/js/apps/account/components/Favorites.js
server/sonar-web/src/main/js/apps/account/components/Home.js
server/sonar-web/src/main/js/apps/account/components/Notifications.js
server/sonar-web/src/main/js/apps/account/components/Password.js
server/sonar-web/src/main/js/apps/account/components/ProjectNotification.js
server/sonar-web/src/main/js/apps/account/components/Security.js
server/sonar-web/src/main/js/apps/account/components/UserCard.js
server/sonar-web/src/main/js/apps/account/containers/AccountApp.js
server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs
server/sonar-web/src/main/less/components/page.less
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 2069cb15bc6e456316de7ca36cfd65339cd11519..d3e8480c70fe13ddb139c07d2ec1b506180c4b00 100644 (file)
@@ -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 => (
index 30ade911282522d7d270bcd7c3bf438e7039eabd..1c12cc9582190864c004a045c89f8aaaa76ac214 100644 (file)
@@ -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 => (
index a4e4b0445202edcf1243b524fb64bee9607d60de..3cce3750a0b03c112d1d7b490fe4ad38c27952bf 100644 (file)
@@ -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 => (
index 1c22bfb81a88c7140a872de646f3ed730762a74e..2561d8864af012eb5efecebfa30562cb92124ca9 100644 (file)
@@ -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}/>
index 853d64d3c3555ce6e82ab983ac79f4b4664aeafc..8eb4e437afbd484174ca8ee3ec79871816f39fe6 100644 (file)
@@ -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`}>
index eaf01092dc00339711fb4273ba549d69fb6515c6..fb3641d676b40b72d44441867a252d0e39272a4c 100644 (file)
@@ -26,7 +26,7 @@ export default class Password extends Component {
   state = {
     success: false,
     errors: null
-  }
+  };
 
   handleSuccessfulChange () {
     this.refs.oldPassword.value = '';
index 1147830fac02cdc010e47c2a44a88773803f8ea8..95fb143d8de5375b793606464d6ac5d0975d48c3 100644 (file)
@@ -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}>
index 9342687405809c6d2666953900e91e6686f6380e..44938188c5c1d346e86cf5514b13b0c073d73980 100644 (file)
@@ -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>
   );
 }
index 74d120e79427ad8c73ddd97f8dee597f2f620a63..0c848116e2689427f05c94261cd94c8e1226109e 100644 (file)
@@ -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>
index 967e686843c63d4ed2aa96ad2b1de410bf56daa9..f9b06e63044a38ba8b8ed2e23f0cafaccc8cb61f 100644 (file)
@@ -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>
     );
   }
index 5450a14b6f53f3d630e76aaceab15e1a850aec6f..7739f6511e944531c966d1317b8220bef614c40f 100644 (file)
@@ -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>
index b74a10f274da4f25bc9513a4f8e99892282ed24d..dcaf7ea83386ece3d3411aac841402e95bc8a7bd 100644 (file)
@@ -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;
 }
index e46298ecc674d71aef4dcd7f9fee916f1df05886..952470a04bc08cd36ac793265559d2c2216b04ac 100644 (file)
@@ -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