Merge branch 'hailey/dialogs-pt8' into hailey/dialogs-pt9
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,12 +0,0 @@
|
|||||||
import React from 'react'
|
|
||||||
|
|
||||||
import {Button, ButtonProps} from '#/components/Button'
|
|
||||||
import {NormalizedRNGHPressable} from '#/components/NormalizedRNGHPressable'
|
|
||||||
|
|
||||||
export function BottomSheetButton({children, ...rest}: ButtonProps) {
|
|
||||||
return (
|
|
||||||
<Button {...rest} PressableComponent={NormalizedRNGHPressable}>
|
|
||||||
{children}
|
|
||||||
</Button>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
import {Button as BottomSheetButton} from '#/components/Button'
|
|
||||||
|
|
||||||
export {BottomSheetButton}
|
|
||||||
+116
-124
@@ -15,7 +15,9 @@ import {
|
|||||||
import {LinearGradient} from 'expo-linear-gradient'
|
import {LinearGradient} from 'expo-linear-gradient'
|
||||||
|
|
||||||
import {atoms as a, flatten, select, tokens, useTheme, web} from '#/alf'
|
import {atoms as a, flatten, select, tokens, useTheme, web} from '#/alf'
|
||||||
|
import {useDialogContext} from '#/components/Dialog'
|
||||||
import {Props as SVGIconProps} from '#/components/icons/common'
|
import {Props as SVGIconProps} from '#/components/icons/common'
|
||||||
|
import {NormalizedRNGHPressable} from '#/components/NormalizedRNGHPressable'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
export type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'gradient'
|
export type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'gradient'
|
||||||
@@ -90,8 +92,7 @@ export type ButtonProps = Pick<
|
|||||||
PressableComponent?: React.ComponentType<PressableProps>
|
PressableComponent?: React.ComponentType<PressableProps>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ButtonTextProps = TextProps &
|
export type ButtonTextProps = TextProps & VariantProps & {disabled?: boolean}
|
||||||
VariantProps & {disabled?: boolean | null}
|
|
||||||
|
|
||||||
const Context = React.createContext<VariantProps & ButtonState>({
|
const Context = React.createContext<VariantProps & ButtonState>({
|
||||||
hovered: false,
|
hovered: false,
|
||||||
@@ -99,7 +100,6 @@ const Context = React.createContext<VariantProps & ButtonState>({
|
|||||||
pressed: false,
|
pressed: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
})
|
})
|
||||||
export const ButtonContext = Context
|
|
||||||
|
|
||||||
export function useButtonContext() {
|
export function useButtonContext() {
|
||||||
return React.useContext(Context)
|
return React.useContext(Context)
|
||||||
@@ -122,6 +122,18 @@ export const Button = React.forwardRef<View, ButtonProps>(
|
|||||||
},
|
},
|
||||||
ref,
|
ref,
|
||||||
) => {
|
) => {
|
||||||
|
// This will pick the correct default pressable to use. If we are inside a dialog, we need to use the RNGH
|
||||||
|
// pressable so that it is usable inside the dialog.
|
||||||
|
const {insideDialog} = useDialogContext()
|
||||||
|
if (!PressableComponent) {
|
||||||
|
if (insideDialog) {
|
||||||
|
PressableComponent = NormalizedRNGHPressable
|
||||||
|
} else {
|
||||||
|
PressableComponent = Pressable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const t = useTheme()
|
||||||
const [state, setState] = React.useState({
|
const [state, setState] = React.useState({
|
||||||
pressed: false,
|
pressed: false,
|
||||||
hovered: false,
|
hovered: false,
|
||||||
@@ -185,126 +197,6 @@ export const Button = React.forwardRef<View, ButtonProps>(
|
|||||||
}))
|
}))
|
||||||
}, [setState])
|
}, [setState])
|
||||||
|
|
||||||
const {baseStyles, hoverStyles} = useSharedButtonStyles({
|
|
||||||
color,
|
|
||||||
variant,
|
|
||||||
disabled,
|
|
||||||
shape,
|
|
||||||
size,
|
|
||||||
})
|
|
||||||
|
|
||||||
const {gradientColors, gradientHoverColors, gradientLocations} =
|
|
||||||
React.useMemo(() => {
|
|
||||||
const colors: string[] = []
|
|
||||||
const hoverColors: string[] = []
|
|
||||||
const locations: number[] = []
|
|
||||||
const gradient = {
|
|
||||||
primary: tokens.gradients.sky,
|
|
||||||
secondary: tokens.gradients.sky,
|
|
||||||
secondary_inverted: tokens.gradients.sky,
|
|
||||||
negative: tokens.gradients.sky,
|
|
||||||
gradient_primary: tokens.gradients.primary,
|
|
||||||
gradient_sky: tokens.gradients.sky,
|
|
||||||
gradient_midnight: tokens.gradients.midnight,
|
|
||||||
gradient_sunrise: tokens.gradients.sunrise,
|
|
||||||
gradient_sunset: tokens.gradients.sunset,
|
|
||||||
gradient_nordic: tokens.gradients.nordic,
|
|
||||||
gradient_bonfire: tokens.gradients.bonfire,
|
|
||||||
}[color || 'primary']
|
|
||||||
|
|
||||||
if (variant === 'gradient') {
|
|
||||||
colors.push(...gradient.values.map(([_, color]) => color))
|
|
||||||
hoverColors.push(...gradient.values.map(_ => gradient.hover_value))
|
|
||||||
locations.push(...gradient.values.map(([location, _]) => location))
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
gradientColors: colors,
|
|
||||||
gradientHoverColors: hoverColors,
|
|
||||||
gradientLocations: locations,
|
|
||||||
}
|
|
||||||
}, [variant, color])
|
|
||||||
|
|
||||||
const context = React.useMemo<ButtonContext>(
|
|
||||||
() => ({
|
|
||||||
...state,
|
|
||||||
variant,
|
|
||||||
color,
|
|
||||||
size,
|
|
||||||
disabled: disabled || false,
|
|
||||||
}),
|
|
||||||
[state, variant, color, size, disabled],
|
|
||||||
)
|
|
||||||
|
|
||||||
const flattenedBaseStyles = flatten([baseStyles, style])
|
|
||||||
|
|
||||||
return (
|
|
||||||
<PressableComponent
|
|
||||||
role="button"
|
|
||||||
accessibilityHint={undefined} // optional
|
|
||||||
{...rest}
|
|
||||||
ref={ref}
|
|
||||||
aria-label={label}
|
|
||||||
aria-pressed={state.pressed}
|
|
||||||
accessibilityLabel={label}
|
|
||||||
disabled={disabled || false}
|
|
||||||
accessibilityState={{
|
|
||||||
disabled: disabled || false,
|
|
||||||
}}
|
|
||||||
style={[
|
|
||||||
a.flex_row,
|
|
||||||
a.align_center,
|
|
||||||
a.justify_center,
|
|
||||||
flattenedBaseStyles,
|
|
||||||
...(state.hovered || state.pressed
|
|
||||||
? [hoverStyles, flatten(hoverStyleProp)]
|
|
||||||
: []),
|
|
||||||
]}
|
|
||||||
onPressIn={onPressIn}
|
|
||||||
onPressOut={onPressOut}
|
|
||||||
onHoverIn={onHoverIn}
|
|
||||||
onHoverOut={onHoverOut}
|
|
||||||
onFocus={onFocus}
|
|
||||||
onBlur={onBlur}>
|
|
||||||
{variant === 'gradient' && (
|
|
||||||
<View
|
|
||||||
style={[
|
|
||||||
a.absolute,
|
|
||||||
a.inset_0,
|
|
||||||
a.overflow_hidden,
|
|
||||||
{borderRadius: flattenedBaseStyles.borderRadius},
|
|
||||||
]}>
|
|
||||||
<LinearGradient
|
|
||||||
colors={
|
|
||||||
state.hovered || state.pressed
|
|
||||||
? gradientHoverColors
|
|
||||||
: gradientColors
|
|
||||||
}
|
|
||||||
locations={gradientLocations}
|
|
||||||
start={{x: 0, y: 0}}
|
|
||||||
end={{x: 1, y: 1}}
|
|
||||||
style={[a.absolute, a.inset_0]}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
<Context.Provider value={context}>
|
|
||||||
{typeof children === 'function' ? children(context) : children}
|
|
||||||
</Context.Provider>
|
|
||||||
</PressableComponent>
|
|
||||||
)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
Button.displayName = 'Button'
|
|
||||||
|
|
||||||
export function useSharedButtonStyles({
|
|
||||||
color,
|
|
||||||
variant,
|
|
||||||
disabled,
|
|
||||||
shape,
|
|
||||||
size,
|
|
||||||
}: VariantProps & {disabled?: boolean | null}) {
|
|
||||||
const t = useTheme()
|
|
||||||
|
|
||||||
const {baseStyles, hoverStyles} = React.useMemo(() => {
|
const {baseStyles, hoverStyles} = React.useMemo(() => {
|
||||||
const baseStyles: ViewStyle[] = []
|
const baseStyles: ViewStyle[] = []
|
||||||
const hoverStyles: ViewStyle[] = []
|
const hoverStyles: ViewStyle[] = []
|
||||||
@@ -526,9 +418,109 @@ export function useSharedButtonStyles({
|
|||||||
}
|
}
|
||||||
}, [t, variant, color, size, shape, disabled])
|
}, [t, variant, color, size, shape, disabled])
|
||||||
|
|
||||||
return {baseStyles, hoverStyles}
|
const {gradientColors, gradientHoverColors, gradientLocations} =
|
||||||
|
React.useMemo(() => {
|
||||||
|
const colors: string[] = []
|
||||||
|
const hoverColors: string[] = []
|
||||||
|
const locations: number[] = []
|
||||||
|
const gradient = {
|
||||||
|
primary: tokens.gradients.sky,
|
||||||
|
secondary: tokens.gradients.sky,
|
||||||
|
secondary_inverted: tokens.gradients.sky,
|
||||||
|
negative: tokens.gradients.sky,
|
||||||
|
gradient_primary: tokens.gradients.primary,
|
||||||
|
gradient_sky: tokens.gradients.sky,
|
||||||
|
gradient_midnight: tokens.gradients.midnight,
|
||||||
|
gradient_sunrise: tokens.gradients.sunrise,
|
||||||
|
gradient_sunset: tokens.gradients.sunset,
|
||||||
|
gradient_nordic: tokens.gradients.nordic,
|
||||||
|
gradient_bonfire: tokens.gradients.bonfire,
|
||||||
|
}[color || 'primary']
|
||||||
|
|
||||||
|
if (variant === 'gradient') {
|
||||||
|
colors.push(...gradient.values.map(([_, color]) => color))
|
||||||
|
hoverColors.push(...gradient.values.map(_ => gradient.hover_value))
|
||||||
|
locations.push(...gradient.values.map(([location, _]) => location))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
gradientColors: colors,
|
||||||
|
gradientHoverColors: hoverColors,
|
||||||
|
gradientLocations: locations,
|
||||||
|
}
|
||||||
|
}, [variant, color])
|
||||||
|
|
||||||
|
const context = React.useMemo<ButtonContext>(
|
||||||
|
() => ({
|
||||||
|
...state,
|
||||||
|
variant,
|
||||||
|
color,
|
||||||
|
size,
|
||||||
|
disabled: disabled || false,
|
||||||
|
}),
|
||||||
|
[state, variant, color, size, disabled],
|
||||||
|
)
|
||||||
|
|
||||||
|
const flattenedBaseStyles = flatten([baseStyles, style])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<PressableComponent
|
||||||
|
role="button"
|
||||||
|
accessibilityHint={undefined} // optional
|
||||||
|
{...rest}
|
||||||
|
ref={ref}
|
||||||
|
aria-label={label}
|
||||||
|
aria-pressed={state.pressed}
|
||||||
|
accessibilityLabel={label}
|
||||||
|
disabled={disabled || false}
|
||||||
|
accessibilityState={{
|
||||||
|
disabled: disabled || false,
|
||||||
|
}}
|
||||||
|
style={[
|
||||||
|
a.flex_row,
|
||||||
|
a.align_center,
|
||||||
|
a.justify_center,
|
||||||
|
flattenedBaseStyles,
|
||||||
|
...(state.hovered || state.pressed
|
||||||
|
? [hoverStyles, flatten(hoverStyleProp)]
|
||||||
|
: []),
|
||||||
|
]}
|
||||||
|
onPressIn={onPressIn}
|
||||||
|
onPressOut={onPressOut}
|
||||||
|
onHoverIn={onHoverIn}
|
||||||
|
onHoverOut={onHoverOut}
|
||||||
|
onFocus={onFocus}
|
||||||
|
onBlur={onBlur}>
|
||||||
|
{variant === 'gradient' && (
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
a.absolute,
|
||||||
|
a.inset_0,
|
||||||
|
a.overflow_hidden,
|
||||||
|
{borderRadius: flattenedBaseStyles.borderRadius},
|
||||||
|
]}>
|
||||||
|
<LinearGradient
|
||||||
|
colors={
|
||||||
|
state.hovered || state.pressed
|
||||||
|
? gradientHoverColors
|
||||||
|
: gradientColors
|
||||||
|
}
|
||||||
|
locations={gradientLocations}
|
||||||
|
start={{x: 0, y: 0}}
|
||||||
|
end={{x: 1, y: 1}}
|
||||||
|
style={[a.absolute, a.inset_0]}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
<Context.Provider value={context}>
|
||||||
|
{typeof children === 'function' ? children(context) : children}
|
||||||
|
</Context.Provider>
|
||||||
|
</PressableComponent>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
Button.displayName = 'Button'
|
||||||
|
|
||||||
export function useSharedButtonTextStyles() {
|
export function useSharedButtonTextStyles() {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {color, variant, disabled, size} = useButtonContext()
|
const {color, variant, disabled, size} = useButtonContext()
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import {
|
|||||||
|
|
||||||
export const Context = React.createContext<DialogContextProps>({
|
export const Context = React.createContext<DialogContextProps>({
|
||||||
close: () => {},
|
close: () => {},
|
||||||
|
insideDialog: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
export function useDialogContext() {
|
export function useDialogContext() {
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ export function OuterWithoutPortal({
|
|||||||
const insets = useSafeAreaInsets()
|
const insets = useSafeAreaInsets()
|
||||||
const closeCallbacks = React.useRef<(() => void)[]>([])
|
const closeCallbacks = React.useRef<(() => void)[]>([])
|
||||||
const {setDialogIsOpen} = useDialogStateControlContext()
|
const {setDialogIsOpen} = useDialogStateControlContext()
|
||||||
// @TODO DIALOG REFACTOR - can i get rid of this? seems pointless tbh
|
|
||||||
|
|
||||||
const callQueuedCallbacks = React.useCallback(() => {
|
const callQueuedCallbacks = React.useCallback(() => {
|
||||||
for (const cb of closeCallbacks.current) {
|
for (const cb of closeCallbacks.current) {
|
||||||
@@ -104,21 +103,13 @@ export function OuterWithoutPortal({
|
|||||||
[open, close],
|
[open, close],
|
||||||
)
|
)
|
||||||
|
|
||||||
// @TODO DIALOG REFACTOR - what is this? rm i think?
|
const context = React.useMemo(() => ({close, insideDialog: true}), [close])
|
||||||
// React.useEffect(() => {
|
|
||||||
// return () => {
|
|
||||||
// setDialogIsOpen(control.id, false)
|
|
||||||
// }
|
|
||||||
// }, [control.id, setDialogIsOpen])
|
|
||||||
|
|
||||||
const context = React.useMemo(() => ({close}), [close])
|
|
||||||
|
|
||||||
const Wrapper = isIOS ? View : GestureHandlerRootView
|
const Wrapper = isIOS ? View : GestureHandlerRootView
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Context.Provider value={context}>
|
<Context.Provider value={context}>
|
||||||
<BlueskyBottomSheetView
|
<BlueskyBottomSheetView
|
||||||
// handleIndicatorStyle={{backgroundColor: t.palette.primary_500}} // @TODO DIALOG REFACTOR need to add this to lib!*/
|
|
||||||
ref={ref}
|
ref={ref}
|
||||||
topInset={30}
|
topInset={30}
|
||||||
bottomInset={insets.bottom}
|
bottomInset={insets.bottom}
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ export function Outer({
|
|||||||
const context = React.useMemo(
|
const context = React.useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
close,
|
close,
|
||||||
|
insideDialog: true,
|
||||||
}),
|
}),
|
||||||
[close],
|
[close],
|
||||||
)
|
)
|
||||||
@@ -229,10 +230,6 @@ export const InnerFlatList = React.forwardRef<
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
export function Handle() {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Close() {
|
export function Close() {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const {close} = React.useContext(Context)
|
const {close} = React.useContext(Context)
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ export type DialogControlProps = DialogControlRefProps & {
|
|||||||
|
|
||||||
export type DialogContextProps = {
|
export type DialogContextProps = {
|
||||||
close: DialogControlProps['close']
|
close: DialogControlProps['close']
|
||||||
|
insideDialog: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DialogControlOpenOptions = {
|
export type DialogControlOpenOptions = {
|
||||||
|
|||||||
@@ -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`
|
|
||||||
if (isWeb) {
|
|
||||||
e = e as GestureResponderEvent
|
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (savedFeedConfig) {
|
if (savedFeedConfig) {
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import {shouldClickOpenNewTab} from '#/platform/urls'
|
|||||||
import {useModalControls} from '#/state/modals'
|
import {useModalControls} from '#/state/modals'
|
||||||
import {useOpenLink} from '#/state/preferences/in-app-browser'
|
import {useOpenLink} from '#/state/preferences/in-app-browser'
|
||||||
import {atoms as a, flatten, TextStyleProp, useTheme, web} from '#/alf'
|
import {atoms as a, flatten, TextStyleProp, useTheme, web} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import {Button, ButtonProps} from '#/components/Button'
|
import {Button, ButtonProps} from '#/components/Button'
|
||||||
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
||||||
import {Text, TextProps} from '#/components/Typography'
|
import {Text, TextProps} from '#/components/Typography'
|
||||||
@@ -258,7 +257,7 @@ export function BottomSheetLink({
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
{...rest}
|
{...rest}
|
||||||
style={[a.justify_start, flatten(rest.style)]}
|
style={[a.justify_start, flatten(rest.style)]}
|
||||||
role="link"
|
role="link"
|
||||||
@@ -277,7 +276,7 @@ export function BottomSheetLink({
|
|||||||
},
|
},
|
||||||
})}>
|
})}>
|
||||||
{children}
|
{children}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
import {Pressable as NormalizedPressable} from 'react-native'
|
import {Pressable as NormalizedRNGHPressable} from 'react-native'
|
||||||
|
|
||||||
export {NormalizedPressable}
|
export {NormalizedRNGHPressable}
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {View} from 'react-native'
|
import {GestureResponderEvent, View} from 'react-native'
|
||||||
import {PressableEvent} from 'react-native-gesture-handler/lib/typescript/components/Pressable/PressableProps'
|
|
||||||
import {msg} from '@lingui/macro'
|
import {msg} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, ButtonColor, ButtonText} from '#/components/Button'
|
||||||
import {ButtonColor, 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'
|
||||||
|
|
||||||
@@ -123,14 +121,14 @@ export function Cancel({
|
|||||||
}, [close])
|
}, [close])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
size={gtMobile ? 'small' : 'large'}
|
size={gtMobile ? 'small' : 'large'}
|
||||||
label={cta || _(msg`Cancel`)}
|
label={cta || _(msg`Cancel`)}
|
||||||
onPress={onPress}>
|
onPress={onPress}>
|
||||||
<ButtonText>{cta || _(msg`Cancel`)}</ButtonText>
|
<ButtonText>{cta || _(msg`Cancel`)}</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,7 +145,7 @@ export function Action({
|
|||||||
* Note: The dialog will close automatically when the action is pressed, you
|
* Note: The dialog will close automatically when the action is pressed, you
|
||||||
* should NOT close the dialog as a side effect of this method.
|
* should NOT close the dialog as a side effect of this method.
|
||||||
*/
|
*/
|
||||||
onPress: (e: PressableEvent) => void
|
onPress: (e: GestureResponderEvent) => void
|
||||||
color?: ButtonColor
|
color?: ButtonColor
|
||||||
/**
|
/**
|
||||||
* Optional i18n string. If undefined, it will default to "Confirm".
|
* Optional i18n string. If undefined, it will default to "Confirm".
|
||||||
@@ -159,14 +157,14 @@ export function Action({
|
|||||||
const {gtMobile} = useBreakpoints()
|
const {gtMobile} = useBreakpoints()
|
||||||
const {close} = Dialog.useDialogContext()
|
const {close} = Dialog.useDialogContext()
|
||||||
const handleOnPress = React.useCallback(
|
const handleOnPress = React.useCallback(
|
||||||
(e: PressableEvent) => {
|
(e: GestureResponderEvent) => {
|
||||||
close(() => onPress?.(e))
|
close(() => onPress?.(e))
|
||||||
},
|
},
|
||||||
[close, onPress],
|
[close, onPress],
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color={color}
|
color={color}
|
||||||
size={gtMobile ? 'small' : 'large'}
|
size={gtMobile ? 'small' : 'large'}
|
||||||
@@ -174,7 +172,7 @@ export function Action({
|
|||||||
onPress={handleOnPress}
|
onPress={handleOnPress}
|
||||||
testID={testID}>
|
testID={testID}>
|
||||||
<ButtonText>{cta || _(msg`Confirm`)}</ButtonText>
|
<ButtonText>{cta || _(msg`Confirm`)}</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +199,7 @@ export function Basic({
|
|||||||
* Note: The dialog will close automatically when the action is pressed, you
|
* Note: The dialog will close automatically when the action is pressed, you
|
||||||
* should NOT close the dialog as a side effect of this method.
|
* should NOT close the dialog as a side effect of this method.
|
||||||
*/
|
*/
|
||||||
onConfirm: (e: PressableEvent) => void
|
onConfirm: (e: GestureResponderEvent) => void
|
||||||
confirmButtonColor?: ButtonColor
|
confirmButtonColor?: ButtonColor
|
||||||
showCancel?: boolean
|
showCancel?: boolean
|
||||||
withoutPortal?: boolean
|
withoutPortal?: boolean
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ import {useLingui} from '@lingui/react'
|
|||||||
|
|
||||||
import {getLabelingServiceTitle} from '#/lib/moderation'
|
import {getLabelingServiceTitle} from '#/lib/moderation'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
import {Button, useButtonContext} from '#/components/Button'
|
||||||
import {useButtonContext} from '#/components/Button'
|
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
import * as LabelingServiceCard from '#/components/LabelingServiceCard'
|
import * as LabelingServiceCard from '#/components/LabelingServiceCard'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
@@ -39,12 +38,12 @@ export function SelectLabelerView({
|
|||||||
<View style={[a.gap_sm]}>
|
<View style={[a.gap_sm]}>
|
||||||
{props.labelers.map(labeler => {
|
{props.labelers.map(labeler => {
|
||||||
return (
|
return (
|
||||||
<BottomSheetButton
|
<Button
|
||||||
key={labeler.creator.did}
|
key={labeler.creator.did}
|
||||||
label={_(msg`Send report to ${labeler.creator.displayName}`)}
|
label={_(msg`Send report to ${labeler.creator.displayName}`)}
|
||||||
onPress={() => props.onSelectLabeler(labeler.creator.did)}>
|
onPress={() => props.onSelectLabeler(labeler.creator.did)}>
|
||||||
<LabelerButton labeler={labeler} />
|
<LabelerButton labeler={labeler} />
|
||||||
</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'
|
||||||
@@ -102,7 +101,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"
|
||||||
@@ -110,7 +109,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={[
|
||||||
@@ -214,7 +213,7 @@ export function SubmitView({
|
|||||||
</Text>
|
</Text>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="sendReportBtn"
|
testID="sendReportBtn"
|
||||||
size="large"
|
size="large"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
@@ -226,7 +225,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>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {Pressable, ScrollView, View} from 'react-native'
|
import {Pressable, View} from 'react-native'
|
||||||
|
import {ScrollView} from 'react-native-gesture-handler'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
|||||||
@@ -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'
|
||||||
@@ -324,7 +323,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"
|
||||||
@@ -336,7 +335,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 && (
|
||||||
@@ -527,7 +526,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"
|
||||||
@@ -536,7 +535,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'
|
||||||
@@ -231,6 +230,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(
|
||||||
!(
|
!(
|
||||||
@@ -434,16 +434,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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -463,7 +464,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}
|
||||||
@@ -473,8 +474,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,
|
||||||
@@ -485,7 +485,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,
|
||||||
},
|
},
|
||||||
@@ -499,7 +499,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}
|
||||||
|
|||||||
@@ -13,9 +13,8 @@ import {logger} from '#/logger'
|
|||||||
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, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {BottomSheetButton} from '#/components/BottomSheetButton'
|
|
||||||
import {BottomSheetInlineLinkText} from '#/components/BottomSheetLink'
|
import {BottomSheetInlineLinkText} from '#/components/BottomSheetLink'
|
||||||
import {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 {InlineLinkText} from '#/components/Link'
|
import {InlineLinkText} from '#/components/Link'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
@@ -141,7 +140,7 @@ function Label({
|
|||||||
</View>
|
</View>
|
||||||
{!isSelfLabel && (
|
{!isSelfLabel && (
|
||||||
<View>
|
<View>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -150,7 +149,7 @@ function Label({
|
|||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Appeal</Trans>
|
<Trans>Appeal</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
@@ -279,7 +278,7 @@ function AppealForm({
|
|||||||
? [a.flex_row, a.justify_between]
|
? [a.flex_row, a.justify_between]
|
||||||
: [{flexDirection: 'column-reverse'}, a.gap_sm]
|
: [{flexDirection: 'column-reverse'}, a.gap_sm]
|
||||||
}>
|
}>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="backBtn"
|
testID="backBtn"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -287,8 +286,8 @@ function AppealForm({
|
|||||||
onPress={onPressBack}
|
onPress={onPressBack}
|
||||||
label={_(msg`Back`)}>
|
label={_(msg`Back`)}>
|
||||||
<ButtonText>{_(msg`Back`)}</ButtonText>
|
<ButtonText>{_(msg`Back`)}</ButtonText>
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
<BottomSheetButton
|
<Button
|
||||||
testID="submitBtn"
|
testID="submitBtn"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -297,7 +296,7 @@ function AppealForm({
|
|||||||
label={_(msg`Submit`)}>
|
label={_(msg`Submit`)}>
|
||||||
<ButtonText>{_(msg`Submit`)}</ButtonText>
|
<ButtonText>{_(msg`Submit`)}</ButtonText>
|
||||||
{isPending && <ButtonIcon icon={Loader} />}
|
{isPending && <ButtonIcon icon={Loader} />}
|
||||||
</BottomSheetButton>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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'
|
||||||
@@ -130,7 +129,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"
|
||||||
@@ -138,7 +137,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>
|
||||||
)}
|
)}
|
||||||
@@ -166,7 +165,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"
|
||||||
@@ -174,7 +173,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,16 +152,16 @@ 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`)}
|
||||||
onPress={close}
|
onPress={close}
|
||||||
size="large"
|
size="large"
|
||||||
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