mirror of
https://github.com/balzack/databag.git
synced 2025-05-05 07:55:15 +00:00
minor ui tweaks
This commit is contained in:
parent
c44a91accd
commit
a78bdd4271
@ -46,10 +46,10 @@ const databagColors = {
|
|||||||
elevation: {
|
elevation: {
|
||||||
level0: 'rgb(255, 255, 255)',
|
level0: 'rgb(255, 255, 255)',
|
||||||
level1: 'rgb(240, 240, 240)',
|
level1: 'rgb(240, 240, 240)',
|
||||||
level2: 'rgb(225, 225, 225)',
|
level2: 'rgb(232, 232, 232)',
|
||||||
level3: 'rgb(210, 210, 210)',
|
level3: 'rgb(216, 216, 216)',
|
||||||
level4: 'rgb(180, 180, 180)',
|
level4: 'rgb(208, 208, 208)',
|
||||||
level5: 'rgb(160, 160, 160)',
|
level5: 'rgb(200, 200, 200)',
|
||||||
},
|
},
|
||||||
surfaceDisabled: 'rgba(25, 28, 26, 0.12)',
|
surfaceDisabled: 'rgba(25, 28, 26, 0.12)',
|
||||||
onSurfaceDisabled: 'rgba(25, 28, 26, 0.38)',
|
onSurfaceDisabled: 'rgba(25, 28, 26, 0.38)',
|
||||||
|
@ -2250,7 +2250,7 @@ SPEC CHECKSUMS:
|
|||||||
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
|
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
|
||||||
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
|
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
|
||||||
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
|
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
|
||||||
Yoga: b05994d1933f507b0a28ceaa4fdb968dc18da178
|
Yoga: a9ef4f5c2cd79ad812110525ef61048be6a582a4
|
||||||
|
|
||||||
PODFILE CHECKSUM: 9cf7373afef7b881c911fda82ff1f94eacee3e98
|
PODFILE CHECKSUM: 9cf7373afef7b881c911fda82ff1f94eacee3e98
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@ export function Contacts({openRegistry, openContact, callContact, textContact}:
|
|||||||
color={Colors.connected}
|
color={Colors.connected}
|
||||||
select={async () => {
|
select={async () => {
|
||||||
try {
|
try {
|
||||||
console.log(item);
|
|
||||||
await actions.call(item);
|
await actions.call(item);
|
||||||
|
callContact(item);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
setAlert(true);
|
setAlert(true);
|
||||||
|
@ -20,7 +20,6 @@ export const styles = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
borderRadius: 16,
|
|
||||||
paddingLeft: 16,
|
paddingLeft: 16,
|
||||||
paddingRight: 8,
|
paddingRight: 8,
|
||||||
},
|
},
|
||||||
|
@ -106,14 +106,14 @@ export function Ring() {
|
|||||||
const declineButton = <IconButton key="decline" style={styles.flipIcon} iconColor="white" containerColor={Colors.offsync} icon="phone-outline" compact="true" mode="contained" size={24} loading={declining===callId} onPress={()=>decline(callId, card)} />
|
const declineButton = <IconButton key="decline" style={styles.flipIcon} iconColor="white" containerColor={Colors.offsync} icon="phone-outline" compact="true" mode="contained" size={24} loading={declining===callId} onPress={()=>decline(callId, card)} />
|
||||||
const acceptButton = <IconButton key="accept" style={styles.circleIcon} iconColor="white" containerColor={Colors.primary} icon="phone-outline" compact="true" mode="contained" size={24} loading={accepting===callId} onPress={()=>accept(callId, card)} />
|
const acceptButton = <IconButton key="accept" style={styles.circleIcon} iconColor="white" containerColor={Colors.primary} icon="phone-outline" compact="true" mode="contained" size={24} loading={accepting===callId} onPress={()=>accept(callId, card)} />
|
||||||
return (
|
return (
|
||||||
<Contact containerStyle={styles.card} placeholder={''} imageUrl={imageUrl} name={name} node={node} handle={handle} actions={[ignoreButton, declineButton, acceptButton]} />
|
<Contact containerStyle={styles.card} placeholder={state.strings.name} imageUrl={imageUrl} name={name} node={node} handle={handle} actions={[ignoreButton, declineButton, acceptButton]} />
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={(accepting || state.calling || state.calls.length > 0) ? styles.active : styles.inactive}>
|
<View style={(accepting || state.calling || state.calls.length > 0) ? styles.active : styles.inactive}>
|
||||||
{ state.calls.length > 0 && !accepting && !state.calling && (
|
{ state.calls.length > 0 && !accepting && !state.calling && (
|
||||||
<Surface elevation={4} mode="flat" style={styles.ring}>
|
<Surface elevation={4} mode="flat" style={{ ...styles.ring, borderRadius: display.layout === 'large' ? 16 : 0 }}>
|
||||||
{ calls[0] }
|
{ calls[0] }
|
||||||
</Surface>
|
</Surface>
|
||||||
)}
|
)}
|
||||||
|
@ -11,7 +11,8 @@ export function useRing() {
|
|||||||
const offset = useRef(false);
|
const offset = useRef(false);
|
||||||
|
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
strings: display.state.strings,
|
strings: display.state.strings,
|
||||||
|
layout: display.state.layout,
|
||||||
calls: [] as { callId: string, card: Card }[],
|
calls: [] as { callId: string, card: Card }[],
|
||||||
calling: null as null | Card,
|
calling: null as null | Card,
|
||||||
remoteVideo: false,
|
remoteVideo: false,
|
||||||
@ -27,6 +28,11 @@ export function useRing() {
|
|||||||
setState((s) => ({ ...s, ...value }))
|
setState((s) => ({ ...s, ...value }))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const { layout, strings } = display.state;
|
||||||
|
updateState({ layout, strings });
|
||||||
|
}, [display.state]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
if (offset.current) {
|
if (offset.current) {
|
||||||
|
@ -437,6 +437,10 @@ function SettingsScreen({nav}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function HomeScreen({nav}) {
|
function HomeScreen({nav}) {
|
||||||
|
useEffect(() => {
|
||||||
|
nav.contacts.closeDrawer();
|
||||||
|
}, [nav.callCard]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.frame}>
|
<View style={styles.frame}>
|
||||||
<View style={styles.left}>
|
<View style={styles.left}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user