fix: unify day boundaries on device-local time, JSON import preview parity
- Limits/streaks/greeting now use device-local days (was hardcoded Europe/London), matching dashboard metrics; label copy updated - JSON imports now go through the same preview/duplicate-detection modal as Excel
This commit is contained in:
@@ -37,7 +37,9 @@ export function ImportPreviewModal({
|
||||
>
|
||||
<div className="mb-5 flex items-start justify-between gap-4">
|
||||
<div>
|
||||
<p className="text-sm font-medium uppercase tracking-[0.18em] text-pink-100">Excel import</p>
|
||||
<p className="text-sm font-medium uppercase tracking-[0.18em] text-pink-100">
|
||||
{preview.fileName.toLowerCase().endsWith(".json") ? "JSON import" : "Excel import"}
|
||||
</p>
|
||||
<h2 id="import-preview-title" className="mt-1 text-3xl font-semibold tracking-tight text-white">
|
||||
Preview rows
|
||||
</h2>
|
||||
|
||||
@@ -142,7 +142,7 @@ export function LimitsSettingsForm({ limits, check, saving, onSave }: LimitsSett
|
||||
value={canInput}
|
||||
onChange={(event) => handleCanInputChange(event.target.value)}
|
||||
/>
|
||||
<span className="text-xs text-slate-500">Leave empty to remove. Counts use BST calendar days.</span>
|
||||
<span className="text-xs text-slate-500">Leave empty to remove. Counts use device-local calendar days.</span>
|
||||
</label>
|
||||
|
||||
<label className="grid gap-2 text-sm">
|
||||
@@ -170,7 +170,7 @@ export function LimitsSettingsForm({ limits, check, saving, onSave }: LimitsSett
|
||||
value={stopInput}
|
||||
onChange={(event) => setStopInput(event.target.value)}
|
||||
/>
|
||||
<span className="text-xs text-slate-500">Europe/London (BST/GMT). Leave empty to remove.</span>
|
||||
<span className="text-xs text-slate-500">Your device's local time. Leave empty to remove.</span>
|
||||
</label>
|
||||
|
||||
{previewParts.length ? (
|
||||
|
||||
@@ -61,7 +61,7 @@ export function SettingsView({
|
||||
return (
|
||||
<div className="grid gap-4 xl:grid-cols-[1fr_0.8fr]">
|
||||
<div className="grid content-start gap-4">
|
||||
<AppCard title="Limits" subtitle="Personal caps for cans, spend, and stop time (BST)">
|
||||
<AppCard title="Limits" subtitle="Personal caps for cans, spend, and stop time (local time)">
|
||||
<LimitsSettingsForm
|
||||
limits={userLimits}
|
||||
check={limitCheck}
|
||||
|
||||
Reference in New Issue
Block a user