Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ async def head_root() -> HTMLResponse:
return HTMLResponse(content=None, headers={"content-type": "text/html; charset=utf-8"})


@app.get("/api/", response_class=HTMLResponse)
@app.get("/api", response_class=HTMLResponse)
async def api_docs(request: Request) -> HTMLResponse:
"""Render the API documentation page.
Expand Down
34 changes: 34 additions & 0 deletions src/server/templates/components/git_form.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@
</div>
<!-- Help section -->
<div class="mt-2 flex items-center space-x-1">
<!-- Help button to open modal -->
<div class="mt-1">
<button type="button"
class="text-sm text-blue-500 underline hover:text-blue-700"
onclick="document.getElementById('pat-modal').classList.remove('hidden')">
❓ How is my token used?
</button>
</div>
<a href="https://github.com/settings/tokens/new?description=gitingest&scopes=repo"
target="_blank"
rel="noopener noreferrer"
Expand All @@ -167,6 +175,32 @@
</div>
</div>
</div>
<!-- Modal for PAT Help -->
<div id="pat-modal"
class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="bg-white rounded-xl p-6 w-11/12 max-w-md shadow-[4px_4px_0_#000] border-[3px] border-gray-900">
<h2 class="text-lg font-semibold mb-4 text-gray-900">About Your GitHub Token</h2>
<ul class="list-disc list-inside text-gray-800 text-sm space-y-2">
<li>
<strong>Your Personal Access Token is never stored on our servers or in any database, ensuring complete token privacy.</strong>
</li>
<li>
<strong>It is used only once during the cloning process and is immediately discarded after use.</strong>
</li>
<li>
<strong>The token is not cached or saved in the browser's local storage or memory, preventing any unintended exposure on the client side.</strong>
</li>
</ul>
<div class="relative w-fit group ml-auto">
<div class="w-full h-full rounded bg-gray-800 translate-y-1 translate-x-1 absolute inset-0 z-10"></div>
<button type="button"
onclick="document.getElementById('pat-modal').classList.add('hidden')"
class="py-2.5 px-5 group-hover:-translate-y-px group-hover:-translate-x-px ease-out duration-300 z-20 relative border-[3px] border-gray-900 font-medium bg-[#ffc480] text-gray-900 rounded">
Got it
</button>
</div>
</div>
</div>
</form>
<!-- Example repositories section -->
{% if show_examples %}
Expand Down