diff --git a/package.json b/package.json index c9708473..20e79bb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "photon-lemmy", - "version": "2.2.0", + "version": "2.2.2", "license": "AGPL-3.0-only", "devDependencies": { "@dicebear/core": "^8.0.2", diff --git a/src/lib/app/error.ts b/src/lib/app/error.ts index 62df024b..59f27302 100644 --- a/src/lib/app/error.ts +++ b/src/lib/app/error.ts @@ -13,13 +13,16 @@ export function errorMessage(error: any, instance?: string): string { if (error?.body?.message) { error = JSON.parse(error?.body?.message) - if (error?.message) { + + if (typeof error?.message == 'string') { // probably piefed weird error format error = error.message } - } else if (error?.message) { + } + if (error?.message) { error = error?.message - } else if (error?.error && typeof error?.error === 'string') { + } + if (error?.error && typeof error?.error === 'string') { error = error.error } if (!error) throw error diff --git a/src/lib/app/i18n/en.json b/src/lib/app/i18n/en.json index d72598f3..41edcb86 100644 --- a/src/lib/app/i18n/en.json +++ b/src/lib/app/i18n/en.json @@ -946,7 +946,7 @@ "downvotes_are_disabled": "Downvotes are disabled on this server.", "email_already_exists": "An account already exists with that email.", "slurs": "Your submission contains a term banned in this server.", - "captcha_failed": "Incorrect CAPTCHA answer.", + "captcha_incorrect": "Incorrect CAPTCHA answer.", "cant_block_local_instance": "You cannot block the server you are actively using.", "invalid_vote_value": "You cannot commit voter fraud on Lemmy posts, sorry.", "language_not_allowed": "That language is not allowed in this community. Unset it to use the community's default.", @@ -957,7 +957,8 @@ "unimplemented": "That function of your account's server software is not yet supported by Photon.", "unsupported": "That function is not supported by your account's server software.", "not_live_supported": "That server is not running supported software, or is offline.", - "token_not_found": "That email verification link expired, or never existed." + "token_not_found": "That email verification link expired, or never existed.", + "invalid_password": "Invalid password." }, "aria": { "pagination": { diff --git a/src/lib/feature/instance/InstanceCard.svelte b/src/lib/feature/instance/InstanceCard.svelte index e912d44b..87d6495c 100644 --- a/src/lib/feature/instance/InstanceCard.svelte +++ b/src/lib/feature/instance/InstanceCard.svelte @@ -38,7 +38,7 @@ diff --git a/src/lib/feature/moderation/ApplicationDenyModal.svelte b/src/lib/feature/moderation/ApplicationDenyModal.svelte index 209e04a7..e07e4066 100644 --- a/src/lib/feature/moderation/ApplicationDenyModal.svelte +++ b/src/lib/feature/moderation/ApplicationDenyModal.svelte @@ -3,7 +3,6 @@ import { t } from '$lib/app/i18n' import MarkdownEditor from '$lib/app/markdown/MarkdownEditor.svelte' import { Button, Modal } from 'mono-svelte' - import { preventDefault } from 'svelte/legacy' import UserLink from '../user/UserLink.svelte' interface Props { @@ -28,13 +27,14 @@ } - - {#snippet customTitle()} -

- {$t('routes.admin.applications.modalTitle')} -

- {/snippet} -
deny())} class="flex flex-col gap-4"> + + { + e.preventDefault() + deny() + }} + class="flex flex-col gap-4" + > {/if} - {#snippet icon(width: number)} + {#snippet pfp(width: number)} - {@render icon(48)} + {@render pfp(48)}
{name} diff --git a/src/lib/ui/shared/materials/Material.svelte b/src/lib/ui/shared/materials/Material.svelte index 911e39e4..cd6f3719 100644 --- a/src/lib/ui/shared/materials/Material.svelte +++ b/src/lib/ui/shared/materials/Material.svelte @@ -1,4 +1,5 @@