Migrate more stuff

This commit is contained in:
Jon Staab
2025-02-03 16:37:14 -08:00
parent 0f705c459a
commit 8d3433b167
150 changed files with 2001 additions and 1205 deletions

View File

@@ -1,4 +1,6 @@
<script lang="ts">
import {preventDefault} from "svelte/legacy"
import {displayRelayUrl} from "@welshman/util"
import Spinner from "@lib/components/Spinner.svelte"
import Button from "@lib/components/Button.svelte"
@@ -10,8 +12,7 @@
import {clearModals} from "@app/modal"
import {attemptRelayAccess} from "@app/commands"
export let url
export let error
let {url, error} = $props()
const back = () => history.back()
@@ -39,14 +40,18 @@
}
}
let claim = ""
let loading = false
let claim = $state("")
let loading = $state(false)
</script>
<form class="column gap-4" on:submit|preventDefault={join}>
<form class="column gap-4" onsubmit={preventDefault(join)}>
<ModalHeader>
<div slot="title">Access Error</div>
<div slot="info">We couldn't connect you to this space.</div>
{#snippet title()}
<div>Access Error</div>
{/snippet}
{#snippet info()}
<div>We couldn't connect you to this space.</div>
{/snippet}
</ModalHeader>
<p>
We received an error from the relay indicating you don't have access to {displayRelayUrl(url)}.
@@ -56,12 +61,18 @@
</p>
<p>If you have one, you can try entering an invite code below to request access.</p>
<Field>
<p slot="label">Invite code</p>
<label class="input input-bordered flex w-full items-center gap-2" slot="input">
<Icon icon="link-round" />
<input bind:value={claim} class="grow" type="text" />
</label>
<p slot="info">Enter an invite code provided to you by the admin of the relay.</p>
{#snippet label()}
<p>Invite code</p>
{/snippet}
{#snippet input()}
<label class="input input-bordered flex w-full items-center gap-2">
<Icon icon="link-round" />
<input bind:value={claim} class="grow" type="text" />
</label>
{/snippet}
{#snippet info()}
<p>Enter an invite code provided to you by the admin of the relay.</p>
{/snippet}
</Field>
<ModalFooter>
<Button class="btn btn-link" on:click={back}>