mirror of
https://github.com/ZTatman/myst.git
synced 2026-11-21 20:37:58 +00:00
48 lines
1.9 KiB
HTML
48 lines
1.9 KiB
HTML
{% if not confirmed %}
|
|
{% block selected_snapshot %}
|
|
<section id="selected-snapshot"
|
|
class="card overflow-hidden"
|
|
{% if confirmed %}hx-swap-oob="outerHTML"{% else %}hidden{% endif %}
|
|
aria-live="polite">
|
|
{% if confirmed %}
|
|
<div class="flex flex-wrap items-center justify-between gap-3 border-b border-border px-5 py-3">
|
|
<div class="flex flex-wrap items-center gap-2.5">
|
|
<span class="badge-success">Selected</span>
|
|
<span class="text-xs text-muted-foreground">Preview only — no share link has been created.</span>
|
|
</div>
|
|
<button type="button"
|
|
class="btn btn-xs btn-secondary"
|
|
hx-get="/links/snapshot-picker/preview"
|
|
hx-target="#selected-snapshot"
|
|
hx-swap="outerHTML">Clear</button>
|
|
</div>
|
|
<dl class="snapshot-grid">
|
|
<div class="snapshot-cell">
|
|
<dt class="section-header-subtle">Repository</dt>
|
|
<dd class="snapshot-value">{{ repo }}</dd>
|
|
</div>
|
|
<div class="snapshot-cell">
|
|
<dt class="section-header-subtle">Branch</dt>
|
|
<dd class="snapshot-value">{{ ref }}</dd>
|
|
</div>
|
|
<div class="snapshot-cell">
|
|
<dt class="section-header-subtle">Commit</dt>
|
|
<dd class="snapshot-value">{{ commit[:12] }}</dd>
|
|
</div>
|
|
</dl>
|
|
{% endif %}
|
|
</section>
|
|
{% endblock %}
|
|
{% else %}
|
|
{% block preview_confirmation %}
|
|
<p role="status">Snapshot selected. No share link has been created.</p>
|
|
<div class="picker-actions">
|
|
<button type="button"
|
|
class="btn btn-sm btn-primary"
|
|
commandfor="snapshot-picker"
|
|
command="close"
|
|
autofocus>Done</button>
|
|
</div>
|
|
{{ self.selected_snapshot() }}
|
|
{% endblock %}
|
|
{% endif %}
|