@@ -3,6 +3,10 @@ import Container from "../../components/Container";
3import Section from "../../components/Section";
3import Section from "../../components/Section";
4import SingleColumn from "../../components/SingleColumn";
4import SingleColumn from "../../components/SingleColumn";
5import { useInputChange } from "../../lib/hooks";
5import { useInputChange } from "../../lib/hooks";
6+import ob from "urbit-ob";
7+import Sigil from "../../components/Sigil";
8+import Head from "next/head";
9+import Meta from "../../components/Meta";
7const SubmissionPage = () => {
11const SubmissionPage = () => {
8 const [form, handleFormChange] = useInputChange();
12 const [form, handleFormChange] = useInputChange();
@@ -12,13 +16,24 @@ const SubmissionPage = () => {
12 )}.md&value=${encodeURIComponent(
16 )}.md&value=${encodeURIComponent(
14ship = "${form?.ship}"
18ship = "${form?.ship}"
19+nickname = "${form?.nickname}"
20+bgcolor = "${form?.bgcolor}"
21+image = "${form?.image}"
17${form?.description || ""}`
24${form?.description || ""}`
27+ let validColor = /^#[0-9A-F]{6}$/i.test(form?.bgColor)
21 <Container>
32 <Container>
34+ <title>Claim an Urbit ID page • Urbit.org</title>
22 <SingleColumn>
37 <SingleColumn>
23 <Section narrow className="space-y-12">
38 <Section narrow className="space-y-12">
24 <div className="flex flex-col space-y-4">
39 <div className="flex flex-col space-y-4">
@@ -50,14 +65,60 @@ ${form?.description || ""}`
50 <div className="flex flex-col space-y-4">
65 <div className="flex flex-col space-y-4">
51 <h3>Enter your Urbit ID information</h3>
66 <h3>Enter your Urbit ID information</h3>
52 <div className="flex flex-col">
67 <div className="flex flex-col">
53− <p>
68+ <p>Urbit ID (required)</p>
69+ <div className="flex items-center">
72+ className="mr-2 rounded-lg"
74+ style={{ height: 32, width: 32 }}
78+ className="flex p-2 rounded-lg mr-2"
80+ backgroundColor: validColor,
81+ display: form?.ship?.length > 14 ? "none" : "block",
89+ ob.isValidPatp(form?.ship || "") ? form?.ship : "~zod"
95+ className="bg-wall-100 p-2 flex-1"
54− Urbit ID (e.g. <code>~bitbet-bolbel</code>) (required)
97+ placeholder="~bitbet-bolbel"
55− </p>
98+ onChange={handleFormChange}
102+ <div className="flex flex-col">
103+ <p>Nickname (optional)</p>
104+ <input placeholder="Bitbet" className="bg-wall-100 p-2" />
107+ <p>Sigil color (or avatar image)</p>
108+ <div className="flex space-x-2">
110+ placeholder="#000000"
57− className="bg-wall-100 p-2"
112+ className="bg-wall-100 p-2 flex-1"
113+ onChange={handleFormChange}
116+ placeholder="https://..."
58− name="ship"
117+ name="image"
118+ className="bg-wall-100 p-2 flex-1"
59− onChange={handleFormChange}
119+ onChange={handleFormChange}
62 <div className="flex flex-col">
123 <div className="flex flex-col">
63 <p>Hosted groups</p>
124 <p>Hosted groups</p>