Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ecolyo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
Ecolyo
Commits
1b36186c
Commit
1b36186c
authored
4 years ago
by
Guilhem CARRON
Browse files
Options
Downloads
Patches
Plain Diff
Add display consumtpion in boss mini card
parent
996a1128
No related branches found
No related tags found
1 merge request
!150
Features/us283 display consumption boss mini card
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/Season/SeasonCardOnGoing.tsx
+19
-2
19 additions, 2 deletions
src/components/Season/SeasonCardOnGoing.tsx
src/components/Season/seasonCardOnGoing.scss
+16
-0
16 additions, 0 deletions
src/components/Season/seasonCardOnGoing.scss
src/locales/fr.json
+2
-1
2 additions, 1 deletion
src/locales/fr.json
with
37 additions
and
3 deletions
src/components/Season/SeasonCardOnGoing.tsx
+
19
−
2
View file @
1b36186c
...
@@ -70,7 +70,6 @@ const SeasonCardOnGoing: React.FC<SeasonCardOnGoingProps> = ({
...
@@ -70,7 +70,6 @@ const SeasonCardOnGoing: React.FC<SeasonCardOnGoingProps> = ({
})
})
},
[
userSeason
])
},
[
userSeason
])
//TODO change icon and stars when finished
return
(
return
(
<
div
className
=
"cardContent onGoing"
>
<
div
className
=
"cardContent onGoing"
>
<
div
className
=
"titleBlock"
>
<
div
className
=
"titleBlock"
>
...
@@ -125,11 +124,29 @@ const SeasonCardOnGoing: React.FC<SeasonCardOnGoingProps> = ({
...
@@ -125,11 +124,29 @@ const SeasonCardOnGoing: React.FC<SeasonCardOnGoingProps> = ({
<
StarsContainer
starNumber
=
{
userSeason
.
progress
>=
15
?
5
:
4
}
/>
<
StarsContainer
starNumber
=
{
userSeason
.
progress
>=
15
?
5
:
4
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
{
userSeason
.
progress
>=
userSeason
.
target
?
(
{
userSeason
.
progress
>=
userSeason
.
target
&&
userSeason
.
boss
.
state
===
UserBossState
.
UNLOCKED
?
(
<
button
className
=
"smallCard goDuel"
onClick
=
{
goDuel
}
>
<
button
className
=
"smallCard goDuel"
onClick
=
{
goDuel
}
>
{
t
(
'
season.card.ongoing.duel
'
)
}
{
t
(
'
season.card.ongoing.duel
'
)
}
<
StyledIcon
className
=
"circleStar"
icon
=
{
seasonIcon
}
size
=
{
60
}
/>
<
StyledIcon
className
=
"circleStar"
icon
=
{
seasonIcon
}
size
=
{
60
}
/>
</
button
>
</
button
>
)
:
userSeason
.
boss
.
state
===
UserBossState
.
ONGOING
?
(
<
div
className
=
{
'
smallCard bossCard active
'
}
>
<
div
className
=
"finalDuel"
>
<
span
>
{
t
(
'
season.card.ongoing.duel
'
)
}
</
span
>
<
p
className
=
"starCount"
>
<
span
className
=
"blueNumber"
>
{
`
${
userSeason
.
boss
.
userConsumption
}
€ `
}
</
span
>
<
span
>
{
` /
${
userSeason
.
boss
.
threshold
}
€`
}
</
span
>
</
p
>
</
div
>
<
StyledIcon
className
=
"circleStar"
icon
=
{
seasonIcon
}
size
=
{
60
}
/>
</
div
>
)
:
userSeason
.
boss
.
state
===
UserBossState
.
DONE
?
(
//TODO add open Modal onclick
<
div
className
=
{
'
smallCard bossCard
'
}
>
<
span
>
{
t
(
'
season.card.ongoing.duelDone
'
)
}
</
span
>
<
StyledIcon
className
=
"duelLocked"
icon
=
{
duelLocked
}
size
=
{
60
}
/>
</
div
>
)
:
(
)
:
(
<
div
className
=
{
'
smallCard bossCard
'
}
>
<
div
className
=
{
'
smallCard bossCard
'
}
>
<
p
className
=
"starCount"
>
<
p
className
=
"starCount"
>
...
...
This diff is collapsed.
Click to expand it.
src/components/Season/seasonCardOnGoing.scss
+
16
−
0
View file @
1b36186c
...
@@ -82,12 +82,28 @@
...
@@ -82,12 +82,28 @@
margin
:
0
0
.3rem
0
0
.7rem
;
margin
:
0
0
.3rem
0
0
.7rem
;
}
}
}
}
.finalDuel
{
display
:
flex
;
flex-direction
:
column
;
.starCount
{
span
{
font-size
:
1rem
;
font-weight
:
500
;
}
.blueNumber
{
margin-left
:
0
;
}
}
}
}
}
.bossCard
{
.bossCard
{
background
:
$dark-3
;
background
:
$dark-3
;
border
:
solid
1px
rgba
(
97
,
240
,
242
,
0
.5
);
border
:
solid
1px
rgba
(
97
,
240
,
242
,
0
.5
);
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
&
.active
{
background
:
$grey-linear-gradient-background
;
}
}
}
.goDuel
{
.goDuel
{
align-items
:
center
;
align-items
:
center
;
...
...
This diff is collapsed.
Click to expand it.
src/locales/fr.json
+
2
−
1
View file @
1b36186c
...
@@ -350,7 +350,8 @@
...
@@ -350,7 +350,8 @@
"quiz"
:
"Quiz"
,
"quiz"
:
"Quiz"
,
"mission"
:
"Missions"
,
"mission"
:
"Missions"
,
"action"
:
"Actions"
,
"action"
:
"Actions"
,
"duel"
:
"Défi Final"
"duel"
:
"Défi Final"
,
"duelDone"
:
"Résultat du défi final"
},
},
"locked"
:
{
"locked"
:
{
"desc"
:
"À débloquer en terminant la saison précédente"
"desc"
:
"À débloquer en terminant la saison précédente"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment