mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-19 14:17:20 +02:00
fix: polish explorer, error states and page alignment
- Explorer: 13px code, page-coloured dark editor, padded Markdown with a readable width, full repository ID on hover, sidebar footer kept clear of the floating Ko-fi button. - Explorer errors render as a card with links home and to the FAQ; the empty action bar and Raw/Download buttons are hidden. - Unknown error codes show the generic message instead of the raw ERRORS.<code> key. - All app pages share one content column; New anonymization starts at the top instead of floating mid-screen. - Status page: spaced action buttons, aligned status pill, no second Ko-fi embed under the support cards. - Claim placeholders; consistent notebook option on new conferences. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9d5dc2b229
commit
f8b2ea38a1
12 files changed
+98
-68
No files matched your search
@@ -10,14 +10,14 @@
|
||||
<form class="form needs-validation" name="claimForm" novalidate v-form="viewState" @submit.prevent="submitForm($event, () => { claim() })">
|
||||
<div class="form-group">
|
||||
<label class="paper-field-label" for="repoUrl">GitHub repository URL</label>
|
||||
<input type="text" class="form-control" name="repoUrl" id="repoUrl" required v-field="{ state: viewState, set: value => { repoUrl = value }, value: repoUrl, form: "claimForm", options: {} }" :class="{'is-invalid': claimForm?.repoUrl?.invalid && (claimForm?.repoUrl?.touched || claimForm?.submitted)}">
|
||||
<input type="text" class="form-control" name="repoUrl" id="repoUrl" placeholder="https://github.com/owner/repository" required v-field="{ state: viewState, set: value => { repoUrl = value }, value: repoUrl, form: "claimForm", options: {} }" :class="{'is-invalid': claimForm?.repoUrl?.invalid && (claimForm?.repoUrl?.touched || claimForm?.submitted)}">
|
||||
<div class="invalid-feedback" v-show="claimForm?.repoUrl?.errors?.not_found">
|
||||
No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub.
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="paper-field-label" for="repoId">Anonymized repository ID</label>
|
||||
<input type="text" class="form-control" name="repoId" id="repoId" required v-field="{ state: viewState, set: value => { repoId = value }, value: repoId, form: "claimForm", options: {} }" :class="{'is-invalid': claimForm?.repoId?.invalid && (claimForm?.repoId?.touched || claimForm?.submitted)}">
|
||||
<input type="text" class="form-control" name="repoId" id="repoId" placeholder="e.g. my-paper-7F2A" aria-describedby="idHelp" required v-field="{ state: viewState, set: value => { repoId = value }, value: repoId, form: "claimForm", options: {} }" :class="{'is-invalid': claimForm?.repoId?.invalid && (claimForm?.repoId?.touched || claimForm?.submitted)}">
|
||||
<small id="idHelp" class="form-text text-muted">The ID is the last part of the anonymized URL: <code>anonymous.4open.science/r/<ID></code>.</small>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="leftCol-project-header">
|
||||
<span class="project-name" v-text="repoId"></span>
|
||||
<span class="project-name" v-text="repoId" :title="repoId"></span>
|
||||
<span class="project-file-count">{{ fileCounts?.[''] || files?.length }} files</span>
|
||||
</div>
|
||||
<div class="leftCol-body">
|
||||
@@ -53,7 +53,7 @@
|
||||
<div class="leftCol-backdrop" v-show="files?.length && !sidebarCollapsed" @click="sidebarCollapsed = true"></div>
|
||||
|
||||
<div class="explorer-main">
|
||||
<div class="status-bar">
|
||||
<div class="status-bar" v-show="type != 'error'">
|
||||
<ol class="breadcrumb paths" aria-label="Path">
|
||||
<li class="breadcrumb-item" v-for="(p, index) in paths" v-text="p"></li>
|
||||
</ol>
|
||||
@@ -67,8 +67,8 @@
|
||||
<svg class="ui-icon" aria-hidden="true"><use :href="showSource ? '#project-icon-eye' : '#ui-icon-code'"></use></svg><span class="d-none d-md-inline">
|
||||
{{ showSource ? "Rendered" : "Source" }}</span>
|
||||
</button>
|
||||
<a target="_self" class="btn btn-sm" aria-label="View raw current file" title="View the raw content of the current file" v-show="content != null" :href="safeUrl((url))"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-file"></use></svg><span class="d-none d-md-inline"> Raw</span></a>
|
||||
<a target="_self" class="btn btn-sm" aria-label="Download current file" title="Download the current file" v-show="content != null" :href="safeUrl((url) + "&download=true")"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-download"></use></svg><span class="d-none d-md-inline"> Download</span></a>
|
||||
<a target="_self" class="btn btn-sm" aria-label="View raw current file" title="View the raw content of the current file" v-show="content != null && type != 'error' && type != 'rate_limited'" :href="safeUrl((url))"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-file"></use></svg><span class="d-none d-md-inline"> Raw</span></a>
|
||||
<a target="_self" class="btn btn-sm" aria-label="Download current file" title="Download the current file" v-show="content != null && type != 'error' && type != 'rate_limited'" :href="safeUrl((url) + "&download=true")"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-download"></use></svg><span class="d-none d-md-inline"> Download</span></a>
|
||||
<a target="_self" class="btn btn-sm" aria-label="Download full repository as ZIP" title="Download the full repository as a ZIP archive" v-if="options?.download" :href="safeUrl("/api/repo/" + (repoId) + "/zip")"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-archive"></use></svg><span class="d-none d-md-inline"> Full repo ZIP</span></a>
|
||||
<a target="_self" class="btn btn-sm" aria-label="Website" v-if="options?.hasWebsite" :href="safeUrl("/w/" + (repoId) + "/")"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-globe"></use></svg><span class="d-none d-md-inline"> Website</span></a>
|
||||
</div>
|
||||
|
||||
@@ -108,7 +108,8 @@
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="notebook" name="notebook" v-field="{ state: viewState, set: value => { options.options.notebook = value }, value: options?.options?.notebook, form: "conference", options: {} }">
|
||||
<label class="form-check-label" for="notebook">Display Notebooks</label>
|
||||
<label class="form-check-label" for="notebook">Display notebooks</label>
|
||||
<small class="form-text text-muted">Render Jupyter notebooks instead of raw JSON.</small>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -19,7 +19,17 @@
|
||||
<p class="paper-error-msg">This repository will be available in <strong>{{ rateLimitCountdown }}</strong>. The page will reload automatically.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-error container d-flex h-100" v-if="type == 'error'"><h1 class="paper-empty-title m-auto" v-text="fmt.translate("ERRORS." + (content))">Error</h1></div>
|
||||
<div class="file-error container d-flex h-100" v-if="type == 'error'">
|
||||
<div class="paper-error-card file-error-card m-auto" role="alert">
|
||||
<div class="paper-error-eyebrow">Unavailable</div>
|
||||
<div class="paper-error-title">This content can’t be shown</div>
|
||||
<p class="file-error-msg" v-text="fmt.translate("ERRORS." + (content))"></p>
|
||||
<div class="file-error-actions">
|
||||
<a href="/" class="btn btn-sm">Back to home</a>
|
||||
<a href="/faq" class="btn btn-sm">Read the FAQ</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-error container d-flex h-100" v-if="type == 'loading' && !error"><h1 class="paper-empty-title m-auto">Loading…</h1></div>
|
||||
<div class="file-error container d-flex h-100" v-if="type == 'empty'"><h1 class="paper-empty-title m-auto">Empty <em>repository</em>.</h1></div>
|
||||
<div class="file-error container d-flex h-100" v-if="content == null && type != 'empty'"><h1 class="paper-empty-title m-auto">Empty <em>file</em>.</h1></div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="container paper-page status-page">
|
||||
<div class="paper-crumbs">Anonymization / <span class="here">Status</span></div>
|
||||
<div class="d-flex align-items-end justify-content-between flex-wrap" style="gap: 12px;">
|
||||
<div class="d-flex align-items-center justify-content-between flex-wrap" style="gap: 12px;">
|
||||
<div>
|
||||
<h1 class="paper-page-title">Status of <em>{{ repoId }}</em></h1>
|
||||
<p class="paper-page-lede">Track progress as your anonymization is prepared.</p>
|
||||
@@ -106,9 +106,5 @@
|
||||
<span class="paper-support-cta">GitHub Sponsors <svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-arrow-right"></use></svg></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="paper-kofi-wrap">
|
||||
<iframe id="kofiframe" src="https://ko-fi.com/tdurieux/?hidefeed=true&widget=true&embed=true&preview=true" title="tdurieux" loading="lazy"></iframe>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
Reference in new issue
Block a user