From 6528ae014fffec0119c4dfcb65685270df9e42f3 Mon Sep 17 00:00:00 2001 From: pieterdd Date: Tue, 17 Oct 2023 20:22:14 +0200 Subject: [PATCH 1/2] Hide instance switcher if locked --- src/routes/accounts/+page.svelte | 37 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/routes/accounts/+page.svelte b/src/routes/accounts/+page.svelte index b74838fe..d776d80c 100644 --- a/src/routes/accounts/+page.svelte +++ b/src/routes/accounts/+page.svelte @@ -158,24 +158,25 @@ Sign up -
- - -
+ {#if LINKED_INSTANCE_URL === undefined} +
+ + +
+ {/if} {:else} From 95a9755c836040e151372e7dca6e60e206677c95 Mon Sep 17 00:00:00 2001 From: pieterdd Date: Tue, 17 Oct 2023 20:28:21 +0200 Subject: [PATCH 2/2] Don't show 'Change instance' when locked to instance --- src/lib/components/ui/sidebar/Sidebar.svelte | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/components/ui/sidebar/Sidebar.svelte b/src/lib/components/ui/sidebar/Sidebar.svelte index c64da021..ffaf439f 100644 --- a/src/lib/components/ui/sidebar/Sidebar.svelte +++ b/src/lib/components/ui/sidebar/Sidebar.svelte @@ -18,7 +18,7 @@ import { flip } from 'svelte/animate' import { expoOut } from 'svelte/easing' import { Button } from 'mono-svelte' - import { DEFAULT_INSTANCE_URL } from '$lib/instance.js' + import { DEFAULT_INSTANCE_URL, LINKED_INSTANCE_URL } from '$lib/instance.js' export let route = '' @@ -91,9 +91,11 @@ Sign Up - - - Change instance - + {#if LINKED_INSTANCE_URL === undefined} + + + Change instance + + {/if} {/if}