diff --git a/src/lib/components/NotificationSettings.svelte b/src/lib/components/NotificationSettings.svelte deleted file mode 100644 index 2281d44..0000000 --- a/src/lib/components/NotificationSettings.svelte +++ /dev/null @@ -1,469 +0,0 @@ - - -
- {#if isLoading} -
Loading preferences...
- {:else} - - {#if browserPermission !== 'granted'} -
-
- {#if browserPermission === 'denied'} - Browser notifications blocked -

- Please enable notifications in your browser settings to receive push notifications -

- {:else} - Browser permission required -

Enable browser notifications to receive push notifications

- {/if} -
- {#if browserPermission === 'default'} - - {/if} -
- {/if} - -
- -
-
-

Push Notifications

-

Enable or disable all push notifications

-
- -
- -
- - -
-
-

Friend Requests

-

Get notified when someone sends you a friend request

-
- -
- - -
-
-

Friend Request Accepted

-

Get notified when someone accepts your friend request

-
- -
- - -
-
-

Find Likes

-

Get notified when someone likes your find

-
- -
- - -
-
-

Find Comments

-

Get notified when someone comments on your find

-
- -
-
- {/if} -
- - diff --git a/src/lib/components/NotificationSettingsSheet.svelte b/src/lib/components/NotificationSettingsSheet.svelte deleted file mode 100644 index 40bad82..0000000 --- a/src/lib/components/NotificationSettingsSheet.svelte +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Notifications - Manage your notification preferences - -
- -
-
-
- - diff --git a/src/lib/components/auth/index.ts b/src/lib/components/auth/index.ts new file mode 100644 index 0000000..021ba41 --- /dev/null +++ b/src/lib/components/auth/index.ts @@ -0,0 +1 @@ +export { default as LoginForm } from './login-form.svelte'; diff --git a/src/lib/components/login-form.svelte b/src/lib/components/auth/login-form.svelte similarity index 97% rename from src/lib/components/login-form.svelte rename to src/lib/components/auth/login-form.svelte index 03b5d03..d219d1c 100644 --- a/src/lib/components/login-form.svelte +++ b/src/lib/components/auth/login-form.svelte @@ -9,7 +9,7 @@ import { cn } from '$lib/utils.js'; import { toast } from 'svelte-sonner'; import type { HTMLAttributes } from 'svelte/elements'; - import type { ActionData } from '../../routes/login/$types.js'; + import type { ActionData } from '../../../routes/login/$types.js'; let { class: className, diff --git a/src/lib/components/Comment.svelte b/src/lib/components/finds/Comment.svelte similarity index 97% rename from src/lib/components/Comment.svelte rename to src/lib/components/finds/Comment.svelte index 4085d32..4fde799 100644 --- a/src/lib/components/Comment.svelte +++ b/src/lib/components/finds/Comment.svelte @@ -1,6 +1,6 @@ + + diff --git a/src/lib/components/CommentsList.svelte b/src/lib/components/finds/CommentsList.svelte similarity index 97% rename from src/lib/components/CommentsList.svelte rename to src/lib/components/finds/CommentsList.svelte index 0f1fa1d..3b8fb26 100644 --- a/src/lib/components/CommentsList.svelte +++ b/src/lib/components/finds/CommentsList.svelte @@ -1,6 +1,6 @@ + + + + diff --git a/src/lib/components/notifications/index.ts b/src/lib/components/notifications/index.ts new file mode 100644 index 0000000..b3bbe91 --- /dev/null +++ b/src/lib/components/notifications/index.ts @@ -0,0 +1,3 @@ +export { default as NotificationManager } from './NotificationManager.svelte'; +export { default as NotificationPrompt } from './NotificationPrompt.svelte'; +export { default as NotificationSettings } from './NotificationSettings.svelte'; diff --git a/src/lib/components/ProfilePanel.svelte b/src/lib/components/profile/ProfilePanel.svelte similarity index 90% rename from src/lib/components/ProfilePanel.svelte rename to src/lib/components/profile/ProfilePanel.svelte index 7fad8a2..7e239b0 100644 --- a/src/lib/components/ProfilePanel.svelte +++ b/src/lib/components/profile/ProfilePanel.svelte @@ -7,11 +7,11 @@ DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger - } from './dropdown-menu'; - import { Skeleton } from './skeleton'; + } from '../dropdown-menu'; + import { Skeleton } from '../skeleton'; import ProfilePicture from './ProfilePicture.svelte'; import ProfilePictureSheet from './ProfilePictureSheet.svelte'; - import NotificationSettingsSheet from './NotificationSettingsSheet.svelte'; + import NotificationSettings from '../notifications/NotificationSettings.svelte'; interface Props { username: string; @@ -23,7 +23,7 @@ let { username, id, profilePictureUrl, loading = false }: Props = $props(); let showProfilePictureSheet = $state(false); - let showNotificationSettingsSheet = $state(false); + let showNotificationSettings = $state(false); function openProfilePictureSheet() { showProfilePictureSheet = true; @@ -33,12 +33,12 @@ showProfilePictureSheet = false; } - function openNotificationSettingsSheet() { - showNotificationSettingsSheet = true; + function openNotificationSettings() { + showNotificationSettings = true; } - function closeNotificationSettingsSheet() { - showNotificationSettingsSheet = false; + function closeNotificationSettings() { + showNotificationSettings = false; } @@ -85,7 +85,7 @@ Friends - + Notifications @@ -121,8 +121,8 @@ /> {/if} -{#if showNotificationSettingsSheet} - +{#if showNotificationSettings} + {/if}