gabriel / musehub public
stash_rows.html html
31 lines 1.6 KB
cd448303 Initial extraction of MuseHub from maestro monorepo. Gabriel Cardona <gabriel@tellurstori.com> 7d ago
1 {% from "musehub/macros/empty_state.html" import empty_state %}
2 {# Fragment rendered for HTMX pagination swaps on the stash page.
3 Also included inline by the full page template so initial render and
4 subsequent HTMX swaps produce identical markup. #}
5 {% if stashes %}
6 {% for stash in stashes %}
7 <div class="stash-row" id="stash-{{ stash.id }}">
8 <div class="stash-ref"><code>stash@{{ '{' }}{{ (page - 1) * page_size + loop.index0 }}{{ '}' }}</code></div>
9 <div class="stash-meta">
10 <span class="stash-branch">{{ stash.branch }}</span>
11 <span class="stash-message">{{ stash.message or '(no message)' }}</span>
12 <span class="stash-date">{{ stash.created_at | fmtrelative }}</span>
13 <span class="stash-entries">{{ stash.entry_count }} file{{ 's' if stash.entry_count != 1 else '' }}</span>
14 </div>
15 <div class="stash-actions">
16 <form method="post" action="{{ base_url }}/stash/{{ stash.id }}/apply" hx-boost="true">
17 <button type="submit" class="btn btn-apply">Apply</button>
18 </form>
19 <form method="post" action="{{ base_url }}/stash/{{ stash.id }}/pop" hx-boost="true">
20 <button type="submit" class="btn btn-pop">Pop</button>
21 </form>
22 <form method="post" action="{{ base_url }}/stash/{{ stash.id }}/drop" hx-boost="true"
23 hx-confirm="Drop this stash entry? This cannot be undone.">
24 <button type="submit" class="btn btn-drop">Drop</button>
25 </form>
26 </div>
27 </div>
28 {% endfor %}
29 {% else %}
30 {{ empty_state("📦", "No stashed changes", "Use 'muse stash' in the DAW to save uncommitted work.") }}
31 {% endif %}