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
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "photon-lemmy",
|
"name": "photon-lemmy",
|
||||||
"version": "0.4.19",
|
"version": "0.4.20",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
|
|||||||
@@ -10,7 +10,11 @@
|
|||||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||||
import EditableList from '$lib/components/ui/list/EditableList.svelte'
|
import EditableList from '$lib/components/ui/list/EditableList.svelte'
|
||||||
import { ToastType, toast } from '$lib/components/ui/toasts/toasts.js'
|
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 { ArrowLeftOnRectangle, Icon, Plus, Trash } from 'svelte-hero-icons'
|
||||||
import { flip } from 'svelte/animate'
|
import { flip } from 'svelte/animate'
|
||||||
|
|
||||||
@@ -70,13 +74,14 @@
|
|||||||
}}
|
}}
|
||||||
placeholder="Instance URL"
|
placeholder="Instance URL"
|
||||||
bind:value={newInstance}
|
bind:value={newInstance}
|
||||||
|
disabled={LINKED_INSTANCE_URL != undefined}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
color="primary"
|
color="primary"
|
||||||
class="h-max self-end"
|
class="h-max self-end"
|
||||||
size="lg"
|
size="lg"
|
||||||
{loading}
|
{loading}
|
||||||
disabled={loading}
|
disabled={loading || LINKED_INSTANCE_URL != undefined}
|
||||||
>
|
>
|
||||||
Change
|
Change
|
||||||
</Button>
|
</Button>
|
||||||
@@ -168,8 +173,15 @@
|
|||||||
}}
|
}}
|
||||||
placeholder="Instance URL"
|
placeholder="Instance URL"
|
||||||
bind:value={newInstance}
|
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>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<div class="ml-auto" />
|
<div class="ml-auto" />
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { build, files } from '$service-worker'
|
import { build, files } from '$service-worker'
|
||||||
|
|
||||||
const version = '0.4.19'
|
const version = '0.4.20'
|
||||||
const timestamp = new Date().toLocaleString('en')
|
const timestamp = new Date().toLocaleString('en')
|
||||||
const worker = self as unknown as ServiceWorkerGlobalScope
|
const worker = self as unknown as ServiceWorkerGlobalScope
|
||||||
const FILES = `cache${timestamp}`
|
const FILES = `cache${timestamp}`
|
||||||
|
|||||||
Reference in new issue
Block a user