fix: wrap profile errors in errorMessage
This commit is contained in:
2 files changed
+2
-3
No files matched your search
@@ -8,7 +8,6 @@
|
|||||||
<img src="https://github.com/user-attachments/assets/11cf24c2-fd4f-480a-8a16-41f0f0a5b245">
|
<img src="https://github.com/user-attachments/assets/11cf24c2-fd4f-480a-8a16-41f0f0a5b245">
|
||||||
</picture>
|
</picture>
|
||||||
|
|
||||||
|
|
||||||
# Photon
|
# Photon
|
||||||
|
|
||||||
Photon is a web app for the fediverse with helpful features and a nice UX.
|
Photon is a web app for the fediverse with helpful features and a nice UX.
|
||||||
@@ -90,7 +89,6 @@ Photon lets you configure the default client settings and more.
|
|||||||
If you're hosting Photon for a Lemmy instance, you'll almost definitely want to set these:
|
If you're hosting Photon for a Lemmy instance, you'll almost definitely want to set these:
|
||||||
|
|
||||||
- `PUBLIC_INSTANCE_URL` `string`: The domain which **the browser** will send API requests to.
|
- `PUBLIC_INSTANCE_URL` `string`: The domain which **the browser** will send API requests to.
|
||||||
|
|
||||||
- Example: `PUBLIC_INSTANCE_URL=fedi.phtn.app`
|
- Example: `PUBLIC_INSTANCE_URL=fedi.phtn.app`
|
||||||
|
|
||||||
- `PUBLIC_INSTANCE_TYPE` `lemmyv3 | piefedalpha` (default: `lemmyv3`): If your instance is running PieFed, you must set this option to `piefedalpha`. Otherwise, you don't need to do anything.
|
- `PUBLIC_INSTANCE_TYPE` `lemmyv3 | piefedalpha` (default: `lemmyv3`): If your instance is running PieFed, you must set this option to `piefedalpha`. Otherwise, you don't need to do anything.
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { client, site } from '$lib/api/client.svelte'
|
|||||||
import type { Community, GetSiteResponse, MyUserInfo } from '$lib/api/types'
|
import type { Community, GetSiteResponse, MyUserInfo } from '$lib/api/types'
|
||||||
import { publishedToDate } from '$lib/ui/util/date'
|
import { publishedToDate } from '$lib/ui/util/date'
|
||||||
import { toast } from 'mono-svelte'
|
import { toast } from 'mono-svelte'
|
||||||
|
import { errorMessage } from './error'
|
||||||
import { t } from './i18n'
|
import { t } from './i18n'
|
||||||
import { DEFAULT_INSTANCE_URL } from './instance.svelte'
|
import { DEFAULT_INSTANCE_URL } from './instance.svelte'
|
||||||
import { instanceToURL, moveItem } from './util.svelte'
|
import { instanceToURL, moveItem } from './util.svelte'
|
||||||
@@ -228,7 +229,7 @@ class Profile {
|
|||||||
return user
|
return user
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
toast({
|
toast({
|
||||||
content: err as string,
|
content: errorMessage(err as string),
|
||||||
type: 'error',
|
type: 'error',
|
||||||
})
|
})
|
||||||
return null
|
return null
|
||||||
|
|||||||
Reference in new issue
Block a user