impr: make signup page more user friendly
This commit is contained in:
8 files changed
+350
-181
No files matched your search
@@ -15,6 +15,8 @@
|
||||
}
|
||||
initialOffset?: number
|
||||
debounceResize?: number
|
||||
useWindow?: boolean
|
||||
height?: number
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -25,6 +27,8 @@
|
||||
initialOffset = 0,
|
||||
restore = $bindable(),
|
||||
debounceResize = 100,
|
||||
useWindow = true,
|
||||
height = 0,
|
||||
...rest
|
||||
}: Props = $props()
|
||||
|
||||
@@ -177,15 +181,24 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:window bind:scrollY />
|
||||
<svelte:window
|
||||
bind:scrollY={
|
||||
() => (useWindow ? scrollY : 0),
|
||||
v => {
|
||||
if (useWindow) scrollY = v
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
<div
|
||||
bind:this={virtualListEl}
|
||||
style="position: relative; height: {cumulativeItemHeights[
|
||||
visibleItems?.[visibleItems.length - 1]?.index
|
||||
]}px;"
|
||||
style="position: relative; height: {height ||
|
||||
cumulativeItemHeights[visibleItems?.[visibleItems.length - 1]?.index]}px;"
|
||||
{...rest}
|
||||
id="feed"
|
||||
onscroll={() => {
|
||||
if (!useWindow) scrollY = virtualListEl?.scrollTop ?? 0
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style="height: {cumulativeItemHeights[visibleItems?.[0]?.index - 1] ||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
style: 'grid-area: sidebar; width: 100% !important;',
|
||||
})}
|
||||
{@render main?.({
|
||||
class: `w-full bg-slate-25 dark:bg-zinc-925 justify-self-center shadow-xs z-0 main pb-22 lg:pb-0 lg:pt-20!`,
|
||||
class: `w-full bg-slate-25 dark:bg-zinc-925 justify-self-center shadow-xs main pb-22 lg:pt-20! pb-4 sm:pb-6`,
|
||||
style: 'grid-area: main',
|
||||
})}
|
||||
{@render suffix?.({
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
} from 'mono-svelte'
|
||||
import type { Placement } from 'svelte-floating-ui/core'
|
||||
import {
|
||||
ArrowDown,
|
||||
ArrowLeftOnRectangle,
|
||||
Bars3,
|
||||
Bookmark,
|
||||
BugAnt,
|
||||
@@ -27,6 +29,7 @@
|
||||
Cog6Tooth,
|
||||
ComputerDesktop,
|
||||
Icon,
|
||||
Identification,
|
||||
Inbox,
|
||||
Moon,
|
||||
ServerStack,
|
||||
@@ -91,13 +94,13 @@
|
||||
{#if profile.data?.jwt}
|
||||
<MenuButton href="/profile">
|
||||
{#snippet prefix()}
|
||||
<Icon src={UserCircle} micro width={16} />
|
||||
<Icon src={UserCircle} micro size="16" />
|
||||
{/snippet}
|
||||
{$t('profile.profile')}
|
||||
</MenuButton>
|
||||
<MenuButton href="/inbox">
|
||||
{#snippet prefix()}
|
||||
<Icon src={Inbox} micro width={16} />
|
||||
<Icon src={Inbox} micro size="16" />
|
||||
{/snippet}
|
||||
{$t('profile.inbox')}
|
||||
{#if $notifications.inbox > 0}
|
||||
@@ -108,21 +111,34 @@
|
||||
</MenuButton>
|
||||
<MenuButton href="/saved">
|
||||
{#snippet prefix()}
|
||||
<Icon src={Bookmark} micro width={16} />
|
||||
<Icon src={Bookmark} micro size="16" />
|
||||
{/snippet}
|
||||
{$t('profile.saved')}
|
||||
</MenuButton>
|
||||
{:else}
|
||||
<MenuButton href="/accounts/login">
|
||||
{#snippet prefix()}
|
||||
<Icon src={ArrowLeftOnRectangle} mini size="16" />
|
||||
{/snippet}
|
||||
{$t('account.login')}
|
||||
</MenuButton>
|
||||
<MenuButton href="/signup">
|
||||
{#snippet prefix()}
|
||||
<Icon src={Identification} micro size="16" />
|
||||
{/snippet}
|
||||
{$t('account.signup')}
|
||||
</MenuButton>
|
||||
{/if}
|
||||
<MenuButton href="/accounts">
|
||||
{#snippet prefix()}
|
||||
<Icon src={UserGroup} micro width={16} />
|
||||
<Icon src={UserGroup} micro size="16" />
|
||||
{/snippet}
|
||||
{$t('account.accounts')}
|
||||
</MenuButton>
|
||||
<MenuDivider>{$t('nav.menu.app')}</MenuDivider>
|
||||
<MenuButton href="/settings">
|
||||
{#snippet prefix()}
|
||||
<Icon src={Cog6Tooth} micro width={16} />
|
||||
<Icon src={Cog6Tooth} micro size="16" />
|
||||
{/snippet}
|
||||
{$t('nav.menu.settings')}
|
||||
</MenuButton>
|
||||
@@ -166,7 +182,7 @@
|
||||
{#if settings.debugInfo}
|
||||
<MenuButton href="/util">
|
||||
{#snippet prefix()}
|
||||
<Icon src={BugAnt} mini width={16} />
|
||||
<Icon src={BugAnt} mini size="16" />
|
||||
{/snippet}
|
||||
Debug
|
||||
</MenuButton>
|
||||
|
||||
+11
-5
@@ -189,6 +189,12 @@
|
||||
"title": "Registrations closed",
|
||||
"description": "This instance has registrations closed. Find another instance.",
|
||||
"anotherInstance": "Find another instance"
|
||||
},
|
||||
"verify": {
|
||||
"title": "Verify email",
|
||||
"description": "Check your inbox for a verification link. Once you've clicked it, press the button below.",
|
||||
"submit": "I've verified my email",
|
||||
"error": "Your email has not been verified."
|
||||
}
|
||||
},
|
||||
"description": "Description",
|
||||
@@ -927,14 +933,14 @@
|
||||
"incorrect_login": "Incorrect login credentials. Please try again.",
|
||||
"incorrect_login_2": "Incorrect login credentials. Try again.",
|
||||
"incorrect_login_3": "Incorrect, again. Try a few more times.",
|
||||
"incorrect_login_4": "Those still aren't the right credentials. Keep trying.",
|
||||
"incorrect_login_5": "I swear, you need to look at the keys you're pressing.",
|
||||
"incorrect_login_6": "Is this a joke to you?",
|
||||
"incorrect_login_7": "Either you struggle with typing or you're harassing me at this point.",
|
||||
"incorrect_login_4": "Successfully logged-wait no. Incorrect credentials.",
|
||||
"incorrect_login_5": "Look at your keyboard while typing this time.",
|
||||
"incorrect_login_6": "I believe in you.",
|
||||
"incorrect_login_7": "Okay, you're messing with me now.",
|
||||
"incorrect_login_8": "I give up.",
|
||||
"incorrect_login_9": "Each of these requests you make are sending data through via an incredible technology. And you're using it to make failed logins.",
|
||||
"incorrect_login_10": "Think about this. The poor instance admins have to maintain their server just for you to make these useless requests.",
|
||||
"incorrect_login_11": "I give up, for real this time.",
|
||||
"incorrect_login_11": "Each press of the button uses thousands of CPU cycles to process your request, which ends up failing.",
|
||||
"incorrect_login_12": "...",
|
||||
"registration_application_is_pending": "The registration application for that account hasn't been accepted yet.",
|
||||
"couldnt_find_post": "That post doesn't exist, isn't on this instance, or was removed.",
|
||||
|
||||
Reference in new issue
Block a user