diff --git a/src/components/ChallengeEditor/ChallengeEditor.module.scss b/src/components/ChallengeEditor/ChallengeEditor.module.scss index 79366ade..7e32cc52 100644 --- a/src/components/ChallengeEditor/ChallengeEditor.module.scss +++ b/src/components/ChallengeEditor/ChallengeEditor.module.scss @@ -15,20 +15,26 @@ } } -.title { - @include roboto-bold(); +.topContainer { + margin-top: 30px; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 20px; +} +.leftContainer { + display: flex; + align-items: center; +} + +.title { font-size: 24px; font-weight: 700; line-height: 29px; + margin-right: 5px; color: $challenges-title; - margin-top: 30px; text-align: center; - - span { - color: $tc-red; - } - } .textRequired { @@ -255,7 +261,6 @@ } .actionButtons { - position: absolute; top: 30px; a,button { height: 40px; diff --git a/src/components/ChallengeEditor/ChallengeViewTabs/ChallengeViewTabs.module.scss b/src/components/ChallengeEditor/ChallengeViewTabs/ChallengeViewTabs.module.scss index 3a4e50c1..fd7a64dd 100644 --- a/src/components/ChallengeEditor/ChallengeViewTabs/ChallengeViewTabs.module.scss +++ b/src/components/ChallengeEditor/ChallengeViewTabs/ChallengeViewTabs.module.scss @@ -3,11 +3,32 @@ $tc-dark-blue: #0681ff; $tc-white: #FFFFFF; +.topContainer { + margin-top: 30px; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 20px; +} + +.leftContainer { + display: flex; + align-items: center; +} +.title { + @include roboto-bold(); + + font-size: 24px; + font-weight: 700; + line-height: 29px; + margin-right: 5px; + color: $challenges-title; + text-align: center; +} + .actionButtons { display: flex; - position: absolute; top: 30px; - margin-top: 53px; } .actionButtonsLeft { @@ -38,21 +59,6 @@ $tc-white: #FFFFFF; } } -.title { - @include roboto-bold(); - - font-size: 24px; - font-weight: 700; - line-height: 29px; - color: $challenges-title; - margin-top: 25px; - text-align: center; - - span { - color: $tc-red; - } -} - .challenge-view-selector { display: flex; flex-wrap: wrap; diff --git a/src/components/ChallengeEditor/ChallengeViewTabs/index.js b/src/components/ChallengeEditor/ChallengeViewTabs/index.js index e213f179..c431f8d4 100644 --- a/src/components/ChallengeEditor/ChallengeViewTabs/index.js +++ b/src/components/ChallengeEditor/ChallengeViewTabs/index.js @@ -81,60 +81,64 @@ const ChallengeViewTabs = ({ return (
- {!isTask && ( +
+
+
{challenge.name}
+ {!isTask && ( +
+ +
+ )} +
- + {(challenge.status === 'Draft' || challenge.status === 'New') &&
} + {challenge.status === 'Draft' && ( +
+ {challenge.legacyId || isTask ? ( + + ) : ( + + {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} + + + )} +
+ )} + {isTask && challenge.status === 'Active' && ( +
+ {assignedMemberDetails ? ( + + + + ) : ( + + {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} + + + )} +
+ )} + {enableEdit && ( + + )} +
- )} -
{challenge.name}
-
- {(challenge.status === 'Draft' || challenge.status === 'New') &&
} - {challenge.status === 'Draft' && ( -
- {challenge.legacyId || isTask ? ( - - ) : ( - - {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} - - - )} -
- )} - {isTask && challenge.status === 'Active' && ( -
- {assignedMemberDetails ? ( - - - - ) : ( - - {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} - - - )} -
- )} - {enableEdit && ( - - )} -
-
- {!isNew && } -
-
{getTitle(isNew)}
-
- {!isNew && this.props.challengeDetails.status === 'New' && } - +
+
+
{getTitle(isNew)}
+ {!isNew && } +
+
+ {!isNew && this.props.challengeDetails.status === 'New' && } + +
* Required
diff --git a/src/components/ChallengesComponent/ChallengesComponent.module.scss b/src/components/ChallengesComponent/ChallengesComponent.module.scss index c453ea90..c779d15b 100644 --- a/src/components/ChallengesComponent/ChallengesComponent.module.scss +++ b/src/components/ChallengesComponent/ChallengesComponent.module.scss @@ -11,6 +11,7 @@ font-size: 24px; font-weight: 700; + margin-right: 5px; line-height: 29px; color: $challenges-title; text-align: center; @@ -22,12 +23,17 @@ justify-content: space-between; align-items: center; padding: 0 20px; + } .titleLinks { align-items: center; display: flex; + > span a { + margin: 2px 5px 0; + } + > a + a { margin-left: 20px; } diff --git a/src/components/LegacyLinks/LegacyLinks.module.scss b/src/components/LegacyLinks/LegacyLinks.module.scss index ac057bd4..a15b41c0 100644 --- a/src/components/LegacyLinks/LegacyLinks.module.scss +++ b/src/components/LegacyLinks/LegacyLinks.module.scss @@ -1,18 +1,10 @@ @import "../../styles/includes"; .container { display: flex; - margin-top: auto; align-items: center; - button:not(:first-child), - a:not(:first-child) { - margin-left: 20px; - } - - button { - height: 40px; - outline: none; - white-space: nowrap; + > a { + margin: 0 5px; } .row { diff --git a/src/components/LegacyLinks/index.js b/src/components/LegacyLinks/index.js index c366fd39..48a82282 100644 --- a/src/components/LegacyLinks/index.js +++ b/src/components/LegacyLinks/index.js @@ -5,40 +5,17 @@ import React, { useCallback } from 'react' import PropTypes from 'prop-types' import cn from 'classnames' import styles from './LegacyLinks.module.scss' -import { DIRECT_PROJECT_URL, MESSAGE, ONLINE_REVIEW_URL } from '../../config/constants' -import PrimaryButton from '../Buttons/PrimaryButton' -import Tooltip from '../Tooltip' +import { ONLINE_REVIEW_URL } from '../../config/constants' const LegacyLinks = ({ challenge, challengeView }) => { const onClick = useCallback((e) => { e.stopPropagation() }, []) - const directUrl = `${DIRECT_PROJECT_URL}/contest/detail?projectId=${challenge.legacyId}` const orUrl = `${ONLINE_REVIEW_URL}/review/actions/ViewProjectDetails?pid=${challenge.legacyId}` return (
- {challenge.legacyId ? ( - <> - - - - - - - - ) : ( - <> - - {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} - - - - {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} - - - - )} + ( Online Review )
{ challengeView && challenge.discussions && challenge.discussions.map(d => (