diff --git a/src/components/NowPlayingBar.tsx b/src/components/NowPlayingBar.tsx
index 9d04826..9bb4359 100644
--- a/src/components/NowPlayingBar.tsx
+++ b/src/components/NowPlayingBar.tsx
@@ -128,7 +128,7 @@ const styles = StyleSheet.create({
height: '100%',
justifyContent: 'center',
alignItems: 'center',
- marginRight: 18,
+ marginRight: 14,
marginLeft: 12,
},
play: {
diff --git a/src/components/NowPlayingLayout.tsx b/src/components/NowPlayingLayout.tsx
index 9b45139..cf238ae 100644
--- a/src/components/NowPlayingLayout.tsx
+++ b/src/components/NowPlayingLayout.tsx
@@ -1,7 +1,7 @@
+import { useNavigation } from '@react-navigation/native'
import { useAtomValue } from 'jotai/utils'
import React from 'react'
-import { StatusBar, StyleSheet, Text, useWindowDimensions, View } from 'react-native'
-import FastImage from 'react-native-fast-image'
+import { StatusBar, StyleSheet, Text, View } from 'react-native'
import { State } from 'react-native-track-player'
import {
currentTrackAtom,
@@ -22,14 +22,31 @@ import PressableImage from './common/PressableImage'
const NowPlayingHeader = () => {
const queueName = useAtomValue(queueNameAtom)
+ const navigation = useNavigation()
return (
-
+ navigation.goBack()}
+ source={require('../../res/arrow_left-fill.png')}
+ style={headerStyles.icons}
+ tintColor="white"
+ hitSlop={12}
+ ripple={true}
+ padding={18}
+ />
{queueName || 'Nothing playing...'}
-
+ {}}
+ source={require('../../res/more_vertical.png')}
+ style={headerStyles.icons}
+ tintColor="white"
+ hitSlop={12}
+ ripple={true}
+ padding={18}
+ />
)
}
@@ -40,12 +57,11 @@ const headerStyles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
- // backgroundColor: 'green',
},
icons: {
- height: 22,
- width: 22,
- margin: 17,
+ height: 42,
+ width: 42,
+ marginHorizontal: 8,
},
queueName: {
...text.paragraph,
@@ -54,16 +70,13 @@ const headerStyles = StyleSheet.create({
const SongCoverArt = () => {
const track = useAtomValue(currentTrackAtom)
- const layout = useWindowDimensions()
-
- const size = layout.width - layout.width / 7
return (
}
- height={size}
- width={size}
+ PlaceholderComponent={() => }
+ height={'100%'}
+ width={'100%'}
coverArtUri={track?.artwork as string}
/>
@@ -72,19 +85,24 @@ const SongCoverArt = () => {
const coverArtStyles = StyleSheet.create({
container: {
- width: '100%',
+ flex: 1,
alignItems: 'center',
- marginTop: 10,
+ padding: 20,
},
})
const SongInfo = () => {
const track = useAtomValue(currentTrackAtom)
+ console.log(track?.artist)
return (
- {track?.title}
- {track?.artist}
+
+ {track?.title}
+
+
+ {track?.artist}
+
)
}
@@ -93,7 +111,6 @@ const infoStyles = StyleSheet.create({
container: {
width: '100%',
alignItems: 'center',
- marginTop: 20,
paddingHorizontal: 20,
},
title: {
@@ -120,7 +137,7 @@ const SeekBar = () => {
-
+
@@ -134,7 +151,7 @@ const SeekBar = () => {
const seekStyles = StyleSheet.create({
container: {
width: '100%',
- marginTop: 40,
+ marginTop: 26,
paddingHorizontal: 20,
},
barContainer: {
@@ -232,7 +249,7 @@ const controlsStyles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
- marginTop: 10,
+ marginBottom: 75,
},
skip: {
height: 40,
diff --git a/src/components/common/PressableImage.tsx b/src/components/common/PressableImage.tsx
index d347f1b..5017a66 100644
--- a/src/components/common/PressableImage.tsx
+++ b/src/components/common/PressableImage.tsx
@@ -9,14 +9,20 @@ const PressableImage: React.FC<{
tintColor?: string
disabled?: boolean
hitSlop?: number
-}> = ({ source, onPress, style, tintColor, disabled, hitSlop }) => {
+ padding?: number
+ ripple?: boolean
+}> = ({ source, onPress, style, tintColor, disabled, hitSlop, padding, ripple }) => {
const [opacity, setOpacity] = useState(1)
const [dimensions, setDimensions] = useState(undefined)
disabled = disabled === undefined ? false : disabled
+ padding = padding || 0
+ ripple = ripple === undefined ? false : ripple
style = {
...(style || {}),
opacity,
+ justifyContent: 'center',
+ alignItems: 'center',
}
useEffect(() => {
@@ -29,6 +35,14 @@ const PressableImage: React.FC<{
onPress={onPress}
disabled={disabled}
hitSlop={hitSlop}
+ android_ripple={
+ ripple
+ ? {
+ color: 'rgba(0.5,0.5,0.5,0.26)',
+ radius: dimensions ? dimensions.width / 2 : undefined,
+ }
+ : undefined
+ }
onPressIn={() => {
if (!disabled) {
setOpacity(0.4)
@@ -43,8 +57,8 @@ const PressableImage: React.FC<{