This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / appview / pages / templates / account / migrate / fromGitHub.html
3.2 kB 99 lines
1{{ define "title" }}Migrate repositories from GitHub{{ end }} 2 3{{ define "content" }} 4 <div class="mt-6 mb-4"> 5 <h1 class="font-medium"> 6 {{ i "import" "size-5 inline m-0.5" }} 7 Migrate repositories 8 </h1> 9 </div> 10 <div class="flex gap-3 p-3 my-4 rounded-md bg-yellow-50 dark:bg-yellow-900/50"> 11 <div class="flex items-center px-1 text-yellow-700 dark:text-yellow-400"> 12 {{ i "badge-info" "size-6" }} 13 </div> 14 <p>Migration covers your repos and commit history.<br>Issues and PRs aren't part of the import yet.</p> 15 </div> 16 <div class="bg-white dark:bg-gray-800 p-8 pb-0 rounded w-full mx-auto drop-shadow-sm dark:text-white"> 17 {{ template "step-1" . }} 18 {{ template "step-2" . }} 19 20 <span id="migrate-error" class="error"></span> 21 22 {{ if not .Knots }} 23 <p class="text-gray-500 dark:text-gray-400"> 24 You aren't a member of any knot yet. Join or register a knot first. 25 </p> 26 {{ end }} 27 28 </div> 29{{ end }} 30 31{{ define "step-1" }} 32 <div class="flex relative border-l border-gray-200 dark:border-gray-700 ml-3 pl-7"> 33 <div class="absolute -left-3 -top-0"> 34 {{ template "numberCircle" 1 }} 35 </div> 36 37 <!-- Content column --> 38 <form 39 hx-post="/account/migrate/listGitHubRepos" 40 hx-target="#source-repos" 41 hx-swap="innerHTML" 42 class="flex-1 min-w-0 pb-12 space-y-3" 43 > 44 45 <h2 class="text-lg font-semibold uppercase dark:text-white">Connect Your Account</h2> 46 <div class="flex gap-3 w-full"> 47 <input 48 id="username" 49 type="text" 50 name="username" 51 required 52 placeholder="github-username" 53 class="flex-1 py-2" 54 /> 55 <button type="submit" class="btn"> 56 Load repos 57 {{ i "loader-circle" "size-4 animate-spin hidden group-[.htmx-request]:inline" }} 58 </button> 59 </div> 60 </form> 61 </div> 62{{ end }} 63 64{{ define "step-2" }} 65 <div class="flex relative border-l border-gray-200 dark:border-gray-700 ml-3 pl-7"> 66 <div class="absolute -left-3 -top-0"> 67 {{ template "numberCircle" 2 }} 68 </div> 69 70 <!-- Content column --> 71 <div class="flex-1 min-w-0 pb-12 space-y-3"> 72 <div class="flex flex-wrap items-center justify-between gap-3"> 73 <h2 class="text-lg font-semibold uppercase">Choose &amp; Configure Repositories</h2> 74 <div class="ml-auto h-7 flex items-center"> 75 <button 76 class="btn-flat flex items-center gap-2" 77 onclick="document.querySelectorAll('input[name^=selected_]').forEach(c => c.checked = !c.checked)" 78 > 79 {{ i "check-check" "size-4" }} 80 Select all repositories 81 </button> 82 </div> 83 </div> 84 <div id="source-repos"> 85 <!-- 86 <p class="text-gray-500 dark:text-gray-400 mb-4">No repositories yet, connect your account first</p> 87 --> 88 89 {{ template "account/migrate/fragments/repoList" . }} 90 </div> 91 </div> 92 </div> 93{{ end }} 94 95{{ define "numberCircle" }} 96 <div class="size-7 bg-gray-200 dark:bg-gray-600 rounded-full flex items-center justify-center font-medium"> 97 {{.}} 98 </div> 99{{ end }}