Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
"format": "./node_modules/prettier/bin/prettier.js --single-quote --write 'src/**/*.js'"
},
"dependencies": {
"@fortawesome/fontawesome": "^1.1.5",
"@fortawesome/fontawesome-free-brands": "^5.0.10",
"@fortawesome/fontawesome-free-regular": "^5.0.10",
"@fortawesome/fontawesome-free-solid": "^5.0.10",
"@fortawesome/react-fontawesome": "^0.0.18",
"admin-lte": "2.3.11",
"ajv": "5.5.1",
"ajv-keywords": "2.1.1",
Expand Down Expand Up @@ -65,7 +70,6 @@
"react-datetime": "^2.8.10",
"react-dom": "^16.2.0",
"react-dropzone": "^3.5.3",
"react-fontawesome": "1.6.1",
"react-height": "^3.0.0",
"react-helmet": "^5.0.3",
"react-immutable-proptypes": "^2.1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'react-fontawesome';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import { Table } from 'react-bootstrap';
import {
FormattedDate,
Expand Down Expand Up @@ -45,8 +45,9 @@ const AssignmentDetails = ({
>
<td className="text-center">
<strong>
{!isAfterFirstDeadline && <Icon name="hourglass-start" />}
{isAfterFirstDeadline && <Icon name="hourglass-end" />}
{!isAfterFirstDeadline &&
<FontAwesomeIcon icon="hourglass-start" />}
{isAfterFirstDeadline && <FontAwesomeIcon icon="hourglass-end" />}
</strong>
</td>
<td>
Expand All @@ -71,8 +72,10 @@ const AssignmentDetails = ({
>
<td className="text-center">
<strong>
{!isAfterSecondDeadline && <Icon name="hourglass-half" />}
{isAfterSecondDeadline && <Icon name="hourglass-end" />}
{!isAfterSecondDeadline &&
<FontAwesomeIcon icon="hourglass-half" />}
{isAfterSecondDeadline &&
<FontAwesomeIcon icon="hourglass-end" />}
</strong>
</td>
<td>
Expand All @@ -93,7 +96,7 @@ const AssignmentDetails = ({
</tr>}
<tr>
<td className="text-center">
<Icon name="cloud-upload" />
<FontAwesomeIcon icon="cloud-upload-alt" />
</td>
<td>
<FormattedMessage
Expand All @@ -111,7 +114,7 @@ const AssignmentDetails = ({
</tr>
<tr>
<td className="text-center">
<Icon name="ban" />
<FontAwesomeIcon icon="ban" />
</td>
<td>
<FormattedMessage
Expand All @@ -125,7 +128,7 @@ const AssignmentDetails = ({
</tr>
<tr>
<td className="text-center">
<Icon name="coffee" />
<FontAwesomeIcon icon="coffee" />
</td>
<td>
<FormattedMessage
Expand All @@ -139,7 +142,7 @@ const AssignmentDetails = ({
</tr>
<tr>
<td className="text-center">
<Icon name="unlock-alt" />
<FontAwesomeIcon icon="unlock-alt" />
</td>
<td>
<FormattedMessage
Expand All @@ -154,7 +157,7 @@ const AssignmentDetails = ({
{isBonus &&
<tr>
<td className="text-center">
<Icon name="plus-circle" />
<FontAwesomeIcon icon="plus-circle" />
</td>
<td>
<FormattedMessage
Expand All @@ -168,7 +171,7 @@ const AssignmentDetails = ({
</tr>}
<tr>
<td className="text-center">
<Icon name="percent" />
<FontAwesomeIcon icon="percent" />
</td>
<td>
<FormattedMessage
Expand All @@ -182,7 +185,7 @@ const AssignmentDetails = ({
</tr>
<tr>
<td className="text-center">
<Icon name="code" />
<FontAwesomeIcon icon="code" />
</td>
<td>
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Icon from 'react-fontawesome';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import Status from './Status';

const AssignmentStatusIcon = ({ id, status, accepted = false }) => {
Expand All @@ -11,7 +11,12 @@ const AssignmentStatusIcon = ({ id, status, accepted = false }) => {
<Status
id={id}
accepted={accepted}
icon={<Icon name="thumbs-o-up" className="text-green" />}
icon={
<FontAwesomeIcon
icon={['far', 'thumbs-up']}
className="text-green"
/>
}
message={
<FormattedMessage
id="app.assignemntStatusIcon.ok"
Expand All @@ -25,7 +30,7 @@ const AssignmentStatusIcon = ({ id, status, accepted = false }) => {
return (
<Status
id={id}
icon={<Icon name="cogs" className="text-yellow" />}
icon={<FontAwesomeIcon icon="cogs" className="text-yellow" />}
message={
<FormattedMessage
id="app.assignemntStatusIcon.inProgress"
Expand All @@ -40,7 +45,12 @@ const AssignmentStatusIcon = ({ id, status, accepted = false }) => {
<Status
id={id}
accepted={accepted}
icon={<Icon name="thumbs-o-down" className="text-red" />}
icon={
<FontAwesomeIcon
icon={['far', 'thumbs-down']}
className="text-red"
/>
}
message={
<FormattedMessage
id="app.assignemntStatusIcon.failed"
Expand All @@ -54,7 +64,12 @@ const AssignmentStatusIcon = ({ id, status, accepted = false }) => {
return (
<Status
id={id}
icon={<Icon name="exclamation-triangle" className="text-yellow" />}
icon={
<FontAwesomeIcon
icon="exclamation-triangle"
className="text-yellow"
/>
}
message={
<FormattedMessage
id="app.assignemntStatusIcon.evaluationFailed"
Expand All @@ -68,7 +83,9 @@ const AssignmentStatusIcon = ({ id, status, accepted = false }) => {
return (
<Status
id={id}
icon={<Icon name="exclamation-triangle" className="text-red" />}
icon={
<FontAwesomeIcon icon="exclamation-triangle" className="text-red" />
}
message={
<FormattedMessage
id="app.assignemntStatusIcon.solutionMissingSubmission"
Expand All @@ -82,7 +99,7 @@ const AssignmentStatusIcon = ({ id, status, accepted = false }) => {
return (
<Status
id={id}
icon={<Icon name="code" className="text-gray" />}
icon={<FontAwesomeIcon icon="code" className="text-gray" />}
message={
<FormattedMessage
id="app.assignemntStatusIcon.none"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import PropTypes from 'prop-types';
import { OverlayTrigger, Tooltip } from 'react-bootstrap';
import Icon from 'react-fontawesome';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import { FormattedMessage } from 'react-intl';

const Status = ({ id, message, icon, accepted = false }) => (
const Status = ({ id, message, icon, accepted = false }) =>
<span>
{!accepted &&
<OverlayTrigger
Expand Down Expand Up @@ -32,10 +32,9 @@ const Status = ({ id, message, icon, accepted = false }) => (
</Tooltip>
}
>
<Icon name="check-circle" className="text-green" />
<FontAwesomeIcon icon="check-circle" className="text-green" />
</OverlayTrigger>}
</span>
);
</span>;

Status.propTypes = {
id: PropTypes.string.isRequired,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Icon from 'react-fontawesome';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import { Modal, ProgressBar, Table } from 'react-bootstrap';
import Button from '../../widgets/FlatButton';
Expand Down Expand Up @@ -78,8 +78,8 @@ class EvaluationProgress extends Component {
})}
>
<strong>
<Icon
name={
<FontAwesomeIcon
icon={
wasSuccessful ? 'check-circle' : 'times-circle'
}
/>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Assignments/SubmissionsTable/CommentsIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { OverlayTrigger, Tooltip } from 'react-bootstrap';
import Icon from 'react-fontawesome';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';

const createIcon = commentsStats => {
if (commentsStats.authoredCount === 0) {
return <Icon name="comment-o" />;
return <FontAwesomeIcon icon={['far', 'comment']} />;
}
if (commentsStats.authoredCount === commentsStats.count) {
return <Icon name="comment" flip="horizontal" />;
return <FontAwesomeIcon icon={['far', 'comment']} flip="horizontal" />;
}
return <Icon name="comments-o" />;
return <FontAwesomeIcon icon={['far', 'comments']} />;
};

const CommentsIcon = ({ id, commentsStats = null }) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'react-fontawesome';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import Button from '../../widgets/FlatButton';
import { FormattedMessage } from 'react-intl';

Expand All @@ -11,7 +11,7 @@ const SubmitSolutionButton = ({ disabled = false, onClick }) =>
disabled={disabled}
onClick={onClick}
>
<Icon name="bug" />{' '}
<FontAwesomeIcon icon="bug" />{' '}
<FormattedMessage
id="app.submissionsTable.submitNewSolution"
defaultMessage="Submit New Solution"
Expand Down
11 changes: 4 additions & 7 deletions src/components/Exercises/DifficultyIcon/DifficultyIcon.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Icon from 'react-fontawesome';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';

const DifficultyIcon = ({ difficulty }) => {
switch (difficulty) {
case 'easy':
return (
<span className="text-success">
<Icon name="smile-o" />
{' '}
<FontAwesomeIcon icon={['far', 'smile']} />{' '}
<FormattedMessage
id="app.exercises.difficultyIcon.easy"
defaultMessage="Easy"
Expand All @@ -21,8 +20,7 @@ const DifficultyIcon = ({ difficulty }) => {
case 'moderate':
return (
<span className="text-warning">
<Icon name="meh-o" />
{' '}
<FontAwesomeIcon icon={['far', 'meh']} />{' '}
<FormattedMessage
id="app.exercises.difficultyIcon.medium"
defaultMessage="Medium"
Expand All @@ -33,8 +31,7 @@ const DifficultyIcon = ({ difficulty }) => {
case 'hard':
return (
<span className="text-danger">
<Icon name="frown-o" />
{' '}
<FontAwesomeIcon icon={['far', 'frown']} />{' '}
<FormattedMessage
id="app.exercises.difficultyIcon.hard"
defaultMessage="Hard"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'react-fontawesome';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import { FormattedDate, FormattedTime, FormattedMessage } from 'react-intl';
import DifficultyIcon from '../DifficultyIcon';
import UsersNameContainer from '../../../containers/UsersNameContainer';
Expand Down Expand Up @@ -29,7 +29,7 @@ const ExercisesListItem = ({
}) =>
<tr>
<td className="text-center">
<Icon name="code" />
<FontAwesomeIcon icon="code" />
</td>
<td>
<ExercisePrefixIcons id={id} isLocked={isLocked} isBroken={isBroken} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Exercises/FilesTable/FilesTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';

import Icon from 'react-fontawesome';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import { Table } from 'react-bootstrap';
import Button from '../../widgets/FlatButton';
import Box from '../../widgets/Box';
Expand Down Expand Up @@ -82,7 +82,7 @@ const FilesTable = ({
</Table>}
{attachments.length === 0 &&
<p className="text-center">
<Icon name="folder-open-o" />{' '}
<FontAwesomeIcon icon={['far', 'folder-open']} />{' '}
<FormattedMessage
id="app.filesTable.empty"
defaultMessage="There are no uploaded files yet."
Expand Down
Loading