-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(junior): Add style to login component
- Loading branch information
1 parent
024708b
commit 35b3e5c
Showing
9 changed files
with
68 additions
and
35 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import PixButton from '@1024pix/pix-ui/components/pix-button'; | ||
import PixIcon from '@1024pix/pix-ui/components/pix-icon'; | ||
import { action } from '@ember/object'; | ||
import { service } from '@ember/service'; | ||
import Component from '@glimmer/component'; | ||
import { t } from 'ember-intl'; | ||
|
||
export default class Login extends Component { | ||
@service router; | ||
@service currentLearner; | ||
|
||
get currentUserDisplayName() { | ||
return this.currentLearner.learner.displayName; | ||
} | ||
|
||
@action | ||
disconnect() { | ||
this.router.transitionTo(this.currentLearner.learner.schoolUrl); | ||
} | ||
|
||
<template> | ||
<div class="login"> | ||
<div class="login__informations"> | ||
<p>{{this.currentUserDisplayName}}</p> | ||
<PixButton @variant="tertiary" @iconBefore="logout" @triggerAction={{this.disconnect}}> | ||
{{t "components.login.logout-button"}} | ||
</PixButton> | ||
</div> | ||
<PixIcon class="login__icon" @name="userCircle" /> | ||
</div> | ||
</template> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.login { | ||
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,5 @@ | |
.header_container { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: flex-start; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters