misc: hide instance URL in login page if linked instance url

This commit is contained in:
Xyphyn committed 2023-08-19 18:22:11 -07:00
1 parent 9df7dc0604
commit 8ecf656e5f
2 files changed
+15 -13

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "photon-lemmy", "name": "photon-lemmy",
"version": "0.9.13", "version": "0.9.14",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
+14 -12
View File
@@ -72,17 +72,19 @@
}} }}
required required
/> />
<span class="mt-5 font-bold">@</span> {#if !LINKED_INSTANCE_URL}
<TextInput <span class="mt-5 font-bold">@</span>
id="instance_url" <TextInput
label="Instance URL" id="instance_url"
placeholder={DEFAULT_INSTANCE_URL} label="Instance URL"
disabled={LINKED_INSTANCE_URL != undefined} placeholder={DEFAULT_INSTANCE_URL}
bind:value={data.instance} disabled={LINKED_INSTANCE_URL != undefined}
class="flex-1" bind:value={data.instance}
required class="flex-1"
pattern={'(?!-)[A-Za-z0-9-]+([-.]{1}[a-z0-9]+)*.[A-Za-z]{2,6}'} required
/> pattern={'(?!-)[A-Za-z0-9-]+([-.]{1}[a-z0-9]+)*.[A-Za-z]{2,6}'}
/>
{/if}
</div> </div>
<div class="flex flex-row gap-2"> <div class="flex flex-row gap-2">
<TextInput <TextInput
@@ -101,7 +103,7 @@
pattern={'\\d{6}'} pattern={'\\d{6}'}
minlength={6} minlength={6}
maxlength={6} maxlength={6}
class="w-20" class="w-24"
on:input={(e) => { on:input={(e) => {
if (!Number.isInteger(Number(e.detail.data))) { if (!Number.isInteger(Number(e.detail.data))) {
e.preventDefault() e.preventDefault()