feat: add and fix #148
This commit is contained in:
1 parent
2a0a3d4fbf
commit
e0f4624489
5 files changed
+27
-11
No files matched your search
@@ -11,7 +11,6 @@ An alternative web client for Lemmy with the UI of Xylo
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## Self-hosting
|
## Self-hosting
|
||||||
|
|
||||||
Put Photon on your own domain for easier onboarding.
|
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_NSFW_BLUR | `bool` | true |
|
||||||
| PUBLIC_NEW_VOTE_BUTTONS | `bool` | false |
|
| PUBLIC_NEW_VOTE_BUTTONS | `bool` | false |
|
||||||
| PUBLIC_RANDOM_PLACEHOLDERS | `bool` | true |
|
| 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.
|
The values for `SortType`, `ListingType`, and `CommentSortType` are defined by the lemmy-js-client library.
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
viewBox="0 0 100 100"
|
viewBox="0 0 100 100"
|
||||||
fill="none"
|
fill="none"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
class="inline"
|
||||||
>
|
>
|
||||||
<linearGradient
|
<linearGradient
|
||||||
gradientTransform="rotate(315, 0.5, 0.5)"
|
gradientTransform="rotate(315, 0.5, 0.5)"
|
||||||
|
|||||||
@@ -62,17 +62,18 @@
|
|||||||
<span class="opacity-30 text-xl">/</span>
|
<span class="opacity-30 text-xl">/</span>
|
||||||
<div class="text-sm font-bold inline-flex flex-col">
|
<div class="text-sm font-bold inline-flex flex-col">
|
||||||
<span>{$site.site_view.site.name}</span>
|
<span>{$site.site_view.site.name}</span>
|
||||||
<span
|
{#if !$userSettings.hidePhoton}
|
||||||
class="font-normal text-xs flex items-center gap-1 text-slate-600 dark:text-zinc-400"
|
<span
|
||||||
>
|
class="text-xs flex items-center gap-1 text-slate-600 dark:text-zinc-400 font-normal"
|
||||||
Powered by <Link
|
|
||||||
href="https://github.com/Xyphyn/photon"
|
|
||||||
highlight={false}
|
|
||||||
class="!font-bold flex items-center gap-0.5 hover:underline text-black dark:text-white"
|
|
||||||
>
|
>
|
||||||
<Logo width={12} /> Photon
|
Powered by <a
|
||||||
</Link>
|
href="https://github.com/Xyphyn/photon"
|
||||||
</span>
|
class="font-bold flex items-center gap-0.5 hover:underline text-black dark:text-white"
|
||||||
|
>
|
||||||
|
<Logo width={12} /> Photon
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ interface Settings {
|
|||||||
|
|
||||||
font: 'inter' | 'system' | 'browser'
|
font: 'inter' | 'system' | 'browser'
|
||||||
leftAlign: boolean
|
leftAlign: boolean
|
||||||
|
hidePhoton: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultSettings: Settings = {
|
export const defaultSettings: Settings = {
|
||||||
@@ -99,6 +100,7 @@ export const defaultSettings: Settings = {
|
|||||||
view: 'list',
|
view: 'list',
|
||||||
font: 'system',
|
font: 'system',
|
||||||
leftAlign: false,
|
leftAlign: false,
|
||||||
|
hidePhoton: toBool(env.PUBLIC_HIDE_POWERED_BY) ?? false,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const userSettings = writable(defaultSettings)
|
export const userSettings = writable(defaultSettings)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
import { removalTemplate } from '$lib/components/lemmy/moderation/moderation.js'
|
import { removalTemplate } from '$lib/components/lemmy/moderation/moderation.js'
|
||||||
import { Button, Checkbox, Select } from 'mono-svelte'
|
import { Button, Checkbox, Select } from 'mono-svelte'
|
||||||
import ViewSelect from '$lib/components/lemmy/ViewSelect.svelte'
|
import ViewSelect from '$lib/components/lemmy/ViewSelect.svelte'
|
||||||
|
import { LINKED_INSTANCE_URL } from '$lib/instance.js'
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -169,6 +170,17 @@
|
|||||||
bind:selected={$userSettings.leftAlign}
|
bind:selected={$userSettings.leftAlign}
|
||||||
/>
|
/>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
{#if LINKED_INSTANCE_URL}
|
||||||
|
<Setting>
|
||||||
|
<span slot="title">Disable "powered by"</span>
|
||||||
|
<span slot="description">
|
||||||
|
Disable the "Powered by Photon" in the top left corner.
|
||||||
|
</span>
|
||||||
|
<Checkbox bind:checked={$userSettings.hidePhoton}>
|
||||||
|
{$userSettings.hidePhoton ? 'Enabled' : 'Disabled'}
|
||||||
|
</Checkbox>
|
||||||
|
</Setting>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<SectionTitle class="mt-4">Instances</SectionTitle>
|
<SectionTitle class="mt-4">Instances</SectionTitle>
|
||||||
<Setting>
|
<Setting>
|
||||||
|
|||||||
Reference in new issue
Block a user