mirror of
https://github.com/booklore-app/booklore.git
synced 2026-02-18 00:17:53 +01:00
fix(reading-stats,ui): update heatmap to use local time formatting, fix tooltip css in reading-stats page (#2587)
This commit is contained in:
@@ -178,7 +178,10 @@ export class ReadingSessionHeatmapComponent implements OnInit, OnDestroy {
|
||||
|
||||
while (currentDate <= endDate || weekIndex === 0) {
|
||||
for (let dayOfWeek = 0; dayOfWeek < 7; dayOfWeek++) {
|
||||
const dateStr = currentDate.toISOString().split('T')[0];
|
||||
const year = currentDate.getFullYear();
|
||||
const month = String(currentDate.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(currentDate.getDate()).padStart(2, '0');
|
||||
const dateStr = `${year}-${month}-${day}`;
|
||||
|
||||
if (currentDate >= startDate && currentDate <= endDate) {
|
||||
const count = sessionMap.get(dateStr) || 0;
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
[pTooltip]="getTooltipContent(session)"
|
||||
[escape]="false"
|
||||
tooltipPosition="top"
|
||||
tooltipStyleClass="session-timeline-tooltip"
|
||||
[appendTo]="'body'">
|
||||
@if (isDurationGreaterThanOneHour(session.duration)) {
|
||||
<div class="session-content">
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
::ng-deep .p-tooltip {
|
||||
::ng-deep .session-timeline-tooltip.p-tooltip {
|
||||
--p-tooltip-max-width: 300px;
|
||||
--p-tooltip-background: rgba(30, 30, 30, 0.98);
|
||||
--p-tooltip-color: #ffffff;
|
||||
|
||||
Reference in New Issue
Block a user