From cd916644e8db2bd494564f2c545056732fe773a3 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Wed, 9 Aug 2023 18:02:36 -0300 Subject: [PATCH] start the tweaks on layout --- .../message/Components/Audio/Slider.tsx | 4 ++-- .../message/Components/Audio/index.tsx | 19 +++++++++++-------- .../message/Components/Audio/styles.ts | 1 - app/lib/constants/colors.ts | 6 ++++++ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/containers/message/Components/Audio/Slider.tsx b/app/containers/message/Components/Audio/Slider.tsx index 6674bb97d..b8ae964ca 100644 --- a/app/containers/message/Components/Audio/Slider.tsx +++ b/app/containers/message/Components/Audio/Slider.tsx @@ -162,8 +162,8 @@ const Slider = ({ thumbColor = '', sound, onEndCallback }: ISlider) => { animatedProps={getCurrentTime} /> - - + + diff --git a/app/containers/message/Components/Audio/index.tsx b/app/containers/message/Components/Audio/index.tsx index f4d5619ff..87d59361c 100644 --- a/app/containers/message/Components/Audio/index.tsx +++ b/app/containers/message/Components/Audio/index.tsx @@ -9,7 +9,7 @@ import Markdown from '../../../markdown'; import { CustomIcon } from '../../../CustomIcon'; import { themes } from '../../../../lib/constants'; import MessageContext from '../../Context'; -import ActivityIndicator from '../../../ActivityIndicator'; +// import ActivityIndicator from '../../../ActivityIndicator'; import { TGetCustomEmoji } from '../../../../definitions/IEmoji'; import { IAttachment, IUserMessage } from '../../../../definitions'; import { useTheme } from '../../../../theme'; @@ -51,23 +51,26 @@ const BUTTON_HIT_SLOP = { top: 12, right: 12, bottom: 12, left: 12 }; const Button = React.memo(({ loading, paused, onPress, disabled, cached }: IButton) => { const { colors } = useTheme(); - let customIconName: 'arrow-down-circle' | 'play-filled' | 'pause-filled' = 'arrow-down-circle'; + let customIconName: 'arrow-down' | 'play-shape-filled' | 'pause-shape-filled' | 'loading' = 'arrow-down'; if (cached) { - customIconName = paused ? 'play-filled' : 'pause-filled'; + customIconName = paused ? 'play-shape-filled' : 'pause-shape-filled'; + } + if (loading) { + customIconName = 'loading'; } return ( - {loading ? ( + + {/* {loading ? ( ) : ( - - )} + )} */} ); }); @@ -223,7 +226,7 @@ const MessageAudio = ({ file, getCustomEmoji, author, isReply, style }: IMessage if (isReply) { thumbColor = themes[theme].tintDisabled; } else { - thumbColor = themes[theme].tintColor; + thumbColor = themes[theme].audioPlayerPrimary; } return ( diff --git a/app/containers/message/Components/Audio/styles.ts b/app/containers/message/Components/Audio/styles.ts index ef59931b9..ea9a537de 100644 --- a/app/containers/message/Components/Audio/styles.ts +++ b/app/containers/message/Components/Audio/styles.ts @@ -14,7 +14,6 @@ const styles = StyleSheet.create({ }, playPauseButton: { alignItems: 'center', - backgroundColor: '#929', marginLeft: 16, height: 32, width: 32, diff --git a/app/lib/constants/colors.ts b/app/lib/constants/colors.ts index eba53bca4..cb75c9651 100644 --- a/app/lib/constants/colors.ts +++ b/app/lib/constants/colors.ts @@ -100,6 +100,8 @@ export const colors = { gray100: '#CBCED1', n900: '#1F2329', overlayColor: '#1F2329B2', + audioPlayerPrimary: '#156FF5', + audioPlayerSecondary: '#CBCED1', ...mentions, ...callButtons }, @@ -177,6 +179,8 @@ export const colors = { gray100: '#CBCED1', n900: '#FFFFFF', overlayColor: '#1F2329B2', + audioPlayerPrimary: '#3976D1', + audioPlayerSecondary: '#404754', ...mentions, ...callButtons }, @@ -254,6 +258,8 @@ export const colors = { gray100: '#CBCED1', n900: '#FFFFFF', overlayColor: '#1F2329B2', + audioPlayerPrimary: '#3976D1', + audioPlayerSecondary: '#404754', ...mentions, ...callButtons }