diff options
| author | Ken D'Ambrosio <ken@jots.org> | 2026-05-14 22:59:59 +0000 |
|---|---|---|
| committer | Ken D'Ambrosio <ken@jots.org> | 2026-05-14 22:59:59 +0000 |
| commit | c76ea393777897e0c367e186d1a3b243193d8377 (patch) | |
| tree | b922795d65bcbea171ef6c2ddf6b3c80881123d2 /views/admin/album.erb | |
| parent | 6acd47c1ca27d705afe88b292a55a5170c038d2e (diff) | |
Hide transcoded originals from non-admins; mark them visually for admins
update.rb records transcoded_to in album.json (even on re-runs where
the MP4 already exists) so the marker survives across scans.
app.rb filters files with transcoded_to from non-admin views.
album.erb renders them greyed-out with an amber "⚠ original" badge in
admin mode. admin/album.erb marks the edit-table row and shows the
target filename under the original.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'views/admin/album.erb')
| -rw-r--r-- | views/admin/album.erb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/views/admin/album.erb b/views/admin/album.erb index f28d515..15a043f 100644 --- a/views/admin/album.erb +++ b/views/admin/album.erb @@ -70,9 +70,12 @@ <% @files.each do |name| %> <% meta = (@data['files'] || {})[name] || {} %> <% file_rel = @rel.empty? ? name : "#{@rel}/#{name}" %> - <tr> + <tr<%= ' class="original-file"' if meta['transcoded_to'] %>> <td><img src="/thumb/<%= file_rel %>" width="60" height="60" loading="lazy" style="object-fit:cover"></td> - <td class="filename"><code><%= name %></code></td> + <td class="filename"> + <code><%= name %></code> + <% if meta['transcoded_to'] %><span class="transcoded-label">→ <%= meta['transcoded_to'] %></span><% end %> + </td> <td><input type="text" name="file_caption[<%= name %>]" value="<%= ERB::Util.html_escape(meta['caption'].to_s) %>" placeholder="caption…"></td> <td class="visible-cell"> <input type="hidden" name="file_visible[<%= name %>]" value="0"> |
