diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte index 19d8a92..acf2e2c 100644 --- a/src/lib/components/Button.svelte +++ b/src/lib/components/Button.svelte @@ -20,7 +20,7 @@ {href} class={tw( 'inline-flex cursor-default items-center justify-center rounded-md px-2 py-1 text-sf-secondary shadow-sm ring-1 ring-ss-secondary', - 'transition-shadow duration-200 hover:ring-ss-primary active:shadow-inner', + 'font-normal transition-shadow duration-200 hover:ring-ss-primary active:shadow-inner', variant === 'primary' && [ 'relative text-slate-50 ring-0 duration-200', 'before:absolute before:-inset-px before:rounded-[7px]', diff --git a/src/lib/components/GroupedList.ts b/src/lib/components/GroupedList.ts index b89b3d3..8039c59 100644 --- a/src/lib/components/GroupedList.ts +++ b/src/lib/components/GroupedList.ts @@ -1,4 +1,6 @@ import GroupedListItem from './GroupedList/GroupedListItem.svelte'; +import GroupedListInputItem from './GroupedList/GroupedListInputItem.svelte'; import GroupedListSection from './GroupedList/GroupedListSection.svelte'; +import GroupedListContainer from './GroupedList/GroupedListContainer.svelte'; -export { GroupedListItem, GroupedListSection }; +export { GroupedListItem, GroupedListInputItem, GroupedListSection, GroupedListContainer }; diff --git a/src/lib/components/GroupedList/GroupedListContainer.svelte b/src/lib/components/GroupedList/GroupedListContainer.svelte new file mode 100644 index 0000000..02bcfbf --- /dev/null +++ b/src/lib/components/GroupedList/GroupedListContainer.svelte @@ -0,0 +1 @@ +
diff --git a/src/lib/components/GroupedList/GroupedListInputItem.svelte b/src/lib/components/GroupedList/GroupedListInputItem.svelte new file mode 100644 index 0000000..b8d8902 --- /dev/null +++ b/src/lib/components/GroupedList/GroupedListInputItem.svelte @@ -0,0 +1,5 @@ + diff --git a/src/lib/components/GroupedList/GroupedListItem.svelte b/src/lib/components/GroupedList/GroupedListItem.svelte index ca9fff5..d1a7828 100644 --- a/src/lib/components/GroupedList/GroupedListItem.svelte +++ b/src/lib/components/GroupedList/GroupedListItem.svelte @@ -11,7 +11,7 @@ this={href ? 'a' : 'div'} {href} class={tw( - 'flex items-center gap-2 px-4 py-3 font-medium text-sf-primary first:rounded-t-lg last:rounded-b-lg', + 'flex cursor-default items-center gap-2 px-4 py-3 font-medium text-sf-primary first:rounded-t-lg last:rounded-b-lg', selected && 'bg-accent-500 text-white shadow-inner dark:bg-accent-900 dark:text-sf-primary' )} > diff --git a/src/lib/components/GroupedList/GroupedListSection.svelte b/src/lib/components/GroupedList/GroupedListSection.svelte index 185bb9a..f787fce 100644 --- a/src/lib/components/GroupedList/GroupedListSection.svelte +++ b/src/lib/components/GroupedList/GroupedListSection.svelte @@ -1,16 +1,16 @@ -
+
{#if $$slots.header} -

+

{/if}
{#if $$slots.footer} -
+
{/if} diff --git a/src/lib/components/LoadingIndicator.svelte b/src/lib/components/LoadingIndicator.svelte new file mode 100644 index 0000000..a48ca5f --- /dev/null +++ b/src/lib/components/LoadingIndicator.svelte @@ -0,0 +1,95 @@ + + +
div]:bg-sf-tertiary', className)}> +
+
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/src/lib/components/PageHeader.svelte b/src/lib/components/PageHeader.svelte new file mode 100644 index 0000000..04be137 --- /dev/null +++ b/src/lib/components/PageHeader.svelte @@ -0,0 +1,15 @@ + + +
+ +
diff --git a/src/lib/identityFiles/identityFileDB.ts b/src/lib/identityFiles/identityFileDB.ts index 32a675d..3f80bec 100644 --- a/src/lib/identityFiles/identityFileDB.ts +++ b/src/lib/identityFiles/identityFileDB.ts @@ -25,7 +25,7 @@ class IdentityFileDB { const db = await openDB(IDB_NAME, 1, { upgrade(db) { if (!db.objectStoreNames.contains(IDB_OBJECT_STORE_NAME)) { - const store = db.createObjectStore(IDB_OBJECT_STORE_NAME, { keyPath: 'idKeyId' }); + const store = db.createObjectStore(IDB_OBJECT_STORE_NAME, { keyPath: 'id_key' }); store.createIndex('id_urls', 'profile.signee.payload.id_urls', { multiEntry: true, unique: true diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 92cc8fa..c1ab9f5 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -5,7 +5,8 @@ import SettingsList from './settings/SettingsList.svelte'; onNavigate((navigation) => { - if (!document.startViewTransition) return; + if (!document.startViewTransition || navigation.from?.url.href === navigation.to?.url.href) + return; return new Promise((resolve) => { document.startViewTransition(async () => { @@ -15,7 +16,7 @@ }); }); - $: isSettings = $page.route.id?.startsWith('/(app)/settings'); + $: isSettings = $page.route.id?.startsWith('/(app)/settings') ?? true; $: mainVisible = !!$page.params.chatId || (isSettings && !$page.route.id?.startsWith('/(app)/settings/_mobile_empty')); @@ -30,7 +31,7 @@ > {#if isSettings} - + {/if} {#if mainVisible} diff --git a/src/routes/(app)/settings/SettingsList.svelte b/src/routes/(app)/settings/SettingsList.svelte index f2de676..1ba6473 100644 --- a/src/routes/(app)/settings/SettingsList.svelte +++ b/src/routes/(app)/settings/SettingsList.svelte @@ -3,6 +3,7 @@ import { GroupedListSection, GroupedListItem } from '$lib/components/GroupedList'; import { tw } from '$lib/tw'; import { + ArrowRightEndOnRectangle, Bell, Cog, DevicePhoneMobile, @@ -11,22 +12,32 @@ QuestionMarkCircle, UserPlus } from 'svelte-hero-icons'; + import { scale } from 'svelte/transition'; + import SettingsListItem from './SettingsListItem.svelte'; + import PageHeader from '$lib/components/PageHeader.svelte'; let className = ''; export { className as class }; -
-
+
+ -

Settings

-
+

Settings

+ +
- Add Account + + Sign in + + Create Account - General + General Notifications Privacy and Security Devices diff --git a/src/routes/(app)/settings/SettingsListItem.svelte b/src/routes/(app)/settings/SettingsListItem.svelte new file mode 100644 index 0000000..a213df7 --- /dev/null +++ b/src/routes/(app)/settings/SettingsListItem.svelte @@ -0,0 +1,15 @@ + + + diff --git a/src/routes/(app)/settings/account/add/+page.svelte b/src/routes/(app)/settings/account/add/+page.svelte new file mode 100644 index 0000000..6df816c --- /dev/null +++ b/src/routes/(app)/settings/account/add/+page.svelte @@ -0,0 +1,12 @@ + + +

Sign in

+ + + +

New here? Create a new account.

+
+
diff --git a/src/routes/(app)/settings/account/new/+page.svelte b/src/routes/(app)/settings/account/new/+page.svelte new file mode 100644 index 0000000..2465bc4 --- /dev/null +++ b/src/routes/(app)/settings/account/new/+page.svelte @@ -0,0 +1,129 @@ + + + +

Create Account

+ {#if isBusy} + + {:else} + + {/if} +
+ + + + + + + + + + +

Bio

+ +

Introduce yourself. This will be public for everyone to see.

+
+ + +

Security

+ + Password + + + + Repeat Password + + +
+

+ Sensitive actions like signing in on new devices require your password. Make sure it's + unique and secure. You'll lose access to your account if you forget it. +

+ {#if !passwordMatch && repeatPassword} +

Passwords do not match.

+ {/if} +
+
+