Merge pull request #174 from pieterdd/ux-tweaks

A few UX tweaks
This commit is contained in:
Xylight authored and GitHub committed 2023-10-18 07:26:14 -07:00
commit e9fa5f6c42
2 files changed
+26 -23

No files matched your search

+7 -5
View File
@@ -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 = ''
</script>
@@ -91,9 +91,11 @@
<Icon mini src={Identification} size="20" />
<span slot="label">Sign Up</span>
</SidebarButton>
<SidebarButton href="/accounts" title="Change Instance">
<Icon mini src={ServerStack} size="20" />
<span slot="label">Change instance</span>
</SidebarButton>
{#if LINKED_INSTANCE_URL === undefined}
<SidebarButton href="/accounts" title="Change Instance">
<Icon mini src={ServerStack} size="20" />
<span slot="label">Change instance</span>
</SidebarButton>
{/if}
{/if}
</nav>
+19 -18
View File
@@ -158,24 +158,25 @@
Sign up
</Button>
</div>
<div class="flex flex-row font-normal gap-2">
<TextInput
label="Guest instance"
on:change={changeGuestInstance}
placeholder="Instance URL"
bind:value={newInstance}
disabled={LINKED_INSTANCE_URL != undefined}
/>
<Button
color="primary"
class="h-max self-end"
size="lg"
{loading}
disabled={loading || LINKED_INSTANCE_URL != undefined}
>
Change
</Button>
</div>
{#if LINKED_INSTANCE_URL === undefined}
<div class="flex flex-row font-normal gap-2">
<TextInput
label="Guest instance"
on:change={changeGuestInstance}
placeholder="Instance URL"
bind:value={newInstance}
/>
<Button
color="primary"
class="h-max self-end"
size="lg"
{loading}
disabled={loading}
>
Change
</Button>
</div>
{/if}
</div>
</div>
{:else}