~gitpocket/gitpocket

8
9964e9d0dda454f20256e9df8cb7ff2f59cb8d25
mainfeed-discovery
gitpocket/web/templates/import.tmpl -rw-r--r--2.2 KiB ViewLogBlameView rawPermalink 9964e9d0dd feat(mirror): add pull and push mirrors with sealed credentials 16 hours ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{{define "content"}}
<h3>Import a repository</h3>
<p class="muted">Branches and tags are copied from GitHub, GitLab, Gitea, Forgejo, Codeberg or any https clone URL. Issues and pull requests stay where they are.</p>
<form method="post" action="/import" class="twocol">
<div>
<label>Clone URL <input name="source" type="url" required autofocus placeholder="https://github.com/owner/repo" value="{{.Data.Source}}"></label>
<label>Access token <span class="muted">(private sources only)</span><input name="token" type="password" autocomplete="off" placeholder="Personal access token with read access"><small>Used once for this import and never stored, unless the import is a mirror.</small></label>
{{with .Data.Orgs}}<label>Owner <select name="owner"><option value="{{$.User.Name}}">~{{$.User.Name}}</option>{{range .}}<option value="{{.Name}}"{{if eq .Name $.Data.Owner}} selected{{end}}>~{{.Name}}</option>{{end}}</select></label>{{end}}
<label>Repository name <input name="name" pattern="[a-z0-9][a-z0-9_.-]{0,38}" placeholder="Taken from the URL when left empty" value="{{.Data.Name}}"></label>
<label>Description <input name="description" maxlength="200" value="{{.Data.Description}}"></label>
<label class="check"><input type="checkbox" name="mirror"{{if .Data.Mirror}} checked{{end}}> Keep it as a read only mirror<small>Fetches the source again on a schedule. A token given here is stored encrypted for those fetches.</small></label>
<label>Sync every <select name="hours">{{range .Data.Intervals}}<option value="{{.}}"{{if eq . 8}} selected{{end}}>{{.}} hours</option>{{end}}</select></label>
<div class="actions"><button class="btn primary">Import repository ▸</button></div>
</div>
<div>
<span class="legend">Visibility</span>
<label class="radio"><input type="radio" name="visibility" value="public" checked> Public<small>Shown on your profile and listed in the public index</small></label>
<label class="radio"><input type="radio" name="visibility" value="unlisted"> Unlisted<small>Visible to anyone who knows the URL, but not shown on your profile</small></label>
<label class="radio"><input type="radio" name="visibility" value="private"> Private<small>Only visible to you</small></label>
</div>
</form>
{{end}}