Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/forms/BeatForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const BeatForm = ({
)}

{/* Cover Art Section */}
<Feature id="socialbeats-downloads">
<Feature id="socialbeats-cover">
<On>
<Card className="form-section">
<div className="section-header-with-icon">
Expand Down
39 changes: 27 additions & 12 deletions src/pages/Pricing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { logger } from '../logger';
import PricingConfirmModal from './pricing/PricingConfirmModal';
import './Pricing.css';

// Plan configuration - matches backend plans.config.js
// Plan configuration - matches backend plans.config.js and SocialBeats-1.1.yaml
const plans = [
{
name: 'FREE',
Expand All @@ -27,11 +27,16 @@ const plans = [
features: [
{ text: 'Escucha beats ilimitados', included: true },
{ text: 'Máximo 3 beats subidos', included: true },
{ text: 'Perfil básico de artista', included: true },
{ text: 'Estadísticas básicas', included: true },
{ text: 'Tamaño máximo por beat: 10MB', included: true },
{ text: 'Almacenamiento: 30MB', included: true },
{ text: 'Hasta 5 certificaciones', included: true },
{ text: '1 playlist', included: true },
{ text: '3 dashboards de analíticas', included: true },
{ text: 'Perfil avanzado de artista', included: true },
{ text: 'Banner personalizado', included: false },
{ text: 'Cover de perfil', included: false },
{ text: 'Beats destacados', included: false },
{ text: 'Decorativos de perfil', included: false },
{ text: 'Descarga de beats', included: false },
],
},
{
Expand All @@ -45,12 +50,17 @@ const plans = [
popular: true,
features: [
{ text: 'Escucha beats ilimitados', included: true },
{ text: 'Máximo 25 beats subidos', included: true },
{ text: 'Perfil verificado de artista', included: true },
{ text: 'Estadísticas avanzadas', included: true },
{ text: 'Máximo 30 beats subidos', included: true },
{ text: 'Tamaño máximo por beat: 25MB', included: true },
{ text: 'Almacenamiento: 750MB', included: true },
{ text: 'Hasta 10 certificaciones', included: true },
{ text: '3 playlists', included: true },
{ text: '30 dashboards de analíticas', included: true },
{ text: 'Perfil avanzado de artista', included: true },
{ text: 'Banner personalizado', included: true },
{ text: 'Cover de perfil', included: true },
{ text: 'Hasta 3 beats destacados', included: true },
{ text: 'Decorativos de perfil', included: false },
{ text: 'Descarga de beats', included: false },
],
},
{
Expand All @@ -64,12 +74,17 @@ const plans = [
popular: false,
features: [
{ text: 'Escucha beats ilimitados', included: true },
{ text: 'Beats ilimitados subidos', included: true },
{ text: 'Perfil verificado premium', included: true },
{ text: 'Estadísticas completas + insights', included: true },
{ text: 'Beats ilimitados', included: true },
{ text: 'Tamaño máximo por beat: 50MB', included: true },
{ text: 'Almacenamiento: 1GB', included: true },
{ text: 'Certificaciones ilimitadas', included: true },
{ text: '30 playlists', included: true },
{ text: 'Dashboards ilimitados', included: true },
{ text: 'Perfil avanzado de artista', included: true },
{ text: 'Banner personalizado', included: true },
{ text: 'Cover de perfil', included: true },
{ text: 'Beats destacados ilimitados', included: true },
{ text: 'Decorativos de perfil', included: true },
{ text: 'Descarga de beats', included: true },
],
}
];
Expand Down
18 changes: 8 additions & 10 deletions src/pages/app/explore/components/BeatCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import './BeatCard.css';
import { usePlayerStore } from '../../../../store/usePlayerStore';
import { Beat } from '../../../../store/usePlayerStore';
import { getAudioStreamUrl } from '../../../../services/beatsService';
import logo from '../../../../assets/logo-dark-no-fondo.png';

/**
* BeatCard - Tarjeta de beat para la vista de exploración
Expand Down Expand Up @@ -80,14 +81,17 @@ export default function BeatCard({ beat, variant = 'default', onClick }: BeatCar
const beatId = beat._id || beat.id;
const { streamUrl, coverUrl } = await getAudioStreamUrl(beatId);

// Usar defaultCover como fallback si no hay cover disponible
const finalCover = coverUrl || coverImageUrl || defaultCover;

const beatForStore: Beat = {
...beat,
id: beatId,
author: beat.createdBy?.username || 'Unknown',
cover: coverUrl || coverImageUrl || undefined,
cover: finalCover,
audio: {
url: streamUrl,
coverUrl: coverUrl || coverImageUrl || undefined,
coverUrl: finalCover,
duration: beat.duration
}
};
Expand All @@ -100,14 +104,8 @@ export default function BeatCard({ beat, variant = 'default', onClick }: BeatCar
}
};

// Imagen por defecto si no hay cover
const defaultCover = 'data:image/svg+xml,' + encodeURIComponent(`
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<rect fill="#1e293b" width="100" height="100"/>
<circle fill="#8b5cf6" cx="50" cy="50" r="30" opacity="0.3"/>
<circle fill="#ec4899" cx="50" cy="50" r="20" opacity="0.3"/>
</svg>
`);
// Imagen por defecto si no hay cover (mismo logo que en BeatDetailPage y PlaylistDetails)
const defaultCover = logo;

return (
<div
Expand Down
20 changes: 12 additions & 8 deletions src/pages/app/explore/components/BeatsExploreSection.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,33 +98,37 @@
display: flex;
flex-wrap: nowrap;
gap: 1.25rem;
padding: 0.5rem 0 1rem 0;
padding: 0.5rem 0 1.5rem 0;
-webkit-overflow-scrolling: touch;
/* Scroll horizontal aquí */
overflow-x: scroll;
overflow-y: visible;

/* Styled scrollbar */
/* Styled scrollbar - Firefox */
scrollbar-width: thin;
scrollbar-color: var(--accent-primary) rgba(255, 255, 255, 0.05);
scrollbar-color: var(--primary) rgba(255, 255, 255, 0.08);
}

/* Scrollbar personalizada - Webkit (Chrome, Safari, Edge) */
.explore-beats-grid::-webkit-scrollbar {
height: 8px;
height: 6px;
}

.explore-beats-grid::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.05);
border-radius: 4px;
border-radius: 10px;
margin: 0 0.5rem;
}

.explore-beats-grid::-webkit-scrollbar-thumb {
background: var(--accent-primary);
border-radius: 4px;
background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
border-radius: 10px;
transition: all 0.3s ease;
}

.explore-beats-grid::-webkit-scrollbar-thumb:hover {
background: var(--accent-secondary);
background: linear-gradient(90deg, var(--primary-light) 0%, var(--accent) 100%);
box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* Asegurar que las cards tengan tamaño fijo - selector más específico */
Expand Down
13 changes: 0 additions & 13 deletions src/services/beatsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,12 @@ export const getBeats = async (filters = {}) => {
// 👇 CAMBIAR AQUÍ: QUITAR /api/v1
export const getMyBeats = async (params = {}) => {
try {
console.log('📡 Fetching my beats with params:', params);
console.log('🔑 Token presente:', localStorage.getItem('accessToken') ? 'SÍ' : 'NO');
console.log('🔗 Base URL:', client.defaults.baseURL);

const { data } = await client.get('/beats/my-beats');

console.log('📦 My beats response:', data);
console.log('📊 data.data value:', data.data);
console.log('📊 data.data length:', data.data?.length);
console.log('📊 data.data is Array?:', Array.isArray(data.data));
console.log('📊 First beat if any:', data.data?.[0]);

if (data.success && data.data) {
const beatsArray = data.data;
console.log('✅ Returning my beats count:', beatsArray.length);
console.log('✅ Returning my beats:', beatsArray);
return beatsArray;
} else {
console.warn('⚠️ Unexpected API response structure:', data);
return data;
}
} catch (error) {
Expand Down