diff --git a/.gitignore b/.gitignore index fb8b6478..af852bee 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,5 @@ __screenshots__/ # NS8 Robot Framework test output (output.xml, log.html, report.html, screenshots) packaging/ns8/tests/outputs/ __pycache__/ +calnode.key +FUTURE_FEATURES.md diff --git a/frontend/src/app.css b/frontend/src/app.css index e0921169..4ce8c248 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -1,7 +1,7 @@ @import "tailwindcss"; @import "tw-animate-css"; -@custom-variant dark (&:is(.dark *)); +@custom-variant dark (&:where(.dark, .dark *)); /* * Tailwind v4 has built-in data-* variants: `data-foo:` targets `[data-foo]`. @@ -57,17 +57,17 @@ :root { --radius: 0.5rem; - --background: oklch(1 0 0); - --foreground: oklch(0.141 0.005 285.823); - --card: oklch(1 0 0); - --card-foreground: oklch(0.141 0.005 285.823); - --popover: oklch(1 0 0); - --popover-foreground: oklch(0.141 0.005 285.823); + --background: #F7F8FA; + --foreground: #111827; + --card: #FFFFFF; + --card-foreground: #111827; + --popover: #FFFFFF; + --popover-foreground: #111827; --primary: oklch(0.21 0.006 285.885); --primary-foreground: oklch(0.985 0 0); - --secondary: oklch(0.967 0.001 286.375); - --secondary-foreground: oklch(0.21 0.006 285.885); - --muted: oklch(0.967 0.001 286.375); + --secondary: #F1F3F5; + --secondary-foreground: #111827; + --muted: #F1F3F5; --muted-foreground: oklch(0.552 0.016 285.938); --accent: oklch(0.967 0.001 286.375); --accent-foreground: oklch(0.21 0.006 285.885); @@ -139,4 +139,30 @@ body { line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + transition: background-color 180ms cubic-bezier(0.2, 0.8, 0.2, 1), color 180ms cubic-bezier(0.2, 0.8, 0.2, 1); +} + +button, +a, +input, +select, +textarea { + transition-duration: 160ms; + transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); +} + +:focus-visible { + outline: 2px solid var(--ring); + outline-offset: 2px; +} + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } } diff --git a/frontend/src/app.html b/frontend/src/app.html index 4fdc6b00..4f69454c 100644 --- a/frontend/src/app.html +++ b/frontend/src/app.html @@ -5,6 +5,16 @@ + diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index cd6c8723..213c0499 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -54,6 +54,8 @@ export type EventType = { min_notice_minutes: number; max_future_days: number; max_active_bookings: number; + max_per_day?: number | null; + max_per_week?: number | null; price_cents: number; // 0 = free currency: string; // ISO 4217, lowercase (e.g. "usd") created_at: string; @@ -93,6 +95,22 @@ export type EventTypeHost = { archived: boolean; }; +export type SingleUseLink = { + id: string; + token: string; + url: string; + event_type_id: string; + created_by_user_id: string; + expires_at: string | null; + used_at: string | null; + booking_id: string | null; + created_at: string; +}; + +export type CreateSingleUseLinkPayload = { + expires_in_hours?: number; +}; + export type Question = { id: string; event_type_id: string; diff --git a/frontend/src/lib/components/event-types/BookingPreviewCard.svelte b/frontend/src/lib/components/event-types/BookingPreviewCard.svelte new file mode 100644 index 00000000..8d55c8e1 --- /dev/null +++ b/frontend/src/lib/components/event-types/BookingPreviewCard.svelte @@ -0,0 +1,153 @@ + + +
+
+ Live Preview + Interactive +
+ +
+
+
+ {#if hostAvatar} + {hostName} + {:else} +
+ {(hostName || 'H').slice(0, 1).toUpperCase()} +
+ {/if} + {hostName} +
+

{name || 'Untitled Event'}

+ {#if description} +

{description}

+ {/if} +
+ + {duration || 30}m + + + {locationLabel} + +
+
+ + {#if mode === 'form'} +
+
+ Fri, Nov {selectedDay} · 10:00 AM + UTC +
+
+
+
Your name *
+
Jane Doe
+
+
+
Email address *
+
jane@example.com
+
+ {#if allowPhoneCall} +
+
Phone number (optional)
+
+1 (555) 000-0000
+
+ {/if} + {#each questions as q (q.id)} +
+ {#if q.type === 'checkbox'} +
+
+ {q.label}{#if q.required} *{/if} +
+ {:else if q.type === 'select'} +
{q.label}{#if q.required} *{/if}
+
+ {q.options?.[0] ?? 'Choose an option'} + ▾ +
+ {:else} +
{q.label}{#if q.required} *{/if}
+
Answer...
+ {/if} +
+ {/each} +
+
+ Confirm booking +
+
+
+
+ {:else} +
+
+ November 2026 + UTC +
+
+ {#each weekdays as wd} +
{wd}
+ {/each} + {#each days as d} + {@const isWeekend = d % 7 === 0 || d % 7 === 6} + + {/each} +
+
+ {/if} +
+
diff --git a/frontend/src/lib/components/event-types/QuestionsPanel.svelte b/frontend/src/lib/components/event-types/QuestionsPanel.svelte index 8036ff9b..a6e7adb7 100644 --- a/frontend/src/lib/components/event-types/QuestionsPanel.svelte +++ b/frontend/src/lib/components/event-types/QuestionsPanel.svelte @@ -1,288 +1,824 @@ - -
-

{$t('eventTypeEditor.questions.title')}

-

{$t('eventTypeEditor.questions.subtitle')}

+ +
+

+ Booking form +

+

+ {$t("eventTypeEditor.questions.subtitle")} +

+ + +
+
+
+
Your name
+
Text
+
+ Required +
+
+
+
Email address
+
Email
+
+ Required +
+ {#if allowPhoneCall} +
+
+
Phone number
+
Phone
+
+ Optional +
+ {/if} +
-
- {#if qLoading} -

{$t('common.loading')}

- {:else if questions.length > 0} - - - - - - - - - - - - {#each questions as q} - {#if editingQId === q.id} - - -
{$t('eventTypeEditor.questions.table.number')}{$t('eventTypeEditor.questions.table.question')}{$t('eventTypeEditor.questions.table.type')}{$t('eventTypeEditor.questions.table.required')}
{q.position + 1} -
-
- - -
-
- - { if (v) editQForm.type = v as 'text'|'select'|'checkbox'; }}> - - {QUESTION_TYPES.find((t) => t.value === editQForm.type)?.label ?? $t('common.select')} - - - {#each QUESTION_TYPES as qt} - {qt.label} - {/each} - - -
- {#if editQForm.type === 'select'} -
- -