From b88242fed200b14900056a152db5f8fc1dd94c54 Mon Sep 17 00:00:00 2001 From: balzack Date: Wed, 29 Jan 2025 16:37:27 -0800 Subject: [PATCH] theming for call screen --- .../mobile/src/calling/Calling.styled.ts | 12 +++---- app/client/mobile/src/calling/Calling.tsx | 31 +++++++++++++------ 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/app/client/mobile/src/calling/Calling.styled.ts b/app/client/mobile/src/calling/Calling.styled.ts index 29be92e9..f730d1ac 100644 --- a/app/client/mobile/src/calling/Calling.styled.ts +++ b/app/client/mobile/src/calling/Calling.styled.ts @@ -38,7 +38,6 @@ export const styles = StyleSheet.create({ display: 'flex', alignItems: 'center', justifyContent: 'center', - backgroundColor: 'rgb(64,64,64)', }, calls: { borderRadius: 8, @@ -73,7 +72,6 @@ export const styles = StyleSheet.create({ }, name: { fontSize: 28, - color: '#aaaaaa', paddingLeft: 16, paddingRight: 16, width: '100%', @@ -100,14 +98,14 @@ export const styles = StyleSheet.create({ position: 'absolute', width: '100%', height: '100%', - backgroundColor: 'rgb(64,64,64)', }, card: { width: '100%', - height: 48, - paddingTop: 8, - paddingBottom: 8, - paddingLeft: 16, + height: 64, + paddingTop: 16, + paddingBottom: 16, + paddingLeft: 32, + paddingRight: 32, borderBottomWidth: 1, } }); diff --git a/app/client/mobile/src/calling/Calling.tsx b/app/client/mobile/src/calling/Calling.tsx index 08d5ee43..557e93e2 100644 --- a/app/client/mobile/src/calling/Calling.tsx +++ b/app/client/mobile/src/calling/Calling.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; import { useWindowDimensions, Image, SafeAreaView, Modal, ScrollView, View } from 'react-native'; -import { Surface, Icon, Divider, Button, IconButton, Text, TextInput} from 'react-native-paper'; +import { Surface, Icon, Divider, Button, IconButton, Text, TextInput, useTheme} from 'react-native-paper'; import {styles} from './Calling.styled'; import {useCalling} from './useCalling.hook'; import {BlurView} from '@react-native-community/blur'; @@ -24,6 +24,19 @@ export function Calling({ callCard }: { callCard: string }) { const [accepting, setAccepting] = useState(null as null|string); const [ignoring, setIgnoring] = useState(null as null|string); const [declining, setDeclining] = useState(null as null|string); + const theme = useTheme(); + + const surface = theme.dark ? { + base: 'rgba(16,16,16,1)', + blend: 'rgba(16,16,16,0)', + control: 'rgba(64,64,64,0.6)', + title: 'rgba(32,32,32,0.8)', + } : { + base: 'rgba(212,212,212,1)', + blend: 'rgba(212,212,212,0)', + control: 'rgba(128,128,128,0.6)', + title: 'rgba(192,192,192,0.8)', + }; const toggleVideo = async () => { if (!applyingVideo) { @@ -178,12 +191,12 @@ export function Calling({ callCard }: { callCard: string }) { )} { connecting && !state.calling && ( - + )} { state.calling && ( - + { state.loaded && ( - + )} { state.loaded && ( - + )} { state.loaded && ( - + )} { state.loaded && ( - + )} )} { state.calling && state.loaded && ( - + { state.calling.name && ( { state.calling.name } )} @@ -245,7 +258,7 @@ export function Calling({ callCard }: { callCard: string }) { )} { state.calling && state.loaded && ( - +