design: tweak theming and remove questionable text in sign up page
This commit is contained in:
1 parent
4c8bbe4e64
commit
32c4a060a1
10 files changed
+103
-93
No files matched your search
@@ -3,13 +3,14 @@
|
||||
import { setUser } from '$lib/auth.js'
|
||||
import { Note, toast } from 'mono-svelte'
|
||||
import { DEFAULT_INSTANCE_URL, LINKED_INSTANCE_URL } from '$lib/instance.js'
|
||||
import { getClient, mayBeIncompatible, site, validateInstance } from '$lib/lemmy.js'
|
||||
import { Button, TextInput } from 'mono-svelte'
|
||||
import {
|
||||
Icon,
|
||||
Identification,
|
||||
QuestionMarkCircle,
|
||||
} from 'svelte-hero-icons'
|
||||
getClient,
|
||||
mayBeIncompatible,
|
||||
site,
|
||||
validateInstance,
|
||||
} from '$lib/lemmy.js'
|
||||
import { Button, TextInput } from 'mono-svelte'
|
||||
import { Icon, Identification, QuestionMarkCircle } from 'svelte-hero-icons'
|
||||
import { DOMAIN_REGEX_FORMS } from '$lib/util.js'
|
||||
import { MINIMUM_VERSION } from '$lib/version.js'
|
||||
|
||||
@@ -64,7 +65,7 @@
|
||||
<form on:submit|preventDefault={logIn} class="flex flex-col gap-5">
|
||||
<div class="flex flex-col gap-2">
|
||||
<h1 class="font-bold text-3xl">Log In</h1>
|
||||
{#if $site && mayBeIncompatible(MINIMUM_VERSION, $site.version.replace("v", ""))}
|
||||
{#if $site && mayBeIncompatible(MINIMUM_VERSION, $site.version.replace('v', ''))}
|
||||
<Note>
|
||||
This version of Photon supports instances running
|
||||
<span style="font-family: monospace;">
|
||||
@@ -101,6 +102,7 @@
|
||||
bind:value={data.password}
|
||||
label="Password"
|
||||
type="password"
|
||||
minlength={10}
|
||||
required
|
||||
class="w-full"
|
||||
/>
|
||||
|
||||
@@ -94,18 +94,21 @@
|
||||
bind:value={oldPassword}
|
||||
label="Current Password"
|
||||
type="password"
|
||||
minlength={10}
|
||||
required
|
||||
/>
|
||||
<TextInput
|
||||
bind:value={newPassword}
|
||||
label="New Password"
|
||||
type="password"
|
||||
minlength={10}
|
||||
required
|
||||
/>
|
||||
<TextInput
|
||||
bind:value={newPasswordVerify}
|
||||
label="New Password (Verify)"
|
||||
type="password"
|
||||
minlength={10}
|
||||
required
|
||||
/>
|
||||
<Button size="lg" color="primary" submit {loading} disabled={loading}>
|
||||
|
||||
@@ -1 +1 @@
|
||||
You're not supposed to be here.
|
||||
how did you get here? something in my code must have broke
|
||||
@@ -131,14 +131,8 @@
|
||||
label="Email"
|
||||
required={data.site_view.local_site.require_email_verification}
|
||||
type="email"
|
||||
placeholder="nigerianprince@notascam.com"
|
||||
/>
|
||||
<TextInput
|
||||
bind:value={username}
|
||||
label="Username"
|
||||
required
|
||||
placeholder="BobTheDestroyer"
|
||||
/>
|
||||
<TextInput bind:value={username} label="Username" required />
|
||||
<TextInput
|
||||
bind:value={password}
|
||||
label="Password"
|
||||
@@ -154,8 +148,8 @@
|
||||
{#if data.site_view.local_site.registration_mode == 'RequireApplication'}
|
||||
<Material class="dark:text-yellow-200 text-yellow-800 bg-yellow-500/20">
|
||||
<Icon src={ExclamationTriangle} mini size="20" />
|
||||
To join this instance, you need to fill out this application, and wait to
|
||||
be accepted.
|
||||
To join this instance, you must fill out this application, and wait to be
|
||||
accepted. You will receive an email if your application is accepted.
|
||||
</Material>
|
||||
{#if data.site_view.local_site.application_question}
|
||||
<Markdown source={data.site_view.local_site.application_question} />
|
||||
@@ -163,7 +157,7 @@
|
||||
<MarkdownEditor
|
||||
label="Application"
|
||||
required
|
||||
placeholder="i like this instance's icon "
|
||||
placeholder="An explanation of why you think this instance is awesome"
|
||||
bind:value={application}
|
||||
/>
|
||||
{/if}
|
||||
@@ -201,11 +195,7 @@
|
||||
<Button on:click={() => getCaptcha()} size="square-md">
|
||||
<Icon src={ArrowPath} size="16" mini />
|
||||
</Button>
|
||||
<TextInput
|
||||
required
|
||||
bind:value={verifyCaptcha}
|
||||
placeholder="i guess i'm a robot"
|
||||
/>
|
||||
<TextInput required bind:value={verifyCaptcha} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
Bookmark,
|
||||
Icon,
|
||||
} from 'svelte-hero-icons'
|
||||
import ColorSwatch from './ColorSwatch.svelte'
|
||||
|
||||
const c = defaultColors
|
||||
|
||||
const svelteIntellisenseSucks = (): (keyof Colors)[] =>
|
||||
Object.keys(c) as (keyof Colors)[]
|
||||
['slate', 'zinc', 'other'] as (keyof Colors)[]
|
||||
|
||||
let importing = false
|
||||
let importText = ''
|
||||
@@ -98,24 +99,33 @@
|
||||
Reset
|
||||
</Button>
|
||||
</div>
|
||||
<Material color="transparent" class="items-center gap-x-4 color-grid gap-y-2">
|
||||
<h1 class="text-2xl font-bold col-span-2">Accent</h1>
|
||||
<ColorSwatch
|
||||
backgroundColor={defaultColors.primary[900]}
|
||||
bind:value={$colors.primary[900]}
|
||||
class="!w-12 !h-12 col-span-1"
|
||||
/>
|
||||
<ColorSwatch
|
||||
backgroundColor={defaultColors.primary[100]}
|
||||
bind:value={$colors.primary[100]}
|
||||
class="!w-12 !h-12 col-span-1"
|
||||
/>
|
||||
<span class="font-semibold text-base">Light</span>
|
||||
<span class="font-semibold text-base">Dark</span>
|
||||
</Material>
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2">
|
||||
{#each svelteIntellisenseSucks() as category}
|
||||
<Material class="flex flex-col gap-2">
|
||||
<Material color="transparent" class="flex flex-col gap-2">
|
||||
<h1 class="capitalize font-semibold text-lg">{category}</h1>
|
||||
<div class="flex flex-row gap-1 flex-wrap items-center space-evenly">
|
||||
{#each Object.keys(c[category]) as shade}
|
||||
<div class="flex flex-col gap-0.5 w-10 group">
|
||||
<div
|
||||
class="w-full h-8 relative rounded-md border dark:border-zinc-600 hover:dark:border-zinc-400
|
||||
transition-colors"
|
||||
style="background-color: {defaultColors[category][shade]}"
|
||||
>
|
||||
<input
|
||||
class="rounded-md border cursor-pointer absolute top-0 left-0 w-full h-full opacity-0"
|
||||
type="color"
|
||||
bind:value={$colors[category][shade]}
|
||||
/>
|
||||
</div>
|
||||
<!--@ts-ignore-->
|
||||
<ColorSwatch
|
||||
bind:value={$colors[category][shade]}
|
||||
backgroundColor={defaultColors[category][shade]}
|
||||
/>
|
||||
<span class="font-medium capitalize">{shade}</span>
|
||||
</div>
|
||||
{/each}
|
||||
@@ -137,3 +147,10 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
:global(.color-grid) {
|
||||
display: grid;
|
||||
grid-template-columns: min-content min-content;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,16 @@
|
||||
<script lang="ts">
|
||||
export let backgroundColor: string = ''
|
||||
export let value: string
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="w-full h-8 relative rounded-md border dark:border-zinc-600 hover:dark:border-zinc-400
|
||||
transition-colors {$$props.class}"
|
||||
style="background-color: {backgroundColor}"
|
||||
>
|
||||
<input
|
||||
class="rounded-md border cursor-pointer absolute top-0 left-0 w-full h-full opacity-0"
|
||||
type="color"
|
||||
bind:value
|
||||
/>
|
||||
</div>
|
||||
Reference in new issue
Block a user