Add interstitial endpoints and enhance media and template functionalities: implement MapInterstitialEndpoints in Program.cs, add preview functionality for media assets in MediaEndpoints, and introduce template preview capabilities in TemplateEndpoints. Remove obsolete bumper settings from Channel and related classes to streamline configuration.
build / backend (push) Successful in 5m58s
build / frontend (push) Successful in 47s
tests / backend-tests (push) Successful in 5m57s

This commit is contained in:
Leonid Pershin
2026-07-26 14:03:53 +03:00
parent 66040a8841
commit 7b12a06d1b
53 changed files with 4076 additions and 469 deletions
@@ -0,0 +1,27 @@
/**
* Перетаскивание на экране роликов. В сборку блока едут только ролики, в группу — и ролики,
* и готовые блоки, поэтому в переносимых данных лежит вид элемента, а не только идентификатор.
*/
export type ClipDragItem = {
kind: 'clip' | 'block'
id: string
name: string
seconds: number
}
const MIME = 'application/x-telewave-clip'
export function setDragItem(event: React.DragEvent, item: ClipDragItem) {
event.dataTransfer.setData(MIME, JSON.stringify(item))
event.dataTransfer.effectAllowed = 'copy'
}
export function readDragItem(event: React.DragEvent): ClipDragItem | null {
const raw = event.dataTransfer.getData(MIME)
if (!raw) return null
try {
return JSON.parse(raw) as ClipDragItem
} catch {
return null
}
}