feat(usage): add All Time period option and refine overview cards
- Add "all" period option to usage dashboard and chart API - Aggregate all days in getChartData when period is "all" - Center overview card metrics and adjust font size to prevent truncation Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1 parent
d1de324586
commit
b53260ca54
5 files changed
+48
-20
No files matched your search
@@ -200,6 +200,7 @@ const PERIODS = [
|
||||
{ value: "7d", label: "7D" },
|
||||
{ value: "30d", label: "30D" },
|
||||
{ value: "60d", label: "60D" },
|
||||
{ value: "all", label: "All" },
|
||||
];
|
||||
|
||||
export default function UsageStats({ period: periodProp, setPeriod: setPeriodProp, hidePeriodSelector = false } = {}) {
|
||||
@@ -448,7 +449,7 @@ export default function UsageStats({ period: periodProp, setPeriod: setPeriodPro
|
||||
{/* Period selector (hidden when controlled by parent) */}
|
||||
{!hidePeriodSelector && (
|
||||
<div className="flex w-full items-center gap-2 sm:w-auto sm:self-end">
|
||||
<div className="grid flex-1 grid-cols-5 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none">
|
||||
<div className="grid flex-1 grid-cols-6 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none">
|
||||
{PERIODS.map((p) => (
|
||||
<button
|
||||
key={p.value}
|
||||
|
||||
Reference in new issue
Block a user