Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Vũ Hoàng Anh
canifa_note
Commits
987bb807
Unverified
Commit
987bb807
authored
Sep 04, 2022
by
winwin2011
Committed by
GitHub
Sep 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: heatmap popover blink (#195)
parent
b884327a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
29 deletions
+36
-29
UsageHeatMap.tsx
web/src/components/UsageHeatMap.tsx
+12
-6
usage-heat-map.less
web/src/less/usage-heat-map.less
+24
-23
No files found.
web/src/components/UsageHeatMap.tsx
View file @
987bb807
...
@@ -99,19 +99,25 @@ const UsageHeatMap = () => {
...
@@ -99,19 +99,25 @@ const UsageHeatMap = () => {
:
"stat-day-L4-bg"
;
:
"stat-day-L4-bg"
;
return
(
return
(
<
span
<
div
className=
{
`stat-container ${colorLevel} ${currentStat === v ? "current" : ""} ${
className=
"stat-wrapper"
todayTimeStamp === v.timestamp ? "today" : ""
}`
}
key=
{
i
}
key=
{
i
}
onMouseEnter=
{
(
e
)
=>
handleUsageStatItemMouseEnter
(
e
,
v
)
}
onMouseEnter=
{
(
e
)
=>
handleUsageStatItemMouseEnter
(
e
,
v
)
}
onMouseLeave=
{
handleUsageStatItemMouseLeave
}
onMouseLeave=
{
handleUsageStatItemMouseLeave
}
onClick=
{
()
=>
handleUsageStatItemClick
(
v
)
}
onClick=
{
()
=>
handleUsageStatItemClick
(
v
)
}
></
span
>
>
<
span
className=
{
`stat-container ${colorLevel} ${currentStat === v ? "current" : ""} ${
todayTimeStamp === v.timestamp ? "today" : ""
}`
}
></
span
>
</
div
>
);
);
})
}
})
}
{
nullCell
.
map
((
_
,
i
)
=>
(
{
nullCell
.
map
((
_
,
i
)
=>
(
<
span
className=
"stat-container null"
key=
{
i
}
></
span
>
<
div
className=
"stat-wrapper"
key=
{
i
}
>
<
span
className=
"stat-container null"
></
span
>
</
div
>
))
}
))
}
</
div
>
</
div
>
</
div
>
</
div
>
...
...
web/src/less/usage-heat-map.less
View file @
987bb807
...
@@ -23,35 +23,36 @@
...
@@ -23,35 +23,36 @@
grid-template-columns: repeat(12, 1fr);
grid-template-columns: repeat(12, 1fr);
grid-auto-flow: column;
grid-auto-flow: column;
> .stat-
contain
er {
> .stat-
wrapp
er {
@apply block rounded-sm;
> .stat-container {
width: 14px
;
@apply block rounded-sm
;
height
: 14px;
width
: 14px;
background-color: @bg-lightgray
;
height: 14px
;
margin-bottom: 2px
;
background-color: @bg-lightgray
;
&.null {
&.null {
@apply bg-transparent;
@apply bg-transparent;
}
}
&.stat-day-L1-bg {
&.stat-day-L1-bg {
background-color: @stat-day-L1-bg !important;
background-color: @stat-day-L1-bg !important;
}
}
&.stat-day-L2-bg {
&.stat-day-L2-bg {
background-color: @stat-day-L2-bg !important;
background-color: @stat-day-L2-bg !important;
}
}
&.stat-day-L3-bg {
&.stat-day-L3-bg {
background-color: @stat-day-L3-bg !important;
background-color: @stat-day-L3-bg !important;
}
}
&.stat-day-L4-bg {
&.stat-day-L4-bg {
background-color: @stat-day-L4-bg !important;
background-color: @stat-day-L4-bg !important;
}
}
&.today {
&.today {
border: 1px solid black;
border: 1px solid black;
}
}
}
}
}
}
}
...
...
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