multiple small ui fixes (#2276)
Co-authored-by: WorldTeacher <coding_contact@pm.me>
This commit is contained in:
co-authored by
WorldTeacher
parent
1f62e4cd26
commit
f704e58b7d
+2
-2
@@ -28,7 +28,7 @@ public interface ReadingSessionRepository extends JpaRepository<ReadingSessionEn
|
|||||||
@Query("""
|
@Query("""
|
||||||
SELECT
|
SELECT
|
||||||
b.id as bookId,
|
b.id as bookId,
|
||||||
b.metadata.title as bookTitle,
|
COALESCE(b.metadata.title, b.fileName, 'Unknown Book') as bookTitle,
|
||||||
rs.bookType as bookFileType,
|
rs.bookType as bookFileType,
|
||||||
MIN(rs.startTime) as startDate,
|
MIN(rs.startTime) as startDate,
|
||||||
MAX(rs.endTime) as endDate,
|
MAX(rs.endTime) as endDate,
|
||||||
@@ -38,7 +38,7 @@ public interface ReadingSessionRepository extends JpaRepository<ReadingSessionEn
|
|||||||
JOIN rs.book b
|
JOIN rs.book b
|
||||||
WHERE rs.user.id = :userId
|
WHERE rs.user.id = :userId
|
||||||
AND rs.startTime >= :startOfWeek AND rs.startTime < :endOfWeek
|
AND rs.startTime >= :startOfWeek AND rs.startTime < :endOfWeek
|
||||||
GROUP BY b.id, b.metadata.title, rs.bookType
|
GROUP BY b.id, COALESCE(b.metadata.title, b.fileName, 'Unknown Book'), rs.bookType
|
||||||
ORDER BY MIN(rs.startTime)
|
ORDER BY MIN(rs.startTime)
|
||||||
""")
|
""")
|
||||||
List<ReadingSessionTimelineDto> findSessionTimelineByUserAndWeek(
|
List<ReadingSessionTimelineDto> findSessionTimelineByUserAndWeek(
|
||||||
|
|||||||
+1
-1
@@ -73,7 +73,7 @@
|
|||||||
<div class="sessions">
|
<div class="sessions">
|
||||||
@for (session of dayData.sessions; track $index) {
|
@for (session of dayData.sessions; track $index) {
|
||||||
<div class="session-block"
|
<div class="session-block"
|
||||||
[ngClass]="'book-type-' + (session.bookType || 'default').toLowerCase()"
|
[class]="'book-type-' + (session.bookType || 'default').toLowerCase()"
|
||||||
[style.left.%]="session.left"
|
[style.left.%]="session.left"
|
||||||
[style.width.%]="session.width"
|
[style.width.%]="session.width"
|
||||||
[style.top]="session.totalLevels > 1 ? 'calc(' + session.level + ' / ' + session.totalLevels + ' * 100% + ' + session.level * 2 + 'px)' : '0'"
|
[style.top]="session.totalLevels > 1 ? 'calc(' + session.level + ' / ' + session.totalLevels + ' * 100% + ' + session.level * 2 + 'px)' : '0'"
|
||||||
|
|||||||
+8
-1
@@ -1,5 +1,6 @@
|
|||||||
.timeline-container {
|
.timeline-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-header {
|
.timeline-header {
|
||||||
@@ -153,6 +154,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hour-markers {
|
.hour-markers {
|
||||||
@@ -197,11 +199,13 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-row {
|
.timeline-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
|
overflow: visible;
|
||||||
|
|
||||||
.day-label {
|
.day-label {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
@@ -221,6 +225,7 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
min-height: 35px;
|
min-height: 35px;
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,6 +249,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 4px;
|
inset: 4px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
overflow: visible;
|
||||||
|
|
||||||
.session-block {
|
.session-block {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -337,13 +343,14 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
|
||||||
z-index: 1000;
|
z-index: 9999;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
max-width: 350px;
|
max-width: 350px;
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||||
|
white-space: normal;
|
||||||
|
|
||||||
.tooltip-content {
|
.tooltip-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -191,6 +191,7 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(12, 1fr);
|
grid-template-columns: repeat(12, 1fr);
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-card {
|
.chart-card {
|
||||||
@@ -202,7 +203,7 @@
|
|||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: visible;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: rgba(255, 255, 255, 0.2);
|
border-color: rgba(255, 255, 255, 0.2);
|
||||||
|
|||||||
Reference in New Issue
Block a user