Skip to content
Snippets Groups Projects
Commit 7ba5d42b authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: remove media source expert mode

This was confusing for users.

refs #310
parent dfd6a184
No related branches found
No related tags found
No related merge requests found
Pipeline #8834 passed
Pipeline: aura-tests

#8835

    ......@@ -338,7 +338,6 @@
    <APlaylistEditor
    :playlist="playlist"
    :show="show"
    :use-expert-mode="true"
    :disabled="disabled"
    class="tw-max-w-3xl"
    @create="playlistId.value = $event.id"
    ......
    ......@@ -25,20 +25,10 @@
    <APlaylistEditor
    :playlist="playlist"
    :show="show"
    :use-expert-mode="usePlaylistEditorExpertMode"
    :disabled="disabled"
    @create="assignPlaylist"
    />
    </APermissionGuard>
    <button
    v-if="playlist && playlist.entries.length > 0 && !usePlaylistEditorExpertMode"
    type="button"
    class="btn btn-default btn-sm -tw-mt-3"
    @click="usePlaylistEditorExpertMode = true"
    >
    Weitere hinzufügen
    </button>
    </AFieldset>
    </div>
    ......@@ -59,7 +49,7 @@
    </div>
    </template>
    <script setup lang="ts">
    import { computed, ref, watch } from 'vue'
    import { computed } from 'vue'
    import { useI18n } from '@/i18n'
    import { useEpisodeStore, useTimeSlotStore } from '@/stores'
    import { useBreadcrumbs } from '@/stores/nav'
    ......@@ -83,8 +73,6 @@ const { locale, t } = useI18n()
    const episodeStore = useEpisodeStore()
    const timeslotStore = useTimeSlotStore()
    const usePlaylistEditorExpertMode = ref(false)
    const title = computed(() => {
    return props.episode.title || `Sendung #${props.episode.id}`
    })
    ......@@ -108,14 +96,6 @@ async function assignPlaylist(playlist: Playlist) {
    await episodeStore.partialUpdate(props.episode.id, { mediaId: playlist.id })
    }
    watch(
    () => props.playlist?.entries?.length ?? 0,
    (numPlaylistEntries) => {
    if (numPlaylistEntries > 1) usePlaylistEditorExpertMode.value = true
    },
    { immediate: true },
    )
    useBreadcrumbs(() => [
    { title: t('navigation.shows'), route: { name: 'shows' } },
    { title: props.show.name, route: { name: 'show', params: { showId: props.show.id.toString() } } },
    ......
    ......@@ -85,7 +85,7 @@
    </section>
    <fieldset
    v-if="allowAddEntries"
    v-if="!disabled"
    ref="dropzoneEl"
    class="tw-rounded tw-border-2 tw-flex tw-mb-3 tw-p-6 dark:tw-border-neutral-700"
    :class="{
    ......@@ -161,7 +161,7 @@
    import { APIResponseError, useErrorList } from '@rokoli/bnb/drf'
    import { createTemplatePromise, useDropZone, useFileDialog } from '@vueuse/core'
    import { partition } from 'lodash'
    import { computed, ref, useAttrs, watch } from 'vue'
    import { ref, useAttrs, watch } from 'vue'
    import { useCopy } from '@/form'
    import { useI18n } from '@/i18n'
    ......@@ -188,7 +188,6 @@ const props = withDefaults(
    show: Show
    requiredDurationSeconds?: number
    playlist: Playlist | null
    useExpertMode?: boolean
    disabled?: boolean
    }>(),
    {
    ......@@ -213,11 +212,6 @@ const GetM3uUrl = createTemplatePromise<string | null>()
    const entries = useCopy(() => props.playlist?.entries ?? [], {
    save: () => updatePlaylistEntries(),
    })
    const allowAddEntries = computed(
    () =>
    !props.disabled &&
    (props.useExpertMode || !props.playlist || props.playlist.entries.length === 0),
    )
    const entryUpdateError = ref<Error>()
    const entryUpdateErrorList = useErrorList(entryUpdateError)
    const nonAddedEntries = ref<Partial<PlaylistEntry>[]>([])
    ......
    ......@@ -405,7 +405,6 @@ export default {
    duration: 'Dauer',
    editor: {
    title: 'Medienquellen',
    expertMode: 'Expert:innenmodus',
    isSaving: 'Medienquellen werden gespeichert',
    editPlaylistEntry: 'Medienquelle bearbeiten',
    deletePlaylistEntry: 'Medienquelle löschen',
    ......
    ......@@ -402,7 +402,6 @@ export default {
    duration: 'Duration',
    editor: {
    title: 'Media sources',
    expertMode: 'Expert mode',
    isSaving: 'Media sources are being saved',
    editPlaylistEntry: 'Edit media sources',
    deletePlaylistEntry: 'Delete media source',
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment