This commit is contained in:
maurice committed 2026-11-14 18:25:54 +01:00
1 parent b444b5759d
commit a3067b011d
8 files changed
+123 -110

No files matched your search

+18 -16
View File
@@ -89,15 +89,6 @@
<p class="hint">If a custom ID is taken, you'll get a fresh one. Always use the link returned after saving.</p>
</aside>
</div>
<section id="share-result" class="card result" aria-labelledby="result-title" hidden>
<p class="eyebrow">READY TO SHARE</p>
<h2 id="result-title">Your link</h2>
<div class="copy-row">
<input id="share-url" aria-label="Share URL" readonly>
<button id="copy-url" type="button" class="secondary">Copy link</button>
</div>
<p><a id="share-link" target="_blank" rel="noopener noreferrer">Open share ↗</a> <span class="hint">Opening counts as a view.</span></p>
</section>
</section>
<section id="collection" class="panel card" aria-labelledby="collection-title" hidden>
@@ -120,15 +111,26 @@
<p class="muted">Have an ID or a Pastable link? Open it here.</p>
<form id="open-form">
<label>ID or share URL<input id="open-id" placeholder="my-paste or a full share URL" required autocomplete="off"></label>
<div class="form-grid">
<label>Type<select id="open-kind"><option value="note">Text or code</option><option value="url">Short link</option></select></label>
<label id="format-field">Display<select id="open-format"><option value="html">Syntax highlighted</option><option value="plain">Plain text</option></select></label>
</div>
<button type="submit" id="open-submit">Open paste</button>
<p class="hint">Opening a paste or following a link counts as a view. Short links open in a new tab.</p>
<label>Type<select id="open-kind"><option value="note">Text or code</option><option value="url">Short link</option></select></label>
<button type="submit">Open share</button>
<p class="hint">Opening a share navigates to it and counts as a view.</p>
</form>
<div id="preview" class="preview" aria-live="polite" hidden></div>
</section>
<dialog id="share-result" class="card result" aria-labelledby="result-title" aria-describedby="result-feedback">
<p class="eyebrow">READY TO SHARE</p>
<h2 id="result-title">Your share is ready</h2>
<p id="result-feedback" class="hint" role="status" aria-live="polite"></p>
<label for="share-url">Share link</label>
<div class="copy-row">
<input id="share-url" readonly autofocus>
<button id="copy-url" type="button">Copy link</button>
</div>
<div class="actions result-actions">
<a id="share-link">Open share ↗</a>
<form method="dialog"><button class="secondary">Done</button></form>
</div>
<p class="hint">Opening counts as a view. Copying the link does not.</p>
</dialog>
<noscript><p class="status">Enable JavaScript to use the browser app. The HTTP API remains available.</p></noscript>
<script src="/static/gui.js" defer></script>
{% endblock %}
+7 -1
View File
@@ -4,8 +4,14 @@
<article class="card paste-view">
<div class="section-heading">
<div><p class="eyebrow">SHARED PASTE</p><h1>{{ paste.id }}</h1></div>
<p class="badge view-counter">Views: {{ paste.views }} / {% match paste.max_views %}{% when Some with (max) %}{{ max }}{% when None %}∞{% endmatch %}</p>
<div class="actions">
<p class="badge view-counter">Views: {{ paste.views }} / {% match paste.max_views %}{% when Some with (max) %}{{ max }}{% when None %}∞{% endmatch %}</p>
<button id="copy-code" class="secondary" type="button" data-raw="{{ raw_code }}">Copy raw code</button>
</div>
</div>
{{ code|safe }}
<p id="copy-status" class="hint" role="status" aria-live="polite" hidden></p>
<textarea id="raw-code" aria-label="Raw paste content" rows="8" readonly spellcheck="false" hidden></textarea>
</article>
<script src="/static/paste.js" defer></script>
{% endblock %}