rename playlist-editor to tracklist-editor; refactor player

This commit is contained in:
bkfox
2024-03-20 01:42:01 +01:00
parent 3ad886764c
commit d293eb4a00
20 changed files with 214 additions and 149 deletions

View File

@ -2,7 +2,42 @@
{% load static i18n humanize honeypot aircox %}
{% block page_form %}
{{ block.super }}
<hr/>
{% include "./widgets/playlist_editor.html" with formset=playlist_formset %}
<a-episode :page="{title: &quot;{{ object.title }}&quot;, podcasts: {{ object.sounds|json }}}">
<template v-slot="{podcasts,page}">
{{ block.super }}
<hr/>
{% include "./widgets/tracklist_editor.html" with formset=playlist_formset %}
<hr/>
<section class="container">
<h3 class="title">{% translate "Sound files" %}</h3>
<a-playlist v-if="page" :set="podcasts"
name="{{ page.title }}"
list-class="menu-list" item-class="menu-item"
:player="player" :actions="['play']"
@select="player.playItems('queue', $event.item)">
<template #after-title="{item}">
<span class="flex-grow-1">
[[ item.data.type_display ]]
<span v-if="item.data.is_public">
/
{% translate "public" %}
</span>
<span v-if="item.data.is_downloadable">
/
{% translate "downloadable" %}
</span>
</span>
</template>
<template #actions="{item}">
<button type="button" class="button"
title="{% translate "Edit" %}">
<span class="icon">
<i class="fa fa-edit"></i>
</span>
</button>
</template>
</a-playlist>
</section>
</template>
</a-episode>
{% endblock %}