- {#if config.network.name === "homestead"}
-
+
diff --git a/src/base/registrations/Index.svelte b/src/base/registrations/Index.svelte
index eb6c0ed41..ba27b1dce 100644
--- a/src/base/registrations/Index.svelte
+++ b/src/base/registrations/Index.svelte
@@ -8,102 +8,108 @@
export let config: Config;
let input = "";
+ let valid: boolean = false;
+ let validationMessage: string | undefined = undefined;
function register() {
- navigate(`/registrations/${label}/form`);
+ if (!valid) {
+ return;
+ }
+ navigate(`/registrations/${ensName}/form`);
}
- function validate(input: string): string[] {
- const errors: string[] = [];
+ function validate(input: string) {
+ if (input === "") {
+ return { valid: false };
+ }
if (input && input.includes(".")) {
- errors.push("Please do not use dots as separators.");
+ return {
+ valid: false,
+ validationMessage: "Please do not use dots as separators.",
+ };
}
if (input && input.length < 2) {
- errors.push("Please enter a minimum of 2 characters.");
+ return {
+ valid: false,
+ validationMessage: "Please enter a minimum of 2 characters.",
+ };
}
if (input && input.length > 128) {
- errors.push("Please enter a maximum of 128 characters.");
+ return {
+ valid: false,
+ validationMessage: "Please enter a maximum of 128 characters.",
+ };
}
- return errors;
+ return { valid: true };
}
- $: label = input.trim();
- $: errors = validate(label);
+ $: ensName = input.trim();
+ $: ({ valid, validationMessage } = validate(ensName));
- Radicle: Register
+ Radicle – Register
-
-
-{:else}
-
- To get RAD tokens on
- {config.network.name}
-
- , please check the known exchanges.
-
- {:else if !$session}
-
- To get RAD tokens on
- {config.network.name}
-
- , please connect your wallet.
-
- {:else}
-
- Obtain RAD tokens on
- {config.network.name}
-
-
-
-
- {/if}
+
-
- {#if error}
-
- (error = "")} />
-
-
-
- {error}
-
- {/if}
-
+ Obtain RAD tokens on
+ {config.network.name}
+
+
+ {#if config.network.name === "homestead"}
+
+ {:else if !$session}
+
+ To get RAD tokens on
+ {config.network.name}
+
+ ,
+
+ please connect your wallet. +
+ {:else}
+ + please connect your wallet. +
+ {
+ withdraw(amount);
+ }}
+ bind:value={amount}
+ {valid}
+ {loading} />
+
+
+
+ {/if}
-
-{:else if state === State.Proposed && org}
+{:else if state === "proposed" && org}
- Register a {config.registrar.domain}
- name
-
-
- Register a unique name with our ENS registrar, under the
- radicle.eth
-
- domain (e.g. cloudhead.radicle.eth). Radicle names never expire and free
- to register.
-
-
-
-
-
- .{config.registrar.domain}
-
-
- {#if errors}
-
+
+
- {#each errors as error}
-
- {/if}
-
+{error}
- {/each}
-
+ Register a {config.registrar.domain}
+ name
+
-
-
+ Register a unique name with our ENS registrar, under
+ the + radicle.eth + domain (e.g. cloudhead.radicle.eth). +
+ Radicle names never expire and free to register. +
+
+ + the + radicle.eth + domain (e.g. cloudhead.radicle.eth). +
+ Radicle names never expire and free to register. +
+
+
+ .{config.registrar.domain}
+
+
+
+
diff --git a/src/base/vesting/Index.svelte b/src/base/vesting/Index.svelte
index fa7bd86b3..374687b7f 100644
--- a/src/base/vesting/Index.svelte
+++ b/src/base/vesting/Index.svelte
@@ -1,52 +1,78 @@
-{#if state === State.Success && newOwner}
+{#if state === "success" && newOwner}
✅
@@ -96,7 +116,7 @@
🪴
@@ -118,63 +138,80 @@
🔑
Transfer ownership
- {#if state === State.Signing}
+
+
+
+
+
+
+
+ 🔑
+
+
+ Transfer ownership
+
+ {#if state === "signing"}
Please confirm the transaction in your wallet.
- {:else if state === State.Pending}
+ {:else if state === "pending"}
Waiting for transaction to be processed…
- {:else if state === State.Proposing && org}
+ {:else if state === "proposing" && org}
Proposal is being submitted to the safe
{formatAddress(org.owner)}
, please sign the transaction in your wallet.
- {:else if state === State.Idle}
+ {:else if state === "idle"}
Transfer the ownership of Org
{formatAddress(org.address)}
to a new address.
- {:else if state === State.Failed}
-
- {error}
-
{/if}
- {#if state === State.Idle}
-
-
+ {#if state === "idle"}
+
- {:else if state === State.Failed}
-
{/if}
+
- {:else if state === State.Pending || state === State.Proposing || state === State.Signing}
+ {:else if state === "pending" || state === "proposing" || state === "signing"}
+
+
- {#if state === State.Signing}
+ {#if state === "signing"}
- {:else if state === State.Pending}
+ {:else if state === "pending"}
- {:else if state === State.Failed}
-
{:else}
-