Add bumper variant management: implement API endpoints for adding, updating, and removing bumper text variants, enhance data models to support variant details, and update scheduling logic to utilize variants. Refactor related components for improved bumper template handling and ensure proper error management for variant operations.
This commit is contained in:
@@ -128,15 +128,27 @@ export type OverrideMode = 'Exclusive' | 'Boost'
|
||||
export type ScheduleEntryKind = 'Program' | 'Ad' | 'Bumper'
|
||||
export type BumperFont = 'Sans' | 'Serif'
|
||||
export type BumperSelection = 'Rotation' | 'Random' | 'AlwaysFirst'
|
||||
export type BumperTextKind = 'NowNext' | 'Free'
|
||||
export type BumperTrigger = 'OnShowChange' | 'BetweenEpisodes' | 'Both'
|
||||
|
||||
/** Общие для канала настройки заставок (стиль/звук — на каждом блоке, см. BumperTemplateDto). */
|
||||
/** Общие для канала настройки заставок (стиль/звук/текст — на блоках и подблоках). */
|
||||
export type BumperSettings = {
|
||||
font: BumperFont
|
||||
minIntervalMinutes: number
|
||||
selection: BumperSelection
|
||||
}
|
||||
|
||||
/** Подблок (текст-вариант): свой текст + правило показа поверх стиля/звука блока. */
|
||||
export type BumperTextVariantDto = {
|
||||
id: string
|
||||
position: number
|
||||
name: string
|
||||
kind: BumperTextKind
|
||||
nowLabel: string
|
||||
nextLabel: string
|
||||
minIntervalMinutes: number
|
||||
onlyBetweenDifferentShows: boolean
|
||||
selection: BumperSelection
|
||||
line1: string
|
||||
line2: string
|
||||
trigger: BumperTrigger
|
||||
}
|
||||
|
||||
export type BumperTemplateDto = {
|
||||
@@ -151,6 +163,7 @@ export type BumperTemplateDto = {
|
||||
backgroundImageId: string | null
|
||||
hasAudio: boolean
|
||||
audioDurationSeconds: number | null
|
||||
variants: BumperTextVariantDto[]
|
||||
}
|
||||
|
||||
export type ChannelSummaryDto = {
|
||||
|
||||
@@ -220,6 +220,20 @@ const resources = {
|
||||
'Каждый блок — свой звук и оформление. Первый блок дефолтный, его нельзя удалить. Длительность заставки — по длине звука.',
|
||||
bumperAddTemplate: 'Добавить блок',
|
||||
bumperTemplateName: 'Название',
|
||||
bumperVariants: 'Подблоки (текст)',
|
||||
bumperVariantsHint:
|
||||
'Разный текст на одной музыке и оформлении блока. Правило показа — у каждого подблока своё.',
|
||||
bumperAddVariant: 'Добавить текст',
|
||||
bumperVariantName: 'Название',
|
||||
bumperTextKind: 'Режим текста',
|
||||
bumperKindNowNext: 'Сейчас / Далее',
|
||||
bumperKindFree: 'Свободный текст',
|
||||
bumperLine1: 'Строка 1',
|
||||
bumperLine2: 'Строка 2',
|
||||
bumperTrigger: 'Показывать',
|
||||
bumperTriggerOnShowChange: 'При смене шоу',
|
||||
bumperTriggerBetweenEpisodes: 'Между сериями',
|
||||
bumperTriggerBoth: 'Оба',
|
||||
bumperDefault: 'по умолчанию',
|
||||
bumperSeconds: 'с',
|
||||
bumperDefaultDuration: '≈8 с (джингл)',
|
||||
@@ -526,6 +540,20 @@ const resources = {
|
||||
'Each block has its own sound and style. The first block is the default and cannot be removed. Bumper length follows the sound length.',
|
||||
bumperAddTemplate: 'Add block',
|
||||
bumperTemplateName: 'Name',
|
||||
bumperVariants: 'Sub-blocks (text)',
|
||||
bumperVariantsHint:
|
||||
'Different text over the same music and style. Each sub-block has its own show rule.',
|
||||
bumperAddVariant: 'Add text',
|
||||
bumperVariantName: 'Name',
|
||||
bumperTextKind: 'Text mode',
|
||||
bumperKindNowNext: 'Now / Next',
|
||||
bumperKindFree: 'Free text',
|
||||
bumperLine1: 'Line 1',
|
||||
bumperLine2: 'Line 2',
|
||||
bumperTrigger: 'Show on',
|
||||
bumperTriggerOnShowChange: 'Show change',
|
||||
bumperTriggerBetweenEpisodes: 'Between episodes',
|
||||
bumperTriggerBoth: 'Both',
|
||||
bumperDefault: 'default',
|
||||
bumperSeconds: 's',
|
||||
bumperDefaultDuration: '≈8 s (jingle)',
|
||||
|
||||
Reference in New Issue
Block a user