Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
91520016
Commit
91520016
authored
Jul 12, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update rating design
parent
cb4d8e8e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
PopoverContent.tsx
ui/marketplace/Rating/PopoverContent.tsx
+26
-6
No files found.
ui/marketplace/Rating/PopoverContent.tsx
View file @
91520016
import
{
Text
,
Flex
,
Spinner
,
Button
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
{
mdash
}
from
'
lib/html-entities
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
Stars
from
'
./Stars
'
;
const
ratingDescriptions
=
[
'
Terrible
'
,
'
Poor
'
,
'
Average
'
,
'
Very good
'
,
'
Outstanding
'
];
...
...
@@ -39,13 +42,30 @@ const PopoverContent = ({ appId, recordId, userRating, rate, isSending }: Props)
if
(
userRating
)
{
return
(
<>
<
Flex
alignItems=
"center"
>
<
IconSvg
name=
"verified"
color=
"green.400"
boxSize=
"30px"
mr=
{
1
}
ml=
"-5px"
/>
<
Text
fontWeight=
"500"
fontSize=
"xs"
lineHeight=
"30px"
variant=
"secondary"
>
App is already rated by you
</
Text
>
</
Flex
>
<
Flex
alignItems=
"center"
h=
"32px"
>
<
Stars
filledIndex=
{
userRating
-
1
}
/>
<
Text
fontSize=
"md"
ml=
{
2
}
>
{
ratingDescriptions
[
userRating
-
1
]
}
<
IconSvg
name=
"star_filled"
color=
"yellow.400"
boxSize=
{
5
}
mr=
{
1
}
/>
<
Text
fontSize=
"md"
fontWeight=
"500"
mr=
{
3
}
>
{
userRating
.
toFixed
(
1
)
}
</
Text
>
<
Text
fontSize=
"md"
>
{
mdash
}
{
ratingDescriptions
[
userRating
-
1
]
}
</
Text
>
</
Flex
>
</>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment