fix: disable guest url if LINKED_INSTANCE_URL is set
This commit is contained in:
1 parent
ad037c9e05
commit
8d2604871b
3 files changed
+17
-5
No files matched your search
@@ -10,7 +10,11 @@
|
||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||
import EditableList from '$lib/components/ui/list/EditableList.svelte'
|
||||
import { ToastType, toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { instance, validateInstance } from '$lib/lemmy.js'
|
||||
import {
|
||||
LINKED_INSTANCE_URL,
|
||||
instance,
|
||||
validateInstance,
|
||||
} from '$lib/lemmy.js'
|
||||
import { ArrowLeftOnRectangle, Icon, Plus, Trash } from 'svelte-hero-icons'
|
||||
import { flip } from 'svelte/animate'
|
||||
|
||||
@@ -70,13 +74,14 @@
|
||||
}}
|
||||
placeholder="Instance URL"
|
||||
bind:value={newInstance}
|
||||
disabled={LINKED_INSTANCE_URL != undefined}
|
||||
/>
|
||||
<Button
|
||||
color="primary"
|
||||
class="h-max self-end"
|
||||
size="lg"
|
||||
{loading}
|
||||
disabled={loading}
|
||||
disabled={loading || LINKED_INSTANCE_URL != undefined}
|
||||
>
|
||||
Change
|
||||
</Button>
|
||||
@@ -168,8 +173,15 @@
|
||||
}}
|
||||
placeholder="Instance URL"
|
||||
bind:value={newInstance}
|
||||
disabled={LINKED_INSTANCE_URL != undefined}
|
||||
/>
|
||||
<Button color="primary" {loading} disabled={loading}>Change</Button>
|
||||
<Button
|
||||
color="primary"
|
||||
{loading}
|
||||
disabled={loading || LINKED_INSTANCE_URL != undefined}
|
||||
>
|
||||
Change
|
||||
</Button>
|
||||
</div>
|
||||
</span>
|
||||
<div class="ml-auto" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// @ts-ignore
|
||||
import { build, files } from '$service-worker'
|
||||
|
||||
const version = '0.4.19'
|
||||
const version = '0.4.20'
|
||||
const timestamp = new Date().toLocaleString('en')
|
||||
const worker = self as unknown as ServiceWorkerGlobalScope
|
||||
const FILES = `cache${timestamp}`
|
||||
|
||||
Reference in new issue
Block a user