|
|
@ -2,15 +2,15 @@ |
|
|
|
import LogEntry from "../components/LogEntry.svelte"; |
|
|
|
import type { LogResult } from "../models/log"; |
|
|
|
import logStore from "../stores/logs"; |
|
|
|
import { endOfWeek, formatFormTime, formatWeekdayDate, startOfWeek } from "../utils/time"; |
|
|
|
import { endOfDay, endOfWeek, formatFormTime, formatWeekdayDate, startOfDay, startOfWeek } from "../utils/time"; |
|
|
|
import EmptyList from "../components/EmptyList.svelte"; |
|
|
|
import RefreshSelection from "../components/RefreshSelection.svelte"; |
|
|
|
import DateRangeSelect from "../components/DateRangeSelect.svelte"; |
|
|
|
import EveryMinute from "../components/EveryMinute.svelte"; |
|
|
|
|
|
|
|
let groupedLogs: {day: number, text: string, logs: LogResult[]}[] = []; |
|
|
|
let minTime = formatFormTime($logStore.filter.minTime || startOfWeek(new Date())); |
|
|
|
let maxTime = formatFormTime($logStore.filter.maxTime || endOfWeek(new Date())); |
|
|
|
let minTime = formatFormTime($logStore.filter.minTime || startOfDay(new Date(Date.now() - 86400000 * 7))); |
|
|
|
let maxTime = formatFormTime($logStore.filter.maxTime || endOfDay(new Date())); |
|
|
|
let emptyMessage = `No logs since ${formatWeekdayDate(minTime)}.`; |
|
|
|
let error = ""; |
|
|
|
let now = new Date(); |
|
|
|