Skip to content

Commit 2592303

Browse files
feat(ui): add inline PAT info tooltip inside token field (#348)
1 parent fdcbc53 commit 2592303

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/server/templates/components/git_form.jinja

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,29 @@
145145
name="token"
146146
placeholder="Personal Access Token"
147147
value="{{ token if token else '' }}"
148-
class="py-2 px-2 bg-[#E8F0FE] focus:outline-none w-full rounded">
148+
class="py-2 pl-2 pr-8 bg-[#E8F0FE] focus:outline-none w-full rounded">
149+
<!-- Info icon with tooltip -->
150+
<span class="absolute right-3 top-1/2 -translate-y-1/2">
151+
<!-- Icon -->
152+
<svg class="w-4 h-4 text-gray-600 cursor-pointer peer"
153+
xmlns="http://www.w3.org/2000/svg"
154+
fill="none"
155+
viewBox="0 0 24 24"
156+
stroke="currentColor"
157+
stroke-width="2">
158+
<circle cx="12" cy="12" r="10" />
159+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 16v-4m0-4h.01" />
160+
</svg>
161+
<!-- Tooltip (tooltip listens to peer-hover) -->
162+
<div class="absolute bottom-full mb-2 left-1/2 -translate-x-1/2 bg-gray-900 text-white text-xs leading-tight py-1 px-2 rounded shadow-lg opacity-0 pointer-events-none peer-hover:opacity-100 peer-hover:pointer-events-auto transition-opacity duration-200 whitespace-nowrap">
163+
<ul class="list-disc pl-4">
164+
<li>PAT is never stored in the backend</li>
165+
<li>Used once for cloning, then discarded from memory</li>
166+
<li>No browser caching</li>
167+
<li>Cloned repos are deleted after processing</li>
168+
</ul>
169+
</div>
170+
</span>
149171
</div>
150172
</div>
151173
<!-- Help section -->

0 commit comments

Comments
 (0)