diff --git a/policy_dump.sql b/policy_dump.sql deleted file mode 100644 index e69de29..0000000 diff --git a/policy_dump.txt b/policy_dump.txt deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/components/calendar/Calendar.svelte b/src/lib/components/calendar/Calendar.svelte index 202747d..fcdd77d 100644 --- a/src/lib/components/calendar/Calendar.svelte +++ b/src/lib/components/calendar/Calendar.svelte @@ -38,7 +38,6 @@ getMonthDays(currentDate.getFullYear(), currentDate.getMonth()), ); - // Group days into weeks (rows of 7) const weeks = $derived.by(() => { const result: Date[][] = []; for (let i = 0; i < days.length; i += 7) { @@ -58,14 +57,13 @@ return date.getMonth() === currentDate.getMonth(); } - const monthYear = $derived( + const headerTitle = $derived( currentDate.toLocaleDateString(undefined, { month: "long", year: "numeric", }), ); - // Get week days for week view (Mon-Sun) function getWeekDays(date: Date): Date[] { const startOfWeek = new Date(date); const dayOfWeek = startOfWeek.getDay(); @@ -116,145 +114,154 @@ currentDate = new Date(); } - const headerTitle = $derived.by(() => { - if (currentView === "day") { - return currentDate.toLocaleDateString(undefined, { - weekday: "long", - month: "long", - day: "numeric", - year: "numeric", - }); - } else if (currentView === "week") { - const start = weekDates[0]; - const end = weekDates[6]; - return `${start.toLocaleDateString(undefined, { month: "short", day: "numeric" })} - ${end.toLocaleDateString(undefined, { month: "short", day: "numeric", year: "numeric" })}`; - } - return monthYear; - }); + const iconStyle = + "font-size: 24px; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;"; -
- -
-
+
+ +
+ +
- {headerTitle} - - -
-
+ + {headerTitle} + + +
+ + +
+
- - {#if currentView === "month"} -
- -
+ +
+ + {#if currentView === "month"} + +
{#each weekDayHeaders as day} -
- + {day}
{/each}
- -
+ +
{#each weeks as week} -
+
{#each week as day} {@const dayEvents = getEventsForDay(day)} {@const isToday = isSameDay(day, today)} {@const inMonth = isCurrentMonth(day)}
{#each dayEvents.slice(0, 2) as event} - { e.stopPropagation(); onEventClick?.(event); }} - role="button" - tabindex="0" > {event.title} - +
{/each} {#if dayEvents.length > 2} - +{dayEvents.length - 2} {/if} @@ -263,105 +270,176 @@
{/each}
-
- {/if} - - {#if currentView === "week"} -
-
+ + {:else if currentView === "week"} + +
{#each weekDates as day} - {@const dayEvents = getEventsForDay(day)} {@const isToday = isSameDay(day, today)}
-
-
- {weekDayHeaders[(day.getDay() + 6) % 7]} -
-
+
+ {day.getDate()} -
-
-
- {#each dayEvents as event} - - {/each} +
{/each}
-
- {/if} - - {#if currentView === "day"} - {@const dayEvents = getEventsForDay(currentDate)} -
- {#if dayEvents.length === 0} -
- event_busy +
+ {#each weekDates as day} + {@const dayEvents = getEventsForDay(day)} + {@const isToday = isSameDay(day, today)} +
- {:else} -
- {#each dayEvents as event} - - {/each} + {/each} + {#if dayEvents.length === 0} + {m.calendar_no_events()} + {/if} + + {/each} +
+ + + {:else} + {@const dayEvents = getEventsForDay(currentDate)} + {@const isToday = isSameDay(currentDate, today)} + + +
+
+ + {currentDate.toLocaleDateString(undefined, { + weekday: "long", + })} + +
+ + {currentDate.getDate()} + +
- {/if} -
- {/if} +
+ + +
+
+ {#if dayEvents.length === 0} +
+ event_busy +

+ {m.calendar_no_events()} +

+
+ {:else} + {#each dayEvents as event} + + {/each} + {/if} +
+
+ {/if} +
diff --git a/src/lib/components/chat-settings/UserSettingsModal.svelte b/src/lib/components/chat-settings/UserSettingsModal.svelte index ebb50a3..aa847ef 100644 --- a/src/lib/components/chat-settings/UserSettingsModal.svelte +++ b/src/lib/components/chat-settings/UserSettingsModal.svelte @@ -231,7 +231,7 @@ {/each} {/if} @@ -834,10 +830,10 @@ type="button" class="flex flex-col gap-2 items-center justify-center w-[240px] min-w-[240px] h-[155px] min-h-[155px] p-4 rounded-[32px] overflow-clip transition-all cursor-pointer {selectedDoc?.id === item.id - ? 'bg-surface ring-2 ring-primary/50' + ? 'bg-surface ring-4 ring-primary' : 'hover:bg-surface/50'} {draggedItem?.id === item.id ? 'opacity-50' : ''} - {dragOverFolder === item.id ? 'ring-2 ring-primary bg-primary/10' : ''}" + {dragOverFolder === item.id ? 'ring-4 ring-primary bg-primary/10' : ''}" draggable="true" ondragstart={(e) => handleDragStart(e, item)} ondragend={handleDragEnd} @@ -856,9 +852,8 @@ {getDocIcon(item)} - {getDocIcon(item)} -

handleColumnDragOver(e, column.id)} diff --git a/src/lib/components/modules/FilesWidget.svelte b/src/lib/components/modules/FilesWidget.svelte index cde5a75..5ca8d78 100644 --- a/src/lib/components/modules/FilesWidget.svelte +++ b/src/lib/components/modules/FilesWidget.svelte @@ -260,7 +260,7 @@

diff --git a/src/lib/components/ui/ContentHeader.svelte b/src/lib/components/ui/ContentHeader.svelte deleted file mode 100644 index c1b17dd..0000000 --- a/src/lib/components/ui/ContentHeader.svelte +++ /dev/null @@ -1,57 +0,0 @@ - - -
-
-

{title}

- {#if subtitle} -

{subtitle}

- {/if} -
-
- {#if children} - {@render children()} - {/if} - {#if actionLabel && onAction} - - {/if} - {#if onMore} - - {/if} -
-
diff --git a/src/lib/components/ui/Input.svelte b/src/lib/components/ui/Input.svelte index 4bc22de..d941079 100644 --- a/src/lib/components/ui/Input.svelte +++ b/src/lib/components/ui/Input.svelte @@ -21,6 +21,7 @@ required?: boolean; autocomplete?: AutoFill; icon?: string; + id?: string; name?: string; variant?: "default" | "compact"; class?: string; @@ -41,6 +42,7 @@ required = false, autocomplete, icon, + id, name, variant = "default", class: className, @@ -52,7 +54,8 @@ const isCompact = $derived(variant === "compact"); let showPassword = $state(false); - const inputId = `input-${crypto.randomUUID().slice(0, 8)}`; + const autoId = `input-${crypto.randomUUID().slice(0, 8)}`; + const inputId = $derived(id ?? autoId); const isPassword = $derived(type === "password"); const inputType = $derived(isPassword && showPassword ? "text" : type); @@ -104,10 +107,10 @@ {onkeydown} class=" w-full {isCompact - ? 'px-3 py-2 bg-dark border border-light/10 rounded-xl text-body-sm' + ? 'px-3 py-2 bg-dark rounded-xl text-body-sm' : 'px-3 py-2 bg-night rounded-[20px] font-medium font-input text-body'} - text-white placeholder:text-white/50 - focus:outline-none focus:ring-2 focus:ring-primary/50 + text-white placeholder:text-white/50 border-none + focus:outline-none focus:ring-4 focus:ring-primary disabled:opacity-30 disabled:cursor-not-allowed transition-colors {className ?? ''} " diff --git a/src/lib/components/ui/ListCard.svelte b/src/lib/components/ui/ListCard.svelte index 26ed8ed..d9b4142 100644 --- a/src/lib/components/ui/ListCard.svelte +++ b/src/lib/components/ui/ListCard.svelte @@ -1,7 +1,7 @@ @@ -22,7 +30,7 @@ {iconMap[type]} + >{iconMap[type]} -

{label}

+

+ {label} +

{:else} {/if} diff --git a/src/lib/components/ui/PageHeader.svelte b/src/lib/components/ui/PageHeader.svelte index e1884b7..02543ef 100644 --- a/src/lib/components/ui/PageHeader.svelte +++ b/src/lib/components/ui/PageHeader.svelte @@ -4,8 +4,10 @@ interface Props { title: string; subtitle?: string; - icon?: string; - iconColor?: string; + actionLabel?: string; + actionIcon?: string; + onAction?: () => void; + onMore?: () => void; actions?: Snippet; class?: string; } @@ -13,32 +15,54 @@ let { title, subtitle, - icon, - iconColor = "text-white", + actionLabel, + actionIcon, + onAction, + onMore, actions, class: className = "", }: Props = $props(); -
-
- {#if icon} - {icon} +
+
+

{title}

+ {#if subtitle} +

{subtitle}

{/if} -
-

{title}

- {#if subtitle} -

{subtitle}

- {/if} -
- {#if actions} -
+
+ {#if actions} {@render actions()} -
- {/if} + {/if} + {#if actionLabel && onAction} + + {/if} + {#if onMore} + + {/if} +
diff --git a/src/lib/components/ui/SectionCard.svelte b/src/lib/components/ui/SectionCard.svelte index 84fcdf1..14806ee 100644 --- a/src/lib/components/ui/SectionCard.svelte +++ b/src/lib/components/ui/SectionCard.svelte @@ -24,7 +24,7 @@ }; -
+
{#if title || titleRight}
{#if title} diff --git a/src/lib/components/ui/Select.svelte b/src/lib/components/ui/Select.svelte index 8d355e3..d30630b 100644 --- a/src/lib/components/ui/Select.svelte +++ b/src/lib/components/ui/Select.svelte @@ -68,7 +68,7 @@ ? 'px-3 py-2 bg-dark border border-light/10 rounded-xl text-body-sm' : 'px-3 py-2 bg-night rounded-[20px] font-medium font-input text-body'} text-white - focus:outline-none focus:ring-2 focus:ring-primary/50 + focus:outline-none focus:ring-4 focus:ring-primary disabled:opacity-30 disabled:cursor-not-allowed transition-colors appearance-none cursor-pointer {className ?? ''}" class:ring-1={error && !isCompact} diff --git a/src/lib/components/ui/StatCard.svelte b/src/lib/components/ui/StatCard.svelte index 7af1543..a9899b7 100644 --- a/src/lib/components/ui/StatCard.svelte +++ b/src/lib/components/ui/StatCard.svelte @@ -21,7 +21,7 @@ {#if href}
{:else} -
+
diff --git a/src/lib/components/ui/Textarea.svelte b/src/lib/components/ui/Textarea.svelte index 582330c..c46d530 100644 --- a/src/lib/components/ui/Textarea.svelte +++ b/src/lib/components/ui/Textarea.svelte @@ -63,7 +63,7 @@ text-white placeholder:text-light/30 focus:outline-none {isCompact ? 'focus:border-primary' - : 'focus:ring-2 focus:ring-primary'} + : 'focus:ring-4 focus:ring-primary'} disabled:opacity-30 disabled:cursor-not-allowed transition-colors {resizeClasses[resize]} {className ?? ''}" class:ring-1={error && !isCompact} diff --git a/src/lib/components/ui/Toggle.svelte b/src/lib/components/ui/Toggle.svelte index 623ab71..3f09912 100644 --- a/src/lib/components/ui/Toggle.svelte +++ b/src/lib/components/ui/Toggle.svelte @@ -2,16 +2,21 @@ interface Props { checked?: boolean; disabled?: boolean; - size?: 'sm' | 'md' | 'lg'; + size?: "sm" | "md" | "lg"; onchange?: (checked: boolean) => void; } - let { checked = $bindable(false), disabled = false, size = 'md', onchange }: Props = $props(); + let { + checked = $bindable(false), + disabled = false, + size = "md", + onchange, + }: Props = $props(); const sizeClasses = { - sm: { track: 'w-8 h-4', thumb: 'w-3 h-3', translate: 'translate-x-4' }, - md: { track: 'w-10 h-5', thumb: 'w-4 h-4', translate: 'translate-x-5' }, - lg: { track: 'w-12 h-6', thumb: 'w-5 h-5', translate: 'translate-x-6' } + sm: { track: "w-8 h-4", thumb: "w-3 h-3", translate: "translate-x-4" }, + md: { track: "w-10 h-5", thumb: "w-4 h-4", translate: "translate-x-5" }, + lg: { track: "w-12 h-6", thumb: "w-5 h-5", translate: "translate-x-6" }, }; function handleClick() { @@ -29,7 +34,7 @@ aria-label="Toggle" {disabled} onclick={handleClick} - class="relative inline-flex items-center rounded-full transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-dark disabled:opacity-50 disabled:cursor-not-allowed {sizeClasses[ + class="relative inline-flex items-center rounded-full transition-colors duration-200 focus:outline-none focus:ring-4 focus:ring-primary focus:ring-offset-2 focus:ring-offset-dark disabled:opacity-50 disabled:cursor-not-allowed {sizeClasses[ size ].track} {checked ? 'bg-primary' : 'bg-light/20'}" > diff --git a/src/lib/components/ui/index.ts b/src/lib/components/ui/index.ts index f46e098..5a9412d 100644 --- a/src/lib/components/ui/index.ts +++ b/src/lib/components/ui/index.ts @@ -22,7 +22,6 @@ export { default as CalendarDay } from './CalendarDay.svelte'; export { default as OrgHeader } from './OrgHeader.svelte'; export { default as KanbanColumn } from './KanbanColumn.svelte'; export { default as Logo } from './Logo.svelte'; -export { default as ContentHeader } from './ContentHeader.svelte'; export { default as Icon } from './Icon.svelte'; export { default as AssigneePicker } from './AssigneePicker.svelte'; export { default as ContextMenu } from './ContextMenu.svelte'; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index bc79dcc..56b4697 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -186,7 +186,8 @@
@@ -239,7 +240,7 @@ {#each pendingInvites as invite} { e.preventDefault(); acceptInvite(invite); @@ -322,7 +323,7 @@ {#each organizations as org}
diff --git a/src/routes/[orgSlug]/+layout.svelte b/src/routes/[orgSlug]/+layout.svelte index 75eff2e..9a7893c 100644 --- a/src/routes/[orgSlug]/+layout.svelte +++ b/src/routes/[orgSlug]/+layout.svelte @@ -90,7 +90,7 @@ ? [ { href: `/${data.org.slug}/documents`, - label: m.nav_storage(), + label: m.files_title(), icon: "cloud", exact: false, }, @@ -171,7 +171,7 @@ href="/{data.org.slug}" class="flex items-center gap-4 w-full hover:opacity-80 transition-opacity" > -
+
-
+
-
+
{@render children()} + {#if $navigating} +
+
+ +
+
+ {/if}
diff --git a/src/routes/[orgSlug]/+page.svelte b/src/routes/[orgSlug]/+page.svelte index 13e41c4..bf7414a 100644 --- a/src/routes/[orgSlug]/+page.svelte +++ b/src/routes/[orgSlug]/+page.svelte @@ -260,7 +260,7 @@ {#if isAdmin}
import type { Snippet } from "svelte"; import { navigating } from "$app/stores"; - import { PageHeader, ContentSkeleton } from "$lib/components/ui"; - import * as m from "$lib/paraglide/messages"; + import { ContentSkeleton } from "$lib/components/ui"; interface Props { data: { @@ -18,19 +17,10 @@ ); -
- - +
{#if isNavigatingHere} {:else} -
- {@render children()} -
+ {@render children()} {/if}
diff --git a/src/routes/[orgSlug]/calendar/+layout.svelte b/src/routes/[orgSlug]/calendar/+layout.svelte index 76cd2eb..01fe52e 100644 --- a/src/routes/[orgSlug]/calendar/+layout.svelte +++ b/src/routes/[orgSlug]/calendar/+layout.svelte @@ -1,8 +1,7 @@ -
- - +
{#if isNavigatingHere} {:else} -
- {@render children()} -
+ {@render children()} {/if}
diff --git a/src/routes/[orgSlug]/calendar/+page.svelte b/src/routes/[orgSlug]/calendar/+page.svelte index 3742fd5..d4deb09 100644 --- a/src/routes/[orgSlug]/calendar/+page.svelte +++ b/src/routes/[orgSlug]/calendar/+page.svelte @@ -8,6 +8,7 @@ ContextMenu, Input, Textarea, + PageHeader, } from "$lib/components/ui"; import { Calendar } from "$lib/components/calendar"; import { @@ -462,18 +463,9 @@ {m.calendar_title()} - {data.org.name} | root -
- -
-
-

- {m.calendar_title()} -

-

- {m.calendar_subtitle()} -

-
-
+
+ + {#snippet actions()} @@ -514,8 +506,8 @@ : []), ]} /> -
-
+ {/snippet} +
@@ -720,7 +712,7 @@ >
@@ -730,7 +722,7 @@ >
@@ -754,7 +746,7 @@ type="button" class="w-7 h-7 rounded-full transition-transform {eventColor === color - ? 'ring-2 ring-white scale-110' + ? 'ring-4 ring-white scale-110' : ''}" style="background-color: {color}" onclick={() => (eventColor = color)} diff --git a/src/routes/[orgSlug]/chat/+layout.svelte b/src/routes/[orgSlug]/chat/+layout.svelte index 0022c62..8d376ab 100644 --- a/src/routes/[orgSlug]/chat/+layout.svelte +++ b/src/routes/[orgSlug]/chat/+layout.svelte @@ -1,8 +1,7 @@ -
- - +
{#if isNavigatingHere && !$navigating?.from?.url.pathname?.includes(`/${data.org.slug}/chat`)} {:else} -
- {@render children()} -
+ {@render children()} {/if}
diff --git a/src/routes/[orgSlug]/documents/+layout.svelte b/src/routes/[orgSlug]/documents/+layout.svelte index 1d0dc23..346f995 100644 --- a/src/routes/[orgSlug]/documents/+layout.svelte +++ b/src/routes/[orgSlug]/documents/+layout.svelte @@ -1,8 +1,7 @@ -
- - +
{#if isNavigatingHere} {:else} -
- {@render children()} -
+ {@render children()} {/if}
diff --git a/src/routes/[orgSlug]/documents/+page.svelte b/src/routes/[orgSlug]/documents/+page.svelte index e1492f2..0517d7a 100644 --- a/src/routes/[orgSlug]/documents/+page.svelte +++ b/src/routes/[orgSlug]/documents/+page.svelte @@ -1,6 +1,6 @@ {m.nav_storage()} - {data.org.name} | root -
- + fileBrowserRef?.handleAdd()} - /> - (showCreateModal = true)} /> +
+ +
diff --git a/src/routes/[orgSlug]/documents/file/[id]/+page.svelte b/src/routes/[orgSlug]/documents/file/[id]/+page.svelte index b098d7d..cf5547f 100644 --- a/src/routes/[orgSlug]/documents/file/[id]/+page.svelte +++ b/src/routes/[orgSlug]/documents/file/[id]/+page.svelte @@ -664,7 +664,7 @@ {data.document.name} - {data.org.name} | root -
+
{#if data.isKanban} import { FileBrowser } from "$lib/components/documents"; - import { ContentHeader } from "$lib/components/ui"; + import { PageHeader } from "$lib/components/ui"; import type { Document } from "$lib/supabase/types"; import * as m from "$lib/paraglide/messages"; @@ -27,17 +27,19 @@ {data.folder.name} - {data.org.name} | root -
- + - +
+ +
diff --git a/src/routes/[orgSlug]/events/+layout.svelte b/src/routes/[orgSlug]/events/+layout.svelte index 9fefa90..fe2fa91 100644 --- a/src/routes/[orgSlug]/events/+layout.svelte +++ b/src/routes/[orgSlug]/events/+layout.svelte @@ -1,8 +1,7 @@ {#if showListLayout} -
- - +
{#if isNavigatingToList && !isEventsList} {:else} -
- {@render children()} -
+ {@render children()} {/if}
{:else} diff --git a/src/routes/[orgSlug]/events/+page.svelte b/src/routes/[orgSlug]/events/+page.svelte index 7f7c63f..3414c53 100644 --- a/src/routes/[orgSlug]/events/+page.svelte +++ b/src/routes/[orgSlug]/events/+page.svelte @@ -7,6 +7,8 @@ Button, Input, Textarea, + PageHeader, + Modal, } from "$lib/components/ui"; import { getContext } from "svelte"; import type { SupabaseClient } from "@supabase/supabase-js"; @@ -176,20 +178,13 @@ {m.events_title()} | {data.org.name} -
- -
-
-

{m.events_title()}

-
-
- {#if isEditor} - - {/if} -
-
+
+ (showCreateModal = true) : undefined} + />
@@ -253,145 +248,106 @@
-{#if showCreateModal} - - -
e.key === "Escape" && (showCreateModal = false)} - onclick={(e) => - e.target === e.currentTarget && (showCreateModal = false)} - role="dialog" - aria-modal="true" - aria-label={m.events_create()} + { + showCreateModal = false; + resetForm(); + }} + title={m.events_create()} + size="lg" +> +
{ + e.preventDefault(); + handleCreate(); + }} > -
-
+