This commit is contained in:
2026-10-19 01:50:13 +07:00
parent 5b964a1b46
commit 6798275187
3 changed files with 29 additions and 29 deletions
+4 -4
View File
@@ -372,7 +372,7 @@ onUnmounted(() => {
<section class="presentation-grid">
<n-card title="План экранов">
<template #header-extra>
<n-button
<n-button size="small"
v-if="!isPlanEditing"
:square="!!state.catalog.steps.length"
:aria-label="state.catalog.steps.length ? 'Редактировать' : 'Создать план'"
@@ -386,11 +386,11 @@ onUnmounted(() => {
<span v-else>Создать план</span>
</n-button>
<n-space v-else>
<n-button
<n-button size="small"
:disabled="isBusy || isPlanSaving"
@click="discardPlan(() => { isPlanEditing = false })"
>Отменить</n-button>
<n-button
<n-button size="small"
type="primary"
:disabled="isBusy || isPlanSaving || planStatus.key !== state.catalog.key || !planStatus.editable"
:loading="isBusy || isPlanSaving"
@@ -465,7 +465,7 @@ onUnmounted(() => {
</ScreenPlanPanel>
<p v-if="state.scene.status === 'pending'" role="status">Подготовка показа…</p>
<n-alert v-if="state.scene.error" type="error">{{ state.scene.error }}</n-alert>
<n-button
<n-button size="small"
v-if="state.scene.status === 'error'"
@click="send({ action: 'mode', mode: state.scene.mode })"
>Повторить подготовку</n-button
+15 -15
View File
@@ -133,14 +133,14 @@ function remove(trackId?: number) {
<template>
<n-card title="План музыки" data-testid="music-plan">
<template #header-extra>
<n-button v-if="!isEditing" square aria-label="Редактировать" title="Редактировать" :disabled="isDisabled" @click="edit">
<n-button size="small" v-if="!isEditing" square aria-label="Редактировать" title="Редактировать" :disabled="isDisabled" @click="edit">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="m16 3 5 5M3 21l5-1L21 7a2.8 2.8 0 0 0-4-4L4 16z" />
</svg>
</n-button>
<n-space v-else>
<template v-if="isDirty || hasConflict">
<n-button
<n-button size="small"
:disabled="isDisabled || !selected || hasConflict"
@click="
selected &&
@@ -152,9 +152,9 @@ function remove(trackId?: number) {
"
>Сохранить порядок</n-button
>
<n-button :disabled="props.isBusy" @click="reset">Отменить порядок</n-button>
<n-button size="small" :disabled="props.isBusy" @click="reset">Отменить порядок</n-button>
</template>
<n-button :disabled="isBusy || isDirty || !!hasConflict" @click="isEditing = false"
<n-button size="small" :disabled="isBusy || isDirty || !!hasConflict" @click="isEditing = false"
>Готово</n-button
>
</n-space>
@@ -178,20 +178,20 @@ function remove(trackId?: number) {
:disabled="isDisabled"
/>
<n-space>
<n-button
<n-button size="small"
:disabled="isDisabled || !name.trim() || name === selected.name"
@click="emit('action', { action: 'playlist-rename', playlistId: selected.id, name })"
>Сохранить название</n-button
>
<n-button :disabled="isDisabled || isDirty" @click="remove()"
<n-button size="small" :disabled="isDisabled || isDirty" @click="remove()"
>Удалить плейлист</n-button
>
<n-button
<n-button size="small"
:disabled="isDisabled || isDirty"
@click="emit('action', { action: 'playlist-upload', playlistId: selected.id })"
>Добавить MP3</n-button
>
<n-button
<n-button size="small"
:disabled="isDisabled || isDirty || !canUse || !selected.tracks.length"
@click="emit('action', { action: 'playlist-use', playlistId: selected.id })"
>Использовать в игре</n-button
@@ -205,19 +205,19 @@ function remove(trackId?: number) {
selected.tracks.find((t) => t.id === id)?.name ?? `Трек №${id} удалён на сервере`
}}</span>
<n-space>
<n-button
<n-button size="small"
:disabled="isDisabled || index === 0"
:aria-label="`Поднять трек ${index + 1}`"
@click="move(index, -1)"
>↑</n-button
>
<n-button
<n-button size="small"
:disabled="isDisabled || index === order.length - 1"
:aria-label="`Опустить трек ${index + 1}`"
@click="move(index, 1)"
>↓</n-button
>
<n-button :disabled="isDisabled || isDirty" @click="remove(id)"
<n-button size="small" :disabled="isDisabled || isDirty" @click="remove(id)"
>Удалить трек</n-button
>
</n-space>
@@ -243,7 +243,7 @@ function remove(trackId?: number) {
emit('command', { action: 'playlist', channel: 'music', playlistId: $event })
"
/>
<n-button
<n-button size="small"
square
:type="channel.loop ? 'primary' : 'default'"
:disabled="isBusy"
@@ -260,7 +260,7 @@ function remove(trackId?: number) {
<p v-if="channel.source" class="current-track" data-testid="current-music-track">{{ channel.source.name }}</p>
<div class="track-actions">
<n-space align="center">
<n-button
<n-button size="small"
square
:disabled="!canPlay"
:aria-label="control.label"
@@ -281,7 +281,7 @@ function remove(trackId?: number) {
<path v-else d="M7 4v16l13-8z" />
</svg>
</n-button>
<n-button
<n-button size="small"
square
:disabled="!canPlay"
aria-label="Стоп"
@@ -298,7 +298,7 @@ function remove(trackId?: number) {
<path d="M5 5h14v14H5z" />
</svg>
</n-button>
<n-button
<n-button size="small"
square
:disabled="!canPlay"
aria-label="Сначала"
+10 -10
View File
@@ -67,19 +67,19 @@ function timerLabel(index: number) {
:input-props="{ 'aria-label': `Режим шага ${index + 1}` }"
@update:value="emit('updateStep', index, { mode: $event })"
/>
<n-button
<n-button size="small"
:disabled="isBusy || index === 0"
:aria-label="`Поднять шаг ${index + 1}`"
@click="emit('move', index, -1)"
>↑</n-button
>
<n-button
<n-button size="small"
:disabled="isBusy || index === draft.length - 1"
:aria-label="`Опустить шаг ${index + 1}`"
@click="emit('move', index, 1)"
>↓</n-button
>
<n-button :disabled="isBusy" type="error" ghost @click="emit('remove', index)"
<n-button size="small" :disabled="isBusy" type="error" ghost @click="emit('remove', index)"
>Удалить</n-button
>
</div>
@@ -113,8 +113,8 @@ function timerLabel(index: number) {
</template>
</div>
<n-space>
<n-button :disabled="isBusy" @click="emit('add')">Добавить шаг</n-button>
<n-button :disabled="isBusy || !draft.length" @click="emit('clear')">Удалить план</n-button>
<n-button size="small" :disabled="isBusy" @click="emit('add')">Добавить шаг</n-button>
<n-button size="small" :disabled="isBusy || !draft.length" @click="emit('clear')">Удалить план</n-button>
</n-space>
</template>
<template v-else>
@@ -156,7 +156,7 @@ function timerLabel(index: number) {
<div class="plan-step-actions">
<n-space v-if="[2, 4, 7].includes(step.mode)" align="center" :wrap="false">
<template v-if="step.mode === 7">
<n-button
<n-button size="small"
square
:aria-label="timerLabel(index)"
:title="timerLabel(index)"
@@ -177,7 +177,7 @@ function timerLabel(index: number) {
<path v-else d="M7 4v16l13-8z" />
</svg>
</n-button>
<n-button square aria-label="Сбросить" title="Сбросить" :disabled="isBusy || currentIndex !== index" @click="emit('command', { action: 'timer-reset' })"
<n-button size="small" square aria-label="Сбросить" title="Сбросить" :disabled="isBusy || currentIndex !== index" @click="emit('command', { action: 'timer-reset' })"
>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
<path d="M3 4v6h6M3 10a9 9 0 1 1 0 6" />
@@ -186,7 +186,7 @@ function timerLabel(index: number) {
>
</template>
<template v-if="step.mode === 2 || step.mode === 4">
<n-button
<n-button size="small"
square
:aria-label="currentIndex === index ? mainControl.label : 'Воспроизвести'"
:title="currentIndex === index ? mainControl.label : 'Воспроизвести'"
@@ -199,7 +199,7 @@ function timerLabel(index: number) {
</svg>
</n-button
>
<n-button
<n-button size="small"
square
aria-label="Стоп"
title="Стоп"
@@ -211,7 +211,7 @@ function timerLabel(index: number) {
</svg>
</n-button
>
<n-button
<n-button size="small"
square
aria-label="Сначала"
title="Сначала"