mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-14 00:07:00 +01:00
88 lines
6.3 KiB
HTML
88 lines
6.3 KiB
HTML
<div class="repository-task status-page">
|
||
<div class="paper-crumbs"><a href="/dashboard">My work</a> / Repository</div>
|
||
<h1>Prepare your anonymous review link</h1>
|
||
<p class="task-lede">{{ repo?.status === 'ready' ? 'Your repository is ready to share.' : 'Your settings are saved. Track preparation before sharing the link.' }}</p>
|
||
<ol class="task-trail" aria-label="Repository progress"><li>1. Repository</li><li>2. Review and hosting</li><li aria-current="step">3. Review link</li></ol>
|
||
<div class="task-columns">
|
||
<section class="task-preparation" aria-label="Repository preparation">
|
||
<div class="task-ready" v-if="repo?.status === 'ready'" role="status"><strong>Your review link is ready</strong></div>
|
||
<h2>{{ repoId }}</h2>
|
||
<p v-if="repo?.status === 'ready'">Share the link with reviewers. They do not need to sign in.</p>
|
||
<p v-if="error" class="text-danger" role="alert">Unable to load repository status. <button type="button" class="task-text-button" @click="getStatus()">Try again</button></p>
|
||
|
||
<p class="paper-section-copy" v-if="repo?.status !== 'ready'">
|
||
The repository will take a few minutes to get ready, depending on its
|
||
size. Visit the <a href="/faq">FAQ</a> for more information.
|
||
</p>
|
||
|
||
<div class="paper-ratelimit-card" role="status" v-if="rateLimitResetAt">
|
||
<div class="paper-ratelimit-head">
|
||
<svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-hourglass"></use></svg>
|
||
<div>
|
||
<div class="paper-error-eyebrow">Temporarily paused</div>
|
||
<div class="paper-error-title">GitHub API rate limit reached</div>
|
||
</div>
|
||
</div>
|
||
<p class="paper-error-msg">Anonymization will resume automatically in <strong>{{ rateLimitCountdown }}</strong>. No action needed — the job is queued and will continue where it left off.</p>
|
||
</div>
|
||
|
||
<div class="paper-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" v-if="repo?.status !== 'ready' && repo?.status != 'error' && !rateLimitResetAt" :class="{'paper-progress-ready': repo?.status == 'ready'}" :aria-valuenow="(progress)">
|
||
<div class="paper-progress-bar" :style=""width: " + (progress) + "%;""></div>
|
||
<div class="paper-progress-label">
|
||
<span v-text="fmt?.title(repo?.status)"></span><span v-if="repo?.statusMessage"> · <span v-text="repo?.statusMessage"></span></span>
|
||
<span class="paper-progress-pct">{{ progress || 0 }}%</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="paper-error-card" role="alert" v-if="repo?.status == 'error' && !rateLimitResetAt">
|
||
<div class="paper-error-head">
|
||
<svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-warning"></use></svg>
|
||
<div>
|
||
<div class="paper-error-eyebrow">Anonymization failed</div>
|
||
<div class="paper-error-title">Something went wrong while preparing this repository.</div>
|
||
</div>
|
||
</div>
|
||
<p class="paper-error-msg" v-if="repo?.statusMessage">{{ fmt?.translate('ERRORS.' + repo?.statusMessage) }}</p>
|
||
<p class="paper-error-msg" v-if="!repo?.statusMessage">No additional details were reported. The most common causes are private repositories, missing branches, and rate limits.</p>
|
||
<p v-if="repo?.statusMessage === 'quota_exceeded'"><a :href="safeUrl('/anonymize/' + repoId)">Review this repository’s hosting</a>, then retry preparation.</p>
|
||
<ul class="paper-error-hints">
|
||
<li>Make sure the source URL points to a repository or pull request you can access.</li>
|
||
<li>Check that the chosen branch and commit still exist on GitHub.</li>
|
||
<li>If you just signed in, the access token may need a moment to propagate — try again.</li>
|
||
</ul>
|
||
<div class="paper-error-actions">
|
||
<a class="btn btn-ink" :href="safeUrl("/anonymize/" + (repoId))"><svg class="ui-icon mr-1" aria-hidden="true"><use href="#ui-icon-edit"></use></svg> Edit anonymization</a>
|
||
<a class="btn" href="/faq"><svg class="ui-icon mr-1" aria-hidden="true"><use href="#ui-icon-help"></use></svg> Read the FAQ</a>
|
||
<a class="btn" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon mr-1" aria-hidden="true"><use href="#ui-icon-bug"></use></svg> Report a bug in Anonymous GitHub</a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="share-link" v-if="repo?.status == 'ready'">
|
||
<p class="paper-section-copy">Reviewers can browse the repository at this address without seeing who you are.</p>
|
||
<div class="share-link-row">
|
||
<input id="share-url" class="form-control share-link-input" readonly aria-label="Anonymous link" :value="shareUrl" @focus="$event.target.select()">
|
||
<button type="button" class="btn btn-ink" @click="copyShareUrl()">
|
||
<svg class="ui-icon" aria-hidden="true"><use :href="copied ? '#ui-icon-check' : '#project-icon-copy'"></use></svg>
|
||
<span aria-live="polite" v-text="copied ? 'Copied' : 'Copy link'"></span>
|
||
</button>
|
||
</div>
|
||
<div class="share-link-actions">
|
||
<a class="btn" target="_self" :href="safeUrl("/r/" + (repoId) + "/")">
|
||
<svg class="ui-icon" aria-hidden="true"><use href="#project-icon-eye"></use></svg> Open repository
|
||
</a>
|
||
<a class="btn" target="_self" v-if="repo?.options?.page" :href="safeUrl("/w/" + (repoId) + "/")">
|
||
<svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-globe"></use></svg> Open GitHub page
|
||
</a>
|
||
</div>
|
||
</div>
|
||
|
||
</section>
|
||
|
||
<aside class="task-summary" aria-label="Repository summary">
|
||
<h3>{{ repoId }}</h3>
|
||
<dl><dt>Source</dt><dd>{{ repo?.source?.fullName ? 'https://github.com/' + repo.source.fullName : 'Loading…' }}</dd><dt>Lifetime</dt><dd>{{ repo?.options?.expirationMode === 'never' ? 'Never expire while subscribed' : repo?.options?.expirationDate ? 'Until ' + fmt.date(repo.options.expirationDate) : 'Loading…' }}</dd><dt>Review access</dt><dd>Anonymous and free</dd></dl>
|
||
<div class="task-summary-foot"><strong>{{ repo?.status === 'ready' ? 'Ready to share' : 'Repository preparation' }}</strong><p>Coauthors do not each need a subscription.</p></div>
|
||
</aside>
|
||
</div>
|
||
</div>
|