feat: views and single scroll hitparade and playback
This commit is contained in:
@@ -197,6 +197,7 @@ const HitParade = () => {
|
|||||||
artist={item?.userName}
|
artist={item?.userName}
|
||||||
coverUrl={item?.coverUrl || null}
|
coverUrl={item?.coverUrl || null}
|
||||||
subscriptionLevel={getCreatorLevel(item)}
|
subscriptionLevel={getCreatorLevel(item)}
|
||||||
|
views={item?.monthViews}
|
||||||
onPress={() =>
|
onPress={() =>
|
||||||
navigateToMusicDetails({
|
navigateToMusicDetails({
|
||||||
projectId: item?.id,
|
projectId: item?.id,
|
||||||
@@ -218,6 +219,7 @@ const HitParade = () => {
|
|||||||
artist={item?.userName}
|
artist={item?.userName}
|
||||||
coverUrl={item?.coverUrl || null}
|
coverUrl={item?.coverUrl || null}
|
||||||
subscriptionLevel={getCreatorLevel(item)}
|
subscriptionLevel={getCreatorLevel(item)}
|
||||||
|
views={item?.views}
|
||||||
onPress={() =>
|
onPress={() =>
|
||||||
navigateToMusicDetails({
|
navigateToMusicDetails({
|
||||||
projectId: item?.id,
|
projectId: item?.id,
|
||||||
@@ -448,24 +450,26 @@ const HitParade = () => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const renderWebContent = () => (
|
const renderWebContent = () => (
|
||||||
<ScrollView
|
<View
|
||||||
contentContainerStyle={{
|
style={{
|
||||||
flexGrow: 1,
|
flex: 1,
|
||||||
gap: 24,
|
gap: 24,
|
||||||
paddingBottom: responsiveHeight(20),
|
paddingBottom: responsiveHeight(20),
|
||||||
|
position: 'relative',
|
||||||
|
zIndex: 5,
|
||||||
}}
|
}}
|
||||||
showsVerticalScrollIndicator={false}
|
|
||||||
style={{ flex: 1, position: 'relative', zIndex: 5 }}
|
|
||||||
>
|
>
|
||||||
{renderHero()}
|
{renderHero()}
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
flex: 1,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
gap: 16,
|
gap: 16,
|
||||||
alignItems: 'flex-start',
|
alignItems: 'flex-start',
|
||||||
|
overflow: 'hidden',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<View style={{ flex: 1, gap: 12 }}>
|
<View style={{ flex: 1, height: '100%', gap: 12 }}>
|
||||||
<BlurView
|
<BlurView
|
||||||
intensity={50}
|
intensity={50}
|
||||||
tint="dark"
|
tint="dark"
|
||||||
@@ -489,9 +493,15 @@ const HitParade = () => {
|
|||||||
</Text>
|
</Text>
|
||||||
{/* </BorderGradient> */}
|
{/* </BorderGradient> */}
|
||||||
</BlurView>
|
</BlurView>
|
||||||
{renderSongList()}
|
<ScrollView
|
||||||
|
showsVerticalScrollIndicator={false}
|
||||||
|
contentContainerStyle={{ paddingBottom: 20 }}
|
||||||
|
style={{ flex: 1 }}
|
||||||
|
>
|
||||||
|
{renderSongList()}
|
||||||
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flex: 1, gap: 12 }}>
|
<View style={{ flex: 1, height: '100%', gap: 12 }}>
|
||||||
<BlurView
|
<BlurView
|
||||||
intensity={50}
|
intensity={50}
|
||||||
tint="dark"
|
tint="dark"
|
||||||
@@ -515,9 +525,15 @@ const HitParade = () => {
|
|||||||
</Text>
|
</Text>
|
||||||
{/* </BorderGradient> */}
|
{/* </BorderGradient> */}
|
||||||
</BlurView>
|
</BlurView>
|
||||||
{renderTopMonthColumns()}
|
<ScrollView
|
||||||
|
showsVerticalScrollIndicator={false}
|
||||||
|
contentContainerStyle={{ paddingBottom: 20 }}
|
||||||
|
style={{ flex: 1 }}
|
||||||
|
>
|
||||||
|
{renderTopMonthColumns()}
|
||||||
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flex: 1, gap: 12 }}>
|
<View style={{ flex: 1, height: '100%', gap: 12 }}>
|
||||||
<BlurView
|
<BlurView
|
||||||
intensity={50}
|
intensity={50}
|
||||||
tint="dark"
|
tint="dark"
|
||||||
@@ -541,10 +557,16 @@ const HitParade = () => {
|
|||||||
</Text>
|
</Text>
|
||||||
{/* </BorderGradient> */}
|
{/* </BorderGradient> */}
|
||||||
</BlurView>
|
</BlurView>
|
||||||
{renderAllTimeColumns()}
|
<ScrollView
|
||||||
|
showsVerticalScrollIndicator={false}
|
||||||
|
contentContainerStyle={{ paddingBottom: 20 }}
|
||||||
|
style={{ flex: 1 }}
|
||||||
|
>
|
||||||
|
{renderAllTimeColumns()}
|
||||||
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</View>
|
||||||
)
|
)
|
||||||
|
|
||||||
const renderMobileContent = () => (
|
const renderMobileContent = () => (
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ const SongCard = ({
|
|||||||
coverUrl = null,
|
coverUrl = null,
|
||||||
onPress = null,
|
onPress = null,
|
||||||
subscriptionLevel = null,
|
subscriptionLevel = null,
|
||||||
|
views = null,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Pressable
|
<Pressable
|
||||||
@@ -48,9 +49,9 @@ const SongCard = ({
|
|||||||
...Style.containerRow,
|
...Style.containerRow,
|
||||||
}}
|
}}
|
||||||
tint="dark"
|
tint="dark"
|
||||||
// experimentalBlurMethod={
|
// experimentalBlurMethod={
|
||||||
// Platform.OS !== "ios" ? "dimezisBlurView" : "none"
|
// Platform.OS !== "ios" ? "dimezisBlurView" : "none"
|
||||||
// }
|
// }
|
||||||
>
|
>
|
||||||
<View style={{ flex: 1, ...Style.containerRow, gap: 15 }}>
|
<View style={{ flex: 1, ...Style.containerRow, gap: 15 }}>
|
||||||
<Text
|
<Text
|
||||||
@@ -91,6 +92,17 @@ const SongCard = ({
|
|||||||
>
|
>
|
||||||
{artist}
|
{artist}
|
||||||
</Text>
|
</Text>
|
||||||
|
{views !== null && (
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 12,
|
||||||
|
color: Palette.gray,
|
||||||
|
fontFamily: FONT_FAMILY.InterRegular,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
• {views} vues
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<SubscriptionBadge level={subscriptionLevel} size={36} style={{ marginLeft: 'auto' }} />
|
<SubscriptionBadge level={subscriptionLevel} size={36} style={{ marginLeft: 'auto' }} />
|
||||||
|
|||||||
@@ -372,6 +372,7 @@ const PlaybackCharts = ({ onPlaybackPress }) => {
|
|||||||
artist={item?.userName}
|
artist={item?.userName}
|
||||||
coverUrl={item?.coverUrl || null}
|
coverUrl={item?.coverUrl || null}
|
||||||
subscriptionLevel={getCreatorLevel(item)}
|
subscriptionLevel={getCreatorLevel(item)}
|
||||||
|
views={item?.monthViews}
|
||||||
onPress={() => handlePlaybackSelected(item)}
|
onPress={() => handlePlaybackSelected(item)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
@@ -388,6 +389,7 @@ const PlaybackCharts = ({ onPlaybackPress }) => {
|
|||||||
artist={item?.userName}
|
artist={item?.userName}
|
||||||
coverUrl={item?.coverUrl || null}
|
coverUrl={item?.coverUrl || null}
|
||||||
subscriptionLevel={getCreatorLevel(item)}
|
subscriptionLevel={getCreatorLevel(item)}
|
||||||
|
views={item?.views}
|
||||||
onPress={() => handlePlaybackSelected(item)}
|
onPress={() => handlePlaybackSelected(item)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
@@ -395,24 +397,26 @@ const PlaybackCharts = ({ onPlaybackPress }) => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const renderWebContent = () => (
|
const renderWebContent = () => (
|
||||||
<ScrollView
|
<View
|
||||||
contentContainerStyle={{
|
style={{
|
||||||
flexGrow: 1,
|
flex: 1,
|
||||||
gap: 24,
|
gap: 24,
|
||||||
paddingBottom: responsiveHeight(20),
|
paddingBottom: responsiveHeight(20),
|
||||||
|
position: 'relative',
|
||||||
|
zIndex: 5,
|
||||||
}}
|
}}
|
||||||
showsVerticalScrollIndicator={false}
|
|
||||||
style={{ flex: 1, position: 'relative', zIndex: 5 }}
|
|
||||||
>
|
>
|
||||||
{renderHero()}
|
{renderHero()}
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
flex: 1,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
gap: 16,
|
gap: 16,
|
||||||
alignItems: 'flex-start',
|
alignItems: 'flex-start',
|
||||||
|
overflow: 'hidden',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<View style={{ flex: 1, gap: 12 }}>
|
<View style={{ flex: 1, height: '100%', gap: 12 }}>
|
||||||
<BlurView
|
<BlurView
|
||||||
intensity={50}
|
intensity={50}
|
||||||
tint="dark"
|
tint="dark"
|
||||||
@@ -434,9 +438,15 @@ const PlaybackCharts = ({ onPlaybackPress }) => {
|
|||||||
Playbacks
|
Playbacks
|
||||||
</Text>
|
</Text>
|
||||||
</BlurView>
|
</BlurView>
|
||||||
{renderPlaybacksList()}
|
<ScrollView
|
||||||
|
showsVerticalScrollIndicator={false}
|
||||||
|
contentContainerStyle={{ paddingBottom: 20 }}
|
||||||
|
style={{ flex: 1 }}
|
||||||
|
>
|
||||||
|
{renderPlaybacksList()}
|
||||||
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flex: 1, gap: 12 }}>
|
<View style={{ flex: 1, height: '100%', gap: 12 }}>
|
||||||
<BlurView
|
<BlurView
|
||||||
intensity={50}
|
intensity={50}
|
||||||
tint="dark"
|
tint="dark"
|
||||||
@@ -458,9 +468,15 @@ const PlaybackCharts = ({ onPlaybackPress }) => {
|
|||||||
Top du mois
|
Top du mois
|
||||||
</Text>
|
</Text>
|
||||||
</BlurView>
|
</BlurView>
|
||||||
{renderTopMonthColumns()}
|
<ScrollView
|
||||||
|
showsVerticalScrollIndicator={false}
|
||||||
|
contentContainerStyle={{ paddingBottom: 20 }}
|
||||||
|
style={{ flex: 1 }}
|
||||||
|
>
|
||||||
|
{renderTopMonthColumns()}
|
||||||
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flex: 1, gap: 12 }}>
|
<View style={{ flex: 1, height: '100%', gap: 12 }}>
|
||||||
<BlurView
|
<BlurView
|
||||||
intensity={50}
|
intensity={50}
|
||||||
tint="dark"
|
tint="dark"
|
||||||
@@ -482,10 +498,16 @@ const PlaybackCharts = ({ onPlaybackPress }) => {
|
|||||||
All Time
|
All Time
|
||||||
</Text>
|
</Text>
|
||||||
</BlurView>
|
</BlurView>
|
||||||
{renderAllTimeColumns()}
|
<ScrollView
|
||||||
|
showsVerticalScrollIndicator={false}
|
||||||
|
contentContainerStyle={{ paddingBottom: 20 }}
|
||||||
|
style={{ flex: 1 }}
|
||||||
|
>
|
||||||
|
{renderAllTimeColumns()}
|
||||||
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</View>
|
||||||
)
|
)
|
||||||
|
|
||||||
const renderMobileContent = () => (
|
const renderMobileContent = () => (
|
||||||
|
|||||||
Reference in New Issue
Block a user