mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-16 11:50:42 +08:00
Fixes and improvements around org creation
This commit is contained in:
+1
-1
@@ -105,7 +105,7 @@
|
||||
<div class="nav">
|
||||
<a use:link href="/registrations">Register</a>
|
||||
<a use:link href="/vesting/">Vesting</a>
|
||||
{#if config && config.signer && config.network.name === 'ropsten'}
|
||||
{#if session && config && config.signer && config.network.name === 'ropsten'}
|
||||
<a use:link href="/orgs/">Orgs</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="typescript">
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { navigate } from 'svelte-routing';
|
||||
import Modal from '@app/Modal.svelte';
|
||||
import Error from '@app/Error.svelte';
|
||||
import type { Err } from '@app/error';
|
||||
@@ -83,7 +84,7 @@
|
||||
</span>
|
||||
|
||||
<span slot="actions">
|
||||
<button on:click={() => dispatch('close')}>
|
||||
<button on:click={() => navigate(`/orgs/${org.address}`)}>
|
||||
Done
|
||||
</button>
|
||||
</span>
|
||||
|
||||
@@ -4,12 +4,18 @@
|
||||
import { session } from '@app/session';
|
||||
import Create from '@app/base/orgs/Create.svelte';
|
||||
import type { Config } from '@app/config';
|
||||
import Error from '@app/Error.svelte';
|
||||
|
||||
export let config: Config;
|
||||
|
||||
let modal: typeof SvelteComponent = Create;
|
||||
|
||||
$: owner = $session && $session.address;
|
||||
let owner: string | null = $session && $session.address;
|
||||
</script>
|
||||
|
||||
<svelte:component this={modal} {owner} {config} on:close={() => navigate('/')} />
|
||||
{#if owner}
|
||||
<svelte:component this={modal} {owner} {config} on:close={() => navigate('/')} />
|
||||
{:else}
|
||||
<Error on:close={() => window.history.back()}>
|
||||
Not connected.
|
||||
</Error>
|
||||
{/if}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
onMount(async () => {
|
||||
name = await config.provider.lookupAddress(address);
|
||||
registration = await getRegistration(name, config);
|
||||
if (name) registration = await getRegistration(name, config);
|
||||
});
|
||||
|
||||
let setNameForm: typeof SvelteComponent | null = null;
|
||||
|
||||
Reference in New Issue
Block a user