fix: incorrect authentication key

This commit is contained in:
James Xylight committed 2025-02-08 14:02:29 -08:00
1 parent 282320052e
commit ebbabdfd7f
11 files changed
+33 -42

No files matched your search

@@ -107,7 +107,7 @@
size="square-md" size="square-md"
rounding="pill" rounding="pill"
color={language != undefined ? 'primary' : 'ghost'} color={language != undefined ? 'primary' : 'ghost'}
title={$t('form.profile.data.languages.title')} title={$t('form.profile.languages.title')}
> >
<Icon src={Language} size="16" micro /> <Icon src={Language} size="16" micro />
</Button> </Button>
@@ -159,7 +159,7 @@
/> />
<TextInput <TextInput
required required
label={$t('form.profile.data.displayName')} label={$t('form.profile.displayName')}
bind:value={formData.displayName} bind:value={formData.displayName}
/> />
<div class="flex flex-row gap-4 flex-wrap *:flex-1"> <div class="flex flex-row gap-4 flex-wrap *:flex-1">
@@ -236,7 +236,7 @@
</Select> </Select>
<div class="space-y-1"> <div class="space-y-1">
<SectionTitle>{$t('form.profile.data.languages.title')}</SectionTitle> <SectionTitle>{$t('form.profile.languages.title')}</SectionTitle>
<Material rounding="xl" color="uniform" class="dark:bg-zinc-950"> <Material rounding="xl" color="uniform" class="dark:bg-zinc-950">
{#if $site} {#if $site}
<div class="flex gap-2 flex-wrap flex-row"> <div class="flex gap-2 flex-wrap flex-row">
+2 -2
View File
@@ -243,8 +243,8 @@
</Switch> </Switch>
<div class="space-y-1"> <div class="space-y-1">
<SectionTitle>{$t('form.profile.data.languages.title')}</SectionTitle> <SectionTitle>{$t('form.profile.languages.title')}</SectionTitle>
<p>{$t('form.profile.data.languages.description')}</p> <p>{$t('form.profile.languages.description')}</p>
<Material rounding="xl" color="uniform" class="dark:bg-zinc-950"> <Material rounding="xl" color="uniform" class="dark:bg-zinc-950">
{#if $site} {#if $site}
<div class="flex gap-2 flex-wrap flex-row"> <div class="flex gap-2 flex-wrap flex-row">
@@ -73,13 +73,13 @@
{/if} {/if}
<TextInput <TextInput
bind:value={password} bind:value={password}
label={$t('form.profile.data.newPassword')} label={$t('form.profile.newPassword')}
type="password" type="password"
required required
/> />
<TextInput <TextInput
bind:value={password_verify} bind:value={password_verify}
label={$t('form.profile.data.verifyNewPassword')} label={$t('form.profile.verifyNewPassword')}
type="password" type="password"
required required
/> />
@@ -19,7 +19,7 @@
url: '/profile/password', url: '/profile/password',
}, },
{ {
name: $t('form.profile.data.2fa.2fa'), name: $t('form.profile.2fa.2fa'),
url: '/profile/password/2fa', url: '/profile/password/2fa',
}, },
{ {
@@ -50,7 +50,7 @@
> >
<Icon src={Key} size="24" /> <Icon src={Key} size="24" />
</Material> </Material>
<span class="font-medium text-lg">{$t('form.profile.data.2fa.2fa')}</span> <span class="font-medium text-lg">{$t('form.profile.2fa.2fa')}</span>
<span class="text-sm"> <span class="text-sm">
{data.my_user?.local_user_view.local_user.totp_2fa_enabled {data.my_user?.local_user_view.local_user.totp_2fa_enabled
? $t('common.enabled') ? $t('common.enabled')
@@ -58,7 +58,7 @@
disabled disabled
type="password" type="password"
value={totpLink} value={totpLink}
label={$t('form.profile.data.2fa.totp')} label={$t('form.profile.2fa.totp')}
> >
{#snippet suffix()} {#snippet suffix()}
<button <button
@@ -73,7 +73,7 @@
</button> </button>
{/snippet} {/snippet}
<span class="font-normal text-xs"> <span class="font-normal text-xs">
{$t('form.profile.data.2fa.paste')} {$t('form.profile.2fa.paste')}
</span> </span>
</TextInput> </TextInput>
{/if} {/if}
@@ -47,21 +47,21 @@
<form onsubmit={preventDefault(changePassword)} class="flex flex-col gap-4"> <form onsubmit={preventDefault(changePassword)} class="flex flex-col gap-4">
<TextInput <TextInput
bind:value={oldPassword} bind:value={oldPassword}
label={$t('form.profile.data.currentPassword')} label={$t('form.profile.currentPassword')}
type="password" type="password"
minlength={10} minlength={10}
required required
/> />
<TextInput <TextInput
bind:value={newPassword} bind:value={newPassword}
label={$t('form.profile.data.newPassword')} label={$t('form.profile.newPassword')}
type="password" type="password"
minlength={10} minlength={10}
required required
/> />
<TextInput <TextInput
bind:value={newPasswordVerify} bind:value={newPasswordVerify}
label={$t('form.profile.data.verifyNewPassword')} label={$t('form.profile.verifyNewPassword')}
type="password" type="password"
minlength={10} minlength={10}
required required
@@ -97,7 +97,7 @@
onaction={() => deleteAccount(4)} onaction={() => deleteAccount(4)}
> >
{#snippet customTitle()} {#snippet customTitle()}
<span>{$t('form.profile.data.deleteAccount.label')}</span> <span>{$t('form.profile.deleteAccount.label')}</span>
{/snippet} {/snippet}
<TextInput <TextInput
label={$t('form.password')} label={$t('form.password')}
@@ -105,10 +105,10 @@
bind:value={deletion.password} bind:value={deletion.password}
/> />
<Checkbox bind:checked={deletion.deleteContent}> <Checkbox bind:checked={deletion.deleteContent}>
{$t('form.profile.data.deleteAccount.deleteContent')} {$t('form.profile.deleteAccount.deleteContent')}
{#snippet description()} {#snippet description()}
<span> <span>
{$t('form.profile.data.deleteAccount.warning')} {$t('form.profile.deleteAccount.warning')}
</span> </span>
{/snippet} {/snippet}
</Checkbox> </Checkbox>
@@ -128,10 +128,10 @@
{$t('routes.profile.delete.warning')} {$t('routes.profile.delete.warning')}
</p> </p>
<Switch bind:checked={deletion.deleteContent}> <Switch bind:checked={deletion.deleteContent}>
{$t('form.profile.data.deleteAccount.deleteContent')} {$t('form.profile.deleteAccount.deleteContent')}
{#snippet description()} {#snippet description()}
<span> <span>
{$t('form.profile.data.deleteAccount.warning')} {$t('form.profile.deleteAccount.warning')}
</span> </span>
{/snippet} {/snippet}
</Switch> </Switch>
@@ -89,54 +89,45 @@
{/if} {/if}
{@render children?.()} {@render children?.()}
{#if data.my_user?.local_user_view?.local_user && formData} {#if data.my_user?.local_user_view?.local_user && formData}
<TextInput label={$t('form.profile.email')} bind:value={formData.email} />
<TextInput <TextInput
label={$t('form.profile.data.email')} label={$t('form.profile.displayName')}
bind:value={formData.email}
/>
<TextInput
label={$t('form.profile.data.displayName')}
bind:value={formData.display_name} bind:value={formData.display_name}
placeholder="Optional" placeholder="Optional"
/> />
<MarkdownEditor <MarkdownEditor
images={false} images={false}
bind:value={() => formData.bio ?? '', (v) => (formData.bio = v)} bind:value={() => formData.bio ?? '', (v) => (formData.bio = v)}
label={$t('form.profile.data.bio')} label={$t('form.profile.bio')}
previewButton previewButton
/> />
<div class="flex gap-2 items-center *:flex-1"> <div class="flex gap-2 items-center *:flex-1">
<ImageInput <ImageInput label={$t('form.profile.avatar')} bind:files={profileImage} />
label={$t('form.profile.data.avatar')} <ImageInput label={$t('form.profile.banner')} bind:files={bannerImage} />
bind:files={profileImage}
/>
<ImageInput
label={$t('form.profile.data.banner')}
bind:files={bannerImage}
/>
</div> </div>
<TextInput <TextInput
label={$t('form.profile.data.matrix')} label={$t('form.profile.matrix')}
bind:value={formData.matrix_user_id} bind:value={formData.matrix_user_id}
placeholder="@user:example.com" placeholder="@user:example.com"
/> />
<Switch bind:checked={formData.show_nsfw}> <Switch bind:checked={formData.show_nsfw}>
{$t('form.profile.data.showNSFW')} {$t('form.profile.showNSFW')}
</Switch> </Switch>
<Switch bind:checked={formData.show_scores}> <Switch bind:checked={formData.show_scores}>
{$t('form.profile.data.scores')} {$t('form.profile.scores')}
</Switch> </Switch>
<Switch bind:checked={formData.bot_account}> <Switch bind:checked={formData.bot_account}>
{$t('form.profile.data.bot')} {$t('form.profile.bot')}
</Switch> </Switch>
<Switch bind:checked={formData.show_bot_accounts}> <Switch bind:checked={formData.show_bot_accounts}>
{$t('form.profile.data.showBots')} {$t('form.profile.showBots')}
</Switch> </Switch>
<Switch bind:checked={formData.show_read_posts}> <Switch bind:checked={formData.show_read_posts}>
{$t('form.profile.data.showRead')} {$t('form.profile.showRead')}
</Switch> </Switch>
<div class="space-y-1"> <div class="space-y-1">
<SectionTitle>{$t('form.profile.data.languages.title')}</SectionTitle> <SectionTitle>{$t('form.profile.languages.title')}</SectionTitle>
<p>{$t('form.profile.data.languages.description')}</p> <p>{$t('form.profile.languages.description')}</p>
<Material rounding="xl" color="uniform" class="dark:bg-zinc-950"> <Material rounding="xl" color="uniform" class="dark:bg-zinc-950">
{#if $site && formData.discussion_languages} {#if $site && formData.discussion_languages}
<div class="flex gap-2 flex-wrap flex-row"> <div class="flex gap-2 flex-wrap flex-row">
+1 -1
View File
@@ -201,7 +201,7 @@
</div> </div>
</div> </div>
{/if} {/if}
<Checkbox bind:checked={nsfw}>{$t('form.profile.data.showNSFW')}</Checkbox> <Checkbox bind:checked={nsfw}>{$t('form.profile.showNSFW')}</Checkbox>
<input type="dn" name="honeypot" bind:value={honeypot} class="hidden" /> <input type="dn" name="honeypot" bind:value={honeypot} class="hidden" />
<Button <Button
submit submit