feat(chat): integrate podcast support into chat components
- Updated ChatMessage and ChatWindow components to handle podcast content alongside films and songs. - Enhanced useContentPanel to extract and manage podcasts, allowing for richer media interactions. - Added PodcastCard and PodcastGrid components for displaying podcast information. - Improved UI elements to accommodate podcast selection and detail viewing. - Updated styles for empty state icons and added new CSS for podcast-related elements. Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
import type { Podcast } from '@aiui/core/types/content'
|
||||
|
||||
export const mockPodcasts: Podcast[] = [
|
||||
{
|
||||
id: 'p1',
|
||||
title: 'What Bitcoin Did',
|
||||
host: 'Peter McCormack',
|
||||
description: 'Interview-based podcast exploring Bitcoin, freedom, and the future of money.',
|
||||
coverUrl: undefined,
|
||||
year: 2018,
|
||||
episodeCount: 400,
|
||||
genres: ['Bitcoin', 'Finance', 'Tech'],
|
||||
sources: [
|
||||
{ type: 'fountain', name: 'Fountain', url: 'https://fountain.fm/show/whatbitcoindid', icon: '⚡' },
|
||||
{ type: 'podcastindex', name: 'Podcast Index', url: 'https://podcastindex.org/podcast/123456', icon: '📻' },
|
||||
{ type: 'youtube', name: 'YouTube', url: 'https://youtube.com/@WhatBitcoinDid', icon: '▶️' },
|
||||
{ type: 'rss', name: 'RSS', url: 'https://www.whatbitcoindid.com/podcast?format=rss', icon: '📡' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'p2',
|
||||
title: 'The Audacity to Podcast',
|
||||
host: 'Daniel J. Lewis',
|
||||
description: 'Podcasting tips, strategies, and news. Podcasting 2.0 focused.',
|
||||
coverUrl: undefined,
|
||||
year: 2010,
|
||||
episodeCount: 500,
|
||||
genres: ['Podcasting', 'Tech', 'How-To'],
|
||||
sources: [
|
||||
{ type: 'fountain', name: 'Fountain', url: 'https://fountain.fm/show/1I7TKhOPXJz9MDhG5gqh', icon: '⚡' },
|
||||
{ type: 'youtube', name: 'YouTube', url: 'https://youtube.com/@audacitytopodcast', icon: '▶️' },
|
||||
{ type: 'castopod', name: 'Castopod', url: 'https://castopod.example/audacity', icon: '🦣' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'p3',
|
||||
title: 'Tales from the Crypt',
|
||||
host: 'Marty Bent',
|
||||
description: 'Bitcoin, Austrian economics, and the importance of sound money.',
|
||||
coverUrl: undefined,
|
||||
year: 2017,
|
||||
episodeCount: 300,
|
||||
genres: ['Bitcoin', 'Economics', 'Finance'],
|
||||
sources: [
|
||||
{ type: 'fountain', name: 'Fountain', url: 'https://fountain.fm/show/talesfromthecrypt', icon: '⚡' },
|
||||
{ type: 'odysee', name: 'Odysee', url: 'https://odysee.com/@tftc', icon: '🔗' },
|
||||
{ type: 'rumble', name: 'Rumble', url: 'https://rumble.com/c/tftc', icon: '📺' },
|
||||
{ type: 'youtube', name: 'YouTube', url: 'https://youtube.com/@TalesFromTheCrypt', icon: '▶️' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'p4',
|
||||
title: 'Stephan Livera Podcast',
|
||||
host: 'Stephan Livera',
|
||||
description: 'Bitcoin, Lightning Network, and sovereign individual topics.',
|
||||
coverUrl: undefined,
|
||||
year: 2018,
|
||||
episodeCount: 450,
|
||||
genres: ['Bitcoin', 'Lightning', 'Tech'],
|
||||
sources: [
|
||||
{ type: 'fountain', name: 'Fountain', url: 'https://fountain.fm/show/stephanlivera', icon: '⚡' },
|
||||
{ type: 'podcastindex', name: 'Podcast Index', url: 'https://podcastindex.org/podcast/789012', icon: '📻' },
|
||||
{ type: 'podverse', name: 'Podverse', url: 'https://podverse.fm/podcast/stephan-livera', icon: '🎧' },
|
||||
{ type: 'rss', name: 'RSS', url: 'https://stephanlivera.com/feed/', icon: '📡' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'p5',
|
||||
title: 'Hell Money',
|
||||
host: 'Brittany Kaiser & Patrick Wood',
|
||||
description: 'Investigative podcast on financial crime, surveillance, and control systems.',
|
||||
coverUrl: undefined,
|
||||
year: 2022,
|
||||
episodeCount: 80,
|
||||
genres: ['True Crime', 'Finance', 'Investigative'],
|
||||
sources: [
|
||||
{ type: 'rumble', name: 'Rumble', url: 'https://rumble.com/c/hellmoney', icon: '📺' },
|
||||
{ type: 'youtube', name: 'YouTube', url: 'https://youtube.com/@HellMoney', icon: '▶️' },
|
||||
{ type: 'odysee', name: 'Odysee', url: 'https://odysee.com/@HellMoney', icon: '🔗' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'p6',
|
||||
title: 'Cypherpunk Bitstream',
|
||||
host: 'Brandon Zemp',
|
||||
description: 'Decentralization, privacy tech, and cypherpunk philosophy.',
|
||||
coverUrl: undefined,
|
||||
year: 2020,
|
||||
episodeCount: 120,
|
||||
genres: ['Privacy', 'Bitcoin', 'Decentralization'],
|
||||
sources: [
|
||||
{ type: 'fountain', name: 'Fountain', url: 'https://fountain.fm/show/cypherpunkbitstream', icon: '⚡' },
|
||||
{ type: 'castopod', name: 'Castopod', url: 'https://castopod.example/cypherpunk', icon: '🦣' },
|
||||
{ type: 'ipfs', name: 'IPFS', url: 'ipfs://QmCypherpunkBitstream...', icon: '🌐' },
|
||||
{ type: 'rss', name: 'RSS', url: 'https://cypherpunkbitstream.com/feed', icon: '📡' },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
export function searchPodcasts(query: string): Podcast[] {
|
||||
const q = query.toLowerCase()
|
||||
return mockPodcasts.filter(
|
||||
(p) =>
|
||||
p.title.toLowerCase().includes(q) ||
|
||||
(p.host ?? '').toLowerCase().includes(q) ||
|
||||
(p.genres ?? []).some((g) => g.toLowerCase().includes(q))
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user