feat: 标签调整宽度和图标,top 3 -> top 4

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-25 19:00:52 +08:00
co-authored by Copilot
parent 520cfd96c7
commit fea99d37fe
4 changed files with 73 additions and 78 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ import { Prisma } from '@prisma/client'
const MAX_GAP_MS = 5 * 60 * 1000
const DEFAULT_SAMPLE_MS = 30 * 1000
const MIN_SAMPLE_MS = 5 * 1000
const SPOTLIGHT_APP_LIMIT = 4
const LABEL_TOKEN_THRESHOLD_RATIO = 0.5
const HOUR_MS = 60 * 60 * 1000
const DAY_MS = 24 * HOUR_MS
@@ -458,7 +459,7 @@ async function handleScreenTime(req: NextRequest) {
const aggregateSummary = buildAppList(aggregateUsageMap)
const selectedDaySummary = buildAppList(selectedDayUsageMap)
const spotlightApps = selectedDaySummary.apps.slice(0, 3).map(app => ({
const spotlightApps = selectedDaySummary.apps.slice(0, SPOTLIGHT_APP_LIMIT).map(app => ({
processId: app.processId,
processName: app.processName,
durationSeconds: app.durationSeconds,