mirror of
https://github.com/tooot-app/app
synced 2025-03-10 08:30:19 +01:00
Refined filter view
This commit is contained in:
parent
2a806695ca
commit
e8eb62e2d0
@ -235,12 +235,7 @@ const ComponentInstance: React.FC<Props> = ({
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
) : null}
|
) : null}
|
||||||
<View
|
<View style={{ marginTop: StyleConstants.Spacing.L }}>
|
||||||
style={{
|
|
||||||
marginTop: StyleConstants.Spacing.L,
|
|
||||||
marginHorizontal: StyleConstants.Spacing.Global.PagePadding
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
|
29
src/components/ModalScrollView.tsx
Normal file
29
src/components/ModalScrollView.tsx
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import { useHeaderHeight } from '@react-navigation/elements'
|
||||||
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
|
import { forwardRef, PropsWithChildren, RefObject } from 'react'
|
||||||
|
import { KeyboardAvoidingView, Platform, ScrollView } from 'react-native'
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context'
|
||||||
|
|
||||||
|
export const ModalScrollView = forwardRef(
|
||||||
|
({ children }: PropsWithChildren, ref: RefObject<ScrollView>) => {
|
||||||
|
const headerHeight = useHeaderHeight()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<KeyboardAvoidingView
|
||||||
|
style={{ flex: 1 }}
|
||||||
|
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
||||||
|
keyboardVerticalOffset={headerHeight}
|
||||||
|
>
|
||||||
|
<SafeAreaView style={{ flex: 1 }} edges={['bottom']}>
|
||||||
|
<ScrollView
|
||||||
|
ref={ref}
|
||||||
|
keyboardShouldPersistTaps='always'
|
||||||
|
contentContainerStyle={{ padding: StyleConstants.Spacing.Global.PagePadding }}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</ScrollView>
|
||||||
|
</SafeAreaView>
|
||||||
|
</KeyboardAvoidingView>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
@ -309,7 +309,11 @@ const ParseHTML: React.FC<Props> = ({
|
|||||||
height: numberOfLines === 1 && !expanded ? 0 : undefined
|
height: numberOfLines === 1 && !expanded ? 0 : undefined
|
||||||
}}
|
}}
|
||||||
numberOfLines={
|
numberOfLines={
|
||||||
typeof totalLines === 'number' ? (expanded ? 999 : numberOfLines) : MAX_ALLOWED_LINES
|
typeof totalLines === 'number'
|
||||||
|
? expanded
|
||||||
|
? 999
|
||||||
|
: numberOfLines
|
||||||
|
: Math.max(MAX_ALLOWED_LINES, numberOfLines)
|
||||||
}
|
}
|
||||||
selectable={selectable}
|
selectable={selectable}
|
||||||
/>
|
/>
|
||||||
|
@ -210,7 +210,8 @@
|
|||||||
"hide": "Hidden completely"
|
"hide": "Hidden completely"
|
||||||
},
|
},
|
||||||
"keywords": "Matches for these keywords",
|
"keywords": "Matches for these keywords",
|
||||||
"keyword": "Keyword"
|
"keyword": "Keyword",
|
||||||
|
"statuses": "Matches these toots"
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"feedback": {
|
"feedback": {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import haptics from '@components/haptics'
|
import haptics from '@components/haptics'
|
||||||
import { HeaderLeft, HeaderRight } from '@components/Header'
|
import { HeaderLeft, HeaderRight } from '@components/Header'
|
||||||
|
import { ModalScrollView } from '@components/ModalScrollView'
|
||||||
import CustomText from '@components/Text'
|
import CustomText from '@components/Text'
|
||||||
import apiInstance from '@utils/api/instance'
|
import apiInstance from '@utils/api/instance'
|
||||||
import { ScreenComposeStackScreenProps } from '@utils/navigation/navigators'
|
import { ScreenComposeStackScreenProps } from '@utils/navigation/navigators'
|
||||||
@ -7,8 +8,7 @@ import { StyleConstants } from '@utils/styles/constants'
|
|||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { useContext, useEffect, useState } from 'react'
|
import React, { useContext, useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Alert, KeyboardAvoidingView, Platform, ScrollView, TextInput } from 'react-native'
|
import { Alert, TextInput } from 'react-native'
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context'
|
|
||||||
import ComposeContext from './utils/createContext'
|
import ComposeContext from './utils/createContext'
|
||||||
|
|
||||||
const ComposeEditAttachment: React.FC<
|
const ComposeEditAttachment: React.FC<
|
||||||
@ -34,9 +34,7 @@ const ComposeEditAttachment: React.FC<
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
navigation.setOptions({
|
navigation.setOptions({
|
||||||
title: t('content.editAttachment.header.title'),
|
title: t('content.editAttachment.header.title'),
|
||||||
headerLeft: () => (
|
headerLeft: () => <HeaderLeft content='chevron-down' onPress={() => navigation.goBack()} />,
|
||||||
<HeaderLeft content='chevron-down' onPress={() => navigation.goBack()} />
|
|
||||||
),
|
|
||||||
headerRight: () => (
|
headerRight: () => (
|
||||||
<HeaderRight
|
<HeaderRight
|
||||||
accessibilityLabel={t('content.editAttachment.header.right.accessibilityLabel')}
|
accessibilityLabel={t('content.editAttachment.header.right.accessibilityLabel')}
|
||||||
@ -88,22 +86,13 @@ const ComposeEditAttachment: React.FC<
|
|||||||
}, [theAttachment])
|
}, [theAttachment])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<KeyboardAvoidingView
|
<ModalScrollView>
|
||||||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
||||||
style={{ flex: 1 }}
|
|
||||||
>
|
|
||||||
<SafeAreaView
|
|
||||||
style={{ flex: 1, padding: StyleConstants.Spacing.Global.PagePadding }}
|
|
||||||
edges={['left', 'right', 'bottom']}
|
|
||||||
>
|
|
||||||
<ScrollView>
|
|
||||||
<CustomText fontStyle='M' style={{ color: colors.primaryDefault }} fontWeight='Bold'>
|
<CustomText fontStyle='M' style={{ color: colors.primaryDefault }} fontWeight='Bold'>
|
||||||
{t('content.editAttachment.content.altText.heading')}
|
{t('content.editAttachment.content.altText.heading')}
|
||||||
</CustomText>
|
</CustomText>
|
||||||
<TextInput
|
<TextInput
|
||||||
style={{
|
style={{
|
||||||
height:
|
height: StyleConstants.Font.Size.M * 11 + StyleConstants.Spacing.Global.PagePadding * 2,
|
||||||
StyleConstants.Font.Size.M * 11 + StyleConstants.Spacing.Global.PagePadding * 2,
|
|
||||||
...StyleConstants.FontStyle.M,
|
...StyleConstants.FontStyle.M,
|
||||||
marginTop: StyleConstants.Spacing.M,
|
marginTop: StyleConstants.Spacing.M,
|
||||||
marginBottom: StyleConstants.Spacing.S,
|
marginBottom: StyleConstants.Spacing.S,
|
||||||
@ -138,9 +127,7 @@ const ComposeEditAttachment: React.FC<
|
|||||||
>
|
>
|
||||||
{theAttachment.description?.length || 0} / 1500
|
{theAttachment.description?.length || 0} / 1500
|
||||||
</CustomText>
|
</CustomText>
|
||||||
</ScrollView>
|
</ModalScrollView>
|
||||||
</SafeAreaView>
|
|
||||||
</KeyboardAvoidingView>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,22 +4,24 @@ import { HeaderLeft, HeaderRight } from '@components/Header'
|
|||||||
import Hr from '@components/Hr'
|
import Hr from '@components/Hr'
|
||||||
import ComponentInput from '@components/Input'
|
import ComponentInput from '@components/Input'
|
||||||
import { MenuRow } from '@components/Menu'
|
import { MenuRow } from '@components/Menu'
|
||||||
|
import { ModalScrollView } from '@components/ModalScrollView'
|
||||||
import Selections from '@components/Selections'
|
import Selections from '@components/Selections'
|
||||||
import CustomText from '@components/Text'
|
import CustomText from '@components/Text'
|
||||||
import { useActionSheet } from '@expo/react-native-action-sheet'
|
import { useActionSheet } from '@expo/react-native-action-sheet'
|
||||||
import apiInstance from '@utils/api/instance'
|
import apiInstance from '@utils/api/instance'
|
||||||
import { androidActionSheetStyles } from '@utils/helpers/androidActionSheetStyles'
|
import { androidActionSheetStyles } from '@utils/helpers/androidActionSheetStyles'
|
||||||
|
import browserPackage from '@utils/helpers/browserPackage'
|
||||||
import { TabMePreferencesStackScreenProps } from '@utils/navigation/navigators'
|
import { TabMePreferencesStackScreenProps } from '@utils/navigation/navigators'
|
||||||
import { queryClient } from '@utils/queryHooks'
|
import { queryClient } from '@utils/queryHooks'
|
||||||
import { QueryKeyFilters } from '@utils/queryHooks/filters'
|
import { QueryKeyFilters } from '@utils/queryHooks/filters'
|
||||||
|
import { getAccountStorage } from '@utils/storage/actions'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { RefObject, useEffect, useState } from 'react'
|
import * as WebBrowser from 'expo-web-browser'
|
||||||
|
import React, { RefObject, useEffect, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { KeyboardAvoidingView, Platform, View } from 'react-native'
|
import { ScrollView, View } from 'react-native'
|
||||||
import FlashMessage from 'react-native-flash-message'
|
import FlashMessage from 'react-native-flash-message'
|
||||||
import { ScrollView } from 'react-native-gesture-handler'
|
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context'
|
|
||||||
|
|
||||||
const TabMePreferencesFilter: React.FC<
|
const TabMePreferencesFilter: React.FC<
|
||||||
TabMePreferencesStackScreenProps<'Tab-Me-Preferences-Filter'> & {
|
TabMePreferencesStackScreenProps<'Tab-Me-Preferences-Filter'> & {
|
||||||
@ -101,7 +103,11 @@ const TabMePreferencesFilter: React.FC<
|
|||||||
])
|
])
|
||||||
|
|
||||||
const [keywords, setKeywords] = useState<string[]>(
|
const [keywords, setKeywords] = useState<string[]>(
|
||||||
params.type === 'edit' ? params.filter.keywords.map(({ keyword }) => keyword) : []
|
params.type === 'edit'
|
||||||
|
? params.filter.keywords.length
|
||||||
|
? params.filter.keywords.map(({ keyword }) => keyword)
|
||||||
|
: ['']
|
||||||
|
: ['']
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -152,6 +158,48 @@ const TabMePreferencesFilter: React.FC<
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'edit':
|
case 'edit':
|
||||||
|
isLoading = true
|
||||||
|
await apiInstance({
|
||||||
|
method: 'put',
|
||||||
|
version: 'v2',
|
||||||
|
url: `filters/${params.filter.id}`,
|
||||||
|
body: {
|
||||||
|
title: titleState[0],
|
||||||
|
context: contexts
|
||||||
|
.filter(context => context.selected)
|
||||||
|
.map(context => context.type),
|
||||||
|
filter_action: actions.filter(
|
||||||
|
action => action.type === 'hide' && action.selected
|
||||||
|
).length
|
||||||
|
? 'hide'
|
||||||
|
: 'warn',
|
||||||
|
...(parseInt(expiration) && {
|
||||||
|
expires_in: parseInt(expiration)
|
||||||
|
}),
|
||||||
|
...(keywords.filter(keyword => keyword.length).length
|
||||||
|
? {
|
||||||
|
keywords_attributes: keywords
|
||||||
|
.filter(keyword => keyword.length)
|
||||||
|
.map(keyword => ({ keyword, whole_word: true }))
|
||||||
|
}
|
||||||
|
: params.filter.keywords.length && {
|
||||||
|
keywords_attributes: params.filter.keywords.map(keyword => ({
|
||||||
|
...keyword,
|
||||||
|
_destroy: true
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
isLoading = false
|
||||||
|
const queryKey: QueryKeyFilters = ['Filters', { version: 'v2' }]
|
||||||
|
queryClient.refetchQueries(queryKey)
|
||||||
|
navigation.navigate('Tab-Me-Preferences-Filters')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
isLoading = false
|
||||||
|
haptics('Error')
|
||||||
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -160,13 +208,10 @@ const TabMePreferencesFilter: React.FC<
|
|||||||
})
|
})
|
||||||
}, [titleState[0], expiration, contexts, actions, keywords])
|
}, [titleState[0], expiration, contexts, actions, keywords])
|
||||||
|
|
||||||
|
const scrollViewRef = useRef<ScrollView>(null)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<KeyboardAvoidingView
|
<ModalScrollView ref={scrollViewRef}>
|
||||||
style={{ flex: 1 }}
|
|
||||||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
||||||
>
|
|
||||||
<SafeAreaView style={{ flex: 1 }} edges={['bottom']}>
|
|
||||||
<ScrollView style={{ padding: StyleConstants.Spacing.Global.PagePadding }}>
|
|
||||||
<ComponentInput title={t('screenTabs:me.preferencesFilter.name')} value={titleState} />
|
<ComponentInput title={t('screenTabs:me.preferencesFilter.name')} value={titleState} />
|
||||||
<MenuRow
|
<MenuRow
|
||||||
title={t('screenTabs:me.preferencesFilter.expiration')}
|
title={t('screenTabs:me.preferencesFilter.expiration')}
|
||||||
@ -207,11 +252,17 @@ const TabMePreferencesFilter: React.FC<
|
|||||||
/>
|
/>
|
||||||
<Hr style={{ marginVertical: StyleConstants.Spacing.M }} />
|
<Hr style={{ marginVertical: StyleConstants.Spacing.M }} />
|
||||||
|
|
||||||
|
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||||
<CustomText
|
<CustomText
|
||||||
fontStyle='M'
|
fontStyle='M'
|
||||||
children={t('screenTabs:me.preferencesFilter.keywords')}
|
children={t('screenTabs:me.preferencesFilter.keywords')}
|
||||||
style={{ color: colors.primaryDefault }}
|
style={{ color: colors.primaryDefault }}
|
||||||
/>
|
/>
|
||||||
|
<CustomText
|
||||||
|
style={{ marginHorizontal: StyleConstants.Spacing.M, color: colors.secondary }}
|
||||||
|
children={t('screenTabs:me.preferencesFilters.keywords', { count: keywords.length })}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
marginTop: StyleConstants.Spacing.M,
|
marginTop: StyleConstants.Spacing.M,
|
||||||
@ -244,21 +295,45 @@ const TabMePreferencesFilter: React.FC<
|
|||||||
content='minus'
|
content='minus'
|
||||||
round
|
round
|
||||||
disabled={keywords.length < 1}
|
disabled={keywords.length < 1}
|
||||||
/>
|
style={{ marginRight: StyleConstants.Spacing.M }}
|
||||||
<CustomText
|
|
||||||
style={{ marginHorizontal: StyleConstants.Spacing.M, color: colors.secondary }}
|
|
||||||
children={keywords.length}
|
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
onPress={() => setKeywords([...keywords, ''])}
|
onPress={() => {
|
||||||
|
setKeywords([...keywords, ''])
|
||||||
|
setTimeout(() => scrollViewRef.current?.scrollToEnd(), 50)
|
||||||
|
}}
|
||||||
type='icon'
|
type='icon'
|
||||||
content='plus'
|
content='plus'
|
||||||
round
|
round
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
|
||||||
</SafeAreaView>
|
{params.type === 'edit' && params.filter.statuses?.length ? (
|
||||||
</KeyboardAvoidingView>
|
<>
|
||||||
|
<Hr style={{ marginVertical: StyleConstants.Spacing.M }} />
|
||||||
|
<MenuRow
|
||||||
|
title={t('screenTabs:me.preferencesFilter.statuses')}
|
||||||
|
content={t('screenTabs:me.preferencesFilters.statuses', {
|
||||||
|
count: params.filter.statuses.length
|
||||||
|
})}
|
||||||
|
iconBack='external-link'
|
||||||
|
onPress={async () =>
|
||||||
|
WebBrowser.openAuthSessionAsync(
|
||||||
|
`https://${getAccountStorage.string('auth.domain')}/filters/${
|
||||||
|
params.filter.id
|
||||||
|
}/statuses`,
|
||||||
|
'tooot://tooot',
|
||||||
|
{
|
||||||
|
...(await browserPackage()),
|
||||||
|
dismissButtonStyle: 'done',
|
||||||
|
readerMode: false
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
</ModalScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
|||||||
import { TabMeProfileStackParamList, TabMeStackScreenProps } from '@utils/navigation/navigators'
|
import { TabMeProfileStackParamList, TabMeStackScreenProps } from '@utils/navigation/navigators'
|
||||||
import React, { useRef } from 'react'
|
import React, { useRef } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { KeyboardAvoidingView, Platform } from 'react-native'
|
|
||||||
import FlashMessage from 'react-native-flash-message'
|
import FlashMessage from 'react-native-flash-message'
|
||||||
import TabMeProfileFields from './Fields'
|
import TabMeProfileFields from './Fields'
|
||||||
import TabMeProfileName from './Name'
|
import TabMeProfileName from './Name'
|
||||||
@ -18,10 +17,7 @@ const TabMeProfile: React.FC<TabMeStackScreenProps<'Tab-Me-Switch'>> = ({ naviga
|
|||||||
const messageRef = useRef<FlashMessage>(null)
|
const messageRef = useRef<FlashMessage>(null)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<KeyboardAvoidingView
|
<>
|
||||||
style={{ flex: 1 }}
|
|
||||||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
||||||
>
|
|
||||||
<Stack.Navigator screenOptions={{ headerShadowVisible: false }}>
|
<Stack.Navigator screenOptions={{ headerShadowVisible: false }}>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name='Tab-Me-Profile-Root'
|
name='Tab-Me-Profile-Root'
|
||||||
@ -55,7 +51,7 @@ const TabMeProfile: React.FC<TabMeStackScreenProps<'Tab-Me-Switch'>> = ({ naviga
|
|||||||
</Stack.Navigator>
|
</Stack.Navigator>
|
||||||
|
|
||||||
<Message ref={messageRef} />
|
<Message ref={messageRef} />
|
||||||
</KeyboardAvoidingView>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import AccountButton from '@components/AccountButton'
|
import AccountButton from '@components/AccountButton'
|
||||||
import ComponentInstance from '@components/Instance'
|
import ComponentInstance from '@components/Instance'
|
||||||
|
import { ModalScrollView } from '@components/ModalScrollView'
|
||||||
import CustomText from '@components/Text'
|
import CustomText from '@components/Text'
|
||||||
import { getReadableAccounts } from '@utils/storage/actions'
|
import { getReadableAccounts } from '@utils/storage/actions'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { useEffect, useRef } from 'react'
|
import React, { useEffect, useRef } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { KeyboardAvoidingView, Platform, View } from 'react-native'
|
import { View } from 'react-native'
|
||||||
import { ScrollView } from 'react-native-gesture-handler'
|
import { ScrollView } from 'react-native-gesture-handler'
|
||||||
|
|
||||||
const TabMeSwitch: React.FC = () => {
|
const TabMeSwitch: React.FC = () => {
|
||||||
@ -20,15 +21,7 @@ const TabMeSwitch: React.FC = () => {
|
|||||||
}, [scrollViewRef.current])
|
}, [scrollViewRef.current])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<KeyboardAvoidingView
|
<ModalScrollView>
|
||||||
style={{ flex: 1 }}
|
|
||||||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
||||||
>
|
|
||||||
<ScrollView
|
|
||||||
ref={scrollViewRef}
|
|
||||||
style={{ marginBottom: StyleConstants.Spacing.L * 2 }}
|
|
||||||
keyboardShouldPersistTaps='always'
|
|
||||||
>
|
|
||||||
<View>
|
<View>
|
||||||
<CustomText
|
<CustomText
|
||||||
fontStyle='M'
|
fontStyle='M'
|
||||||
@ -47,7 +40,6 @@ const TabMeSwitch: React.FC = () => {
|
|||||||
style={{
|
style={{
|
||||||
marginTop: StyleConstants.Spacing.S,
|
marginTop: StyleConstants.Spacing.S,
|
||||||
paddingTop: StyleConstants.Spacing.M,
|
paddingTop: StyleConstants.Spacing.M,
|
||||||
marginHorizontal: StyleConstants.Spacing.Global.PagePadding,
|
|
||||||
borderTopWidth: 1,
|
borderTopWidth: 1,
|
||||||
borderTopColor: colors.border
|
borderTopColor: colors.border
|
||||||
}}
|
}}
|
||||||
@ -75,8 +67,7 @@ const TabMeSwitch: React.FC = () => {
|
|||||||
})}
|
})}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ModalScrollView>
|
||||||
</KeyboardAvoidingView>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import ComponentAccount from '@components/Account'
|
import ComponentAccount from '@components/Account'
|
||||||
import { HeaderLeft, HeaderRight } from '@components/Header'
|
import { HeaderLeft, HeaderRight } from '@components/Header'
|
||||||
|
import { ModalScrollView } from '@components/ModalScrollView'
|
||||||
import Selections from '@components/Selections'
|
import Selections from '@components/Selections'
|
||||||
import CustomText from '@components/Text'
|
import CustomText from '@components/Text'
|
||||||
import apiInstance from '@utils/api/instance'
|
import apiInstance from '@utils/api/instance'
|
||||||
@ -11,7 +12,7 @@ import { StyleConstants } from '@utils/styles/constants'
|
|||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Platform, ScrollView, TextInput, View } from 'react-native'
|
import { Platform, TextInput, View } from 'react-native'
|
||||||
import { Switch } from 'react-native-gesture-handler'
|
import { Switch } from 'react-native-gesture-handler'
|
||||||
|
|
||||||
const TabSharedReport: React.FC<TabSharedStackScreenProps<'Tab-Shared-Report'>> = ({
|
const TabSharedReport: React.FC<TabSharedStackScreenProps<'Tab-Shared-Report'>> = ({
|
||||||
@ -96,7 +97,7 @@ const TabSharedReport: React.FC<TabSharedStackScreenProps<'Tab-Shared-Report'>>
|
|||||||
}, [rulesQuery.data])
|
}, [rulesQuery.data])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView>
|
<ModalScrollView>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
margin: StyleConstants.Spacing.Global.PagePadding,
|
margin: StyleConstants.Spacing.Global.PagePadding,
|
||||||
@ -209,7 +210,7 @@ const TabSharedReport: React.FC<TabSharedStackScreenProps<'Tab-Shared-Report'>>
|
|||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ModalScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user