update struct 🎨
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
31fcc3f526
commit
bbc1af9ccd
@ -1,12 +1,9 @@
|
|||||||
|
|
||||||
const Icons = {
|
const Icons = {
|
||||||
discovery: require('./images/icon_discovery.png'),
|
discovery: require('./images/icon_discovery.png'),
|
||||||
like: require('./images/icon_like.png'),
|
like: require('./images/icon_like.png'),
|
||||||
dislike: require('./images/icon_dislike.png'),
|
dislike: require('./images/icon_dislike.png'),
|
||||||
bookmark : require('./images/icon_bookmark.svg'),
|
bookmark : require('./images/icon_bookmark.svg'),
|
||||||
share : require('./images/Vector.png'),
|
share : require('./images/Vector.png'),
|
||||||
|
|
||||||
// riveLike : require('./light_like.riv'),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Icons;
|
export default Icons;
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import { View } from 'react-native';
|
|
||||||
import Animated from 'react-native-reanimated';
|
|
||||||
|
|
||||||
export default function CurrentMusic() {
|
|
||||||
|
|
||||||
return (
|
|
||||||
|
|
||||||
<View style={{
|
|
||||||
width: 200,
|
|
||||||
height: 200,
|
|
||||||
backgroundColor: 'white',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
borderRadius: 25,
|
|
||||||
// iOS
|
|
||||||
shadowOpacity: 0.2,
|
|
||||||
shadowOffset: { width: 0, height: 0 },
|
|
||||||
shadowRadius: 20,
|
|
||||||
// Android
|
|
||||||
elevation: 2,
|
|
||||||
}}>
|
|
||||||
<Animated.View style={[{
|
|
||||||
width: 200,
|
|
||||||
height: 200,
|
|
||||||
backgroundColor: 'white',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
borderRadius: 25,
|
|
||||||
// iOS
|
|
||||||
shadowOpacity: 0.2,
|
|
||||||
shadowOffset: { width: 0, height: 0 },
|
|
||||||
shadowRadius: 20,
|
|
||||||
// Android
|
|
||||||
elevation: 2,
|
|
||||||
}, { overflow: 'hidden' }]}>
|
|
||||||
<Animated.View />
|
|
||||||
</Animated.View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import { ScrollView, StyleSheet } from "react-native";
|
|
||||||
import Music from "../model/Music";
|
|
||||||
import { Artist } from "./Artist";
|
|
||||||
|
|
||||||
export const ArtistLayout = () => {
|
|
||||||
const MUSIC_LIST: Music[] = [
|
|
||||||
new Music("La pharmacie", "Jul", require("../assets/images/jul.png"),"",""),
|
|
||||||
new Music("Deux frères", "PNL", require("../assets/images/pnl.png"),"",""),
|
|
||||||
new Music("Bambina", "PNL", "https://upload.wikimedia.org/wikipedia/en/a/a0/PNL_-_Dans_la_l%C3%A9gende.png","",""),
|
|
||||||
new Music("Stratos", "Kekra", "https://images.genius.com/ddc9cadedd1d4cef0860aaa85af9cd46.705x705x1.png","",""),
|
|
||||||
new Music("Autobahn", "Sch", "https://images.genius.com/83b6c98680d38bde1571f6b4093244b5.1000x1000x1.jpg","",""),
|
|
||||||
new Music("Freeze Raël", "Freeze Corleone", "https://intrld.com/wp-content/uploads/2020/08/freeze-corleone-la-menace-fanto%CC%82me.png","",""),
|
|
||||||
new Music("Blanka", "PNL", require("../assets/images/pnl.png"),"",""),
|
|
||||||
new Music("Kratos", "PNL", "https://upload.wikimedia.org/wikipedia/en/a/a0/PNL_-_Dans_la_l%C3%A9gende.png","",""),
|
|
||||||
]
|
|
||||||
const [artists, setArtists] = useState<Music[]>(MUSIC_LIST);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ScrollView contentContainerStyle={styles.container}>
|
|
||||||
{artists.map((artist, i) => (
|
|
||||||
<Artist
|
|
||||||
artist={artist}
|
|
||||||
key={artist.title}
|
|
||||||
onPress={() => {
|
|
||||||
const tmppArtist = new Music("Kratos", "PNL", "https://upload.wikimedia.org/wikipedia/en/a/a0/PNL_-_Dans_la_l%C3%A9gende.png","","");
|
|
||||||
|
|
||||||
artists.push(tmppArtist);
|
|
||||||
setArtists([...artists]);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
container: {
|
|
||||||
flexDirection: "row",
|
|
||||||
flexWrap: "wrap",
|
|
||||||
},
|
|
||||||
});
|
|
@ -1,24 +0,0 @@
|
|||||||
import { View } from 'react-native'
|
|
||||||
|
|
||||||
interface HalfCirlceProps {
|
|
||||||
backgroundColor: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const HalfCirlce = ({ backgroundColor }: HalfCirlceProps) => {
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View style={{
|
|
||||||
width: RADIUS * 2,
|
|
||||||
height: RADIUS * 2,
|
|
||||||
overflow: "hidden",
|
|
||||||
|
|
||||||
}}>
|
|
||||||
<View style={{ backgroundColor: backgroundColor, width: RADIUS * 2, height: RADIUS * 2, borderRadius: RADIUS, }}>
|
|
||||||
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export default HalfCirlce;
|
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View, StyleSheet, Animated, useWindowDimensions } from 'react-native';
|
import { View, StyleSheet, Animated, useWindowDimensions } from 'react-native';
|
||||||
|
|
||||||
import normalize from '../components/Normalize';
|
import normalize from './Normalize';
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
export default function Paginator({ data, scrollX }) {
|
export default function Paginator({ data, scrollX }) {
|
@ -0,0 +1,29 @@
|
|||||||
|
import { Image, StyleSheet, Pressable } from 'react-native'
|
||||||
|
import React from 'react'
|
||||||
|
import Icons from '../assets/icon';
|
||||||
|
import { RiveRef } from 'rive-react-native';
|
||||||
|
|
||||||
|
export default function PlayButtonComponent() {
|
||||||
|
const riveRef = React.useRef<RiveRef>(null);
|
||||||
|
|
||||||
|
const handlePlay = () => { riveRef.current?.play() };
|
||||||
|
return (
|
||||||
|
<Pressable onPress={handlePlay}>
|
||||||
|
<Image source={Icons.discovery} style={[styles.image]} />
|
||||||
|
</Pressable>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
button: {
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
borderRadius: 24,
|
||||||
|
resizeMode: 'cover',
|
||||||
|
width: 65,
|
||||||
|
height: 65,
|
||||||
|
backgroundColor: 'black',
|
||||||
|
}
|
||||||
|
})
|
@ -1,69 +0,0 @@
|
|||||||
import { View, StyleSheet, Dimensions, TouchableOpacity } from "react-native";
|
|
||||||
import Animated, {
|
|
||||||
Layout,
|
|
||||||
ZoomIn,
|
|
||||||
ZoomOut,
|
|
||||||
} from "react-native-reanimated";
|
|
||||||
|
|
||||||
const { width } = Dimensions.get("window");
|
|
||||||
const SIZE = width / 3;
|
|
||||||
import { Feather as Icon } from "@expo/vector-icons";
|
|
||||||
import Music from "../model/Music";
|
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
|
|
||||||
interface SelectedCardProps {
|
|
||||||
artist: Music;
|
|
||||||
onPress: () => void;
|
|
||||||
}
|
|
||||||
export const SelectedCard = ({ artist, onPress }: SelectedCardProps) => {
|
|
||||||
const [selected, setSeleted] = useState(false);
|
|
||||||
const onS = () => {
|
|
||||||
setSeleted(!selected);
|
|
||||||
onPress();
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<TouchableOpacity onPress={onS}>
|
|
||||||
<Animated.View
|
|
||||||
style={styles.container}
|
|
||||||
entering={ZoomIn}
|
|
||||||
exiting={ZoomOut}
|
|
||||||
layout={Layout.delay(200)}
|
|
||||||
>
|
|
||||||
<View style={styles.card}>
|
|
||||||
|
|
||||||
{selected && (
|
|
||||||
<View style={styles.cheked}>
|
|
||||||
<Icon name="check-circle" color="black" size={24} />
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
</View>
|
|
||||||
</Animated.View>
|
|
||||||
</TouchableOpacity>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
container: {
|
|
||||||
width: SIZE,
|
|
||||||
height: SIZE,
|
|
||||||
padding: 8,
|
|
||||||
},
|
|
||||||
card: {
|
|
||||||
flex: 1,
|
|
||||||
padding: 8,
|
|
||||||
alignItems: "flex-end",
|
|
||||||
},
|
|
||||||
image: {
|
|
||||||
borderRadius: 8,
|
|
||||||
...StyleSheet.absoluteFillObject,
|
|
||||||
width: undefined,
|
|
||||||
height: undefined,
|
|
||||||
},
|
|
||||||
cheked: {
|
|
||||||
backgroundColor: "white",
|
|
||||||
borderRadius: 100,
|
|
||||||
alignItems: "center",
|
|
||||||
}
|
|
||||||
});
|
|
@ -1,39 +0,0 @@
|
|||||||
import { Image , StyleSheet, Pressable } from 'react-native'
|
|
||||||
import React from 'react'
|
|
||||||
import Icons from '../../assets/icons/icons/icon';
|
|
||||||
import { RiveRef } from 'rive-react-native';
|
|
||||||
|
|
||||||
interface ButtonProps {
|
|
||||||
name : string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const FladButton = ({name} : ButtonProps) => {
|
|
||||||
const riveRef = React.useRef<RiveRef>(null);
|
|
||||||
|
|
||||||
const handlePlay = () => { riveRef.current?.play() };
|
|
||||||
return (
|
|
||||||
<Pressable onPress={handlePlay}>
|
|
||||||
<Image source={Icons.discovery} style={[styles.image]} />
|
|
||||||
</Pressable>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
button : {
|
|
||||||
justifyContent : 'center',
|
|
||||||
alignItems : 'center',
|
|
||||||
},
|
|
||||||
image : {
|
|
||||||
borderRadius : 24,
|
|
||||||
resizeMode: 'cover',
|
|
||||||
width: 65,
|
|
||||||
height: 65,
|
|
||||||
backgroundColor: 'black',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default FladButton;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
import { View, Text, StyleSheet, Image } from 'react-native';
|
|
||||||
|
|
||||||
export interface RenderCellProps {
|
|
||||||
data : any;
|
|
||||||
}
|
|
||||||
export const LittleCard = (props: RenderCellProps) => {
|
|
||||||
return (
|
|
||||||
<View style={styles.similarContainer}>
|
|
||||||
<Image source={{ uri: props.data.image }} style={styles.similarPoster}></Image>
|
|
||||||
<Text numberOfLines={2} style={styles.similarTitleFilm}>{props.data.title}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
|
|
||||||
similarContainer: {
|
|
||||||
marginHorizontal: 7
|
|
||||||
},
|
|
||||||
similarTitleFilm: {
|
|
||||||
color: "#DADADA",
|
|
||||||
paddingTop: 5,
|
|
||||||
fontWeight: "300"
|
|
||||||
},
|
|
||||||
similarPoster: {
|
|
||||||
height: 160,
|
|
||||||
width: 160,
|
|
||||||
borderRadius: 16
|
|
||||||
}
|
|
||||||
})
|
|
Loading…
Reference in new issue