Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/components/qr/qr-toolkit-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ export function QrToolkitPreview({
}
}
return (
<section className="space-y-4 rounded-2xl border border-ds-border bg-ds-surface p-5">
<section className="space-y-5 rounded-xl border border-ds-border bg-ds-surface2/65 p-5 sm:p-6 lg:sticky lg:top-0">
<div className="flex items-center justify-between gap-3">
<h2 className="text-base font-semibold">Live preview</h2>
<span className="text-xs text-ds-text-tertiary">Print-ready card</span>
</div>
<div
id="toolkit-print-card"
className="rounded-xl bg-[#ffffff] p-5 text-center text-[#172522]"
className="rounded-lg border border-black/5 bg-[#ffffff] p-5 text-center text-[#172522] shadow-sm"
>
<h2 className="break-words text-2xl font-bold">{title || "Scan me"}</h2>
<div
Expand All @@ -89,9 +93,9 @@ export function QrToolkitPreview({
{error}
</p>
) : null}
<div className="flex flex-wrap gap-2">
<div className="grid grid-cols-2 gap-2">
<button
className="toolkit-button"
className="toolkit-button toolkit-button-primary"
disabled={!ready}
type="button"
onClick={() => void download("png")}
Expand Down Expand Up @@ -128,7 +132,7 @@ export function QrToolkitPreview({
</button>
</div>
<details>
<summary className="cursor-pointer text-sm font-semibold">
<summary className="cursor-pointer text-xs font-medium text-ds-text-tertiary">
Encoded content
</summary>
<pre
Expand Down
12 changes: 6 additions & 6 deletions src/components/theme-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ const THEME_OPTIONS = [
{
value: "system" as const,
icon: Monitor,
label: "Sys",
label: "System",
accessibleLabel: "Use system theme",
},
{
value: "dark" as const,
icon: Moon,
label: "Drk",
label: "Dark",
accessibleLabel: "Use dark theme",
},
{
value: "light" as const,
icon: Sun,
label: "Lgt",
label: "Light",
accessibleLabel: "Use light theme",
},
] as const;
Expand All @@ -27,7 +27,7 @@ export function ThemeToggle() {

return (
<fieldset
className="flex overflow-hidden rounded-xl border-[2px] border-ds-border"
className="flex gap-1 rounded-lg border border-ds-border bg-ds-surface2 p-1"
aria-label="Color theme"
>
{THEME_OPTIONS.map((opt) => (
Expand All @@ -38,9 +38,9 @@ export function ThemeToggle() {
aria-pressed={theme === opt.value}
title={opt.accessibleLabel}
onClick={() => setTheme(opt.value)}
className={`flex-1 flex items-center justify-center gap-1.5 px-2.5 py-1.5 text-[10px] font-extrabold tracking-wide transition-all duration-100 ${
className={`flex-1 flex items-center justify-center gap-1.5 rounded-md px-1.5 py-2 text-xs font-medium transition-colors ${
theme === opt.value
? "bg-ds-accent text-ds-accent-fg"
? "bg-ds-surface text-ds-fg shadow-sm"
: "text-ds-muted hover:text-ds-fg"
}`}
>
Expand Down
16 changes: 7 additions & 9 deletions src/routes/app/analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ function AnalyticsPage() {
<div className="mx-auto w-full max-w-[1320px]">
<div className="mb-6 flex flex-wrap items-start justify-between gap-3 sm:mb-8">
<div>
<h1 className="text-2xl font-extrabold tracking-tighter sm:text-3xl">
Analytics
</h1>
<h1 className="text-2xl font-semibold tracking-tight">Analytics</h1>
<p className="mt-1 text-base text-ds-text-secondary">
View trends, top-performing codes, and usage activity
</p>
Expand Down Expand Up @@ -131,7 +129,7 @@ function AnalyticsPage() {
id={qrCodeFieldId}
value={selectedCodeId}
onChange={(event) => setSelectedCodeId(event.target.value)}
className="h-11 rounded-xl border border-ds-border bg-white px-3 text-sm text-ds-fg outline-none transition-colors focus:border-ds-accent"
className="h-11 rounded-xl border border-ds-border bg-ds-input-bg px-3 text-sm text-ds-fg transition-colors focus:border-ds-accent"
>
<option value="all">All Codes</option>
{(qrCodes ?? []).map((code) => (
Expand Down Expand Up @@ -162,8 +160,8 @@ function AnalyticsPage() {
isActive
? "border-ds-accent bg-ds-accent/10 text-ds-accent"
: isUnavailable
? "cursor-not-allowed border-ds-border bg-white/50 text-ds-text-tertiary/50"
: "border-ds-border bg-white text-ds-text-tertiary hover:border-ds-accent hover:text-ds-accent"
? "cursor-not-allowed border-ds-border bg-ds-input-bg/50 text-ds-text-tertiary/50"
: "border-ds-border bg-ds-input-bg text-ds-text-tertiary hover:border-ds-accent hover:text-ds-accent"
}`}
>
{option.label}
Expand Down Expand Up @@ -239,7 +237,7 @@ function AnalyticsPage() {

<div className="overflow-hidden rounded-2xl border border-ds-border bg-ds-surface">
<div className="border-b border-ds-border px-4 py-3">
<h2 className="text-2xl font-semibold tracking-tight">
<h2 className="text-base font-semibold tracking-tight">
Top codes
</h2>
</div>
Expand Down Expand Up @@ -378,7 +376,7 @@ function DailyScanTrend({
return (
<div className="overflow-hidden rounded-2xl border border-ds-border bg-ds-surface">
<div className="border-b border-ds-border px-4 py-3">
<h2 className="text-2xl font-semibold tracking-tight">View trend</h2>
<h2 className="text-base font-semibold tracking-tight">View trend</h2>
</div>
<div className="px-4 py-4">
<div className="mb-4 grid grid-cols-3 gap-2">
Expand All @@ -393,7 +391,7 @@ function DailyScanTrend({
<TrendStat label="Average/day" value={averageScans.toFixed(1)} />
</div>

<div className="rounded-xl border border-ds-border bg-white p-3">
<div className="rounded-xl border border-ds-border bg-ds-input-bg p-3">
<div className="relative w-full aspect-[3/1] min-h-[210px]">
{hoveredPoint && hoveredPercent !== null ? (
<div
Expand Down
28 changes: 15 additions & 13 deletions src/routes/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ function DashboardHome() {
<div className="mx-auto w-full max-w-[1320px]">
{analyticsQuery.isError ? <AnalyticsNotice /> : null}
<section className="rounded-2xl border border-ds-border bg-ds-surface p-5 sm:p-6">
<h1 className="text-3xl font-bold tracking-tight">
<h1 className="text-2xl font-semibold tracking-tight">
Welcome to Easy Access QR
</h1>
<p className="mt-1 text-sm text-ds-text-secondary sm:text-base">
<p className="mt-1 text-sm text-ds-text-secondary">
Complete onboarding to unlock your compact dashboard with live
performance snapshots.
</p>
Expand All @@ -193,7 +193,7 @@ function DashboardHome() {
</div>
<div className="h-2 w-full overflow-hidden rounded-full bg-ds-surface2">
<div
className="h-full bg-ds-accent transition-all duration-300"
className="h-full bg-ds-accent motion-safe:transition-[width] duration-300"
style={{ width: `${onboardingProgress}%` }}
/>
</div>
Expand All @@ -202,7 +202,7 @@ function DashboardHome() {

<div className="mt-4 grid gap-4 xl:grid-cols-[minmax(0,1.15fr)_minmax(0,0.85fr)]">
<section className="rounded-2xl border border-ds-border bg-ds-surface p-4 sm:p-5">
<h2 className="text-xl font-semibold tracking-tight">
<h2 className="text-base font-semibold tracking-tight">
Setup checklist
</h2>
<div className="mt-4 space-y-3">
Expand All @@ -217,7 +217,7 @@ function DashboardHome() {
</section>

<section className="rounded-2xl border border-ds-border bg-ds-surface p-4 sm:p-5">
<h2 className="text-xl font-semibold tracking-tight">
<h2 className="text-base font-semibold tracking-tight">
Current workspace snapshot
</h2>
<div className="mt-4 grid grid-cols-2 gap-3">
Expand All @@ -241,11 +241,11 @@ function DashboardHome() {
return (
<div className="mx-auto w-full max-w-[1320px]">
{analyticsQuery.isError ? <AnalyticsNotice /> : null}
<section className="mb-4 rounded-2xl border border-ds-border bg-ds-surface p-5 sm:p-6">
<section className="mb-6">
<div className="flex flex-wrap items-start justify-between gap-3">
<div>
<h1 className="text-3xl font-bold tracking-tight">Dashboard</h1>
<p className="mt-1 text-sm text-ds-text-secondary sm:text-base">
<h1 className="text-2xl font-semibold tracking-tight">Dashboard</h1>
<p className="mt-1 text-sm text-ds-text-secondary">
Quick performance summary for your active QR workspace.
</p>
</div>
Expand All @@ -269,7 +269,7 @@ function DashboardHome() {
<div className="grid gap-4 xl:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]">
<section className="rounded-2xl border border-ds-border bg-ds-surface">
<div className="border-b border-ds-border px-4 py-3 sm:px-5">
<h2 className="text-xl font-semibold tracking-tight">
<h2 className="text-base font-semibold tracking-tight">
Analytics snapshot
</h2>
<p className="mt-1 text-xs text-ds-text-tertiary">
Expand Down Expand Up @@ -297,7 +297,7 @@ function DashboardHome() {

<section className="rounded-2xl border border-ds-border bg-ds-surface">
<div className="border-b border-ds-border px-4 py-3 sm:px-5">
<h2 className="text-xl font-semibold tracking-tight">
<h2 className="text-base font-semibold tracking-tight">
Recent QR codes
</h2>
<p className="mt-1 text-xs text-ds-text-tertiary">
Expand Down Expand Up @@ -425,9 +425,11 @@ function OnboardingStepCard({

function SmallStat({ label, value }: { label: string; value: number }) {
return (
<div className="rounded-xl border border-ds-border bg-ds-surface2/45 px-3 py-3">
<div className="rounded-xl border border-ds-border bg-ds-surface px-4 py-5">
<p className="text-xs font-medium text-ds-text-tertiary">{label}</p>
<p className="mt-1 text-2xl font-bold tracking-tight">{value}</p>
<p className="mt-2 text-3xl font-semibold tabular-nums tracking-tight">
{value}
</p>
</div>
);
}
Expand Down Expand Up @@ -469,7 +471,7 @@ function MiniTrendChart({
};

return (
<div className="rounded-xl border border-ds-border bg-ds-input-bg p-3">
<div className="p-1">
<div className="flex items-center justify-between text-xs text-ds-text-tertiary">
<span className="inline-flex items-center gap-1">
<BarChart3 className="h-3.5 w-3.5 text-ds-accent" />
Expand Down
Loading
Loading