Bladeren bron

SONAR-7227 SONAR-7230 SONAR-7231 apply ui feedback

tags/5.4-M10
Stas Vilchik 8 jaren geleden
bovenliggende
commit
e78c8fe04e

+ 7
- 0
server/sonar-web/src/main/js/apps/account/components/FavoriteIssueFilters.js Bestand weergeven

@@ -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 => (

+ 7
- 0
server/sonar-web/src/main/js/apps/account/components/FavoriteMeasureFilters.js Bestand weergeven

@@ -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 => (

+ 7
- 0
server/sonar-web/src/main/js/apps/account/components/Favorites.js Bestand weergeven

@@ -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 => (

+ 1
- 1
server/sonar-web/src/main/js/apps/account/components/Home.js Bestand weergeven

@@ -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}/>

+ 2
- 2
server/sonar-web/src/main/js/apps/account/components/Notifications.js Bestand weergeven

@@ -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`}>

+ 1
- 1
server/sonar-web/src/main/js/apps/account/components/Password.js Bestand weergeven

@@ -26,7 +26,7 @@ export default class Password extends Component {
state = {
success: false,
errors: null
}
};

handleSuccessfulChange () {
this.refs.oldPassword.value = '';

+ 2
- 2
server/sonar-web/src/main/js/apps/account/components/ProjectNotification.js Bestand weergeven

@@ -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}>

+ 11
- 9
server/sonar-web/src/main/js/apps/account/components/Security.js Bestand weergeven

@@ -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>
);
}

+ 7
- 2
server/sonar-web/src/main/js/apps/account/components/UserCard.js Bestand weergeven

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

+ 4
- 5
server/sonar-web/src/main/js/apps/account/containers/AccountApp.js Bestand weergeven

@@ -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>
);
}

+ 1
- 1
server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs Bestand weergeven

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

+ 8
- 0
server/sonar-web/src/main/less/components/page.less Bestand weergeven

@@ -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;
}

+ 3
- 0
sonar-core/src/main/resources/org/sonar/l10n/core.properties Bestand weergeven

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

Laden…
Annuleren
Opslaan