From 4a525706907fbcc02d40f6b5106e881657e2ef15 Mon Sep 17 00:00:00 2001 From: Stephen Gruzin Date: Sat, 11 Jul 2026 02:22:09 -0700 Subject: [PATCH 1/6] Working on adding expired override options --- .vscode/settings.json | 3 + .../dynamicUrls/DynamicURLEditor.svelte | 58 ++++++++++++++++++- frontend/src/lib/utils.ts | 2 + .../dashboard/dynamic-urls/data.remote.ts | 12 +++- 4 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4452e03 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.definitionLinkOpensInPeek": false +} diff --git a/frontend/src/lib/dashboard/dynamicUrls/DynamicURLEditor.svelte b/frontend/src/lib/dashboard/dynamicUrls/DynamicURLEditor.svelte index 950d1f7..d5f7f74 100644 --- a/frontend/src/lib/dashboard/dynamicUrls/DynamicURLEditor.svelte +++ b/frontend/src/lib/dashboard/dynamicUrls/DynamicURLEditor.svelte @@ -12,6 +12,7 @@ import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { toast } from "svelte-sonner"; + import { Temporal } from "temporal-polyfill"; async function deleteIt() { const loading = toast.loading("Deleting Dynamic URL"); @@ -33,6 +34,30 @@ let { url, saveRequired = $bindable() }: { url: DynamicURLModel, saveRequired: boolean } = $props(); + const overrideExpiresTimes = [ + { value: "never", label: "Never" }, + { value: "15min", label: "In 15 minutes" }, + { value: "30min", label: "In 30 minutes" }, + { value: "1hour", label: "In 1 hour" }, + { value: "2hour", label: "In 2 hours" }, + { value: "4hour", label: "In 4 hours" }, + { value: "8hour", label: "In 8 hours" }, + { value: "16hour", label: "In 16 hours" } + ] as const; + + let selectedOverrideExpireTime: (typeof overrideExpiresTimes)[number]['value'] | "set" = $derived(url.overrideExpireInStr); + let selectedOverrideExpireTimeToDate = $derived({ + never: 0, + "15min": 15, + "30min": 30, + "1hour": 60, + "2hour": 120, + "4hour": 240, + "8hour": 480, + "16hour": 960, + "set": 0 + }[selectedOverrideExpireTime]); + let confirmDelete = $state(false); let totalHits = $derived(url.refs.reduce((sum, ref) => sum + ref.hits, 0)); let maxHits = $derived(Math.max(...url.refs.map((r) => r.hits), 1)); @@ -53,12 +78,14 @@ const overrideURLChanged = overrideURL !== url.overrideRedirectTo; const enableWeeklyScheduleChanged = enableWeeklySchedule !== url.enableWeekSheet; const weekSheetChanged = weekSheet !== url.weekSheet; + const overrideExpiresInChanged = (selectedOverrideExpireTime === "never" ? "" : Temporal.Now.zonedDateTimeISO(currentTz).add({minutes: selectedOverrideExpireTimeToDate}).toString()) !== url.overrideExpiresIn; saveRequired = defaultRedirectURLChanged || currentTzChanged || disableURLChanged || enableOverrideChanged || ( enableOverride && overrideURLChanged ) || + ( enableOverride && overrideExpiresInChanged ) || enableWeeklyScheduleChanged || weekSheetChanged; }); @@ -74,7 +101,8 @@ enableWeekSheet: enableWeeklySchedule, overrideRedirectTo: overrideURL, enableOverrideRedirect: enableOverride, - disableURL + disableURL, + overrideExpiresIn: selectedOverrideExpireTime === "never" ? "" : Temporal.Now.zonedDateTimeISO(currentTz).add({minutes: selectedOverrideExpireTimeToDate}).toString({ timeZoneName: 'never' }).replace('T', ' ') }); toast.dismiss(loading); if (response.error) { @@ -118,7 +146,7 @@ - {currentTz} + {currentTz} {#each TIMEZONES as tz (`aTZ${tz}`)} @@ -176,6 +204,32 @@ bind:value={overrideURL} placeholder="https://zoom.us/j/special-event" /> + {/if} diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts index e5bb433..7267faf 100644 --- a/frontend/src/lib/utils.ts +++ b/frontend/src/lib/utils.ts @@ -383,6 +383,8 @@ export interface DynamicURLModel extends RecordModel { refs: URLRefHits[], created: string, updated: string, + overrideExpiresIn: string + overrideExpireInStr: "never" | "15min" | "30min" | "1hour" | "2hour" | "4hour" | "8hour" | "16hour" | "set" } export const TIMEZONES = [ diff --git a/frontend/src/routes/(mainWebsite)/dashboard/dynamic-urls/data.remote.ts b/frontend/src/routes/(mainWebsite)/dashboard/dynamic-urls/data.remote.ts index 76ca62f..b5b7732 100644 --- a/frontend/src/routes/(mainWebsite)/dashboard/dynamic-urls/data.remote.ts +++ b/frontend/src/routes/(mainWebsite)/dashboard/dynamic-urls/data.remote.ts @@ -94,7 +94,8 @@ export const createDynamicURLCommand = command(CreateDynamicURLSchema, async (ne "timeZone": newURLData.timeZone, "weekSheet": [[],[],[],[],[],[],[]], "refs": [], - "owner": locals.user.id + "owner": locals.user.id, + "overrideExpireInStr": "never" }; await locals.pb.collection('dynamic_url').create(data, { @@ -129,6 +130,7 @@ const UpdateDynamicURLSchema = v.object({ }))), enableWeekSheet: v.boolean(), enableOverrideRedirect: v.boolean(), + overrideExpiresIn: v.string(), disableURL: v.boolean(), overrideRedirectTo: v.nullish(v.union([v.pipe(v.string(), v.url()), v.pipe(v.string(), v.maxLength(0))])), }); @@ -185,13 +187,19 @@ export const updateDynamicURLCommand = command(UpdateDynamicURLSchema, async (up "weekSheet": updatedURLData.weekSheet, "enableWeekSheet": updatedURLData.enableWeekSheet, "enableOverrideRedirect": updatedURLData.enableOverrideRedirect, - "disableURL": updatedURLData.disableURL, + "disableURL": updatedURLData.disableURL }; if (updatedURLData.enableOverrideRedirect && updatedURLData.overrideRedirectTo && updatedURLData.overrideRedirectTo.length > 0) { data["overrideRedirectTo"] = updatedURLData.overrideRedirectTo; } + if (updatedURLData.enableOverrideRedirect) { + data["overrideExpiresIn"] = updatedURLData.overrideExpiresIn; + } + + console.log(data); + await locals.pb.collection('dynamic_url').update(dynamicURL.id, data, { headers: { "Authorization": "Bearer " + process.env["POCKETBASE_TOKEN"]! From 5bbec9f61280126f74ee92d88602cd57a217f5dd Mon Sep 17 00:00:00 2001 From: Stephen Gruzin Date: Wed, 15 Jul 2026 01:12:33 -0700 Subject: [PATCH 2/6] Made it possible to expire the override toggle in the dynamic url page --- .../dynamicUrls/DynamicURLEditor.svelte | 16 ++++--- .../(mainWebsite)/dashboard/backend.remote.ts | 43 +++++++++++++++++++ .../dashboard/dynamic-urls/data.remote.ts | 3 +- frontend/src/routes/go/[slug]/+server.ts | 3 +- 4 files changed, 56 insertions(+), 9 deletions(-) diff --git a/frontend/src/lib/dashboard/dynamicUrls/DynamicURLEditor.svelte b/frontend/src/lib/dashboard/dynamicUrls/DynamicURLEditor.svelte index d5f7f74..5bd51dc 100644 --- a/frontend/src/lib/dashboard/dynamicUrls/DynamicURLEditor.svelte +++ b/frontend/src/lib/dashboard/dynamicUrls/DynamicURLEditor.svelte @@ -1,6 +1,6 @@ @@ -35,16 +37,18 @@
- {#if calId.length > 0} - + {#if calPublicIdBindable.length > 0} + {/if} - + + {#each updateCalendarForm.fields.publicId.issues() as issue} +

{issue.message}

+ {/each}
diff --git a/frontend/src/routes/(mainWebsite)/dashboard/calendars/+page.svelte b/frontend/src/routes/(mainWebsite)/dashboard/calendars/+page.svelte index 79fd4bf..03aad41 100644 --- a/frontend/src/routes/(mainWebsite)/dashboard/calendars/+page.svelte +++ b/frontend/src/routes/(mainWebsite)/dashboard/calendars/+page.svelte @@ -24,15 +24,17 @@ let newCalendarDialogOpen = $state(false); let newCalendarDescription = $state(""); + let newCalendarPublicId = $state(""); let newCalendarName = $state(""); let newCalendarPasswordEnabled = $state(false); let newCalendarPassword = $state(""); let creatingCalendar = $state(false); async function handleCreateCalendar() { - if (newCalendarName && newCalendarDescription) { + if (newCalendarPublicId && newCalendarName && newCalendarDescription) { creatingCalendar = true; const response = await createCalendarCommand({ + publicId: newCalendarPublicId, name: newCalendarName, description: newCalendarDescription, enablePassword: newCalendarPasswordEnabled, @@ -45,6 +47,7 @@ toast.success(response.msg); newCalendarDialogOpen = false; newCalendarDescription = ""; + newCalendarPublicId = ""; newCalendarName = ""; newCalendarPasswordEnabled = false; newCalendarPassword = ""; @@ -110,6 +113,15 @@
+
+ + +
+
{/if} - /cal/{calendar.id} + /cal/{calendar.publicId}
diff --git a/frontend/src/routes/(mainWebsite)/dashboard/calendars/[slug]/+page.svelte b/frontend/src/routes/(mainWebsite)/dashboard/calendars/[slug]/+page.svelte index bf95647..e2808eb 100644 --- a/frontend/src/routes/(mainWebsite)/dashboard/calendars/[slug]/+page.svelte +++ b/frontend/src/routes/(mainWebsite)/dashboard/calendars/[slug]/+page.svelte @@ -93,19 +93,26 @@ let savingChanges = toast.loading("Saving Changes.", { duration: Number.POSITIVE_INFINITY }); try { await submit(); - form.reset(); - - clearFileInput(document.getElementById("imageUploaderCalendar")); - uploadNewAvatar = null; toast.dismiss(savingChanges); - toast.success("Saved Changes"); + if (!updateCalendarForm.fields.allIssues()) { + form.reset(); + + clearFileInput(document.getElementById("imageUploaderCalendar")); + uploadNewAvatar = null; + toast.success("Saved Changes"); + } else { + toast.error("Something went wrong!"); + } } catch (err) { console.log(err); toast.dismiss(savingChanges); toast.error("An error occured."); } })} class="lg:col-span-2 space-y-6" enctype="multipart/form-data"> + {#if selectedCalendar.id.length > 0} + + {/if} @@ -136,7 +143,7 @@ diff --git a/frontend/src/lib/DynamicFeedAvatar.svelte b/frontend/src/lib/DynamicFeedAvatar.svelte index d6a035f..e0ddd94 100644 --- a/frontend/src/lib/DynamicFeedAvatar.svelte +++ b/frontend/src/lib/DynamicFeedAvatar.svelte @@ -1,9 +1,9 @@
- -
\ No newline at end of file + +
diff --git a/frontend/src/lib/Event.svelte b/frontend/src/lib/Event.svelte index 7d71b4b..e887b43 100644 --- a/frontend/src/lib/Event.svelte +++ b/frontend/src/lib/Event.svelte @@ -1,103 +1,173 @@ -
-
-

{event.name}

-

{#if EVENT_DAY_NUMBER !== 1}{MONTHTOSTRING[start.month]} {start.day}, {/if}

-
- - {#if event.description && calendarCustomizations.showDescription} -

{event.description}

- {/if} - -
- - {#if MULTI_DAY_EVENT} - {MONTHTOSTRING[start.month]} {start.day}, - {:else} - - {/if} -
- - {#if MULTI_DAY_EVENT} -
- - Multi-day event - Day {EVENT_DAY_NUMBER} -
- {/if} - - - - {#if event.times && event.times.length > 1} -
- -
-
Time Schedule:
-
- {#each event.times as time, index (`anEventTime${time.name}${event.id}`)} - {#if index+1 < event.times.length},
{/if} - {/each} -
-
-
- {/if} - - {#if event.location && calendarCustomizations.showLocation} -
- -

- Location: - {#if calendarCustomizations.onlyShowLocationTitle}{event.location.split(" - ")[0]}{:else}{event.location}{/if} -

-
- {/if} - - {#if event.expand.tags} -
- {#each event.expand.tags as tag (`taglist${tag.tag_id}${event.id}`)} -
- - {tag.name} - -
- {/each} -
- {/if} -
\ No newline at end of file +
+
+

+ {event.name} +

+

+ {#if EVENT_DAY_NUMBER !== 1}{MONTHTOSTRING[start.month]} {start.day}, + {/if} +

+
+ + {#if event.description && calendarCustomizations.showDescription} +

+ {event.description} +

+ {/if} + +
+ + {#if MULTI_DAY_EVENT} + {MONTHTOSTRING[start.month]} + {start.day}, + {:else} + + {/if} +
+ + {#if MULTI_DAY_EVENT} +
+ + Multi-day event - Day {EVENT_DAY_NUMBER} +
+ {/if} + + + + {#if event.times && event.times.length > 1} +
+ +
+
Time Schedule:
+
+ {#each event.times as time, index (`anEventTime${time.name}${event.id}`)} + {#if index + 1 < event.times.length},
{/if} + {/each} +
+
+
+ {/if} + + {#if event.location && calendarCustomizations.showLocation} +
+ +

+ Location: + {#if calendarCustomizations.onlyShowLocationTitle}{event.location.split( + " - " + )[0]}{:else}{event.location}{/if} +

+
+ {/if} + + {#if event.expand.tags} +
+ {#each event.expand.tags as tag (`taglist${tag.tag_id}${event.id}`)} +
+ + {tag.name} + +
+ {/each} +
+ {/if} +
diff --git a/frontend/src/lib/EventResources.svelte b/frontend/src/lib/EventResources.svelte index f0a2f30..e84ef31 100644 --- a/frontend/src/lib/EventResources.svelte +++ b/frontend/src/lib/EventResources.svelte @@ -1,48 +1,69 @@ {#if rooms.length > 0 && showRooms} -
- -

- Room{#if rooms.length > 1}s{/if}: - - {#each rooms as room, index} - {#if room.path_name}{room.path_name}\\{/if} {room.name}{#if index+1 < rooms.length}, {/if} - {/each} - -

-
+
+ +

+ Room{#if rooms.length > 1}s{/if}: + + {#each rooms as room, index} + {#if room.path_name}{room.path_name}\\{/if} + {room.name}{#if index + 1 < rooms.length}, + {/if} + {/each} + +

+
{/if} {#if res.length > 0 && showResources} -
- -

- Resource{#if res.length > 1}s{/if}: - - {#each res as resource, index} - {resource.name}{#if resource.path_name && showResourcePathname}({resource.path_name.trimEnd()}){/if}{#if index+1 < res.length}, {/if} - {/each} - -

-
-{/if} \ No newline at end of file +
+ +

+ Resource{#if res.length > 1}s{/if}: + + {#each res as resource, index} + {resource.name}{#if resource.path_name && showResourcePathname}({resource.path_name.trimEnd()}){/if}{#if index + 1 < res.length}, + {/if} + {/each} + +

+
+{/if} diff --git a/frontend/src/lib/EventTimes.svelte b/frontend/src/lib/EventTimes.svelte index affb51e..70920bf 100644 --- a/frontend/src/lib/EventTimes.svelte +++ b/frontend/src/lib/EventTimes.svelte @@ -1,13 +1,32 @@ -{time.name}: {#if multiDayEvent && start.day !== today.day}{MONTHTOSTRING[start.month]} {start.day}, {/if}
diff --git a/frontend/src/lib/cal.utils.ts b/frontend/src/lib/cal.utils.ts index 8bfe8a8..f8c167f 100644 --- a/frontend/src/lib/cal.utils.ts +++ b/frontend/src/lib/cal.utils.ts @@ -1,15 +1,15 @@ import type { RecordModel } from "pocketbase"; export type CalendarCustomizations = { - viewType: "3day" | "week" | "month", - useAMPM: boolean, - showResourcePathname: boolean, - onlyShowLocationTitle: boolean, - showLocation: boolean, - showResources: boolean, - showRooms: boolean, - showDescription: boolean -} + viewType: "3day" | "week" | "month"; + useAMPM: boolean; + showResourcePathname: boolean; + onlyShowLocationTitle: boolean; + showLocation: boolean; + showResources: boolean; + showRooms: boolean; + showDescription: boolean; +}; export const defaultCalendarCustomizations: CalendarCustomizations = { viewType: "3day", @@ -20,19 +20,19 @@ export const defaultCalendarCustomizations: CalendarCustomizations = { showResources: true, showRooms: true, showDescription: false -} +}; export type CalendarFilters = { - onlyShowFeatured: boolean, - hideUnpublished: boolean, - resourceFilterType: "allow" | "block" - allowResources: string[], - blockResources: string[], - enableResourceFiltering: boolean, - tagFilterType: "allow" | "block", - allowTags: string[], - blockTags: string[], - enableTagFiltering: boolean + onlyShowFeatured: boolean; + hideUnpublished: boolean; + resourceFilterType: "allow" | "block"; + allowResources: string[]; + blockResources: string[]; + enableResourceFiltering: boolean; + tagFilterType: "allow" | "block"; + allowTags: string[]; + blockTags: string[]; + enableTagFiltering: boolean; }; export const defaultCalendarFilters: CalendarFilters = { @@ -46,20 +46,20 @@ export const defaultCalendarFilters: CalendarFilters = { allowTags: [], blockTags: [], enableTagFiltering: false -} +}; export interface CalendarDBModel extends RecordModel { - publicId: string, - name: string, - password: string, - passwordEnabled: boolean, - owner: string, - logo: string | File, - visits: number, - filters: CalendarFilters, - description: string, - passwordScreenMessage: string, - displaySettings: CalendarCustomizations, - created: string, - updated: string -} \ No newline at end of file + publicId: string; + name: string; + password: string; + passwordEnabled: boolean; + owner: string; + logo: string | File; + visits: number; + filters: CalendarFilters; + description: string; + passwordScreenMessage: string; + displaySettings: CalendarCustomizations; + created: string; + updated: string; +} diff --git a/frontend/src/lib/calendar/monthView/MonthCalView.svelte b/frontend/src/lib/calendar/monthView/MonthCalView.svelte index b8f41a9..5ce1fde 100644 --- a/frontend/src/lib/calendar/monthView/MonthCalView.svelte +++ b/frontend/src/lib/calendar/monthView/MonthCalView.svelte @@ -1,41 +1,52 @@
-
-
- {#each ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] as day (`aweekday${day}`)} -
- {day} -
- {/each} -
+
+
+ {#each ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] as day (`aweekday${day}`)} +
+ {day} +
+ {/each} +
-
- {#each days as day, index (`adayinmonth${index}`)} - - {/each} -
-
-
\ No newline at end of file +
+ {#each days as day, index (`adayinmonth${index}`)} + + {/each} +
+
+ diff --git a/frontend/src/lib/calendar/monthView/MonthCalViewDay.svelte b/frontend/src/lib/calendar/monthView/MonthCalViewDay.svelte index 805cbd9..f0cab4c 100644 --- a/frontend/src/lib/calendar/monthView/MonthCalViewDay.svelte +++ b/frontend/src/lib/calendar/monthView/MonthCalViewDay.svelte @@ -1,56 +1,62 @@
-
- {day.day} -
+
+ {day.day} +
-
- {#each dayEvents as event (`aneventfortheday${event.id}`)} - - {/each} -
-
\ No newline at end of file +
+ {#each dayEvents as event (`aneventfortheday${event.id}`)} + + {/each} +
+ diff --git a/frontend/src/lib/calendar/monthView/MonthCalViewDayEvent.svelte b/frontend/src/lib/calendar/monthView/MonthCalViewDayEvent.svelte index 80903c1..d7693df 100644 --- a/frontend/src/lib/calendar/monthView/MonthCalViewDayEvent.svelte +++ b/frontend/src/lib/calendar/monthView/MonthCalViewDayEvent.svelte @@ -1,29 +1,50 @@
- - {event.name} - - - {#if EVENT_DAY_NUMBER !== 1} - Day {EVENT_DAY_NUMBER} - {:else} - -
\ No newline at end of file + + {event.name} + + + {#if EVENT_DAY_NUMBER !== 1} + Day {EVENT_DAY_NUMBER} + {:else} + + diff --git a/frontend/src/lib/calendar/weekView/WeekCalView.svelte b/frontend/src/lib/calendar/weekView/WeekCalView.svelte index 3a51dfc..056681d 100644 --- a/frontend/src/lib/calendar/weekView/WeekCalView.svelte +++ b/frontend/src/lib/calendar/weekView/WeekCalView.svelte @@ -1,41 +1,52 @@
-
-
- {#each days as day (`aweekday${day.dayOfWeek}`)} -
- {["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"][day.dayOfWeek]} -
- {/each} -
+
+
+ {#each days as day (`aweekday${day.dayOfWeek}`)} +
+ {["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"][day.dayOfWeek]} +
+ {/each} +
-
- {#each days as day, index (`adayinmonth${index}`)} - - {/each} -
-
-
\ No newline at end of file +
+ {#each days as day, index (`adayinmonth${index}`)} + + {/each} +
+
+ diff --git a/frontend/src/lib/calendar/weekView/WeekCalViewDay.svelte b/frontend/src/lib/calendar/weekView/WeekCalViewDay.svelte index 1144b93..f66090f 100644 --- a/frontend/src/lib/calendar/weekView/WeekCalViewDay.svelte +++ b/frontend/src/lib/calendar/weekView/WeekCalViewDay.svelte @@ -1,56 +1,62 @@
-
- {day.day} -
+
+ {day.day} +
-
- {#each dayEvents as event (`aneventfortheday${event.id}`)} - - {/each} -
-
\ No newline at end of file +
+ {#each dayEvents as event (`aneventfortheday${event.id}`)} + + {/each} +
+ diff --git a/frontend/src/lib/calendar/weekView/WeekCalViewDayEvent.svelte b/frontend/src/lib/calendar/weekView/WeekCalViewDayEvent.svelte index 2d57d26..207054f 100644 --- a/frontend/src/lib/calendar/weekView/WeekCalViewDayEvent.svelte +++ b/frontend/src/lib/calendar/weekView/WeekCalViewDayEvent.svelte @@ -1,40 +1,76 @@
-
-

{event.name}

-
- -
- - {#if MULTI_DAY_EVENT} - {MONTHTOSTRING[start.month]} {start.day}, - {:else} - - {/if} -
+
+

+ {event.name} +

+
- {#if MULTI_DAY_EVENT} -
- - Multi-day event - Day {EVENT_DAY_NUMBER} -
- {/if} -
\ No newline at end of file +
+ + {#if MULTI_DAY_EVENT} + {MONTHTOSTRING[start.month]} + {start.day}, + {:else} + + {/if} +
+ + {#if MULTI_DAY_EVENT} +
+ + Multi-day event - Day {EVENT_DAY_NUMBER} +
+ {/if} + diff --git a/frontend/src/lib/components/ui/avatar/index.ts b/frontend/src/lib/components/ui/avatar/index.ts index d06457b..b08c780 100644 --- a/frontend/src/lib/components/ui/avatar/index.ts +++ b/frontend/src/lib/components/ui/avatar/index.ts @@ -9,5 +9,5 @@ export { // Root as Avatar, Image as AvatarImage, - Fallback as AvatarFallback, + Fallback as AvatarFallback }; diff --git a/frontend/src/lib/components/ui/badge/badge.svelte b/frontend/src/lib/components/ui/badge/badge.svelte index bfaa9c5..33233da 100644 --- a/frontend/src/lib/components/ui/badge/badge.svelte +++ b/frontend/src/lib/components/ui/badge/badge.svelte @@ -5,18 +5,17 @@ base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-medium transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3", variants: { variant: { - default: - "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent", + default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent", secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent", destructive: "bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white", - outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", - }, + outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground" + } }, defaultVariants: { - variant: "default", - }, + variant: "default" + } }); export type BadgeVariant = VariantProps["variant"]; diff --git a/frontend/src/lib/components/ui/button/button.svelte b/frontend/src/lib/components/ui/button/button.svelte index 2105474..b9a587c 100644 --- a/frontend/src/lib/components/ui/button/button.svelte +++ b/frontend/src/lib/components/ui/button/button.svelte @@ -14,7 +14,7 @@ "bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border", secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", - link: "text-primary underline-offset-4 hover:underline", + link: "text-primary underline-offset-4 hover:underline" }, size: { default: "h-9 px-4 py-2 has-[>svg]:px-3", @@ -22,13 +22,13 @@ lg: "h-10 rounded-md px-6 has-[>svg]:px-4", icon: "size-9", "icon-sm": "size-8", - "icon-lg": "size-10", - }, + "icon-lg": "size-10" + } }, defaultVariants: { variant: "default", - size: "default", - }, + size: "default" + } }); export type ButtonVariant = VariantProps["variant"]; diff --git a/frontend/src/lib/components/ui/button/index.ts b/frontend/src/lib/components/ui/button/index.ts index fb585d7..068bfa2 100644 --- a/frontend/src/lib/components/ui/button/index.ts +++ b/frontend/src/lib/components/ui/button/index.ts @@ -2,7 +2,7 @@ import Root, { type ButtonProps, type ButtonSize, type ButtonVariant, - buttonVariants, + buttonVariants } from "./button.svelte"; export { @@ -13,5 +13,5 @@ export { buttonVariants, type ButtonProps, type ButtonSize, - type ButtonVariant, + type ButtonVariant }; diff --git a/frontend/src/lib/components/ui/calendar/calendar-caption.svelte b/frontend/src/lib/components/ui/calendar/calendar-caption.svelte index 5c93037..d545234 100644 --- a/frontend/src/lib/components/ui/calendar/calendar-caption.svelte +++ b/frontend/src/lib/components/ui/calendar/calendar-caption.svelte @@ -14,7 +14,7 @@ month, locale, placeholder = $bindable(), - monthIndex = 0, + monthIndex = 0 }: { captionLayout: ComponentProps["captionLayout"]; months: ComponentProps["months"]; diff --git a/frontend/src/lib/components/ui/calendar/calendar.svelte b/frontend/src/lib/components/ui/calendar/calendar.svelte index 29b6fff..0c8ee1c 100644 --- a/frontend/src/lib/components/ui/calendar/calendar.svelte +++ b/frontend/src/lib/components/ui/calendar/calendar.svelte @@ -97,7 +97,7 @@ get along, so we shut typescript up by casting `value` to `never`. {#if day} {@render day({ day: date, - outsideMonth: !isEqualMonth(date, month.value), + outsideMonth: !isEqualMonth(date, month.value) })} {:else} diff --git a/frontend/src/lib/components/ui/calendar/index.ts b/frontend/src/lib/components/ui/calendar/index.ts index f3a16d2..e6f7726 100644 --- a/frontend/src/lib/components/ui/calendar/index.ts +++ b/frontend/src/lib/components/ui/calendar/index.ts @@ -36,5 +36,5 @@ export { MonthSelect, Caption, // - Root as Calendar, + Root as Calendar }; diff --git a/frontend/src/lib/components/ui/card/card.svelte b/frontend/src/lib/components/ui/card/card.svelte index 67b820b..2ccde86 100644 --- a/frontend/src/lib/components/ui/card/card.svelte +++ b/frontend/src/lib/components/ui/card/card.svelte @@ -26,4 +26,4 @@ div { max-width: calc(100vw - 8px) !important; } - \ No newline at end of file + diff --git a/frontend/src/lib/components/ui/card/index.ts b/frontend/src/lib/components/ui/card/index.ts index 4d3fce4..10daffb 100644 --- a/frontend/src/lib/components/ui/card/index.ts +++ b/frontend/src/lib/components/ui/card/index.ts @@ -21,5 +21,5 @@ export { Footer as CardFooter, Header as CardHeader, Title as CardTitle, - Action as CardAction, + Action as CardAction }; diff --git a/frontend/src/lib/components/ui/carousel/carousel-content.svelte b/frontend/src/lib/components/ui/carousel/carousel-content.svelte index 6b169be..e315003 100644 --- a/frontend/src/lib/components/ui/carousel/carousel-content.svelte +++ b/frontend/src/lib/components/ui/carousel/carousel-content.svelte @@ -22,9 +22,9 @@ container: "[data-embla-container]", slides: "[data-embla-slide]", ...emblaCtx.options, - axis: emblaCtx.orientation === "horizontal" ? "x" : "y", + axis: emblaCtx.orientation === "horizontal" ? "x" : "y" }, - plugins: emblaCtx.plugins, + plugins: emblaCtx.plugins }} onemblaInit={emblaCtx.onInit} > diff --git a/frontend/src/lib/components/ui/carousel/carousel.svelte b/frontend/src/lib/components/ui/carousel/carousel.svelte index 9f781e5..4f581d7 100644 --- a/frontend/src/lib/components/ui/carousel/carousel.svelte +++ b/frontend/src/lib/components/ui/carousel/carousel.svelte @@ -3,7 +3,7 @@ type CarouselAPI, type CarouselProps, type EmblaContext, - setEmblaContext, + setEmblaContext } from "./context.js"; import { cn, type WithElementRef } from "$lib/utils.js"; @@ -34,7 +34,7 @@ onInit, scrollSnaps: [], selectedIndex: 0, - scrollTo, + scrollTo }); setEmblaContext(carouselState); diff --git a/frontend/src/lib/components/ui/carousel/context.ts b/frontend/src/lib/components/ui/carousel/context.ts index a5fd74f..a02fff7 100644 --- a/frontend/src/lib/components/ui/carousel/context.ts +++ b/frontend/src/lib/components/ui/carousel/context.ts @@ -1,7 +1,7 @@ import type { WithElementRef } from "$lib/utils.js"; import type { EmblaCarouselSvelteType, - default as emblaCarouselSvelte, + default as emblaCarouselSvelte } from "embla-carousel-svelte"; import { getContext, hasContext, setContext } from "svelte"; import type { HTMLAttributes } from "svelte/elements"; diff --git a/frontend/src/lib/components/ui/carousel/index.ts b/frontend/src/lib/components/ui/carousel/index.ts index 957fc74..9aaf431 100644 --- a/frontend/src/lib/components/ui/carousel/index.ts +++ b/frontend/src/lib/components/ui/carousel/index.ts @@ -15,5 +15,5 @@ export { Content as CarouselContent, Item as CarouselItem, Previous as CarouselPrevious, - Next as CarouselNext, + Next as CarouselNext }; diff --git a/frontend/src/lib/components/ui/checkbox/index.ts b/frontend/src/lib/components/ui/checkbox/index.ts index 6d92d94..5fba5a4 100644 --- a/frontend/src/lib/components/ui/checkbox/index.ts +++ b/frontend/src/lib/components/ui/checkbox/index.ts @@ -2,5 +2,5 @@ import Root from "./checkbox.svelte"; export { Root, // - Root as Checkbox, + Root as Checkbox }; diff --git a/frontend/src/lib/components/ui/collapsible/index.ts b/frontend/src/lib/components/ui/collapsible/index.ts index 169b479..d5db2aa 100644 --- a/frontend/src/lib/components/ui/collapsible/index.ts +++ b/frontend/src/lib/components/ui/collapsible/index.ts @@ -9,5 +9,5 @@ export { // Root as Collapsible, Content as CollapsibleContent, - Trigger as CollapsibleTrigger, + Trigger as CollapsibleTrigger }; diff --git a/frontend/src/lib/components/ui/dialog/index.ts b/frontend/src/lib/components/ui/dialog/index.ts index dce1d9d..790315c 100644 --- a/frontend/src/lib/components/ui/dialog/index.ts +++ b/frontend/src/lib/components/ui/dialog/index.ts @@ -33,5 +33,5 @@ export { Overlay as DialogOverlay, Content as DialogContent, Description as DialogDescription, - Close as DialogClose, + Close as DialogClose }; diff --git a/frontend/src/lib/components/ui/drawer/index.ts b/frontend/src/lib/components/ui/drawer/index.ts index cfbdb8b..6dce95d 100644 --- a/frontend/src/lib/components/ui/drawer/index.ts +++ b/frontend/src/lib/components/ui/drawer/index.ts @@ -37,5 +37,5 @@ export { Title as DrawerTitle, Trigger as DrawerTrigger, Portal as DrawerPortal, - Close as DrawerClose, + Close as DrawerClose }; diff --git a/frontend/src/lib/components/ui/dropdown-menu/index.ts b/frontend/src/lib/components/ui/dropdown-menu/index.ts index 1cf9f70..342f314 100644 --- a/frontend/src/lib/components/ui/dropdown-menu/index.ts +++ b/frontend/src/lib/components/ui/dropdown-menu/index.ts @@ -45,5 +45,5 @@ export { Sub, SubContent, SubTrigger, - Trigger, + Trigger }; diff --git a/frontend/src/lib/components/ui/empty/empty-media.svelte b/frontend/src/lib/components/ui/empty/empty-media.svelte index 0b4e45d..323be1e 100644 --- a/frontend/src/lib/components/ui/empty/empty-media.svelte +++ b/frontend/src/lib/components/ui/empty/empty-media.svelte @@ -6,12 +6,12 @@ variants: { variant: { default: "bg-transparent", - icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6", - }, + icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6" + } }, defaultVariants: { - variant: "default", - }, + variant: "default" + } }); export type EmptyMediaVariant = VariantProps["variant"]; diff --git a/frontend/src/lib/components/ui/empty/index.ts b/frontend/src/lib/components/ui/empty/index.ts index ae4c106..ee84b29 100644 --- a/frontend/src/lib/components/ui/empty/index.ts +++ b/frontend/src/lib/components/ui/empty/index.ts @@ -18,5 +18,5 @@ export { Media as EmptyMedia, Title as EmptyTitle, Description as EmptyDescription, - Content as EmptyContent, + Content as EmptyContent }; diff --git a/frontend/src/lib/components/ui/field/field-separator.svelte b/frontend/src/lib/components/ui/field/field-separator.svelte index 12bcb77..e06410a 100644 --- a/frontend/src/lib/components/ui/field/field-separator.svelte +++ b/frontend/src/lib/components/ui/field/field-separator.svelte @@ -20,10 +20,7 @@ bind:this={ref} data-slot="field-separator" data-content={hasContent} - class={cn( - "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", - className - )} + class={cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className)} {...restProps} > diff --git a/frontend/src/lib/components/ui/field/field.svelte b/frontend/src/lib/components/ui/field/field.svelte index 3284203..0daefca 100644 --- a/frontend/src/lib/components/ui/field/field.svelte +++ b/frontend/src/lib/components/ui/field/field.svelte @@ -9,18 +9,18 @@ horizontal: [ "flex-row items-center", "[&>[data-slot=field-label]]:flex-auto", - "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px", + "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px" ], responsive: [ "flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto", "@md/field-group:[&>[data-slot=field-label]]:flex-auto", - "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px", - ], - }, + "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px" + ] + } }, defaultVariants: { - orientation: "vertical", - }, + orientation: "vertical" + } }); export type FieldOrientation = VariantProps["orientation"]; diff --git a/frontend/src/lib/components/ui/field/index.ts b/frontend/src/lib/components/ui/field/index.ts index a644a95..39fbe1e 100644 --- a/frontend/src/lib/components/ui/field/index.ts +++ b/frontend/src/lib/components/ui/field/index.ts @@ -29,5 +29,5 @@ export { Title as FieldTitle, Description as FieldDescription, Separator as FieldSeparator, - Error as FieldError, + Error as FieldError }; diff --git a/frontend/src/lib/components/ui/input/index.ts b/frontend/src/lib/components/ui/input/index.ts index f47b6d3..c9ffe28 100644 --- a/frontend/src/lib/components/ui/input/index.ts +++ b/frontend/src/lib/components/ui/input/index.ts @@ -3,5 +3,5 @@ import Root from "./input.svelte"; export { Root, // - Root as Input, + Root as Input }; diff --git a/frontend/src/lib/components/ui/item/index.ts b/frontend/src/lib/components/ui/item/index.ts index 168bc3e..f3a812e 100644 --- a/frontend/src/lib/components/ui/item/index.ts +++ b/frontend/src/lib/components/ui/item/index.ts @@ -30,5 +30,5 @@ export { Title as ItemTitle, Description as ItemDescription, Actions as ItemActions, - Media as ItemMedia, + Media as ItemMedia }; diff --git a/frontend/src/lib/components/ui/item/item-group.svelte b/frontend/src/lib/components/ui/item/item-group.svelte index 3e58e36..c8f1841 100644 --- a/frontend/src/lib/components/ui/item/item-group.svelte +++ b/frontend/src/lib/components/ui/item/item-group.svelte @@ -14,7 +14,10 @@ bind:this={ref} role="list" data-slot="item-group" - class={cn("gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2 group/item-group flex w-full flex-col", className)} + class={cn( + "gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2 group/item-group flex w-full flex-col", + className + )} {...restProps} > {@render children?.()} diff --git a/frontend/src/lib/components/ui/item/item-media.svelte b/frontend/src/lib/components/ui/item/item-media.svelte index 45def5a..74e2695 100644 --- a/frontend/src/lib/components/ui/item/item-media.svelte +++ b/frontend/src/lib/components/ui/item/item-media.svelte @@ -7,12 +7,13 @@ variant: { default: "bg-transparent", icon: "[&_svg:not([class*='size-'])]:size-4", - image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover", - }, + image: + "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover" + } }, defaultVariants: { - variant: "default", - }, + variant: "default" + } }); export type ItemMediaVariant = VariantProps["variant"]; diff --git a/frontend/src/lib/components/ui/item/item-title.svelte b/frontend/src/lib/components/ui/item/item-title.svelte index c9a0f9b..fc805af 100644 --- a/frontend/src/lib/components/ui/item/item-title.svelte +++ b/frontend/src/lib/components/ui/item/item-title.svelte @@ -13,7 +13,10 @@
{@render children?.()} diff --git a/frontend/src/lib/components/ui/item/item.svelte b/frontend/src/lib/components/ui/item/item.svelte index 8eff328..2a10b8a 100644 --- a/frontend/src/lib/components/ui/item/item.svelte +++ b/frontend/src/lib/components/ui/item/item.svelte @@ -7,18 +7,18 @@ variant: { default: "border-transparent", outline: "border-border", - muted: "bg-muted/50 border-transparent", + muted: "bg-muted/50 border-transparent" }, size: { default: "gap-3.5 px-4 py-3.5", sm: "gap-2.5 px-3 py-2.5", - xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0", - }, + xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0" + } }, defaultVariants: { variant: "default", - size: "default", - }, + size: "default" + } }); export type ItemSize = VariantProps["size"]; @@ -48,7 +48,7 @@ "data-slot": "item", "data-variant": variant, "data-size": size, - ...restProps, + ...restProps }); diff --git a/frontend/src/lib/components/ui/kbd/index.ts b/frontend/src/lib/components/ui/kbd/index.ts index 6aa7f07..c622e9a 100644 --- a/frontend/src/lib/components/ui/kbd/index.ts +++ b/frontend/src/lib/components/ui/kbd/index.ts @@ -6,5 +6,5 @@ export { Group, // Root as Kbd, - Group as KbdGroup, + Group as KbdGroup }; diff --git a/frontend/src/lib/components/ui/label/index.ts b/frontend/src/lib/components/ui/label/index.ts index 8bfca0b..2c3128c 100644 --- a/frontend/src/lib/components/ui/label/index.ts +++ b/frontend/src/lib/components/ui/label/index.ts @@ -3,5 +3,5 @@ import Root from "./label.svelte"; export { Root, // - Root as Label, + Root as Label }; diff --git a/frontend/src/lib/components/ui/popover/index.ts b/frontend/src/lib/components/ui/popover/index.ts index 9f30922..1a8a309 100644 --- a/frontend/src/lib/components/ui/popover/index.ts +++ b/frontend/src/lib/components/ui/popover/index.ts @@ -13,5 +13,5 @@ export { Root as Popover, Content as PopoverContent, Trigger as PopoverTrigger, - Close as PopoverClose, + Close as PopoverClose }; diff --git a/frontend/src/lib/components/ui/range-calendar/index.ts b/frontend/src/lib/components/ui/range-calendar/index.ts index d2d258b..aea5e57 100644 --- a/frontend/src/lib/components/ui/range-calendar/index.ts +++ b/frontend/src/lib/components/ui/range-calendar/index.ts @@ -36,5 +36,5 @@ export { Nav, Month, // - Root as RangeCalendar, + Root as RangeCalendar }; diff --git a/frontend/src/lib/components/ui/range-calendar/range-calendar-caption.svelte b/frontend/src/lib/components/ui/range-calendar/range-calendar-caption.svelte index 944654d..bb7c7bc 100644 --- a/frontend/src/lib/components/ui/range-calendar/range-calendar-caption.svelte +++ b/frontend/src/lib/components/ui/range-calendar/range-calendar-caption.svelte @@ -14,7 +14,7 @@ month, locale, placeholder = $bindable(), - monthIndex = 0, + monthIndex = 0 }: { captionLayout: ComponentProps["captionLayout"]; months: ComponentProps["months"]; diff --git a/frontend/src/lib/components/ui/range-calendar/range-calendar.svelte b/frontend/src/lib/components/ui/range-calendar/range-calendar.svelte index 4d917a6..573874b 100644 --- a/frontend/src/lib/components/ui/range-calendar/range-calendar.svelte +++ b/frontend/src/lib/components/ui/range-calendar/range-calendar.svelte @@ -94,7 +94,7 @@ {#if day} {@render day({ day: date, - outsideMonth: !isEqualMonth(date, month.value), + outsideMonth: !isEqualMonth(date, month.value) })} {:else} diff --git a/frontend/src/lib/components/ui/select/index.ts b/frontend/src/lib/components/ui/select/index.ts index 9e8d3e9..ace6bf9 100644 --- a/frontend/src/lib/components/ui/select/index.ts +++ b/frontend/src/lib/components/ui/select/index.ts @@ -33,5 +33,5 @@ export { Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, - GroupHeading as SelectGroupHeading, + GroupHeading as SelectGroupHeading }; diff --git a/frontend/src/lib/components/ui/separator/index.ts b/frontend/src/lib/components/ui/separator/index.ts index 82442d2..dbfb139 100644 --- a/frontend/src/lib/components/ui/separator/index.ts +++ b/frontend/src/lib/components/ui/separator/index.ts @@ -3,5 +3,5 @@ import Root from "./separator.svelte"; export { Root, // - Root as Separator, + Root as Separator }; diff --git a/frontend/src/lib/components/ui/sheet/index.ts b/frontend/src/lib/components/ui/sheet/index.ts index 01d40c8..29e0d0c 100644 --- a/frontend/src/lib/components/ui/sheet/index.ts +++ b/frontend/src/lib/components/ui/sheet/index.ts @@ -32,5 +32,5 @@ export { Header as SheetHeader, Footer as SheetFooter, Title as SheetTitle, - Description as SheetDescription, + Description as SheetDescription }; diff --git a/frontend/src/lib/components/ui/sheet/sheet-content.svelte b/frontend/src/lib/components/ui/sheet/sheet-content.svelte index 856922e..aaa91e7 100644 --- a/frontend/src/lib/components/ui/sheet/sheet-content.svelte +++ b/frontend/src/lib/components/ui/sheet/sheet-content.svelte @@ -5,14 +5,16 @@ variants: { side: { top: "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", - bottom: "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", + bottom: + "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", left: "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", - right: "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", - }, + right: + "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm" + } }, defaultVariants: { - side: "right", - }, + side: "right" + } }); export type Side = VariantProps["side"]; diff --git a/frontend/src/lib/components/ui/sidebar/context.svelte.ts b/frontend/src/lib/components/ui/sidebar/context.svelte.ts index 15248ad..6f9b4a9 100644 --- a/frontend/src/lib/components/ui/sidebar/context.svelte.ts +++ b/frontend/src/lib/components/ui/sidebar/context.svelte.ts @@ -53,9 +53,7 @@ class SidebarState { }; toggle = () => { - return this.#isMobile.current - ? (this.openMobile = !this.openMobile) - : this.setOpen(!this.open); + return this.#isMobile.current ? (this.openMobile = !this.openMobile) : this.setOpen(!this.open); }; } diff --git a/frontend/src/lib/components/ui/sidebar/index.ts b/frontend/src/lib/components/ui/sidebar/index.ts index 318a341..5c2e6b8 100644 --- a/frontend/src/lib/components/ui/sidebar/index.ts +++ b/frontend/src/lib/components/ui/sidebar/index.ts @@ -71,5 +71,5 @@ export { Separator as SidebarSeparator, Trigger as SidebarTrigger, Trigger, - useSidebar, + useSidebar }; diff --git a/frontend/src/lib/components/ui/sidebar/sidebar-group-action.svelte b/frontend/src/lib/components/ui/sidebar/sidebar-group-action.svelte index fb84e4a..d9579fd 100644 --- a/frontend/src/lib/components/ui/sidebar/sidebar-group-action.svelte +++ b/frontend/src/lib/components/ui/sidebar/sidebar-group-action.svelte @@ -23,7 +23,7 @@ ), "data-slot": "sidebar-group-action", "data-sidebar": "group-action", - ...restProps, + ...restProps }); diff --git a/frontend/src/lib/components/ui/sidebar/sidebar-group-label.svelte b/frontend/src/lib/components/ui/sidebar/sidebar-group-label.svelte index e292945..2b6287a 100644 --- a/frontend/src/lib/components/ui/sidebar/sidebar-group-label.svelte +++ b/frontend/src/lib/components/ui/sidebar/sidebar-group-label.svelte @@ -21,7 +21,7 @@ ), "data-slot": "sidebar-group-label", "data-sidebar": "group-label", - ...restProps, + ...restProps }); diff --git a/frontend/src/lib/components/ui/sidebar/sidebar-menu-action.svelte b/frontend/src/lib/components/ui/sidebar/sidebar-menu-action.svelte index fa3fb0c..fb386c3 100644 --- a/frontend/src/lib/components/ui/sidebar/sidebar-menu-action.svelte +++ b/frontend/src/lib/components/ui/sidebar/sidebar-menu-action.svelte @@ -30,7 +30,7 @@ ), "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", - ...restProps, + ...restProps }); diff --git a/frontend/src/lib/components/ui/sidebar/sidebar-menu-button.svelte b/frontend/src/lib/components/ui/sidebar/sidebar-menu-button.svelte index 4bef683..57e2fa2 100644 --- a/frontend/src/lib/components/ui/sidebar/sidebar-menu-button.svelte +++ b/frontend/src/lib/components/ui/sidebar/sidebar-menu-button.svelte @@ -7,23 +7,21 @@ variant: { default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground", outline: - "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]", + "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]" }, size: { default: "h-8 text-sm", sm: "h-7 text-xs", - lg: "group-data-[collapsible=icon]:p-0! h-12 text-sm", - }, + lg: "group-data-[collapsible=icon]:p-0! h-12 text-sm" + } }, defaultVariants: { variant: "default", - size: "default", - }, + size: "default" + } }); - export type SidebarMenuButtonVariant = VariantProps< - typeof sidebarMenuButtonVariants - >["variant"]; + export type SidebarMenuButtonVariant = VariantProps["variant"]; export type SidebarMenuButtonSize = VariantProps["size"]; @@ -63,7 +61,7 @@ "data-sidebar": "menu-button", "data-size": size, "data-active": isActive, - ...restProps, + ...restProps }); diff --git a/frontend/src/lib/components/ui/sidebar/sidebar-menu-sub-button.svelte b/frontend/src/lib/components/ui/sidebar/sidebar-menu-sub-button.svelte index 987f104..d221310 100644 --- a/frontend/src/lib/components/ui/sidebar/sidebar-menu-sub-button.svelte +++ b/frontend/src/lib/components/ui/sidebar/sidebar-menu-sub-button.svelte @@ -30,7 +30,7 @@ "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, - ...restProps, + ...restProps }); diff --git a/frontend/src/lib/components/ui/sidebar/sidebar-provider.svelte b/frontend/src/lib/components/ui/sidebar/sidebar-provider.svelte index 5b0d0aa..ff9ffca 100644 --- a/frontend/src/lib/components/ui/sidebar/sidebar-provider.svelte +++ b/frontend/src/lib/components/ui/sidebar/sidebar-provider.svelte @@ -6,7 +6,7 @@ SIDEBAR_COOKIE_MAX_AGE, SIDEBAR_COOKIE_NAME, SIDEBAR_WIDTH, - SIDEBAR_WIDTH_ICON, + SIDEBAR_WIDTH_ICON } from "./constants.js"; import { setSidebar } from "./context.svelte.js"; @@ -31,7 +31,7 @@ // This sets the cookie to keep the sidebar state. document.cookie = `${SIDEBAR_COOKIE_NAME}=${open}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`; - }, + } }); diff --git a/frontend/src/lib/components/ui/sidebar/sidebar.svelte b/frontend/src/lib/components/ui/sidebar/sidebar.svelte index 3e9eba9..a4ce730 100644 --- a/frontend/src/lib/components/ui/sidebar/sidebar.svelte +++ b/frontend/src/lib/components/ui/sidebar/sidebar.svelte @@ -34,10 +34,7 @@ {@render children?.()}
{:else if sidebar.isMobile} - sidebar.openMobile, (v) => sidebar.setOpenMobile(v)} - {...restProps} - > + sidebar.openMobile, (v) => sidebar.setOpenMobile(v)} {...restProps}> {#each thumbItems as thumb (thumb.index)} diff --git a/frontend/src/lib/components/ui/switch/index.ts b/frontend/src/lib/components/ui/switch/index.ts index f5533db..f0e5fb7 100644 --- a/frontend/src/lib/components/ui/switch/index.ts +++ b/frontend/src/lib/components/ui/switch/index.ts @@ -3,5 +3,5 @@ import Root from "./switch.svelte"; export { Root, // - Root as Switch, + Root as Switch }; diff --git a/frontend/src/lib/components/ui/table/index.ts b/frontend/src/lib/components/ui/table/index.ts index 14695c8..450c9b3 100644 --- a/frontend/src/lib/components/ui/table/index.ts +++ b/frontend/src/lib/components/ui/table/index.ts @@ -24,5 +24,5 @@ export { Footer as TableFooter, Head as TableHead, Header as TableHeader, - Row as TableRow, + Row as TableRow }; diff --git a/frontend/src/lib/components/ui/tabs/index.ts b/frontend/src/lib/components/ui/tabs/index.ts index 12d4327..56fe91c 100644 --- a/frontend/src/lib/components/ui/tabs/index.ts +++ b/frontend/src/lib/components/ui/tabs/index.ts @@ -12,5 +12,5 @@ export { Root as Tabs, Content as TabsContent, List as TabsList, - Trigger as TabsTrigger, + Trigger as TabsTrigger }; diff --git a/frontend/src/lib/components/ui/tabs/tabs-list.svelte b/frontend/src/lib/components/ui/tabs/tabs-list.svelte index 08932b6..48d14b0 100644 --- a/frontend/src/lib/components/ui/tabs/tabs-list.svelte +++ b/frontend/src/lib/components/ui/tabs/tabs-list.svelte @@ -2,11 +2,7 @@ import { Tabs as TabsPrimitive } from "bits-ui"; import { cn } from "$lib/utils.js"; - let { - ref = $bindable(null), - class: className, - ...restProps - }: TabsPrimitive.ListProps = $props(); + let { ref = $bindable(null), class: className, ...restProps }: TabsPrimitive.ListProps = $props(); + {...restProps}> diff --git a/frontend/src/lib/components/ui/tooltip/index.ts b/frontend/src/lib/components/ui/tooltip/index.ts index 313a7f0..f8dc9df 100644 --- a/frontend/src/lib/components/ui/tooltip/index.ts +++ b/frontend/src/lib/components/ui/tooltip/index.ts @@ -17,5 +17,5 @@ export { Content as TooltipContent, Trigger as TooltipTrigger, Provider as TooltipProvider, - Portal as TooltipPortal, + Portal as TooltipPortal }; diff --git a/frontend/src/lib/dashboard/DashboardHeader.svelte b/frontend/src/lib/dashboard/DashboardHeader.svelte index 05cf750..38284ad 100644 --- a/frontend/src/lib/dashboard/DashboardHeader.svelte +++ b/frontend/src/lib/dashboard/DashboardHeader.svelte @@ -1,40 +1,48 @@
-
-
- - -
+
+
+ + +
-
- +
+ - -
-
+ +
+
\ No newline at end of file + header { + max-width: 100vw; + } + diff --git a/frontend/src/lib/dashboard/DashboardIsNavigating.svelte b/frontend/src/lib/dashboard/DashboardIsNavigating.svelte index 0bc6ed2..f2d55a5 100644 --- a/frontend/src/lib/dashboard/DashboardIsNavigating.svelte +++ b/frontend/src/lib/dashboard/DashboardIsNavigating.svelte @@ -1,22 +1,22 @@
-
+
\ No newline at end of file + .progress-bar-indicator { + height: 100%; + width: 100%; + /* this will do the magic */ + -webkit-mask: linear-gradient(#fff 0 0); + mask: linear-gradient(#fff 0 0); + } + .progress-bar-indicator::before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-image: linear-gradient(to right, red, blue); /* your gradient here */ + } + diff --git a/frontend/src/lib/dashboard/DashboardSidebar.svelte b/frontend/src/lib/dashboard/DashboardSidebar.svelte index e27e189..4951ca2 100644 --- a/frontend/src/lib/dashboard/DashboardSidebar.svelte +++ b/frontend/src/lib/dashboard/DashboardSidebar.svelte @@ -1,226 +1,273 @@ - - - - -
- -
-
- - InfoSections - - - {#if user.accessLevel === "none"}Free{:else}{capitalizeFirstLetter(user.accessLevel)}{/if} Plan - -
-
-
-
-
+ + + + +
+ +
+
+ InfoSections + + {#if user.accessLevel === "none"}Free{:else}{capitalizeFirstLetter( + user.accessLevel + )}{/if} Plan + +
+
+
+
+
- - - Dashboard - - {#each navigation as item (item.title)} - { - if (sidebar.openMobile) { - sidebar.setOpenMobile(false); - } - }}> - {#snippet child({ props })} - - {#if item.icon} - - {/if} - {item.title} - - {/snippet} - - {/each} - - + + + Dashboard + + {#each navigation as item (item.title)} + { + if (sidebar.openMobile) { + sidebar.setOpenMobile(false); + } + }} + > + {#snippet child({ props })} + + {#if item.icon} + + {/if} + {item.title} + + {/snippet} + + {/each} + + - {#if sidebar.open || sidebar.isMobile} - - Integrations - { - addIntegrationDropdownOpen = true; - if (sidebar.openMobile) { - sidebar.setOpenMobile(false); - } - }}> - - Add Project - - - {#each await getMyIntegrations() as integration (`anintegration${integration.id}`)} - { - if (sidebar.openMobile) { - sidebar.setOpenMobile(false); - } - selectedIntegration = integration; - }}> - {#if integration.service === "planningcenter"} - - {:else if integration.service === "breeze"} - - {:else if integration.service === "twitter"} - - {:else} - - {/if} - {integration.prettyName} - - - {/each} - - - {/if} - + {#if sidebar.open || sidebar.isMobile} + + Integrations + { + addIntegrationDropdownOpen = true; + if (sidebar.openMobile) { + sidebar.setOpenMobile(false); + } + }} + > + + Add Project + + + {#each await getMyIntegrations() as integration (`anintegration${integration.id}`)} + { + if (sidebar.openMobile) { + sidebar.setOpenMobile(false); + } + selectedIntegration = integration; + }} + > + {#if integration.service === "planningcenter"} + + {:else if integration.service === "breeze"} + + {:else if integration.service === "twitter"} + + {:else} + + {/if} + {integration.prettyName} + + + {/each} + + + {/if} + - - - - - - {#snippet child({ props })} - - - - {user.name.split(" ").map((n) => n[0] ? n[0].toUpperCase() : "").join("")} - + + + + + + {#snippet child({ props })} + + + + {user.name + .split(" ") + .map((n) => (n[0] ? n[0].toUpperCase() : "")) + .join("")} + -
- {user.name} - {user.email} -
- -
- {/snippet} -
- - -
- - - {user.name.split(" ").map((n) => n[0] ? n[0].toUpperCase() : "").join("")} - +
+ {user.name} + {user.email} +
+ + + {/snippet} + + + +
+ + + {user.name + .split(" ") + .map((n) => (n[0] ? n[0].toUpperCase() : "")) + .join("")} + -
- {user.name} - {user.email} -
-
-
+
+ {user.name} + {user.email} +
+
+
- + - - {#if user.accessLevel !== "none"} - - {#snippet child({ props })} - - - Billing - - {/snippet} - - {:else} - - {#snippet child({ props })} - - - Setup Payments - - {/snippet} - - - {#snippet child({ props })} - - - Free Trial - - {/snippet} - - {/if} - + + {#if user.accessLevel !== "none"} + + {#snippet child({ props })} + + + Billing + + {/snippet} + + {:else} + + {#snippet child({ props })} + + + Setup Payments + + {/snippet} + + + {#snippet child({ props })} + + + Free Trial + + {/snippet} + + {/if} + - + - - {#snippet child({ props })} - - - Log out - - {/snippet} - -
-
-
-
-
- + + {#snippet child({ props })} + + + Log out + + {/snippet} + + +
+
+
+
+
- \ No newline at end of file + diff --git a/frontend/src/lib/dashboard/calendar/CalAvatar.svelte b/frontend/src/lib/dashboard/calendar/CalAvatar.svelte index 46963b9..f73fbd2 100644 --- a/frontend/src/lib/dashboard/calendar/CalAvatar.svelte +++ b/frontend/src/lib/dashboard/calendar/CalAvatar.svelte @@ -1,107 +1,111 @@ - - Calendar Avatar - Upload an image to represent your calendar - - -
-
- {#if avatarLinkBindable.length > 0 || uploadNewAvatar} - {#if avatarLinkBindable.length > 0} - - {/if} + + Calendar Avatar + Upload an image to represent your calendar + + +
+
+ {#if avatarLinkBindable.length > 0 || uploadNewAvatar} + {#if avatarLinkBindable.length > 0} + + {/if} -
- Calendar avatar - -
- {:else} -
- -
- {/if} -
-
-
-

Upload a custom avatar

-

JPG, PNG or GIF. Max size 2MB. Recommended 400x400px.

-
-
- - {#if uploadNewAvatar} - - {/if} -
-
-
-
- \ No newline at end of file +
+ Calendar avatar + +
+ {:else} +
+ +
+ {/if} +
+
+
+

Upload a custom avatar

+

+ JPG, PNG or GIF. Max size 2MB. Recommended 400x400px. +

+
+
+ + {#if uploadNewAvatar} + + {/if} +
+
+
+
+
diff --git a/frontend/src/lib/dashboard/calendar/CalDisplaySettings.svelte b/frontend/src/lib/dashboard/calendar/CalDisplaySettings.svelte index a9eb3d2..3f0f222 100644 --- a/frontend/src/lib/dashboard/calendar/CalDisplaySettings.svelte +++ b/frontend/src/lib/dashboard/calendar/CalDisplaySettings.svelte @@ -1,143 +1,183 @@ - - Display Settings - Customize how event information is displayed - - -
-
- - - - - 3 Day - 7 Day - Month - - -
+ + Display Settings + Customize how event information is displayed + + +
+
+ + + + + 3 Day + 7 Day + Month + + +
-
- - - -
+
+ + + +
-
- - - -
+
+ + + +
-
- - - -
+
+ + + +
- {#if displaySettingsBindable.showResources} -
- - - -
- {/if} + {#if displaySettingsBindable.showResources} +
+ + + +
+ {/if} -
- - - -
+
+ + + +
-
- - - -
+
+ + + +
- {#if displaySettingsBindable.showLocation} -
- - - -
- {/if} -
-
- \ No newline at end of file + {#if displaySettingsBindable.showLocation} +
+ + + +
+ {/if} +
+
+
diff --git a/frontend/src/lib/dashboard/calendar/CalEventPreview.svelte b/frontend/src/lib/dashboard/calendar/CalEventPreview.svelte index e784a1c..a55d8cc 100644 --- a/frontend/src/lib/dashboard/calendar/CalEventPreview.svelte +++ b/frontend/src/lib/dashboard/calendar/CalEventPreview.svelte @@ -1,81 +1,89 @@ - \ No newline at end of file + diff --git a/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte b/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte index 08a9626..12a9c07 100644 --- a/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte +++ b/frontend/src/lib/dashboard/calendar/CalFilterSettings.svelte @@ -1,205 +1,331 @@ - - Filter Settings - Choose what kind of events you want to show in the feed. - - -
-
- + + Filter Settings + Choose what kind of events you want to show in the feed. + + +
+
+ - - -
+ + +
-
- +
+ - - -
+ + +
-
-
- +
+
+ - - -
+ + +
-
- - - - Allow Events - Block Events - - -
- -
- {#each myResources as resource (`allowAResource${resource.id}`)} -
- -
- {/each} -
-
-
- -
- {#each myResources as resource (`blockAResource${resource.id}`)} -
- -
- {/each} -
-
-
-
+
+ + + + Allow Events + Block Events + + +
+ +
+ {#each myResources as resource (`allowAResource${resource.id}`)} +
+ +
+ {/each} +
+
+
+ +
+ {#each myResources as resource (`blockAResource${resource.id}`)} +
+ +
+ {/each} +
+
+
+
-
-
- +
+
+ - - -
+ + +
-
- - - - Allow Events - Block Events - - -
- -
- {#each myTags as tag (`allowATag${tag.id}`)} -
- -
- {/each} -
-
-
- -
- {#each myTags as tag (`blockATag${tag.id}`)} -
- -
- {/each} -
-
-
-
-
-
- \ No newline at end of file +
+ + + + Allow Events + Block Events + + +
+ +
+ {#each myTags as tag (`allowATag${tag.id}`)} +
+ +
+ {/each} +
+
+
+ +
+ {#each myTags as tag (`blockATag${tag.id}`)} +
+ +
+ {/each} +
+
+
+
+
+
+
diff --git a/frontend/src/lib/dashboard/calendar/CalGeneralInfo.svelte b/frontend/src/lib/dashboard/calendar/CalGeneralInfo.svelte index fb4eb51..d5a3711 100644 --- a/frontend/src/lib/dashboard/calendar/CalGeneralInfo.svelte +++ b/frontend/src/lib/dashboard/calendar/CalGeneralInfo.svelte @@ -1,79 +1,77 @@ - - General Information - Basic details about your calendar - - -
- {#if calPublicIdBindable.length > 0} - - {/if} - - - {#each updateCalendarForm.fields.publicId.issues() as issue} -

{issue.message}

- {/each} -
+ + General Information + Basic details about your calendar + + +
+ {#if calPublicIdBindable.length > 0} + + {/if} + + + {#each updateCalendarForm.fields.publicId.issues() as issue} +

{issue.message}

+ {/each} +
-
- {#if calendarNameBindable.length > 0} - - {/if} - - -
+
+ {#if calendarNameBindable.length > 0} + + {/if} + + +
-
- {#if calendarDescriptionBindable.length > 0} - - {/if} - -