···1313)
14141515func init() {
1616- // util.RegisterType("sh.tangled.repo.artifact", &RepoArtifact{})
1616+ util.RegisterType("sh.tangled.repo.artifact", &RepoArtifact{})
1717} //
1818// RECORDTYPE: RepoArtifact
1919type RepoArtifact struct {
···2525 // name: name of the artifact
2626 Name string `json:"name" cborgen:"name"`
2727 // repo: repo that this artifact is being uploaded to
2828- Repo string `json:"repo" cborgen:"repo"`
2828+ Repo *string `json:"repo,omitempty" cborgen:"repo,omitempty"`
2929 RepoDid *string `json:"repoDid,omitempty" cborgen:"repoDid,omitempty"`
3030 // tag: hash of the tag object that this artifact is attached to (only annotated tags are supported)
3131 Tag util.LexBytes `json:"tag,omitempty" cborgen:"tag,omitempty"`
···3737 <p class="text-sm text-gray-500 dark:text-gray-400">A knot hosts repository data. <a href="/settings/knots" class="underline">Learn how to register your own knot.</a></p>
3838 </fieldset>
39394040+ <fieldset class="space-y-3">
4141+ <details>
4242+ <summary class="dark:text-white cursor-pointer select-none">Bring your own DID</summary>
4343+ <div class="mt-2">
4444+ <input
4545+ type="text"
4646+ id="repo_did"
4747+ name="repo_did"
4848+ class="w-full p-2 border rounded bg-gray-100 dark:bg-gray-700 dark:text-white dark:border-gray-600"
4949+ placeholder="did:web:example.com"
5050+ />
5151+ <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">
5252+ Provide a <code>did:web</code> you control to use as this fork's identity.
5353+ You must serve a DID doc on your domain with an <code>atproto_pds</code> service
5454+ endpoint pointing to the selected knot. If left empty, a <code>did:plc</code> will be
5555+ automatically created for you!
5656+ </p>
5757+ </div>
5858+ </details>
5959+ </fieldset>
6060+4061 <div class="space-y-2">
4162 <button type="submit" class="btn-create flex items-center gap-2">
4263 {{ i "git-fork" "w-4 h-4" }}
+26
appview/pages/templates/repo/new.html
···7070 <div class="space-y-2">
7171 {{ template "defaultBranch" . }}
7272 {{ template "knot" . }}
7373+ {{ template "repoDid" . }}
7374 </div>
7475 </div>
7576 </div>
···168169 A knot hosts repository data and handles Git operations.
169170 You can also <a href="/settings/knots" class="underline">register your own knot</a>.
170171 </p>
172172+ </div>
173173+{{ end }}
174174+175175+{{ define "repoDid" }}
176176+ <div>
177177+ <details>
178178+ <summary class="text-sm font-bold uppercase dark:text-white mb-1 cursor-pointer select-none">
179179+ Bring your own DID
180180+ </summary>
181181+ <div class="mt-2">
182182+ <input
183183+ type="text"
184184+ id="repo_did"
185185+ name="repo_did"
186186+ class="w-full dark:bg-gray-700 dark:text-white dark:border-gray-600 border border-gray-300 rounded px-3 py-2"
187187+ placeholder="did:web:example.com"
188188+ />
189189+ <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">
190190+ Provide a <code>did:web</code> you control to use as this repo's identity.
191191+ You must serve a DID doc on your domain with an <code>atproto_pds</code> service
192192+ endpoint pointing to the selected knot. If left empty, a <code>did:plc</code> will be
193193+ automatically created for you!
194194+ </p>
195195+ </div>
196196+ </details>
171197 </div>
172198{{ end }}
173199