Lead review after the first redesign pass: consent now shows "Connect <real MCP client> to Rithub?" instead of the engine's generic app name, via a consent page of our own plus a same-origin client-side bridge that completes the engine's own grant invisibly (no second consent screen, confirmed the engine does not silently skip it for repeat connections). Error page drops the "go revoke it in Settings" dead end for a generic message + a Try-again that restarts the flow (the scope-mismatch class is now structurally unreachable for this app's fixed scope string). Success drops the pointless Continue button. Same real site header on every page now. /mcp-docs rebuilt again into a real one-click tile grid (copy-to-clipboard with a working fallback, Cursor/VS Code as real deep links) with everything else folded away. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
51 lines
3.1 KiB
Cheetah
51 lines
3.1 KiB
Cheetah
{{/*
|
|
Rithub override of Gitea's templates/user/auth/grant.tmpl (upstream
|
|
v1.23.8). Changes:
|
|
1. (2026-11-18) dropped the
|
|
`{{ctx.Locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML}}`
|
|
line -- see the git history of this file for the full why
|
|
(product-vs-founder brand leak).
|
|
2. (2026-12-01, RIT-ACT, owner: "the consent page is the stock engine
|
|
page... make it a clean Rithub page"): replaced the raw space-
|
|
separated scope-string paragraph and the stock red button with a
|
|
plain one-line summary + an expandable raw-scope detail + the same
|
|
`.ui.primary.button` every other real CTA on the site already uses
|
|
(near-black, not red -- see theme-rithub.css --color-primary).
|
|
3. (2026-12-01, lead review, same day): dropped the second logo under
|
|
the title (the real nav above the page already has one -- this is
|
|
the engine's own real page, `base/head`/`base/footer`, not a
|
|
standalone shell, so it was a literal duplicate) and the raw-URL
|
|
`auth.authorize_redirect_notice` line. Button relabeled Allow (with
|
|
a check icon, matching apps/rithub-mcp-oauth's own consent page --
|
|
this is the ONE stock-engine screen a brand-new account still sees
|
|
once, for whichever app is actually asking; every repeat connection,
|
|
the engine skips this page entirely once a matching grant exists).
|
|
Card is now vertically centered (see .rithub-grant-box in
|
|
theme-rithub.css) the same way as every other page in this flow.
|
|
*/}}
|
|
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content ui one column stackable center aligned page grid rithub-grant-box">
|
|
<div class="column seven wide">
|
|
<div class="rithub-grant-card">
|
|
<h1 class="rithub-grant-title">{{ctx.Locale.Tr "auth.authorize_title" .Application.Name}}</h1>
|
|
{{template "base/alert" .}}
|
|
<p class="rithub-grant-summary">Read and write your repos, issues and packages.</p>
|
|
<details class="rithub-grant-detail">
|
|
<summary>What this includes</summary>
|
|
<p>{{.Scope}}</p>
|
|
</details>
|
|
<form method="post" action="{{AppSubUrl}}/login/oauth/grant" class="rithub-grant-actions">
|
|
{{.CsrfTokenHtml}}
|
|
<input type="hidden" name="client_id" value="{{.Application.ClientID}}">
|
|
<input type="hidden" name="state" value="{{.State}}">
|
|
<input type="hidden" name="scope" value="{{.Scope}}">
|
|
<input type="hidden" name="nonce" value="{{.Nonce}}">
|
|
<input type="hidden" name="redirect_uri" value="{{.RedirectURI}}">
|
|
<button type="submit" id="authorize-app" name="granted" value="true" class="ui primary button"><svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path fill="currentColor" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8m1.5 0a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0m10.28-1.72-4.5 4.5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 0 1 .018-1.042.75.75 0 0 1 1.042-.018l1.47 1.47 3.97-3.97a.75.75 0 0 1 1.042.018.75.75 0 0 1 .018 1.042"/></svg> Allow</button>
|
|
<button type="submit" name="granted" value="false" class="ui basic button">{{ctx.Locale.Tr "cancel"}}</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|