feat: add activity heatmap by day
Aggregate last-played dates via GET /api/activity and render a calendar heatmap with a year selector in the library view.
This commit is contained in:
1 parent
54a7b36aae
commit
4566066f2b
10 files changed
+171
-1
No files matched your search
@@ -444,6 +444,36 @@ summary:focus-visible,
|
||||
.bulk-bar select { width: auto; min-width: 130px; padding: 7px 9px; }
|
||||
.bulk-bar .ghost { flex: 0 0 auto; padding: 7px 10px; }
|
||||
|
||||
.activity-panel { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
|
||||
.activity-body {
|
||||
padding: 14px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 14px;
|
||||
background: var(--panel);
|
||||
}
|
||||
.activity-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
|
||||
.activity-head select { width: auto; min-width: 110px; }
|
||||
.activity-heatmap {
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
grid-template-rows: repeat(7, 12px);
|
||||
gap: 3px;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
.activity-cell { width: 12px; height: 12px; border-radius: 3px; background: var(--bg-2); }
|
||||
.activity-cell.blank { background: transparent; }
|
||||
.activity-cell.l1 { background: rgba(94, 234, 212, .22); }
|
||||
.activity-cell.l2 { background: rgba(94, 234, 212, .45); }
|
||||
.activity-cell.l3 { background: rgba(94, 234, 212, .7); }
|
||||
.activity-cell.l4 { background: rgba(94, 234, 212, .95); }
|
||||
.activity-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; }
|
||||
.activity-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
|
||||
.activity-legend .l1 { background: rgba(94, 234, 212, .22); }
|
||||
.activity-legend .l2 { background: rgba(94, 234, 212, .45); }
|
||||
.activity-legend .l3 { background: rgba(94, 234, 212, .7); }
|
||||
.activity-legend .l4 { background: rgba(94, 234, 212, .95); }
|
||||
|
||||
.select-box {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
|
||||
Reference in new issue
Block a user