2024-08-05 00:23:17 +00:00
|
|
|
{{define "head"}}
|
2024-08-31 14:25:44 +00:00
|
|
|
<title>Editing {{.Title}} - ari melody 💫</title>
|
2024-08-05 00:23:17 +00:00
|
|
|
<link rel="shortcut icon" href="{{.GetArtwork}}" type="image/x-icon">
|
|
|
|
|
2024-08-31 00:30:30 +00:00
|
|
|
<link rel="stylesheet" href="/admin/static/edit-release.css">
|
2024-08-05 00:23:17 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "content"}}
|
|
|
|
<main>
|
|
|
|
|
|
|
|
<div id="release" data-id="{{.ID}}">
|
|
|
|
<div class="release-artwork">
|
|
|
|
<img src="{{.Artwork}}" alt="" width="256" loading="lazy" id="artwork">
|
2024-08-31 00:30:30 +00:00
|
|
|
<input type="file" id="artwork-file" name="Artwork" accept=".png,.jpg,.jpeg" hidden>
|
2024-09-01 23:15:23 +00:00
|
|
|
<button id="remove-artwork">Remove</button>
|
2024-08-05 00:23:17 +00:00
|
|
|
</div>
|
|
|
|
<div class="release-info">
|
|
|
|
<h1 class="release-title">
|
2024-09-01 23:49:25 +00:00
|
|
|
<input type="text" id="title" name="Title" value="{{.Title}}" autocomplete="on">
|
2024-08-05 00:23:17 +00:00
|
|
|
</h1>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Type</td>
|
|
|
|
<td>
|
|
|
|
{{$t := .ReleaseType}}
|
|
|
|
<select name="Type" id="type">
|
|
|
|
<option value="single" {{if eq $t "single"}}selected{{end}}>
|
|
|
|
Single
|
|
|
|
</option>
|
|
|
|
<option value="album" {{if eq $t "album"}}selected{{end}}>
|
|
|
|
Album
|
|
|
|
</option>
|
|
|
|
<option value="ep" {{if eq $t "ep"}}selected{{end}}>
|
|
|
|
EP
|
|
|
|
</option>
|
|
|
|
<option value="compilation" {{if eq $t "compilation"}}selected{{end}}>
|
|
|
|
Compilation
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Description</td>
|
|
|
|
<td>
|
|
|
|
<textarea
|
|
|
|
name="Description"
|
|
|
|
value="{{.Description}}"
|
|
|
|
placeholder="No description provided."
|
2024-08-31 18:29:57 +00:00
|
|
|
rows="3"
|
2024-08-05 00:23:17 +00:00
|
|
|
id="description"
|
2024-08-23 22:08:28 +00:00
|
|
|
>{{.Description}}</textarea>
|
2024-08-05 00:23:17 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Release Date</td>
|
|
|
|
<td>
|
2024-09-01 23:15:23 +00:00
|
|
|
<input type="datetime-local" name="release-date" id="release-date" value="{{.TextReleaseDate}}">
|
2024-08-05 00:23:17 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Buy Name</td>
|
|
|
|
<td>
|
2024-09-01 23:49:25 +00:00
|
|
|
<input type="text" name="buyname" id="buyname" value="{{.Buyname}}" autocomplete="on">
|
2024-08-05 00:23:17 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Buy Link</td>
|
|
|
|
<td>
|
2024-09-01 23:49:25 +00:00
|
|
|
<input type="text" name="buylink" id="buylink" value="{{.Buylink}}" autocomplete="on">
|
2024-09-01 23:15:23 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Copyright</td>
|
|
|
|
<td>
|
2024-09-01 23:49:25 +00:00
|
|
|
<input type="text" name="copyright" id="copyright" value="{{.Copyright}}" autocomplete="on">
|
2024-09-01 23:15:23 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Copyright URL</td>
|
|
|
|
<td>
|
2024-09-01 23:49:25 +00:00
|
|
|
<input type="text" name="copyright-url" id="copyright-url" value="{{.CopyrightURL}}" autocomplete="on">
|
2024-08-05 00:23:17 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Visible</td>
|
|
|
|
<td>
|
|
|
|
<select name="Visibility" id="visibility">
|
|
|
|
<option value="true" {{if .Visible}}selected{{end}}>True</option>
|
|
|
|
<option value="false" {{if not .Visible}}selected{{end}}>False</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<div class="release-actions">
|
2024-08-31 18:29:57 +00:00
|
|
|
<a href="/music/{{.ID}}" class="button" target="_blank">Gateway <img class="icon" src="/img/external-link.svg"/></a>
|
2024-08-05 00:23:17 +00:00
|
|
|
<button type="submit" class="save" id="save" disabled>Save</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-title">
|
|
|
|
<h2>Credits ({{len .Credits}})</h2>
|
2024-08-23 22:08:28 +00:00
|
|
|
<a class="button edit"
|
|
|
|
href="/admin/release/{{.ID}}/editcredits"
|
|
|
|
hx-get="/admin/release/{{.ID}}/editcredits"
|
|
|
|
hx-target="body"
|
|
|
|
hx-swap="beforeend"
|
|
|
|
>Edit</a>
|
2024-08-05 00:23:17 +00:00
|
|
|
</div>
|
|
|
|
<div class="card credits">
|
2024-08-23 22:08:28 +00:00
|
|
|
{{range .Credits}}
|
2024-08-05 00:23:17 +00:00
|
|
|
<div class="credit">
|
2024-08-23 22:08:28 +00:00
|
|
|
<img src="{{.Artist.GetAvatar}}" alt="" width="64" loading="lazy" class="artist-avatar">
|
2024-08-05 00:23:17 +00:00
|
|
|
<div class="credit-info">
|
2024-09-03 07:07:45 +00:00
|
|
|
<p class="artist-name"><a href="/admin/artist/{{.Artist.ID}}">{{.Artist.Name}}</a></p>
|
2024-08-05 00:23:17 +00:00
|
|
|
<p class="artist-role">
|
2024-08-23 22:08:28 +00:00
|
|
|
{{.Role}}
|
|
|
|
{{if .Primary}}
|
2024-08-05 00:23:17 +00:00
|
|
|
<small>(Primary)</small>
|
|
|
|
{{end}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if not .Credits}}
|
|
|
|
<p>There are no credits.</p>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
2024-08-23 22:08:28 +00:00
|
|
|
<div class="card-title">
|
|
|
|
<h2>Links ({{len .Links}})</h2>
|
|
|
|
<a class="button edit"
|
|
|
|
href="/admin/release/{{.ID}}/editlinks"
|
|
|
|
hx-get="/admin/release/{{.ID}}/editlinks"
|
|
|
|
hx-target="body"
|
|
|
|
hx-swap="beforeend"
|
|
|
|
>Edit</a>
|
|
|
|
</div>
|
|
|
|
<div class="card links">
|
|
|
|
{{range .Links}}
|
2024-08-31 18:29:57 +00:00
|
|
|
<a href="{{.URL}}" target="_blank" class="button" data-name="{{.Name}}">{{.Name}} <img class="icon" src="/img/external-link.svg"/></a>
|
2024-08-23 22:08:28 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
2024-08-31 14:25:44 +00:00
|
|
|
<div class="card-title" id="tracks">
|
2024-08-05 00:23:17 +00:00
|
|
|
<h2>Tracklist ({{len .Tracks}})</h2>
|
2024-08-23 22:08:28 +00:00
|
|
|
<a class="button edit"
|
|
|
|
href="/admin/release/{{.ID}}/edittracks"
|
|
|
|
hx-get="/admin/release/{{.ID}}/edittracks"
|
|
|
|
hx-target="body"
|
|
|
|
hx-swap="beforeend"
|
|
|
|
>Edit</a>
|
2024-08-05 00:23:17 +00:00
|
|
|
</div>
|
|
|
|
<div class="card tracks">
|
2024-09-03 07:07:45 +00:00
|
|
|
{{range $i, $track := .Tracks}}
|
|
|
|
<div class="track" data-id="{{$track.ID}}">
|
2024-08-31 00:30:30 +00:00
|
|
|
<h2 class="track-title">
|
2024-09-03 07:07:45 +00:00
|
|
|
<span class="track-number">{{.Add $i 1}}</span>
|
|
|
|
<a href="/admin/track/{{$track.ID}}">{{$track.Title}}</a>
|
2024-08-31 00:30:30 +00:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
<h3>Description</h3>
|
2024-09-03 07:07:45 +00:00
|
|
|
{{if $track.Description}}
|
|
|
|
<p class="track-description">{{$track.GetDescriptionHTML}}</p>
|
2024-08-05 00:23:17 +00:00
|
|
|
{{else}}
|
|
|
|
<p class="track-description empty">No description provided.</p>
|
|
|
|
{{end}}
|
2024-08-31 00:30:30 +00:00
|
|
|
|
|
|
|
<h3>Lyrics</h3>
|
2024-09-03 07:07:45 +00:00
|
|
|
{{if $track.Lyrics}}
|
|
|
|
<p class="track-lyrics">{{$track.GetLyricsHTML}}</p>
|
2024-08-05 00:23:17 +00:00
|
|
|
{{else}}
|
|
|
|
<p class="track-lyrics empty">There are no lyrics.</p>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
2024-08-31 14:25:44 +00:00
|
|
|
<div class="card-title">
|
|
|
|
<h2>Danger Zone</h2>
|
|
|
|
</div>
|
|
|
|
<div class="card danger">
|
|
|
|
<p>
|
|
|
|
Clicking the button below will delete this release.
|
|
|
|
This action is <strong>irreversible</strong>.
|
|
|
|
You will be prompted to confirm this decision.
|
|
|
|
</p>
|
|
|
|
<button class="delete" id="delete">Delete Release</button>
|
|
|
|
</div>
|
|
|
|
|
2024-08-05 00:23:17 +00:00
|
|
|
</main>
|
|
|
|
|
|
|
|
<script type="module" src="/admin/static/edit-release.js" defer></script>
|
|
|
|
{{end}}
|