Compare commits

...

2 Commits

Author SHA1 Message Date
Lei Nelissen
8914a26822 chore: Bump version 2022-05-04 16:56:39 +02:00
Lei Nelissen
91eaa1d864 fix: No interaction on Android webview (#59) 2022-05-04 16:55:32 +02:00
3 changed files with 12 additions and 7 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "JellyfinAudioPlayer", "name": "JellyfinAudioPlayer",
"version": "1.2.3", "version": "1.2.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "JellyfinAudioPlayer", "name": "JellyfinAudioPlayer",
"version": "1.2.3", "version": "1.2.4",
"dependencies": { "dependencies": {
"@react-native-community/async-storage": "^1.12.1", "@react-native-community/async-storage": "^1.12.1",
"@react-native-community/masked-view": "^0.1.11", "@react-native-community/masked-view": "^0.1.11",

View File

@@ -1,6 +1,6 @@
{ {
"name": "JellyfinAudioPlayer", "name": "JellyfinAudioPlayer",
"version": "1.2.3", "version": "1.2.4",
"main": "src/index.js", "main": "src/index.js",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@@ -1,6 +1,5 @@
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import styled, { css } from 'styled-components/native'; import styled, { css } from 'styled-components/native';
import { Pressable } from 'react-native';
import { useNavigation, StackActions } from '@react-navigation/native'; import { useNavigation, StackActions } from '@react-navigation/native';
import useDefaultStyles from './Colors'; import useDefaultStyles from './Colors';
@@ -8,12 +7,12 @@ interface Props {
fullSize?: boolean; fullSize?: boolean;
} }
const Background = styled(Pressable)` const Background = styled.View`
flex: 1; flex: 1;
justify-content: center; justify-content: center;
`; `;
const Container = styled(Pressable)<Pick<Props, 'fullSize'>>` const Container = styled.View<Pick<Props, 'fullSize'>>`
margin: auto 20px; margin: auto 20px;
padding: 4px; padding: 4px;
border-radius: 12px; border-radius: 12px;
@@ -27,6 +26,10 @@ const Container = styled(Pressable)<Pick<Props, 'fullSize'>>`
`} `}
`; `;
const Spacer = styled.Pressable`
flex: 1;
`;
const Modal: React.FC<Props> = ({ children, fullSize = true }) => { const Modal: React.FC<Props> = ({ children, fullSize = true }) => {
const defaultStyles = useDefaultStyles(); const defaultStyles = useDefaultStyles();
const navigation = useNavigation(); const navigation = useNavigation();
@@ -35,10 +38,12 @@ const Modal: React.FC<Props> = ({ children, fullSize = true }) => {
}, [navigation]); }, [navigation]);
return ( return (
<Background style={defaultStyles.modal} onPress={closeModal}> <Background style={defaultStyles.modal}>
{!fullSize && <Spacer onPress={closeModal} />}
<Container style={defaultStyles.modalInner} fullSize={fullSize}> <Container style={defaultStyles.modalInner} fullSize={fullSize}>
{children} {children}
</Container> </Container>
{!fullSize && <Spacer onPress={closeModal} />}
</Background> </Background>
); );
}; };