diff --git a/README.md b/README.md index 06e7eb43..2e60b8db 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ An alternative web client for Lemmy with the UI of Xylo ![image](https://github.com/Xyphyn/photon/assets/80978739/dab88315-691b-4471-add7-321b8a803c54) - ## Self-hosting Put Photon on your own domain for easier onboarding. @@ -72,6 +71,7 @@ The following environment variables can be set to override the default settings: | PUBLIC_NSFW_BLUR | `bool` | true | | PUBLIC_NEW_VOTE_BUTTONS | `bool` | false | | PUBLIC_RANDOM_PLACEHOLDERS | `bool` | true | +| PUBLIC_HIDE_POWERED_BY | `bool` | false | The values for `SortType`, `ListingType`, and `CommentSortType` are defined by the lemmy-js-client library. diff --git a/src/lib/components/ui/Logo.svelte b/src/lib/components/ui/Logo.svelte index f8d524e5..935e226f 100644 --- a/src/lib/components/ui/Logo.svelte +++ b/src/lib/components/ui/Logo.svelte @@ -8,6 +8,7 @@ viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" + class="inline" > /
{$site.site_view.site.name} - - Powered by - Photon - - + Powered by + Photon + + + {/if}
{:else} diff --git a/src/lib/settings.ts b/src/lib/settings.ts index d1197058..d869e9c9 100644 --- a/src/lib/settings.ts +++ b/src/lib/settings.ts @@ -60,6 +60,7 @@ interface Settings { font: 'inter' | 'system' | 'browser' leftAlign: boolean + hidePhoton: boolean } export const defaultSettings: Settings = { @@ -99,6 +100,7 @@ export const defaultSettings: Settings = { view: 'list', font: 'system', leftAlign: false, + hidePhoton: toBool(env.PUBLIC_HIDE_POWERED_BY) ?? false, } export const userSettings = writable(defaultSettings) diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index 67cbf2ba..ea676f1b 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -16,6 +16,7 @@ import { removalTemplate } from '$lib/components/lemmy/moderation/moderation.js' import { Button, Checkbox, Select } from 'mono-svelte' import ViewSelect from '$lib/components/lemmy/ViewSelect.svelte' + import { LINKED_INSTANCE_URL } from '$lib/instance.js' let data = { loading: false, @@ -169,6 +170,17 @@ bind:selected={$userSettings.leftAlign} /> + {#if LINKED_INSTANCE_URL} + + Disable "powered by" + + Disable the "Powered by Photon" in the top left corner. + + + {$userSettings.hidePhoton ? 'Enabled' : 'Disabled'} + + + {/if} Instances