diff --git a/scripts/online-smoke.cjs b/scripts/online-smoke.cjs index 6025275..cc5db25 100644 --- a/scripts/online-smoke.cjs +++ b/scripts/online-smoke.cjs @@ -858,11 +858,13 @@ module.exports = async function onlineSmoke({ const view = document.querySelector('[data-testid="music-plan-view"]') const rows = Array.from(view?.querySelectorAll('[data-track-index]') ?? []) return rows.length === 2 && !document.querySelector('[data-testid="music-plan-editor"]') - && rows.every(row => !row.querySelector('.track-preview') && row.querySelector('.n-progress')) - && rows.filter(row => !row.classList.contains('track-current')).every(row => - Array.from(row.querySelectorAll('button[aria-label]')).every(button => button.disabled)) + && rows.every(row => !row.querySelector('.track-actions,.n-progress,.n-slider') && row.querySelector('[data-testid="select-track"]')) + && view.querySelectorAll('.track-actions').length === 1 + && view.querySelectorAll('.n-progress').length === 1 + && view.querySelectorAll('#volume-music').length === 1 + && !!view.querySelector('[data-testid="current-music-track"]') })()`), - 'music view shows tracks, progress and inactive controls', + 'music view shows track selection and one shared player above tracks', ) console.log('SCREEN_MUSIC_PLAN_SMOKE_PASS') await evaluate(`Array.from(document.querySelectorAll('button')) diff --git a/src/components/MusicPlanPanel.vue b/src/components/MusicPlanPanel.vue index fc067bb..4238f6d 100644 --- a/src/components/MusicPlanPanel.vue +++ b/src/components/MusicPlanPanel.vue @@ -49,9 +49,7 @@ const statusLabels: Record = { function isCurrent(index: number) { return !!props.channel.source && props.channel.trackIndex === index } -function canPlay(index: number) { - return isCurrent(index) && props.outputOpen && !props.isBusy -} +const canPlay = computed(() => !!props.channel.source && props.outputOpen && !props.isBusy) function edit() { if (props.isBusy || !props.canEdit) return selectedId.value = props.channel.playlistId @@ -230,7 +228,7 @@ function remove(trackId?: number) { - +
+

{{ channel.source.name }}

+
+ + + + + + + + + + +
+ + +
+
+
+
+ + + {{ statusLabels[channel.status] }} · + {{ formatTimer(Math.floor(channel.position) * 1000) }} / + {{ channel.duration === null ? '—' : formatTimer(channel.duration * 1000) }} + +
+ {{ + channel.error + }} +

Плейлистов в игре пока нет.

Выберите плейлист.

Треков пока нет.

@@ -273,122 +381,20 @@ function remove(trackId?: number) { >{{ isCurrent(index) ? 'Выбран' : 'Выбрать' }}
-
- - - - - - - - - - -
- - -
-
-
-
- - - {{ statusLabels[channel.status] }} · - {{ formatTimer(Math.floor(channel.position) * 1000) }} / - {{ channel.duration === null ? '—' : formatTimer(channel.duration * 1000) }} - -
- {{ - channel.error - }} -
+