Changeset d727e92 in Klonkt for src/views/pages
- Timestamp:
- 06/20/2026 05:37:42 AM (3 months ago)
- Branches:
- main
- Children:
- a66f691
- Parents:
- 183875b
- File:
-
- 1 edited
-
src/views/pages/admin-audio.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/admin-audio.ejs
r183875b rd727e92 62 62 <%# ── TRACK LIST ─────────────────────────────────────────── %> 63 63 <section class="ax-card"> 64 <div class="ax-card-title" >64 <div class="ax-card-title" style="display:flex;align-items:center;gap:.5rem"> 65 65 Tracks <span class="ax-count"><%= tracks.length %></span> 66 <button type="button" class="ax-btn ax-btn-secondary" id="add-link-track-btn" 67 style="margin-left:auto;font-size:.85rem" title="Een track zonder audiobestand — alleen titel + open-in links"> 68 + Track zonder audio 69 </button> 66 70 </div> 67 71 … … 889 893 }); 890 894 }); 895 896 // ── "+ Track zonder audio": maak een link-only stub + open de editor ── 897 const addLinkBtn = document.getElementById('add-link-track-btn'); 898 if (addLinkBtn) { 899 addLinkBtn.addEventListener('click', async () => { 900 addLinkBtn.disabled = true; 901 try { 902 const r = await fetch('/admin/audio/create-link', { 903 method: 'POST', credentials: 'same-origin', 904 headers: { 'Content-Type': 'application/json' }, 905 body: JSON.stringify({ title: 'Nieuwe track' }), 906 }); 907 const j = await r.json(); 908 if (!r.ok || !j.ok) throw new Error(j.error || 'Aanmaken mislukt'); 909 if (typeof window.openTrackEditor !== 'function') { location.reload(); return; } 910 window.openTrackEditor({ id: j.id, onSaved: () => location.reload() }); 911 } catch (err) { 912 alert('Track aanmaken mislukt: ' + err.message); 913 } finally { 914 addLinkBtn.disabled = false; 915 } 916 }); 917 } 891 918 892 919 // ── Wire all "Edit" buttons to the track-editor modal ─────────
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)