From e10957ef946067c6f2b09b53ff22d191e8d37347 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Sun, 30 Jul 2023 11:58:53 -0700 Subject: [PATCH] misc: hide instance setting if LINKED_ISNTANCE_URL is set --- src/routes/settings/+page.svelte | 58 +++++++++++++++++++------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index 97666682..42ae9f5f 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -3,7 +3,13 @@ import TextInput from '$lib/components/input/TextInput.svelte' import Card from '$lib/components/ui/Card.svelte' import { userSettings } from '$lib/settings' - import { authData, instance, user, validateInstance } from '$lib/lemmy.js' + import { + LINKED_INSTANCE_URL, + authData, + instance, + user, + validateInstance, + } from '$lib/lemmy.js' import { Color } from '$lib/ui/colors.js' import Button from '$lib/components/input/Button.svelte' import { ToastType, toast } from '$lib/components/ui/toasts/toasts.js' @@ -48,29 +54,31 @@

Settings

General

- - Instance - Changing this will log you out. -
- -
- + {#if !LINKED_INSTANCE_URL} + + Instance + Changing this will log you out. +
+ +
+ +
-
- + + {/if} Default sort The default sort to use for feeds. @@ -116,7 +124,9 @@ Show compact posts - Show posts with smaller thumbnails and without text bodies. + + Show posts with smaller thumbnails and without text bodies. +