remove Dialog.Handle uses
This commit is contained in:
@@ -21,7 +21,6 @@ import {
|
|||||||
DialogOuterProps,
|
DialogOuterProps,
|
||||||
} from '#/components/Dialog/types'
|
} from '#/components/Dialog/types'
|
||||||
import {createInput} from '#/components/forms/TextField'
|
import {createInput} from '#/components/forms/TextField'
|
||||||
import {FullWindowOverlay} from '#/components/FullWindowOverlay'
|
|
||||||
import {Portal} from '#/components/Portal'
|
import {Portal} from '#/components/Portal'
|
||||||
|
|
||||||
export {useDialogContext, useDialogControl} from '#/components/Dialog/context'
|
export {useDialogContext, useDialogControl} from '#/components/Dialog/context'
|
||||||
@@ -93,18 +92,18 @@ export function Outer({
|
|||||||
[open, close],
|
[open, close],
|
||||||
)
|
)
|
||||||
|
|
||||||
React.useEffect(() => {
|
// @TODO DIALOG REFACTOR - what is this? rm i think?
|
||||||
return () => {
|
// React.useEffect(() => {
|
||||||
setDialogIsOpen(control.id, false)
|
// return () => {
|
||||||
}
|
// setDialogIsOpen(control.id, false)
|
||||||
}, [control.id, setDialogIsOpen])
|
// }
|
||||||
|
// }, [control.id, setDialogIsOpen])
|
||||||
|
|
||||||
const context = React.useMemo(() => ({close}), [close])
|
const context = React.useMemo(() => ({close}), [close])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
isOpen && (
|
isOpen && (
|
||||||
<Portal>
|
<Portal>
|
||||||
<FullWindowOverlay>
|
|
||||||
<View
|
<View
|
||||||
// iOS
|
// iOS
|
||||||
accessibilityViewIsModal
|
accessibilityViewIsModal
|
||||||
@@ -112,15 +111,10 @@ export function Outer({
|
|||||||
testID={testID}
|
testID={testID}
|
||||||
onTouchMove={() => Keyboard.dismiss()}>
|
onTouchMove={() => Keyboard.dismiss()}>
|
||||||
<BottomSheet
|
<BottomSheet
|
||||||
enablePanDownToClose
|
|
||||||
keyboardBehavior="interactive"
|
|
||||||
android_keyboardInputMode="adjustResize"
|
|
||||||
keyboardBlurBehavior="restore"
|
|
||||||
topInset={insets.top}
|
topInset={insets.top}
|
||||||
|
bottomInset={insets.bottom}
|
||||||
ref={sheet}
|
ref={sheet}
|
||||||
backgroundStyle={{backgroundColor: 'transparent'}}
|
// handleIndicatorStyle={{backgroundColor: t.palette.primary_500}} // @TODO DIALOG REFACTOR need to add this to lib!
|
||||||
handleIndicatorStyle={{backgroundColor: t.palette.primary_500}}
|
|
||||||
handleStyle={{display: 'none'}}
|
|
||||||
onClose={onCloseAnimationComplete}>
|
onClose={onCloseAnimationComplete}>
|
||||||
<Context.Provider value={context}>
|
<Context.Provider value={context}>
|
||||||
<View
|
<View
|
||||||
@@ -139,7 +133,6 @@ export function Outer({
|
|||||||
</Context.Provider>
|
</Context.Provider>
|
||||||
</BottomSheet>
|
</BottomSheet>
|
||||||
</View>
|
</View>
|
||||||
</FullWindowOverlay>
|
|
||||||
</Portal>
|
</Portal>
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,20 +1,19 @@
|
|||||||
import React, {useMemo, useCallback} from 'react'
|
import React, {useCallback, useMemo} from 'react'
|
||||||
import {ActivityIndicator, FlatList, View} from 'react-native'
|
import {ActivityIndicator, FlatList, View} from 'react-native'
|
||||||
|
import {AppBskyFeedGetLikes as GetLikes} from '@atproto/api'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {AppBskyFeedGetLikes as GetLikes} from '@atproto/api'
|
|
||||||
|
|
||||||
import {useResolveUriQuery} from '#/state/queries/resolve-uri'
|
|
||||||
import {useLikedByQuery} from '#/state/queries/post-liked-by'
|
|
||||||
import {cleanError} from '#/lib/strings/errors'
|
import {cleanError} from '#/lib/strings/errors'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
|
import {useLikedByQuery} from '#/state/queries/post-liked-by'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {useResolveUriQuery} from '#/state/queries/resolve-uri'
|
||||||
import {Text} from '#/components/Typography'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
|
||||||
import {ErrorMessage} from '#/view/com/util/error/ErrorMessage'
|
|
||||||
import {ProfileCardWithFollowBtn} from '#/view/com/profile/ProfileCard'
|
import {ProfileCardWithFollowBtn} from '#/view/com/profile/ProfileCard'
|
||||||
|
import {ErrorMessage} from '#/view/com/util/error/ErrorMessage'
|
||||||
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
interface LikesDialogProps {
|
interface LikesDialogProps {
|
||||||
control: Dialog.DialogOuterProps['control']
|
control: Dialog.DialogOuterProps['control']
|
||||||
@@ -24,8 +23,6 @@ interface LikesDialogProps {
|
|||||||
export function LikesDialog(props: LikesDialogProps) {
|
export function LikesDialog(props: LikesDialogProps) {
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={props.control}>
|
<Dialog.Outer control={props.control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<LikesDialogInner {...props} />
|
<LikesDialogInner {...props} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {msg, Trans} from '@lingui/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import flattenReactChildren from 'react-keyed-flatten-children'
|
import flattenReactChildren from 'react-keyed-flatten-children'
|
||||||
|
|
||||||
import {isNative} from 'platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
@@ -85,8 +85,6 @@ export function Outer({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={context.control}>
|
<Dialog.Outer control={context.control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
{/* Re-wrap with context since Dialogs are portal-ed to root */}
|
{/* Re-wrap with context since Dialogs are portal-ed to root */}
|
||||||
<Context.Provider value={context}>
|
<Context.Provider value={context}>
|
||||||
<Dialog.ScrollableInner label="Menu TODO">
|
<Dialog.ScrollableInner label="Menu TODO">
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import {msg, Trans} from '@lingui/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {differenceInSeconds} from 'date-fns'
|
import {differenceInSeconds} from 'date-fns'
|
||||||
|
|
||||||
|
import {HITSLOP_10} from '#/lib/constants'
|
||||||
import {useGetTimeAgo} from '#/lib/hooks/useTimeAgo'
|
import {useGetTimeAgo} from '#/lib/hooks/useTimeAgo'
|
||||||
|
import {sanitizeDisplayName} from '#/lib/strings/display-names'
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||||
import {HITSLOP_10} from 'lib/constants'
|
import {useSession} from '#/state/session'
|
||||||
import {sanitizeDisplayName} from 'lib/strings/display-names'
|
|
||||||
import {useSession} from 'state/session'
|
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
@@ -78,7 +78,6 @@ export function NewskieDialog({
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
label={_(msg`New user info dialog`)}
|
label={_(msg`New user info dialog`)}
|
||||||
style={[{width: 'auto', maxWidth: 400, minWidth: 200}]}>
|
style={[{width: 'auto', maxWidth: 400, minWidth: 200}]}>
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ export function Outer({
|
|||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control} testID={testID}>
|
<Dialog.Outer control={control} testID={testID}>
|
||||||
<Context.Provider value={context}>
|
<Context.Provider value={context}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
accessibilityLabelledBy={titleId}
|
accessibilityLabelledBy={titleId}
|
||||||
accessibilityDescribedBy={descriptionId}
|
accessibilityDescribedBy={descriptionId}
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ import {ReportDialogProps} from './types'
|
|||||||
export function ReportDialog(props: ReportDialogProps) {
|
export function ReportDialog(props: ReportDialogProps) {
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={props.control}>
|
<Dialog.Outer control={props.control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<ReportDialogInner {...props} />
|
<ReportDialogInner {...props} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -149,7 +149,6 @@ export function QrCodeDialog({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
label={_(msg`Create a QR code for a starter pack`)}>
|
label={_(msg`Create a QR code for a starter pack`)}>
|
||||||
<View style={[a.flex_1, a.align_center, a.gap_5xl]}>
|
<View style={[a.flex_1, a.align_center, a.gap_5xl]}>
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ import {AppBskyGraphDefs} from '@atproto/api'
|
|||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||||
|
import {saveImageToMediaLibrary} from '#/lib/media/manip'
|
||||||
|
import {shareUrl} from '#/lib/sharing'
|
||||||
|
import {logEvent} from '#/lib/statsig/statsig'
|
||||||
|
import {getStarterPackOgCard} from '#/lib/strings/starter-pack'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
import {isNative, isWeb} from '#/platform/detection'
|
||||||
import {saveImageToMediaLibrary} from 'lib/media/manip'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {shareUrl} from 'lib/sharing'
|
|
||||||
import {logEvent} from 'lib/statsig/statsig'
|
|
||||||
import {getStarterPackOgCard} from 'lib/strings/starter-pack'
|
|
||||||
import {isNative, isWeb} from 'platform/detection'
|
|
||||||
import * as Toast from 'view/com/util/Toast'
|
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {DialogControlProps} from '#/components/Dialog'
|
import {DialogControlProps} from '#/components/Dialog'
|
||||||
@@ -84,7 +84,6 @@ function ShareDialogInner({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.ScrollableInner label={_(msg`Share link dialog`)}>
|
<Dialog.ScrollableInner label={_(msg`Share link dialog`)}>
|
||||||
{!imageLoaded || !link ? (
|
{!imageLoaded || !link ? (
|
||||||
<View style={[a.p_xl, a.align_center]}>
|
<View style={[a.p_xl, a.align_center]}>
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import {BottomSheetFlatListMethods} from '@discord/bottom-sheet'
|
|||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {useInitialNumToRender} from 'lib/hooks/useInitialNumToRender'
|
import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender'
|
||||||
import {isWeb} from 'platform/detection'
|
import {isWeb} from '#/platform/detection'
|
||||||
import {useSession} from 'state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {WizardAction, WizardState} from '#/screens/StarterPack/Wizard/State'
|
import {WizardAction, WizardState} from '#/screens/StarterPack/Wizard/State'
|
||||||
import {atoms as a, native, useTheme, web} from '#/alf'
|
import {atoms as a, native, useTheme, web} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
@@ -80,7 +80,6 @@ export function WizardEditListDialog({
|
|||||||
control={control}
|
control={control}
|
||||||
testID="newChatDialog"
|
testID="newChatDialog"
|
||||||
nativeOptions={{sheet: {snapPoints: ['95%']}}}>
|
nativeOptions={{sheet: {snapPoints: ['95%']}}}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.InnerFlatList
|
<Dialog.InnerFlatList
|
||||||
ref={listRef}
|
ref={listRef}
|
||||||
data={getData()}
|
data={getData()}
|
||||||
|
|||||||
@@ -84,8 +84,6 @@ export function TagMenu({
|
|||||||
{children}
|
{children}
|
||||||
|
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.Inner label={_(msg`Tag menu: ${displayTag}`)}>
|
<Dialog.Inner label={_(msg`Tag menu: ${displayTag}`)}>
|
||||||
{isPreferencesLoading ? (
|
{isPreferencesLoading ? (
|
||||||
<View style={[a.w_full, a.align_center]}>
|
<View style={[a.w_full, a.align_center]}>
|
||||||
|
|||||||
@@ -170,7 +170,6 @@ function WhoCanReplyDialog({
|
|||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
label={_(msg`Dialog: adjust who can interact with this post`)}
|
label={_(msg`Dialog: adjust who can interact with this post`)}
|
||||||
style={[{width: 'auto', maxWidth: 400, minWidth: 200}]}>
|
style={[{width: 'auto', maxWidth: 400, minWidth: 200}]}>
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ export function BirthDateSettingsDialog({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner label={_(msg`My Birthday`)}>
|
<Dialog.ScrollableInner label={_(msg`My Birthday`)}>
|
||||||
<View style={[a.gap_sm, a.pb_lg]}>
|
<View style={[a.gap_sm, a.pb_lg]}>
|
||||||
<Text style={[a.text_2xl, a.font_bold]}>
|
<Text style={[a.text_2xl, a.font_bold]}>
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ type EmbedDialogProps = {
|
|||||||
let EmbedDialog = ({control, ...rest}: EmbedDialogProps): React.ReactNode => {
|
let EmbedDialog = ({control, ...rest}: EmbedDialogProps): React.ReactNode => {
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<EmbedDialogInner {...rest} />
|
<EmbedDialogInner {...rest} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ export function EmbedConsentDialog({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
label={_(msg`External Media`)}
|
label={_(msg`External Media`)}
|
||||||
style={[gtMobile ? {width: 'auto', maxWidth: 400} : a.w_full]}>
|
style={[gtMobile ? {width: 'auto', maxWidth: 400} : a.w_full]}>
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ export function GifSelectDialog({
|
|||||||
control={control}
|
control={control}
|
||||||
nativeOptions={{sheet: {snapPoints: ['100%']}}}
|
nativeOptions={{sheet: {snapPoints: ['100%']}}}
|
||||||
onClose={onClose}>
|
onClose={onClose}>
|
||||||
<Dialog.Handle />
|
|
||||||
<ErrorBoundary renderError={renderErrorBoundary}>
|
<ErrorBoundary renderError={renderErrorBoundary}>
|
||||||
<GifList control={control} onSelectGif={onSelectGif} />
|
<GifList control={control} onSelectGif={onSelectGif} />
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ export function MutedWordsDialog() {
|
|||||||
const {mutedWordsDialogControl: control} = useGlobalDialogsControlContext()
|
const {mutedWordsDialogControl: control} = useGlobalDialogsControlContext()
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<MutedWordsInner />
|
<MutedWordsInner />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ export function PostInteractionSettingsControlledDialog({
|
|||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
label={_(msg`Edit post interaction settings`)}
|
label={_(msg`Edit post interaction settings`)}
|
||||||
style={[{maxWidth: 500}, a.w_full]}>
|
style={[{maxWidth: 500}, a.w_full]}>
|
||||||
@@ -96,7 +95,6 @@ export function PostInteractionSettingsDialog(
|
|||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={props.control}>
|
<Dialog.Outer control={props.control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<PostInteractionSettingsDialogControlledInner {...props} />
|
<PostInteractionSettingsDialogControlledInner {...props} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ export function SigninDialog() {
|
|||||||
const {signinDialogControl: control} = useGlobalDialogsControlContext()
|
const {signinDialogControl: control} = useGlobalDialogsControlContext()
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<SigninDialogInner control={control} />
|
<SigninDialogInner control={control} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ export function SwitchAccountDialog({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner label={_(msg`Switch Account`)}>
|
<Dialog.ScrollableInner label={_(msg`Switch Account`)}>
|
||||||
<View style={[a.gap_lg]}>
|
<View style={[a.gap_lg]}>
|
||||||
<Text style={[a.text_2xl, a.font_bold]}>
|
<Text style={[a.text_2xl, a.font_bold]}>
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ export function NeueTypography() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control} onClose={onClose}>
|
<Dialog.Outer control={control} onClose={onClose}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner label={_(msg`Introducing new font settings`)}>
|
<Dialog.ScrollableInner label={_(msg`Introducing new font settings`)}>
|
||||||
<View style={[a.gap_xl]}>
|
<View style={[a.gap_xl]}>
|
||||||
<View style={[a.gap_md]}>
|
<View style={[a.gap_md]}>
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ export function MessagesNUX() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<DialogInner chatDeclation={profile.associated?.chat} />
|
<DialogInner chatDeclation={profile.associated?.chat} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ let ReportDialog = ({
|
|||||||
<Dialog.Outer
|
<Dialog.Outer
|
||||||
control={control}
|
control={control}
|
||||||
nativeOptions={isAndroid ? {sheet: {snapPoints: ['100%']}} : {}}>
|
nativeOptions={isAndroid ? {sheet: {snapPoints: ['100%']}} : {}}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.ScrollableInner label={_(msg`Report this message`)}>
|
<Dialog.ScrollableInner label={_(msg`Report this message`)}>
|
||||||
<DialogInner params={params} />
|
<DialogInner params={params} />
|
||||||
<Dialog.Close />
|
<Dialog.Close />
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ export function DateField({
|
|||||||
accessibilityHint={accessibilityHint}
|
accessibilityHint={accessibilityHint}
|
||||||
/>
|
/>
|
||||||
<Dialog.Outer control={control} testID={testID}>
|
<Dialog.Outer control={control} testID={testID}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.Inner label={label}>
|
<Dialog.Inner label={label}>
|
||||||
<View style={a.gap_lg}>
|
<View style={a.gap_lg}>
|
||||||
<View style={[a.relative, a.w_full, a.align_center]}>
|
<View style={[a.relative, a.w_full, a.align_center]}>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {View} from 'react-native'
|
|||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {useAgent, useSession} from 'state/session'
|
import {useAgent, useSession} from '#/state/session'
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
@@ -17,7 +17,6 @@ export function VerifyEmailIntentDialog() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Inner control={control} />
|
<Inner control={control} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ export interface LabelsOnMeDialogProps {
|
|||||||
export function LabelsOnMeDialog(props: LabelsOnMeDialogProps) {
|
export function LabelsOnMeDialog(props: LabelsOnMeDialogProps) {
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={props.control}>
|
<Dialog.Outer control={props.control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<LabelsOnMeDialogInner {...props} />
|
<LabelsOnMeDialogInner {...props} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export interface ModerationDetailsDialogProps {
|
|||||||
export function ModerationDetailsDialog(props: ModerationDetailsDialogProps) {
|
export function ModerationDetailsDialog(props: ModerationDetailsDialogProps) {
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={props.control}>
|
<Dialog.Outer control={props.control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<ModerationDetailsDialogInner {...props} />
|
<ModerationDetailsDialogInner {...props} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ function AppealDialog() {
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
<DialogInner />
|
<DialogInner />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -286,7 +286,6 @@ export function StepProfile() {
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Dialog.Outer control={creatorControl}>
|
<Dialog.Outer control={creatorControl}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.Inner
|
<Dialog.Inner
|
||||||
label="Avatar creator"
|
label="Avatar creator"
|
||||||
style={[
|
style={[
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ export function ServerInputDialog({
|
|||||||
control={control}
|
control={control}
|
||||||
nativeOptions={{sheet: {snapPoints: ['100%']}}}
|
nativeOptions={{sheet: {snapPoints: ['100%']}}}
|
||||||
onClose={onClose}>
|
onClose={onClose}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
accessibilityDescribedBy="dialog-description"
|
accessibilityDescribedBy="dialog-description"
|
||||||
accessibilityLabelledBy="dialog-title">
|
accessibilityLabelledBy="dialog-title">
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ export function GifAltText({
|
|||||||
<Dialog.Outer
|
<Dialog.Outer
|
||||||
control={control}
|
control={control}
|
||||||
nativeOptions={isAndroid ? {sheet: {snapPoints: ['100%']}} : {}}>
|
nativeOptions={isAndroid ? {sheet: {snapPoints: ['100%']}} : {}}>
|
||||||
<Dialog.Handle />
|
|
||||||
<AltTextInner
|
<AltTextInner
|
||||||
onSubmit={onPressSubmit}
|
onSubmit={onPressSubmit}
|
||||||
link={link}
|
link={link}
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ type Props = {
|
|||||||
export const ImageAltTextDialog = (props: Props): React.ReactNode => {
|
export const ImageAltTextDialog = (props: Props): React.ReactNode => {
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={props.control}>
|
<Dialog.Outer control={props.control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<ImageAltTextInner {...props} />
|
<ImageAltTextInner {...props} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ export function SubtitleDialogBtn(props: Props) {
|
|||||||
<Dialog.Outer
|
<Dialog.Outer
|
||||||
control={control}
|
control={control}
|
||||||
nativeOptions={isAndroid ? {sheet: {snapPoints: ['60%']}} : {}}>
|
nativeOptions={isAndroid ? {sheet: {snapPoints: ['60%']}} : {}}>
|
||||||
<Dialog.Handle />
|
|
||||||
<SubtitleDialogInner {...props} />
|
<SubtitleDialogInner {...props} />
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ let RepostButton = ({
|
|||||||
) : undefined}
|
) : undefined}
|
||||||
</Button>
|
</Button>
|
||||||
<Dialog.Outer control={dialogControl}>
|
<Dialog.Outer control={dialogControl}>
|
||||||
<Dialog.Handle />
|
|
||||||
<Dialog.Inner label={_(msg`Repost or quote post`)}>
|
<Dialog.Inner label={_(msg`Repost or quote post`)}>
|
||||||
<View style={a.gap_xl}>
|
<View style={a.gap_xl}>
|
||||||
<View style={a.gap_xs}>
|
<View style={a.gap_xs}>
|
||||||
|
|||||||
@@ -78,8 +78,6 @@ export function DisableEmail2FADialog({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
accessibilityDescribedBy="dialog-description"
|
accessibilityDescribedBy="dialog-description"
|
||||||
accessibilityLabelledBy="dialog-title">
|
accessibilityLabelledBy="dialog-title">
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ export function ExportCarDialog({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
accessibilityDescribedBy="dialog-description"
|
accessibilityDescribedBy="dialog-description"
|
||||||
accessibilityLabelledBy="dialog-title">
|
accessibilityLabelledBy="dialog-title">
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import React from 'react'
|
|||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import {useNavigation} from '@react-navigation/native'
|
import {useNavigation} from '@react-navigation/native'
|
||||||
|
|
||||||
|
import {NavigationProp} from '#/lib/routes/types'
|
||||||
import {useDialogStateControlContext} from '#/state/dialogs'
|
import {useDialogStateControlContext} from '#/state/dialogs'
|
||||||
import {NavigationProp} from 'lib/routes/types'
|
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
@@ -179,8 +179,6 @@ export function Dialogs() {
|
|||||||
</Prompt.Outer>
|
</Prompt.Outer>
|
||||||
|
|
||||||
<Dialog.Outer control={basic}>
|
<Dialog.Outer control={basic}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.Inner label="test">
|
<Dialog.Inner label="test">
|
||||||
<H3 nativeID="dialog-title">Dialog</H3>
|
<H3 nativeID="dialog-title">Dialog</H3>
|
||||||
<P nativeID="dialog-description">A basic dialog</P>
|
<P nativeID="dialog-description">A basic dialog</P>
|
||||||
@@ -190,8 +188,6 @@ export function Dialogs() {
|
|||||||
<Dialog.Outer
|
<Dialog.Outer
|
||||||
control={scrollable}
|
control={scrollable}
|
||||||
nativeOptions={{sheet: {snapPoints: ['100%']}}}>
|
nativeOptions={{sheet: {snapPoints: ['100%']}}}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
accessibilityDescribedBy="dialog-description"
|
accessibilityDescribedBy="dialog-description"
|
||||||
accessibilityLabelledBy="dialog-title">
|
accessibilityLabelledBy="dialog-title">
|
||||||
@@ -230,8 +226,6 @@ export function Dialogs() {
|
|||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
|
|
||||||
<Dialog.Outer control={testDialog}>
|
<Dialog.Outer control={testDialog}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
accessibilityDescribedBy="dialog-description"
|
accessibilityDescribedBy="dialog-description"
|
||||||
accessibilityLabelledBy="dialog-title">
|
accessibilityLabelledBy="dialog-title">
|
||||||
@@ -356,8 +350,6 @@ export function Dialogs() {
|
|||||||
|
|
||||||
{shouldRenderUnmountTest && (
|
{shouldRenderUnmountTest && (
|
||||||
<Dialog.Outer control={unmountTestDialog}>
|
<Dialog.Outer control={unmountTestDialog}>
|
||||||
<Dialog.Handle />
|
|
||||||
|
|
||||||
<Dialog.Inner label="test">
|
<Dialog.Inner label="test">
|
||||||
<H3 nativeID="dialog-title">Unmount Test Dialog</H3>
|
<H3 nativeID="dialog-title">Unmount Test Dialog</H3>
|
||||||
<P nativeID="dialog-description">Will unmount in about 5 seconds</P>
|
<P nativeID="dialog-description">Will unmount in about 5 seconds</P>
|
||||||
|
|||||||
Reference in New Issue
Block a user