From ac7548da974b3a6f5b1e2c299037a03d3ad429fd Mon Sep 17 00:00:00 2001 From: lyswhut Date: Mon, 16 Aug 2021 11:47:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A8=AA=E5=B1=8F=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E8=AF=A6=E6=83=85=E9=A1=B5=E8=BF=9B=E5=85=A5=E5=8A=A8?= =?UTF-8?q?=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/screens/PlayDetail/Landscape/Pic.js | 1 + src/screens/PlayDetail/Landscape/Player/index.js | 3 ++- src/screens/PlayDetail/Landscape/components/Header.js | 2 +- src/screens/PlayDetail/Landscape/index.js | 2 +- src/screens/PlayDetail/index.js | 6 +++--- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index f5d6ccf..08e7405 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,6 +1,7 @@ ### 新增 - 新增横屏状态下的播放详情页 +- 新增橙、粉、灰主题色 ### 调整 diff --git a/src/screens/PlayDetail/Landscape/Pic.js b/src/screens/PlayDetail/Landscape/Pic.js index 9b1e326..ddfe290 100644 --- a/src/screens/PlayDetail/Landscape/Pic.js +++ b/src/screens/PlayDetail/Landscape/Pic.js @@ -34,6 +34,7 @@ const styles = StyleSheet.create({ flexShrink: 1, justifyContent: 'center', alignItems: 'center', + // backgroundColor: 'rgba(0,0,0,0.1)', }, content: { // elevation: 3, diff --git a/src/screens/PlayDetail/Landscape/Player/index.js b/src/screens/PlayDetail/Landscape/Player/index.js index 67d316b..c31fac7 100644 --- a/src/screens/PlayDetail/Landscape/Player/index.js +++ b/src/screens/PlayDetail/Landscape/Player/index.js @@ -13,7 +13,7 @@ export default memo(({ playNextModes }) => { const theme = useGetter('common', 'theme') return ( - + @@ -23,6 +23,7 @@ export default memo(({ playNextModes }) => { const styles = StyleSheet.create({ container: { width: '100%', + flexDirection: 'row', // paddingTop: progressContentPadding, // marginTop: -progressContentPadding, // backgroundColor: 'rgba(0, 0, 0, .1)', diff --git a/src/screens/PlayDetail/Landscape/components/Header.js b/src/screens/PlayDetail/Landscape/components/Header.js index b5433f6..518464b 100644 --- a/src/screens/PlayDetail/Landscape/components/Header.js +++ b/src/screens/PlayDetail/Landscape/components/Header.js @@ -17,7 +17,7 @@ export default memo(() => { } return ( - + diff --git a/src/screens/PlayDetail/Landscape/index.js b/src/screens/PlayDetail/Landscape/index.js index bfc9cef..4d290f6 100644 --- a/src/screens/PlayDetail/Landscape/index.js +++ b/src/screens/PlayDetail/Landscape/index.js @@ -25,7 +25,7 @@ export default memo(({ componentId, animated }) => { - + <View> <MoreBtn /> diff --git a/src/screens/PlayDetail/index.js b/src/screens/PlayDetail/index.js index d799ba4..5274f7b 100644 --- a/src/screens/PlayDetail/index.js +++ b/src/screens/PlayDetail/index.js @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react' import { View, StyleSheet } from 'react-native' import { useGetter, useDispatch } from '@/store' -import { useDeviceOrientation } from '@/utils/hooks' +import { useDimensions } from '@/utils/hooks' import { useNavigationComponentDidDisappear, useNavigationComponentDidAppear } from '@/navigation' import { screenUnkeepAwake } from '@/utils/utils' @@ -12,7 +12,7 @@ export default (props) => { // const theme = useGetter('common', 'theme') const setComponentId = useDispatch('common', 'setComponentId') const [animated, setAnimated] = useState(false) - const { portrait } = useDeviceOrientation() + const { window } = useDimensions() useEffect(() => { setComponentId({ name: 'playDetail', id: props.componentId }) // eslint-disable-next-line react-hooks/exhaustive-deps @@ -25,7 +25,7 @@ export default (props) => { }) return ( - portrait + window.height > window.width ? <Portrait componentId={props.componentId} animated={animated} /> : <Landscape componentId={props.componentId} animated={animated} /> )