diff options
| author | Joe Mou <dev@mou.fo> | 2026-08-11 13:32:44 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-08-11 17:37:02 -0400 |
| commit | 32ed69b43aeca42e88ab37187246e1035d4c933f (patch) | |
| tree | b11e637e784d96e285ffe43568d9d53f1def4911 /views/_nav.eta | |
| parent | d2c94ae32ff8d88f438d0e3348ca4f4a81f7bdd7 (diff) | |
Keep the ref picker on the current view and path
Diffstat (limited to 'views/_nav.eta')
| -rw-r--r-- | views/_nav.eta | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/views/_nav.eta b/views/_nav.eta index eb7ed42..a20fbbc 100644 --- a/views/_nav.eta +++ b/views/_nav.eta @@ -6,7 +6,7 @@ <button type="button" class="ref-selector-button branch" command="show-modal" commandfor="ref-selector-menu"> <img src="/static/icons/git-branch.svg" alt="branch" class="icon"> <%= refLabel %> ▾ </button> - <dialog class="ref-selector-menu" id="ref-selector-menu" closedby="any" data-owner="<%= it.repo.owner %>" data-repo="<%= it.repo.name %>"> + <dialog class="ref-selector-menu" id="ref-selector-menu" closedby="any" data-owner="<%= it.repo.owner %>" data-repo="<%= it.repo.name %>" data-view="<%= it.view %>"<% if (it.path && it.path !== "/") { %> data-path="<%= it.path %>"<% } %>> <div class="ref-selector-tabs"> <button type="button" class="active" data-ref-type="branches">Branches</button> <button type="button" data-ref-type="tags">Tags</button> @@ -22,7 +22,7 @@ currentPath += (currentPath ? '/' : '') + part; const isLast = i === pathParts.length - 1; if (isLast) { - %>/<%= part %><%= it.isTree ? "/" : "" %><% + %>/<%= part %><%= it.view === "tree" ? "/" : "" %><% } else { %>/<a href="/<%= it.repo.owner %>/<%= it.repo.name %>/tree/<%= it.branch %>/<%= currentPath %>"><%= part %></a><% } |
