revert all the button import changes
This commit is contained in:
@@ -7,9 +7,9 @@ import {useProfileQuery} from '#/state/queries/profile'
|
|||||||
import {type SessionAccount, useSession} from '#/state/session'
|
import {type SessionAccount, useSession} from '#/state/session'
|
||||||
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
|
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
|
||||||
import {ChevronRight_Stroke2_Corner0_Rounded as Chevron} from '#/components/icons/Chevron'
|
import {ChevronRight_Stroke2_Corner0_Rounded as Chevron} from '#/components/icons/Chevron'
|
||||||
|
import {Button} from './Button'
|
||||||
import {Text} from './Typography'
|
import {Text} from './Typography'
|
||||||
|
|
||||||
export function AccountList({
|
export function AccountList({
|
||||||
@@ -51,19 +51,19 @@ export function AccountList({
|
|||||||
<View style={[{borderBottomWidth: 1}, t.atoms.border_contrast_low]} />
|
<View style={[{borderBottomWidth: 1}, t.atoms.border_contrast_low]} />
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
))}
|
))}
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="chooseAddAccountBtn"
|
testID="chooseAddAccountBtn"
|
||||||
style={[a.flex_1]}
|
style={[a.flex_1]}
|
||||||
onPress={pendingDid ? undefined : onPressAddAccount}
|
onPress={pendingDid ? undefined : onPressAddAccount}
|
||||||
label={_(msg`Login to account that is not listed`)}>
|
label={_(msg`Login to account that is not listed`)}>
|
||||||
{({pressed}) => (
|
{({hovered, pressed}) => (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.flex_1,
|
a.flex_1,
|
||||||
a.flex_row,
|
a.flex_row,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
{height: 48},
|
{height: 48},
|
||||||
pressed && t.atoms.bg_contrast_25,
|
(hovered || pressed) && t.atoms.bg_contrast_25,
|
||||||
]}>
|
]}>
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
@@ -78,7 +78,7 @@ export function AccountList({
|
|||||||
<Chevron size="sm" style={[t.atoms.text, a.mr_md]} />
|
<Chevron size="sm" style={[t.atoms.text, a.mr_md]} />
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@ function AccountItem({
|
|||||||
}, [account, onSelect])
|
}, [account, onSelect])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID={`chooseAccountBtn-${account.handle}`}
|
testID={`chooseAccountBtn-${account.handle}`}
|
||||||
key={account.did}
|
key={account.did}
|
||||||
style={[a.flex_1]}
|
style={[a.flex_1]}
|
||||||
@@ -113,14 +113,14 @@ function AccountItem({
|
|||||||
? _(msg`Continue as ${account.handle} (currently signed in)`)
|
? _(msg`Continue as ${account.handle} (currently signed in)`)
|
||||||
: _(msg`Sign in as ${account.handle}`)
|
: _(msg`Sign in as ${account.handle}`)
|
||||||
}>
|
}>
|
||||||
{({pressed}) => (
|
{({hovered, pressed}) => (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.flex_1,
|
a.flex_1,
|
||||||
a.flex_row,
|
a.flex_row,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
{height: 48},
|
{height: 48},
|
||||||
(pressed || isPendingAccount) && t.atoms.bg_contrast_25,
|
(hovered || pressed || isPendingAccount) && t.atoms.bg_contrast_25,
|
||||||
]}>
|
]}>
|
||||||
<View style={a.p_md}>
|
<View style={a.p_md}>
|
||||||
<UserAvatar avatar={profile?.avatar} size={24} />
|
<UserAvatar avatar={profile?.avatar} size={24} />
|
||||||
@@ -143,6 +143,6 @@ function AccountItem({
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {GestureResponderEvent, View} from 'react-native'
|
import {GestureResponderEvent, View} from 'react-native'
|
||||||
import {PressableEvent} from 'react-native-gesture-handler/lib/typescript/components/Pressable/PressableProps'
|
|
||||||
import {
|
import {
|
||||||
AppBskyActorDefs,
|
AppBskyActorDefs,
|
||||||
AppBskyFeedDefs,
|
AppBskyFeedDefs,
|
||||||
@@ -14,7 +13,6 @@ import {useQueryClient} from '@tanstack/react-query'
|
|||||||
|
|
||||||
import {sanitizeHandle} from '#/lib/strings/handles'
|
import {sanitizeHandle} from '#/lib/strings/handles'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {isWeb} from '#/platform/detection'
|
|
||||||
import {precacheFeedFromGeneratorView} from '#/state/queries/feed'
|
import {precacheFeedFromGeneratorView} from '#/state/queries/feed'
|
||||||
import {
|
import {
|
||||||
useAddSavedFeedsMutation,
|
useAddSavedFeedsMutation,
|
||||||
@@ -256,13 +254,9 @@ function SaveButtonInner({
|
|||||||
const isPending = isAddSavedFeedPending || isRemovePending
|
const isPending = isAddSavedFeedPending || isRemovePending
|
||||||
|
|
||||||
const toggleSave = React.useCallback(
|
const toggleSave = React.useCallback(
|
||||||
async (e: GestureResponderEvent | PressableEvent) => {
|
async (e: GestureResponderEvent) => {
|
||||||
// WEB ONLY - this is okay. See `BottomSheetPressable.web.tsx`
|
e.preventDefault()
|
||||||
if (isWeb) {
|
e.stopPropagation()
|
||||||
e = e as GestureResponderEvent
|
|
||||||
e.preventDefault()
|
|
||||||
e.stopPropagation()
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (savedFeedConfig) {
|
if (savedFeedConfig) {
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import {isNative} from '#/platform/detection'
|
|||||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {useDialogControl} from '#/components/Dialog'
|
import {useDialogControl} from '#/components/Dialog'
|
||||||
@@ -142,7 +141,7 @@ export function NewskieDialog({
|
|||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{isNative && (
|
{isNative && (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Close`)}
|
label={_(msg`Close`)}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -152,7 +151,7 @@ export function NewskieDialog({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Close</Trans>
|
<Trans>Close</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,12 @@ import {DMCA_LINK} from '#/components/ReportDialog/const'
|
|||||||
export {useDialogControl as useReportDialogControl} from '#/components/Dialog'
|
export {useDialogControl as useReportDialogControl} from '#/components/Dialog'
|
||||||
|
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {
|
||||||
import {ButtonIcon, ButtonText, useButtonContext} from '#/components/Button'
|
Button,
|
||||||
|
ButtonIcon,
|
||||||
|
ButtonText,
|
||||||
|
useButtonContext,
|
||||||
|
} from '#/components/Button'
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
import {
|
import {
|
||||||
ChevronLeft_Stroke2_Corner0_Rounded as ChevronLeft,
|
ChevronLeft_Stroke2_Corner0_Rounded as ChevronLeft,
|
||||||
@@ -68,7 +72,7 @@ export function SelectReportOptionView({
|
|||||||
return (
|
return (
|
||||||
<View style={[a.gap_lg]}>
|
<View style={[a.gap_lg]}>
|
||||||
{props.labelers?.length > 1 ? (
|
{props.labelers?.length > 1 ? (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -76,7 +80,7 @@ export function SelectReportOptionView({
|
|||||||
label={_(msg`Go back to previous step`)}
|
label={_(msg`Go back to previous step`)}
|
||||||
onPress={props.goBack}>
|
onPress={props.goBack}>
|
||||||
<ButtonIcon icon={ChevronLeft} />
|
<ButtonIcon icon={ChevronLeft} />
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<View style={[a.justify_center, gtMobile ? a.gap_sm : a.gap_xs]}>
|
<View style={[a.justify_center, gtMobile ? a.gap_sm : a.gap_xs]}>
|
||||||
@@ -91,7 +95,7 @@ export function SelectReportOptionView({
|
|||||||
<View style={[a.gap_sm]}>
|
<View style={[a.gap_sm]}>
|
||||||
{reportOptions.map(reportOption => {
|
{reportOptions.map(reportOption => {
|
||||||
return (
|
return (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
key={reportOption.reason}
|
key={reportOption.reason}
|
||||||
testID={reportOption.reason}
|
testID={reportOption.reason}
|
||||||
label={_(msg`Create report for ${reportOption.title}`)}
|
label={_(msg`Create report for ${reportOption.title}`)}
|
||||||
@@ -100,7 +104,7 @@ export function SelectReportOptionView({
|
|||||||
title={reportOption.title}
|
title={reportOption.title}
|
||||||
description={reportOption.description}
|
description={reportOption.description}
|
||||||
/>
|
/>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ import {useAgent} from '#/state/session'
|
|||||||
import {CharProgress} from '#/view/com/composer/char-progress/CharProgress'
|
import {CharProgress} from '#/view/com/composer/char-progress/CharProgress'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a, native, useTheme} from '#/alf'
|
import {atoms as a, native, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import {ButtonIcon, ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import * as Toggle from '#/components/forms/Toggle'
|
import * as Toggle from '#/components/forms/Toggle'
|
||||||
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
|
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
|
||||||
@@ -101,7 +100,7 @@ export function SubmitView({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[a.gap_2xl]}>
|
<View style={[a.gap_2xl]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -109,7 +108,7 @@ export function SubmitView({
|
|||||||
label={_(msg`Go back to previous step`)}
|
label={_(msg`Go back to previous step`)}
|
||||||
onPress={goBack}>
|
onPress={goBack}>
|
||||||
<ButtonIcon icon={ChevronLeft} />
|
<ButtonIcon icon={ChevronLeft} />
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
@@ -212,7 +211,7 @@ export function SubmitView({
|
|||||||
</Text>
|
</Text>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="sendReportBtn"
|
testID="sendReportBtn"
|
||||||
size="large"
|
size="large"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
@@ -224,7 +223,7 @@ export function SubmitView({
|
|||||||
<Trans>Send report</Trans>
|
<Trans>Send report</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
{submitting && <ButtonIcon icon={Loader} />}
|
{submitting && <ButtonIcon icon={Loader} />}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ import {logger} from '#/logger'
|
|||||||
import {isNative, isWeb} from '#/platform/detection'
|
import {isNative, isWeb} from '#/platform/detection'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {DialogControlProps} from '#/components/Dialog'
|
import {DialogControlProps} from '#/components/Dialog'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
@@ -166,7 +165,7 @@ export function QrCodeDialog({
|
|||||||
) : (
|
) : (
|
||||||
<View
|
<View
|
||||||
style={[a.w_full, a.gap_md, isWeb && [a.flex_row_reverse]]}>
|
style={[a.w_full, a.gap_md, isWeb && [a.flex_row_reverse]]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Copy QR code`)}
|
label={_(msg`Copy QR code`)}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -175,8 +174,8 @@ export function QrCodeDialog({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
{isWeb ? <Trans>Copy</Trans> : <Trans>Share</Trans>}
|
{isWeb ? <Trans>Copy</Trans> : <Trans>Share</Trans>}
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Save QR code`)}
|
label={_(msg`Save QR code`)}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -185,7 +184,7 @@ export function QrCodeDialog({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Save</Trans>
|
<Trans>Save</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ import {logger} from '#/logger'
|
|||||||
import {isNative, isWeb} from '#/platform/detection'
|
import {isNative, isWeb} from '#/platform/detection'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import {DialogControlProps} from '#/components/Dialog'
|
import {DialogControlProps} from '#/components/Dialog'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
@@ -120,7 +119,7 @@ function ShareDialogInner({
|
|||||||
a.gap_md,
|
a.gap_md,
|
||||||
isWeb && [a.gap_sm, a.flex_row_reverse, {marginLeft: 'auto'}],
|
isWeb && [a.gap_sm, a.flex_row_reverse, {marginLeft: 'auto'}],
|
||||||
]}>
|
]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={isWeb ? _(msg`Copy link`) : _(msg`Share link`)}
|
label={isWeb ? _(msg`Copy link`) : _(msg`Share link`)}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -130,8 +129,8 @@ function ShareDialogInner({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
{isWeb ? <Trans>Copy Link</Trans> : <Trans>Share link</Trans>}
|
{isWeb ? <Trans>Copy Link</Trans> : <Trans>Share link</Trans>}
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Share QR code`)}
|
label={_(msg`Share QR code`)}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -145,9 +144,9 @@ function ShareDialogInner({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Share QR code</Trans>
|
<Trans>Share QR code</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
{isNative && (
|
{isNative && (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Save image`)}
|
label={_(msg`Save image`)}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -157,7 +156,7 @@ function ShareDialogInner({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Save image</Trans>
|
<Trans>Save image</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ import {useSession} from '#/state/session'
|
|||||||
import {ListMethods} from '#/view/com/util/List'
|
import {ListMethods} from '#/view/com/util/List'
|
||||||
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 {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {
|
import {
|
||||||
WizardFeedCard,
|
WizardFeedCard,
|
||||||
@@ -112,7 +111,7 @@ export function WizardEditListDialog({
|
|||||||
</Text>
|
</Text>
|
||||||
<View style={{width: 60}}>
|
<View style={{width: 60}}>
|
||||||
{isWeb && (
|
{isWeb && (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Close`)}
|
label={_(msg`Close`)}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -121,7 +120,7 @@ export function WizardEditListDialog({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Close</Trans>
|
<Trans>Close</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -19,8 +19,7 @@ import {useSession} from '#/state/session'
|
|||||||
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
||||||
import {WizardAction, WizardState} from '#/screens/StarterPack/Wizard/State'
|
import {WizardAction, WizardState} from '#/screens/StarterPack/Wizard/State'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Toggle from '#/components/forms/Toggle'
|
import * as Toggle from '#/components/forms/Toggle'
|
||||||
import {Checkbox} from '#/components/forms/Toggle'
|
import {Checkbox} from '#/components/forms/Toggle'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
@@ -99,7 +98,7 @@ function WizardListCard({
|
|||||||
{btnType === 'checkbox' ? (
|
{btnType === 'checkbox' ? (
|
||||||
<Checkbox />
|
<Checkbox />
|
||||||
) : !disabled ? (
|
) : !disabled ? (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Remove`)}
|
label={_(msg`Remove`)}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -109,7 +108,7 @@ function WizardListCard({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Remove</Trans>
|
<Trans>Remove</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
</Toggle.Item>
|
</Toggle.Item>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ import {
|
|||||||
useUpsertMutedWordsMutation,
|
useUpsertMutedWordsMutation,
|
||||||
} from '#/state/queries/preferences'
|
} from '#/state/queries/preferences'
|
||||||
import {atoms as a, native, useTheme} from '#/alf'
|
import {atoms as a, native, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
import {MagnifyingGlass2_Stroke2_Corner0_Rounded as Search} from '#/components/icons/MagnifyingGlass2'
|
import {MagnifyingGlass2_Stroke2_Corner0_Rounded as Search} from '#/components/icons/MagnifyingGlass2'
|
||||||
@@ -212,7 +211,7 @@ export function TagMenu({
|
|||||||
<>
|
<>
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={
|
label={
|
||||||
isMuted
|
isMuted
|
||||||
? _(msg`Unmute all ${displayTag} posts`)
|
? _(msg`Unmute all ${displayTag} posts`)
|
||||||
@@ -266,12 +265,12 @@ export function TagMenu({
|
|||||||
<Trans>posts</Trans>
|
<Trans>posts</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Close this dialog`)}
|
label={_(msg`Close this dialog`)}
|
||||||
size="small"
|
size="small"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -280,7 +279,7 @@ export function TagMenu({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Cancel</Trans>
|
<Trans>Cancel</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Dialog.Inner>
|
</Dialog.Inner>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
threadgateViewToAllowUISetting,
|
threadgateViewToAllowUISetting,
|
||||||
} from '#/state/queries/threadgate'
|
} from '#/state/queries/threadgate'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {useDialogControl} from '#/components/Dialog'
|
import {useDialogControl} from '#/components/Dialog'
|
||||||
import {
|
import {
|
||||||
@@ -82,7 +82,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={
|
label={
|
||||||
isThreadAuthor ? _(msg`Edit who can reply`) : _(msg`Who can reply`)
|
isThreadAuthor ? _(msg`Edit who can reply`) : _(msg`Who can reply`)
|
||||||
}
|
}
|
||||||
@@ -98,8 +98,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
|
|||||||
})
|
})
|
||||||
: {})}
|
: {})}
|
||||||
hitSlop={HITSLOP_10}>
|
hitSlop={HITSLOP_10}>
|
||||||
{/* @TODO DIALOG REFACTOR hovered */}
|
{({hovered}) => (
|
||||||
{({pressed}) => (
|
|
||||||
<View style={[a.flex_row, a.align_center, a.gap_xs, style]}>
|
<View style={[a.flex_row, a.align_center, a.gap_xs, style]}>
|
||||||
<Icon
|
<Icon
|
||||||
color={t.palette.contrast_400}
|
color={t.palette.contrast_400}
|
||||||
@@ -111,7 +110,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
|
|||||||
a.text_sm,
|
a.text_sm,
|
||||||
a.leading_tight,
|
a.leading_tight,
|
||||||
t.atoms.text_contrast_medium,
|
t.atoms.text_contrast_medium,
|
||||||
pressed && a.underline,
|
hovered && a.underline,
|
||||||
]}>
|
]}>
|
||||||
{description}
|
{description}
|
||||||
</Text>
|
</Text>
|
||||||
@@ -121,7 +120,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
|
|
||||||
{isThreadAuthor ? (
|
{isThreadAuthor ? (
|
||||||
<PostInteractionSettingsDialog
|
<PostInteractionSettingsDialog
|
||||||
|
|||||||
@@ -14,10 +14,9 @@ import {
|
|||||||
import {ErrorMessage} from '#/view/com/util/error/ErrorMessage'
|
import {ErrorMessage} from '#/view/com/util/error/ErrorMessage'
|
||||||
import {DateInput} from '#/view/com/util/forms/DateInput'
|
import {DateInput} from '#/view/com/util/forms/DateInput'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
import {ButtonIcon, ButtonText} from '../Button'
|
import {Button, ButtonIcon, ButtonText} from '../Button'
|
||||||
import {Text} from '../Typography'
|
import {Text} from '../Typography'
|
||||||
|
|
||||||
export function BirthDateSettingsDialog({
|
export function BirthDateSettingsDialog({
|
||||||
@@ -114,7 +113,7 @@ function BirthdayInner({
|
|||||||
) : undefined}
|
) : undefined}
|
||||||
|
|
||||||
<View style={isWeb && [a.flex_row, a.justify_end]}>
|
<View style={isWeb && [a.flex_row, a.justify_end]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={hasChanged ? _(msg`Save birthday`) : _(msg`Done`)}
|
label={hasChanged ? _(msg`Save birthday`) : _(msg`Done`)}
|
||||||
size="large"
|
size="large"
|
||||||
onPress={onSave}
|
onPress={onSave}
|
||||||
@@ -124,7 +123,7 @@ function BirthdayInner({
|
|||||||
{hasChanged ? <Trans>Save</Trans> : <Trans>Done</Trans>}
|
{hasChanged ? <Trans>Save</Trans> : <Trans>Done</Trans>}
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
{isPending && <ButtonIcon icon={Loader} />}
|
{isPending && <ButtonIcon icon={Loader} />}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,13 +8,12 @@ import {EMBED_SCRIPT} from '#/lib/constants'
|
|||||||
import {niceDate} from '#/lib/strings/time'
|
import {niceDate} from '#/lib/strings/time'
|
||||||
import {toShareUrl} from '#/lib/strings/url-helpers'
|
import {toShareUrl} from '#/lib/strings/url-helpers'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import * as TextField from '#/components/forms/TextField'
|
import * as TextField from '#/components/forms/TextField'
|
||||||
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
|
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
|
||||||
import {CodeBrackets_Stroke2_Corner0_Rounded as CodeBrackets} from '#/components/icons/CodeBrackets'
|
import {CodeBrackets_Stroke2_Corner0_Rounded as CodeBrackets} from '#/components/icons/CodeBrackets'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {ButtonIcon, ButtonText} from '../Button'
|
import {Button, ButtonIcon, ButtonText} from '../Button'
|
||||||
|
|
||||||
type EmbedDialogProps = {
|
type EmbedDialogProps = {
|
||||||
control: Dialog.DialogControlProps
|
control: Dialog.DialogControlProps
|
||||||
@@ -118,7 +117,7 @@ function EmbedDialogInner({
|
|||||||
/>
|
/>
|
||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
</View>
|
</View>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Copy code`)}
|
label={_(msg`Copy code`)}
|
||||||
color="primary"
|
color="primary"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
@@ -141,7 +140,7 @@ function EmbedDialogInner({
|
|||||||
<Trans>Copy code</Trans>
|
<Trans>Copy code</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
)}
|
)}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
<Dialog.Close />
|
<Dialog.Close />
|
||||||
</Dialog.Inner>
|
</Dialog.Inner>
|
||||||
|
|||||||
@@ -10,9 +10,8 @@ import {
|
|||||||
} from '#/lib/strings/embed-player'
|
} from '#/lib/strings/embed-player'
|
||||||
import {useSetExternalEmbedPref} from '#/state/preferences'
|
import {useSetExternalEmbedPref} from '#/state/preferences'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {ButtonText} from '../Button'
|
import {Button, ButtonText} from '../Button'
|
||||||
import {Text} from '../Typography'
|
import {Text} from '../Typography'
|
||||||
|
|
||||||
export function EmbedConsentDialog({
|
export function EmbedConsentDialog({
|
||||||
@@ -76,30 +75,33 @@ export function EmbedConsentDialog({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={a.gap_md}>
|
<View style={a.gap_md}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
style={gtMobile && a.flex_1}
|
style={gtMobile && a.flex_1}
|
||||||
label={_(msg`Enable external media`)}
|
label={_(msg`Enable external media`)}
|
||||||
onPress={onShowAllPress}
|
onPress={onShowAllPress}
|
||||||
|
onAccessibilityEscape={control.close}
|
||||||
color="primary"
|
color="primary"
|
||||||
size="large"
|
size="large"
|
||||||
variant="solid">
|
variant="solid">
|
||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Enable external media</Trans>
|
<Trans>Enable external media</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
style={gtMobile && a.flex_1}
|
style={gtMobile && a.flex_1}
|
||||||
label={_(msg`Enable this source only`)}
|
label={_(msg`Enable this source only`)}
|
||||||
onPress={onShowPress}
|
onPress={onShowPress}
|
||||||
|
onAccessibilityEscape={control.close}
|
||||||
color="secondary"
|
color="secondary"
|
||||||
size="large"
|
size="large"
|
||||||
variant="solid">
|
variant="solid">
|
||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Enable {externalEmbedLabels[source]} only</Trans>
|
<Trans>Enable {externalEmbedLabels[source]} only</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`No thanks`)}
|
label={_(msg`No thanks`)}
|
||||||
|
onAccessibilityEscape={control.close}
|
||||||
onPress={onHidePress}
|
onPress={onHidePress}
|
||||||
color="secondary"
|
color="secondary"
|
||||||
size="large"
|
size="large"
|
||||||
@@ -107,7 +109,7 @@ export function EmbedConsentDialog({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>No thanks</Trans>
|
<Trans>No thanks</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
<Dialog.Close />
|
<Dialog.Close />
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
|
|||||||
@@ -20,13 +20,12 @@ import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
|
|||||||
import {ErrorBoundary} from '#/view/com/util/ErrorBoundary'
|
import {ErrorBoundary} from '#/view/com/util/ErrorBoundary'
|
||||||
import {ListMethods} from '#/view/com/util/List'
|
import {ListMethods} from '#/view/com/util/List'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import * as TextField from '#/components/forms/TextField'
|
import * as TextField from '#/components/forms/TextField'
|
||||||
import {useThrottledValue} from '#/components/hooks/useThrottledValue'
|
import {useThrottledValue} from '#/components/hooks/useThrottledValue'
|
||||||
import {ArrowLeft_Stroke2_Corner0_Rounded as Arrow} from '#/components/icons/Arrow'
|
import {ArrowLeft_Stroke2_Corner0_Rounded as Arrow} from '#/components/icons/Arrow'
|
||||||
import {MagnifyingGlass2_Stroke2_Corner0_Rounded as Search} from '#/components/icons/MagnifyingGlass2'
|
import {MagnifyingGlass2_Stroke2_Corner0_Rounded as Search} from '#/components/icons/MagnifyingGlass2'
|
||||||
import {ButtonIcon, ButtonText} from '../Button'
|
import {Button, ButtonIcon, ButtonText} from '../Button'
|
||||||
import {ListFooter, ListMaybePlaceholder} from '../Lists'
|
import {ListFooter, ListMaybePlaceholder} from '../Lists'
|
||||||
import {GifPreview} from './GifSelect.shared'
|
import {GifPreview} from './GifSelect.shared'
|
||||||
|
|
||||||
@@ -149,7 +148,7 @@ function GifList({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{!gtMobile && isWeb && (
|
{!gtMobile && isWeb && (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -157,7 +156,7 @@ function GifList({
|
|||||||
onPress={() => control.close()}
|
onPress={() => control.close()}
|
||||||
label={_(msg`Close GIF dialog`)}>
|
label={_(msg`Close GIF dialog`)}>
|
||||||
<ButtonIcon icon={Arrow} size="md" />
|
<ButtonIcon icon={Arrow} size="md" />
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<TextField.Root>
|
<TextField.Root>
|
||||||
@@ -257,7 +256,7 @@ function DialogError({details}: {details?: string}) {
|
|||||||
)}
|
)}
|
||||||
details={details}
|
details={details}
|
||||||
/>
|
/>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Close dialog`)}
|
label={_(msg`Close dialog`)}
|
||||||
onPress={() => control.close()}
|
onPress={() => control.close()}
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -266,7 +265,7 @@ function DialogError({details}: {details?: string}) {
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Close</Trans>
|
<Trans>Close</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,7 @@ import {
|
|||||||
ViewStyleProp,
|
ViewStyleProp,
|
||||||
web,
|
web,
|
||||||
} from '#/alf'
|
} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import {ButtonIcon, ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
|
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
@@ -316,7 +315,7 @@ function MutedWordsInner() {
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[a.pt_xs]}>
|
<View style={[a.pt_xs]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
disabled={isPending || !field}
|
disabled={isPending || !field}
|
||||||
label={_(msg`Add mute word for configured settings`)}
|
label={_(msg`Add mute word for configured settings`)}
|
||||||
size="large"
|
size="large"
|
||||||
@@ -328,7 +327,7 @@ function MutedWordsInner() {
|
|||||||
<Trans>Add</Trans>
|
<Trans>Add</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
<ButtonIcon icon={isPending ? Loader : Plus} position="right" />
|
<ButtonIcon icon={isPending ? Loader : Plus} position="right" />
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
@@ -519,7 +518,7 @@ function MutedWordRow({
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Remove mute word from your list`)}
|
label={_(msg`Remove mute word from your list`)}
|
||||||
size="tiny"
|
size="tiny"
|
||||||
shape="round"
|
shape="round"
|
||||||
@@ -528,7 +527,7 @@ function MutedWordRow({
|
|||||||
onPress={() => control.open()}
|
onPress={() => control.open()}
|
||||||
style={[a.ml_sm]}>
|
style={[a.ml_sm]}>
|
||||||
<ButtonIcon icon={isPending ? Loader : X} />
|
<ButtonIcon icon={isPending ? Loader : X} />
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -30,8 +30,7 @@ import {
|
|||||||
import {useAgent, useSession} from '#/state/session'
|
import {useAgent, useSession} from '#/state/session'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import {ButtonIcon, ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
import * as Toggle from '#/components/forms/Toggle'
|
import * as Toggle from '#/components/forms/Toggle'
|
||||||
@@ -230,6 +229,7 @@ export function PostInteractionSettingsForm({
|
|||||||
}: PostInteractionSettingsFormProps) {
|
}: PostInteractionSettingsFormProps) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
const control = Dialog.useDialogContext()
|
||||||
const {data: lists} = useMyListsQuery('curate')
|
const {data: lists} = useMyListsQuery('curate')
|
||||||
const [quotesEnabled, setQuotesEnabled] = React.useState(
|
const [quotesEnabled, setQuotesEnabled] = React.useState(
|
||||||
!(
|
!(
|
||||||
@@ -432,16 +432,17 @@ export function PostInteractionSettingsForm({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Save`)}
|
label={_(msg`Save`)}
|
||||||
onPress={onSave}
|
onPress={onSave}
|
||||||
|
onAccessibilityEscape={control.close}
|
||||||
color="primary"
|
color="primary"
|
||||||
size="large"
|
size="large"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
style={a.mt_xl}>
|
style={a.mt_xl}>
|
||||||
<ButtonText>{_(msg`Save`)}</ButtonText>
|
<ButtonText>{_(msg`Save`)}</ButtonText>
|
||||||
{isSaving && <ButtonIcon icon={Loader} position="right" />}
|
{isSaving && <ButtonIcon icon={Loader} position="right" />}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -461,7 +462,7 @@ function Selectable({
|
|||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
return (
|
return (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
label={label}
|
label={label}
|
||||||
@@ -471,8 +472,7 @@ function Selectable({
|
|||||||
checked: isSelected,
|
checked: isSelected,
|
||||||
}}
|
}}
|
||||||
style={a.flex_1}>
|
style={a.flex_1}>
|
||||||
{/* @TODO DIALOG REFACTOR hovered focused */}
|
{({hovered, focused}) => (
|
||||||
{({pressed}) => (
|
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.flex_1,
|
a.flex_1,
|
||||||
@@ -483,7 +483,7 @@ function Selectable({
|
|||||||
a.p_md,
|
a.p_md,
|
||||||
{height: 40}, // for consistency with checkmark icon visible or not
|
{height: 40}, // for consistency with checkmark icon visible or not
|
||||||
t.atoms.bg_contrast_50,
|
t.atoms.bg_contrast_50,
|
||||||
pressed && t.atoms.bg_contrast_100,
|
(hovered || focused) && t.atoms.bg_contrast_100,
|
||||||
isSelected && {
|
isSelected && {
|
||||||
backgroundColor: t.palette.primary_100,
|
backgroundColor: t.palette.primary_100,
|
||||||
},
|
},
|
||||||
@@ -497,7 +497,7 @@ function Selectable({
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ import {useCloseAllActiveElements} from '#/state/util'
|
|||||||
import {Logo} from '#/view/icons/Logo'
|
import {Logo} from '#/view/icons/Logo'
|
||||||
import {Logotype} from '#/view/icons/Logotype'
|
import {Logotype} from '#/view/icons/Logotype'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
|
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
@@ -78,7 +77,7 @@ function SigninDialogInner({}: {control: Dialog.DialogOuterProps['control']}) {
|
|||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<View style={[a.flex_col, a.gap_md]}>
|
<View style={[a.flex_col, a.gap_md]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="large"
|
size="large"
|
||||||
@@ -87,9 +86,9 @@ function SigninDialogInner({}: {control: Dialog.DialogOuterProps['control']}) {
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Create an account</Trans>
|
<Trans>Create an account</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
|
|
||||||
<BottomSheetButton
|
<Button
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
size="large"
|
size="large"
|
||||||
@@ -98,7 +97,7 @@ function SigninDialogInner({}: {control: Dialog.DialogOuterProps['control']}) {
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Sign in</Trans>
|
<Trans>Sign in</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{isNative && <View style={{height: 10}} />}
|
{isNative && <View style={{height: 10}} />}
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ import {useProfileQuery} from '#/state/queries/profile'
|
|||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a, useTheme, web} from '#/alf'
|
import {atoms as a, useTheme, web} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import * as Toggle from '#/components/forms/Toggle'
|
import * as Toggle from '#/components/forms/Toggle'
|
||||||
import {Message_Stroke2_Corner0_Rounded} from '#/components/icons/Message'
|
import {Message_Stroke2_Corner0_Rounded} from '#/components/icons/Message'
|
||||||
@@ -157,7 +156,7 @@ function DialogInner({
|
|||||||
</Toggle.Group>
|
</Toggle.Group>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Start chatting`)}
|
label={_(msg`Start chatting`)}
|
||||||
accessibilityHint={_(msg`Close modal`)}
|
accessibilityHint={_(msg`Close modal`)}
|
||||||
size="large"
|
size="large"
|
||||||
@@ -167,7 +166,7 @@ function DialogInner({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Get started</Trans>
|
<Trans>Get started</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
<Dialog.Close />
|
<Dialog.Close />
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import {useSession} from '#/state/session'
|
|||||||
import {ListMethods} from '#/view/com/util/List'
|
import {ListMethods} from '#/view/com/util/List'
|
||||||
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
||||||
import {atoms as a, native, useTheme, web} from '#/alf'
|
import {atoms as a, native, useTheme, web} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {canBeMessaged} from '#/components/dms/util'
|
import {canBeMessaged} from '#/components/dms/util'
|
||||||
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
||||||
@@ -254,7 +254,7 @@ export function SearchablePeopleList({
|
|||||||
a.justify_center,
|
a.justify_center,
|
||||||
{height: 32},
|
{height: 32},
|
||||||
]}>
|
]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Close`)}
|
label={_(msg`Close`)}
|
||||||
size="small"
|
size="small"
|
||||||
shape="round"
|
shape="round"
|
||||||
@@ -264,7 +264,6 @@ export function SearchablePeopleList({
|
|||||||
a.absolute,
|
a.absolute,
|
||||||
a.z_20,
|
a.z_20,
|
||||||
native({
|
native({
|
||||||
top: 2,
|
|
||||||
left: -7,
|
left: -7,
|
||||||
}),
|
}),
|
||||||
web({
|
web({
|
||||||
@@ -277,7 +276,7 @@ export function SearchablePeopleList({
|
|||||||
) : (
|
) : (
|
||||||
<ChevronLeft size="md" fill={t.palette.contrast_500} />
|
<ChevronLeft size="md" fill={t.palette.contrast_500} />
|
||||||
)}
|
)}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
a.z_10,
|
a.z_10,
|
||||||
@@ -364,11 +363,11 @@ function ProfileCard({
|
|||||||
}, [onPress, profile.did])
|
}, [onPress, profile.did])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
disabled={!enabled}
|
disabled={!enabled}
|
||||||
label={_(msg`Start chat with ${displayName}`)}
|
label={_(msg`Start chat with ${displayName}`)}
|
||||||
onPress={handleOnPress}>
|
onPress={handleOnPress}>
|
||||||
{({pressed}) => (
|
{({hovered, pressed, focused}) => (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.flex_1,
|
a.flex_1,
|
||||||
@@ -377,11 +376,12 @@ function ProfileCard({
|
|||||||
a.gap_md,
|
a.gap_md,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
a.flex_row,
|
a.flex_row,
|
||||||
// @TODO DIALOG REFACTOR focused hovered
|
|
||||||
!enabled
|
!enabled
|
||||||
? {opacity: 0.5}
|
? {opacity: 0.5}
|
||||||
: pressed
|
: pressed || focused
|
||||||
? t.atoms.bg_contrast_25
|
? t.atoms.bg_contrast_25
|
||||||
|
: hovered
|
||||||
|
? t.atoms.bg_contrast_50
|
||||||
: t.atoms.bg,
|
: t.atoms.bg,
|
||||||
]}>
|
]}>
|
||||||
<UserAvatar
|
<UserAvatar
|
||||||
@@ -404,7 +404,7 @@ function ProfileCard({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import {msg, Trans} from '@lingui/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {DateFieldProps} from '#/components/forms/DateField/types'
|
import {DateFieldProps} from '#/components/forms/DateField/types'
|
||||||
import {toSimpleDateString} from '#/components/forms/DateField/utils'
|
import {toSimpleDateString} from '#/components/forms/DateField/utils'
|
||||||
@@ -73,7 +72,7 @@ export function DateField({
|
|||||||
accessibilityHint={accessibilityHint}
|
accessibilityHint={accessibilityHint}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Done`)}
|
label={_(msg`Done`)}
|
||||||
onPress={() => control.close()}
|
onPress={() => control.close()}
|
||||||
size="large"
|
size="large"
|
||||||
@@ -82,7 +81,7 @@ export function DateField({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Done</Trans>
|
<Trans>Done</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</Dialog.Inner>
|
</Dialog.Inner>
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ 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 {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {DialogControlProps} from '#/components/Dialog'
|
import {DialogControlProps} from '#/components/Dialog'
|
||||||
import {useIntentDialogs} from '#/components/intents/IntentDialogs'
|
import {useIntentDialogs} from '#/components/intents/IntentDialogs'
|
||||||
@@ -107,7 +106,7 @@ function Inner({control}: {control: DialogControlProps}) {
|
|||||||
)}
|
)}
|
||||||
{status !== 'loading' ? (
|
{status !== 'loading' ? (
|
||||||
<View style={[a.w_full, a.flex_row, a.gap_sm, {marginLeft: 'auto'}]}>
|
<View style={[a.w_full, a.flex_row, a.gap_sm, {marginLeft: 'auto'}]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Close`)}
|
label={_(msg`Close`)}
|
||||||
onPress={() => control.close()}
|
onPress={() => control.close()}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
@@ -117,9 +116,9 @@ function Inner({control}: {control: DialogControlProps}) {
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Close</Trans>
|
<Trans>Close</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
{status === 'failure' ? (
|
{status === 'failure' ? (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Resend Verification Email`)}
|
label={_(msg`Resend Verification Email`)}
|
||||||
onPress={onPressResendEmail}
|
onPress={onPressResendEmail}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
@@ -130,7 +129,7 @@ function Inner({control}: {control: DialogControlProps}) {
|
|||||||
<Trans>Resend Email</Trans>
|
<Trans>Resend Email</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
{sending ? <Loader size="sm" style={{color: 'white'}} /> : null}
|
{sending ? <Loader size="sm" style={{color: 'white'}} /> : null}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import {
|
|||||||
PlaceholderCanvasRef,
|
PlaceholderCanvasRef,
|
||||||
} from '#/screens/Onboarding/StepProfile/PlaceholderCanvas'
|
} from '#/screens/Onboarding/StepProfile/PlaceholderCanvas'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {IconCircle} from '#/components/IconCircle'
|
import {IconCircle} from '#/components/IconCircle'
|
||||||
@@ -312,7 +311,7 @@ export function StepProfile() {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View style={[a.pt_4xl]}>
|
<View style={[a.pt_4xl]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="large"
|
size="large"
|
||||||
@@ -321,7 +320,7 @@ export function StepProfile() {
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Done</Trans>
|
<Trans>Done</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</Dialog.Inner>
|
</Dialog.Inner>
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ import {useLingui} from '@lingui/react'
|
|||||||
import {BSKY_SERVICE} from '#/lib/constants'
|
import {BSKY_SERVICE} from '#/lib/constants'
|
||||||
import * as persisted from '#/state/persisted'
|
import * as persisted from '#/state/persisted'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import * as TextField from '#/components/forms/TextField'
|
import * as TextField from '#/components/forms/TextField'
|
||||||
import * as ToggleButton from '#/components/forms/ToggleButton'
|
import * as ToggleButton from '#/components/forms/ToggleButton'
|
||||||
@@ -125,7 +124,7 @@ export function ServerInputDialog({
|
|||||||
{pdsAddressHistory.length > 0 && (
|
{pdsAddressHistory.length > 0 && (
|
||||||
<View style={[a.flex_row, a.flex_wrap, a.mt_xs]}>
|
<View style={[a.flex_row, a.flex_wrap, a.mt_xs]}>
|
||||||
{pdsAddressHistory.map(uri => (
|
{pdsAddressHistory.map(uri => (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
key={uri}
|
key={uri}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -133,7 +132,7 @@ export function ServerInputDialog({
|
|||||||
style={[a.px_sm, a.py_xs, a.rounded_sm, a.gap_sm]}
|
style={[a.px_sm, a.py_xs, a.rounded_sm, a.gap_sm]}
|
||||||
onPress={() => setCustomAddress(uri)}>
|
onPress={() => setCustomAddress(uri)}>
|
||||||
<ButtonText>{uri}</ButtonText>
|
<ButtonText>{uri}</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -161,7 +160,7 @@ export function ServerInputDialog({
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={gtMobile && [a.flex_row, a.justify_end]}>
|
<View style={gtMobile && [a.flex_row, a.justify_end]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="doneBtn"
|
testID="doneBtn"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -169,7 +168,7 @@ export function ServerInputDialog({
|
|||||||
onPress={() => control.close()}
|
onPress={() => control.close()}
|
||||||
label={_(msg`Done`)}>
|
label={_(msg`Done`)}>
|
||||||
<ButtonText>{_(msg`Done`)}</ButtonText>
|
<ButtonText>{_(msg`Done`)}</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ import {
|
|||||||
import {enforceLen} from '#/lib/strings/helpers'
|
import {enforceLen} from '#/lib/strings/helpers'
|
||||||
import {Gif} from '#/state/queries/tenor'
|
import {Gif} from '#/state/queries/tenor'
|
||||||
import {atoms as a, native, useTheme} from '#/alf'
|
import {atoms as a, native, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import * as TextField from '#/components/forms/TextField'
|
import * as TextField from '#/components/forms/TextField'
|
||||||
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
|
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
|
||||||
@@ -155,7 +154,7 @@ function AltTextInner({
|
|||||||
/>
|
/>
|
||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
</View>
|
</View>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Save`)}
|
label={_(msg`Save`)}
|
||||||
size="large"
|
size="large"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -164,7 +163,7 @@ function AltTextInner({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Save</Trans>
|
<Trans>Save</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
{/* below the text input to force tab order */}
|
{/* below the text input to force tab order */}
|
||||||
<View>
|
<View>
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ import {
|
|||||||
manipulateImage,
|
manipulateImage,
|
||||||
} from '#/state/gallery'
|
} from '#/state/gallery'
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {EditImageDialogProps} from './EditImageDialog'
|
import {EditImageDialogProps} from './EditImageDialog'
|
||||||
@@ -72,7 +71,7 @@ const EditImageInner = ({control, image, onChange}: EditImageDialogProps) => {
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[a.mt_md, a.gap_md]}>
|
<View style={[a.mt_md, a.gap_md]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
disabled={!isNew}
|
disabled={!isNew}
|
||||||
label={_(msg`Save`)}
|
label={_(msg`Save`)}
|
||||||
size="large"
|
size="large"
|
||||||
@@ -82,7 +81,7 @@ const EditImageInner = ({control, image, onChange}: EditImageDialogProps) => {
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Save</Trans>
|
<Trans>Save</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</Dialog.Inner>
|
</Dialog.Inner>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ import {MAX_ALT_TEXT} from '#/lib/constants'
|
|||||||
import {isWeb} from '#/platform/detection'
|
import {isWeb} from '#/platform/detection'
|
||||||
import {ComposerImage} from '#/state/gallery'
|
import {ComposerImage} from '#/state/gallery'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import * as TextField from '#/components/forms/TextField'
|
import * as TextField from '#/components/forms/TextField'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
@@ -103,7 +102,7 @@ const ImageAltTextInner = ({
|
|||||||
/>
|
/>
|
||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
</View>
|
</View>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Save`)}
|
label={_(msg`Save`)}
|
||||||
disabled={altText.length > MAX_ALT_TEXT || altText === image.alt}
|
disabled={altText.length > MAX_ALT_TEXT || altText === image.alt}
|
||||||
size="large"
|
size="large"
|
||||||
@@ -113,7 +112,7 @@ const ImageAltTextInner = ({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Save</Trans>
|
<Trans>Save</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import {LANGUAGES} from '#/locale/languages'
|
|||||||
import {isWeb} from '#/platform/detection'
|
import {isWeb} from '#/platform/detection'
|
||||||
import {useLanguagePrefs} from '#/state/preferences'
|
import {useLanguagePrefs} from '#/state/preferences'
|
||||||
import {atoms as a, useTheme, web} from '#/alf'
|
import {atoms as a, useTheme, web} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import * as TextField from '#/components/forms/TextField'
|
import * as TextField from '#/components/forms/TextField'
|
||||||
@@ -165,7 +164,7 @@ function SubtitleDialogInner({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<View style={web([a.flex_row, a.justify_end])}>
|
<View style={web([a.flex_row, a.justify_end])}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Done`)}
|
label={_(msg`Done`)}
|
||||||
size={isWeb ? 'small' : 'large'}
|
size={isWeb ? 'small' : 'large'}
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -178,7 +177,7 @@ function SubtitleDialogInner({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Done</Trans>
|
<Trans>Done</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<Dialog.Close />
|
<Dialog.Close />
|
||||||
@@ -258,7 +257,7 @@ function SubtitleFileRow({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Remove subtitle file`)}
|
label={_(msg`Remove subtitle file`)}
|
||||||
size="tiny"
|
size="tiny"
|
||||||
shape="round"
|
shape="round"
|
||||||
@@ -269,7 +268,7 @@ function SubtitleFileRow({
|
|||||||
}
|
}
|
||||||
style={[a.ml_sm]}>
|
style={[a.ml_sm]}>
|
||||||
<ButtonIcon icon={X} />
|
<ButtonIcon icon={X} />
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {POST_CTRL_HITSLOP} from '#/lib/constants'
|
|||||||
import {useHaptics} from '#/lib/haptics'
|
import {useHaptics} from '#/lib/haptics'
|
||||||
import {useRequireAuth} from '#/state/session'
|
import {useRequireAuth} from '#/state/session'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {CloseQuote_Stroke2_Corner1_Rounded as Quote} from '#/components/icons/Quote'
|
import {CloseQuote_Stroke2_Corner1_Rounded as Quote} from '#/components/icons/Quote'
|
||||||
@@ -93,7 +92,7 @@ let RepostButton = ({
|
|||||||
<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}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
style={[a.justify_start, a.px_md]}
|
style={[a.justify_start, a.px_md]}
|
||||||
label={
|
label={
|
||||||
isReposted
|
isReposted
|
||||||
@@ -116,8 +115,8 @@ let RepostButton = ({
|
|||||||
? _(msg`Remove repost`)
|
? _(msg`Remove repost`)
|
||||||
: _(msg({message: `Repost`, context: 'action'}))}
|
: _(msg({message: `Repost`, context: 'action'}))}
|
||||||
</Text>
|
</Text>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
disabled={embeddingDisabled}
|
disabled={embeddingDisabled}
|
||||||
testID="quoteBtn"
|
testID="quoteBtn"
|
||||||
style={[a.justify_start, a.px_md]}
|
style={[a.justify_start, a.px_md]}
|
||||||
@@ -153,9 +152,9 @@ let RepostButton = ({
|
|||||||
? _(msg`Quote posts disabled`)
|
? _(msg`Quote posts disabled`)
|
||||||
: _(msg`Quote post`)}
|
: _(msg`Quote post`)}
|
||||||
</Text>
|
</Text>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
label={_(msg`Cancel quote post`)}
|
label={_(msg`Cancel quote post`)}
|
||||||
onAccessibilityEscape={close}
|
onAccessibilityEscape={close}
|
||||||
onPress={close}
|
onPress={close}
|
||||||
@@ -163,7 +162,7 @@ let RepostButton = ({
|
|||||||
variant="solid"
|
variant="solid"
|
||||||
color="primary">
|
color="primary">
|
||||||
<ButtonText>{_(msg`Cancel`)}</ButtonText>
|
<ButtonText>{_(msg`Cancel`)}</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</Dialog.Inner>
|
</Dialog.Inner>
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ import {useAgent, useSession} from '#/state/session'
|
|||||||
import {ErrorMessage} from '#/view/com/util/error/ErrorMessage'
|
import {ErrorMessage} from '#/view/com/util/error/ErrorMessage'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import {ButtonIcon, ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import * as TextField from '#/components/forms/TextField'
|
import * as TextField from '#/components/forms/TextField'
|
||||||
import {Lock_Stroke2_Corner0_Rounded as Lock} from '#/components/icons/Lock'
|
import {Lock_Stroke2_Corner0_Rounded as Lock} from '#/components/icons/Lock'
|
||||||
@@ -109,7 +108,7 @@ export function DisableEmail2FADialog({
|
|||||||
|
|
||||||
{stage === Stages.Email ? (
|
{stage === Stages.Email ? (
|
||||||
<View style={gtMobile && [a.flex_row, a.justify_end, a.gap_md]}>
|
<View style={gtMobile && [a.flex_row, a.justify_end, a.gap_md]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="sendEmailButton"
|
testID="sendEmailButton"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -121,8 +120,8 @@ export function DisableEmail2FADialog({
|
|||||||
<Trans>Send verification email</Trans>
|
<Trans>Send verification email</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
{isProcessing && <ButtonIcon icon={Loader} />}
|
{isProcessing && <ButtonIcon icon={Loader} />}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="haveCodeButton"
|
testID="haveCodeButton"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -133,7 +132,7 @@ export function DisableEmail2FADialog({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>I have a code</Trans>
|
<Trans>I have a code</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
) : stage === Stages.ConfirmCode ? (
|
) : stage === Stages.ConfirmCode ? (
|
||||||
<View>
|
<View>
|
||||||
@@ -158,7 +157,7 @@ export function DisableEmail2FADialog({
|
|||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
</View>
|
</View>
|
||||||
<View style={gtMobile && [a.flex_row, a.justify_end]}>
|
<View style={gtMobile && [a.flex_row, a.justify_end]}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="resendCodeBtn"
|
testID="resendCodeBtn"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -169,8 +168,8 @@ export function DisableEmail2FADialog({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Resend email</Trans>
|
<Trans>Resend email</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="confirmBtn"
|
testID="confirmBtn"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -182,7 +181,7 @@ export function DisableEmail2FADialog({
|
|||||||
<Trans>Confirm</Trans>
|
<Trans>Confirm</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
{isProcessing && <ButtonIcon icon={Loader} />}
|
{isProcessing && <ButtonIcon icon={Loader} />}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ import {logger} from '#/logger'
|
|||||||
import {useAgent} from '#/state/session'
|
import {useAgent} from '#/state/session'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import {ButtonIcon, ButtonText} from '#/components/Button'
|
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {InlineLinkText} from '#/components/Link'
|
import {InlineLinkText} from '#/components/Link'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
@@ -69,7 +68,7 @@ export function ExportCarDialog({
|
|||||||
</Trans>
|
</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<BottomSheetButton
|
<Button
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="large"
|
size="large"
|
||||||
@@ -80,7 +79,7 @@ export function ExportCarDialog({
|
|||||||
<Trans>Download CAR file</Trans>
|
<Trans>Download CAR file</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
{loading && <ButtonIcon icon={Loader} />}
|
{loading && <ButtonIcon icon={Loader} />}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
|
|||||||
Reference in New Issue
Block a user