Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24 - Post: Camera, Galeria e Permissões #21

Merged
merged 27 commits into from
Feb 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fd5314e
1 - fix ScreenHeader
LucasGarcez Dec 22, 2023
0004b39
3 - add lib and permissions
LucasGarcez Dec 22, 2023
401c63e
4 - get photos android, ios and mock lib
LucasGarcez Dec 22, 2023
2b43196
5 - new post screen 1
LucasGarcez Jan 8, 2024
840c99b
6 - new post screen 2 | Header
LucasGarcez Jan 9, 2024
3c5fa8f
7 - ghost button
LucasGarcez Jan 10, 2024
a55c0e2
8 - photos pagination
LucasGarcez Jan 11, 2024
057fc02
9 - photo selection
LucasGarcez Jan 11, 2024
769277d
10 - publish post
LucasGarcez Jan 13, 2024
5c79250
11 - intro to permission
LucasGarcez Jan 15, 2024
62f7d2a
12 - permission service (Android)
LucasGarcez Jan 15, 2024
5be40a4
13 - usePermission
LucasGarcez Jan 15, 2024
557eace
14 - permission service ios
LucasGarcez Jan 21, 2024
150c43c
15 - permission manager
LucasGarcez Jan 21, 2024
e9ddfda
16 - permission manager android
LucasGarcez Jan 21, 2024
bbf3095
17 - image placeholder
LucasGarcez Jan 21, 2024
6d67c7c
18 - camera screen (UI)
LucasGarcez Jan 27, 2024
d5e3935
19 - camera permission
LucasGarcez Jan 29, 2024
e8315af
20 - run on ios device
LucasGarcez Jan 30, 2024
ea395f0
21 - React Native VisionCamera
LucasGarcez Feb 2, 2024
25b2cd1
22 - Camera format
LucasGarcez Feb 2, 2024
5f449e9
23 - takePhoto
LucasGarcez Feb 2, 2024
f975c95
26 - post create and multimediaService
LucasGarcez Feb 18, 2024
d5fd2d7
27 - usePostCreate
LucasGarcez Feb 18, 2024
b2fa756
28 - multimedia getPhotos
LucasGarcez Feb 19, 2024
8bd7027
29 - install expo manipulator
LucasGarcez Feb 19, 2024
95316d5
30 - prepareImageForUpload
LucasGarcez Feb 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
16 - permission manager android
LucasGarcez committed Jan 21, 2024
commit e9ddfda10da26833ef72f3b92b498c59f9bba91d
29 changes: 21 additions & 8 deletions src/components/PermissionManager/PermissionManager.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import {Linking} from 'react-native';
import {Linking, Platform} from 'react-native';

import {PermissionName, usePermission} from '@services';

import {Screen, Text, Button, ActivityIndicator} from '@components';
import {Screen, Text, Button, ActivityIndicator, Box} from '@components';

interface PermissionManagerProps {
permissionName: PermissionName;
@@ -24,16 +24,29 @@ export function PermissionManager({

return (
<Screen flex={1} justifyContent="center" alignItems="center">
<Text preset="headingSmall" textAlign="center" color="error">
<Text preset="headingSmall" textAlign="center">
{description}
</Text>
{isLoading && <ActivityIndicator color="primary" />}
{status === 'never_ask_again' && (
<Button
title="Abrir Configurações"
onPress={Linking.openSettings}
mt="s16"
/>
<Box>
{Platform.OS === 'android' && (
<Text
preset="paragraphMedium"
color="error"
bold
marginVertical="s16"
textAlign="center">
É necessário abrir e fechar o App novamente após alterar as
configurações
</Text>
)}
<Button
title="Abrir Configurações"
onPress={Linking.openSettings}
mt="s16"
/>
</Box>
)}
</Screen>
);

Unchanged files with check annotations Beta

<Image
source={{uri: imageURL}}
resizeMode="cover"
style={{

Check warning on line 12 in src/components/PostItem/components/PostImage.tsx

GitHub Actions / pull-request-checks

Inline style: { height: 300, marginHorizontal: -24 }
width: Dimensions.get('screen').width,
height: 300,
marginHorizontal: -24,
const Container = scrollable ? ScrollViewContainer : ViewContainer;
return (
<KeyboardAvoidingView
style={{flex: 1}}

Check warning on line 34 in src/components/Screen/Screen.tsx

GitHub Actions / pull-request-checks

Inline style: { flex: 1 }
behavior={Platform.OS === 'ios' ? 'padding' : undefined}>
<Container backgroundColor={colors.background}>
<Box
return (
<ScrollView
keyboardShouldPersistTaps="handled"
style={{backgroundColor, flex: 1}}>

Check warning on line 12 in src/components/Screen/components/ScreenContainer.tsx

GitHub Actions / pull-request-checks

Inline style: { flex: 1 }
{children}
</ScrollView>
);
}
export function ViewContainer({children, backgroundColor}: Props) {
return <View style={{backgroundColor, flex: 1}}>{children}</View>;

Check warning on line 19 in src/components/Screen/components/ScreenContainer.tsx

GitHub Actions / pull-request-checks

Inline style: { flex: 1 }
}
return (
<Animated.View
testID={'toast-message'}
style={{position: 'absolute', alignSelf: 'center', opacity: fadeAnim}}>

Check warning on line 52 in src/components/Toast/Toast.tsx

GitHub Actions / pull-request-checks

Inline style: { position: 'absolute', alignSelf: 'center' }
<ToasContent toast={toast} />
</Animated.View>
);
testID={options.tabBarTestID}
onPress={onPress}
onLongPress={onLongPress}
style={{flex: 1}}>

Check warning on line 65 in src/routes/AppTabBar.tsx

GitHub Actions / pull-request-checks

Inline style: { flex: 1 }
<Icon
color={isFocused ? 'primary' : 'backgroundContrast'}
name={isFocused ? tabItem.icon.focused : tabItem.icon.unfocused}
refreshControl={
<RefreshControl refreshing={isLoading} onRefresh={refresh} />
}
contentContainerStyle={{flex: postList.length === 0 ? 1 : undefined}}

Check warning on line 49 in src/screens/app/HomeScreen/HomeScreen.tsx

GitHub Actions / pull-request-checks

Inline style: { flex: 'postList.length === 0 ? 1 : undefined' }
ListHeaderComponent={<HomeHeader />}
ListEmptyComponent={
<HomeEmpty refetch={refresh} error={isError} loading={isLoading} />
{isError && <Text> error ao carregar perfil do usuário</Text>}
{user && (
<ScrollView
style={{flex: 1}}

Check warning on line 21 in src/screens/app/ProfileScreen/ProfileScreen.tsx

GitHub Actions / pull-request-checks

Inline style: { flex: 1 }
refreshControl={
<RefreshControl refreshing={isFetching} onRefresh={refetch} />
}>