Embed voting clips on landing page

This commit is contained in:
AzuTear
2026-06-25 09:54:22 +02:00
parent f851e500f7
commit fd81c968f6
5 changed files with 169 additions and 19 deletions
@@ -1,5 +1,6 @@
import { computed, type ComputedRef, type Ref } from 'vue'
import { buildClipEmbed } from '../../lib/clipEmbeds'
import { useAuthStore } from '../../stores/auth'
import { useAwardsStore } from '../../stores/awards'
import type { HomeDisplayCategory, HomeInteractionModalKind } from './homeLandingTypes'
@@ -117,6 +118,7 @@ export function useHomeModalCandidatePresentation(params: {
const clipUrl = candidate.clipUrl?.trim() || null
const clipTitle = candidate.clipTitle?.trim() || 'Highlight-Clip ansehen'
const clipPlatform = clipUrl ? candidate.clipPlatform?.trim() || candidate.platform : 'Clip fehlt'
const clipEmbed = clipUrl ? buildClipEmbed(clipUrl) : null
return {
name: candidate.displayName,
handle: candidate.channelSlug,
@@ -125,6 +127,8 @@ export function useHomeModalCandidatePresentation(params: {
clipUrl,
clipTitle,
clipPlatform,
clipEmbedUrl: clipEmbed?.src ?? null,
clipEmbedTitle: clipEmbed?.title ?? clipTitle,
idx,
selected,
hasClip: Boolean(clipUrl),