diff --git a/docs/security/authenticate_external_IDP.puml b/docs/security/authenticate_external_IDP.puml index 53842f1b28a..9a458da5a77 100644 --- a/docs/security/authenticate_external_IDP.puml +++ b/docs/security/authenticate_external_IDP.puml @@ -10,7 +10,7 @@ participant DB end box == Connexion au GAR == -utilisateur -> navigateur: saisit identifiant et mot de passe \net clique sur "Login" +utilisateur -> navigateur: saisit identifiant et mot de passe \net clique sur "IdentifiedLearner" navigateur -> GAR : POST /auth/login \nQP: email=&password= GAR -> navigateur: 302_FOUND Header Set-Cookie: oneSessionId="090967(..)khpt0TA=" navigateur -> GAR : GET / \n Header Cookie: oneSessionId="090967(..)khpt0TA=" diff --git a/junior/app/components/challenge/challenge.gjs b/junior/app/components/challenge/challenge.gjs index e9d90913d46..4fe1ebe9e62 100644 --- a/junior/app/components/challenge/challenge.gjs +++ b/junior/app/components/challenge/challenge.gjs @@ -1,9 +1,9 @@ -import { action } from '@ember/object'; -import { service } from '@ember/service'; +import {action} from '@ember/object'; +import {service} from '@ember/service'; import Component from '@glimmer/component'; -import { tracked } from '@glimmer/tracking'; -import { t } from 'ember-intl'; -import { pageTitle } from 'ember-page-title'; +import {tracked} from '@glimmer/tracking'; +import {t} from 'ember-intl'; +import {pageTitle} from 'ember-page-title'; import ENV from 'junior/config/environment'; import Bubble from '../bubble'; @@ -11,6 +11,7 @@ import DelayedElement from '../delayed-element'; import RobotDialog from '../robot-dialog'; import ChallengeContent from './challenge-content'; import ChallengeLayout from './challenge-layout'; +import IdentifiedLearner from '../identified-learner'; const CHALLENGE_DISPLAY_DELAY = ENV.APP.CHALLENGE_DISPLAY_DELAY; export default class Challenge extends Component { @@ -141,22 +142,25 @@ export default class Challenge extends Component { +} diff --git a/junior/app/controllers/school/students.js b/junior/app/controllers/school/students.js index f0860047ecd..1d0a321753c 100644 --- a/junior/app/controllers/school/students.js +++ b/junior/app/controllers/school/students.js @@ -14,6 +14,7 @@ export default class Students extends Controller { identifyUser(learner) { this.currentLearner.setLearner({ id: learner.id, + displayName: learner.displayName, schoolUrl: this.model.schoolUrl, }); styleToolkit.backgroundBlob.reset(); diff --git a/junior/app/styles/app.scss b/junior/app/styles/app.scss index 1325358833f..a28f164535b 100644 --- a/junior/app/styles/app.scss +++ b/junior/app/styles/app.scss @@ -11,6 +11,7 @@ @import 'globals/fonts'; // Components +@import 'components/challenge/challenge'; @import 'components/challenge/challenge-actions'; @import 'components/challenge/challenge-embed-simulator'; @import 'components/challenge/challenge-content'; @@ -23,6 +24,7 @@ @import 'components/bubble'; @import 'components/footer'; @import 'components/issue'; +@import 'components/identified-learner'; @import 'components/oralization-button'; @import 'components/robot-dialog'; diff --git a/junior/app/styles/components/challenge/challenge.scss b/junior/app/styles/components/challenge/challenge.scss new file mode 100644 index 00000000000..6edfcbeb8cd --- /dev/null +++ b/junior/app/styles/components/challenge/challenge.scss @@ -0,0 +1,11 @@ +.header_container { + display: flex; + justify-content: space-between; + align-items: flex-start; + + .identified-learner { + // Negative margin to set identified user outside the container on the far right + // Equals half of the total margin outside the challenge content + offset + margin-right: calc(((100% - 100vw) / 2) + 45px); + } +} diff --git a/junior/app/styles/components/identified-learner.scss b/junior/app/styles/components/identified-learner.scss new file mode 100644 index 00000000000..c6d60c0e748 --- /dev/null +++ b/junior/app/styles/components/identified-learner.scss @@ -0,0 +1,30 @@ +.identified-learner { + align-items: center; + display: flex; + gap: var(--pix-spacing-3x); + font-weight: var(--font-medium); + + &__informations { + display: flex; + flex-direction: column; + align-items: end; + + button { + padding: 0; + } + + p { + font-weight: var(--pix-font-bold); + white-space: nowrap; + } + } + + &__icon { + background-color: var(--pix-primary-300); + border-radius: 50%; + fill: var(--pix-neutral-0); + padding: var(--pix-spacing-1x); + height: 40px; + width: 40px; + } +} diff --git a/junior/app/styles/pages/identified/missions/introduction.scss b/junior/app/styles/pages/identified/missions/introduction.scss index dffed4e6233..ca5f1b9b93e 100644 --- a/junior/app/styles/pages/identified/missions/introduction.scss +++ b/junior/app/styles/pages/identified/missions/introduction.scss @@ -3,6 +3,12 @@ flex-direction: column; align-content: center; + .header_container { + display: flex; + justify-content: space-between; + align-items: flex-start; + } + .button-actions__icon { width: 20px; height: 20px; diff --git a/junior/app/styles/pages/identified/missions/list.scss b/junior/app/styles/pages/identified/missions/list.scss index 539fcaf45b4..aa32c2a2c0e 100644 --- a/junior/app/styles/pages/identified/missions/list.scss +++ b/junior/app/styles/pages/identified/missions/list.scss @@ -34,3 +34,9 @@ } } } + +.header_container { + display: flex; + justify-content: space-between; + align-items: flex-start; +} diff --git a/junior/app/styles/pages/identified/missions/mission.scss b/junior/app/styles/pages/identified/missions/mission.scss index 8a2537b6bfb..7a4f8f866a8 100644 --- a/junior/app/styles/pages/identified/missions/mission.scss +++ b/junior/app/styles/pages/identified/missions/mission.scss @@ -1,6 +1,12 @@ .mission-page { margin-top: 20px; + .header_container { + display: flex; + justify-content: space-between; + align-items: flex-start; + } + &__body { display: flex; margin-top: 16px; diff --git a/junior/app/templates/assessment/results.hbs b/junior/app/templates/assessment/results.hbs index 39f30d8bb2b..8fb89a76ab7 100644 --- a/junior/app/templates/assessment/results.hbs +++ b/junior/app/templates/assessment/results.hbs @@ -1,8 +1,11 @@ {{page-title (t "pages.missions.end-page.title")}}
- - - +
+ + + + +
- - - - - +
+ + + + + +
{{#each this.orderedMissionList as |mission|}} diff --git a/junior/app/templates/identified/missions/mission/index.hbs b/junior/app/templates/identified/missions/mission/index.hbs index f119d76c773..59605f62852 100644 --- a/junior/app/templates/identified/missions/mission/index.hbs +++ b/junior/app/templates/identified/missions/mission/index.hbs @@ -1,8 +1,11 @@ {{page-title (t "pages.missions.start-page.title")}}
- - - +
+ + + + +
- - - +
+ + + + +