mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Bump packages
And deprecate react-native-feather
This commit is contained in:
1
src/@types/untyped.d.ts
vendored
1
src/@types/untyped.d.ts
vendored
@ -1,5 +1,4 @@
|
||||
declare module 'gl-react-blurhash'
|
||||
declare module 'react-native-feather'
|
||||
declare module 'react-native-toast-message'
|
||||
declare module 'rtl-detect'
|
||||
|
||||
|
@ -68,7 +68,7 @@ const ComponentAccount: React.FC<PropsWithChildren & Props> = ({ account, props,
|
||||
</View>
|
||||
{props.onPress && !props.disabled ? (
|
||||
<Icon
|
||||
name='ChevronRight'
|
||||
name='chevron-right'
|
||||
size={StyleConstants.Font.Size.L}
|
||||
color={colors.secondary}
|
||||
style={{ marginLeft: 8 }}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Icon from '@components/Icon'
|
||||
import Icon, { IconName } from '@components/Icon'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React, { useState } from 'react'
|
||||
@ -6,21 +6,17 @@ import { AccessibilityProps, Pressable, StyleProp, View, ViewStyle } from 'react
|
||||
import { Loading } from './Loading'
|
||||
import CustomText from './Text'
|
||||
|
||||
export interface Props {
|
||||
export type Props = {
|
||||
accessibilityLabel?: AccessibilityProps['accessibilityLabel']
|
||||
accessibilityHint?: AccessibilityProps['accessibilityHint']
|
||||
|
||||
style?: StyleProp<ViewStyle>
|
||||
|
||||
type: 'icon' | 'text'
|
||||
content: string
|
||||
|
||||
selected?: boolean
|
||||
loading?: boolean
|
||||
destructive?: boolean
|
||||
disabled?: boolean
|
||||
|
||||
strokeWidth?: number
|
||||
size?: 'S' | 'M' | 'L'
|
||||
fontBold?: boolean
|
||||
spacing?: 'XS' | 'S' | 'M' | 'L'
|
||||
@ -28,7 +24,7 @@ export interface Props {
|
||||
overlay?: boolean
|
||||
|
||||
onPress: () => void
|
||||
}
|
||||
} & ({ type: 'icon'; content: IconName } | { type: 'text'; content: string })
|
||||
|
||||
const Button: React.FC<Props> = ({
|
||||
accessibilityLabel,
|
||||
@ -40,7 +36,6 @@ const Button: React.FC<Props> = ({
|
||||
loading = false,
|
||||
destructive = false,
|
||||
disabled = false,
|
||||
strokeWidth,
|
||||
size = 'M',
|
||||
fontBold = false,
|
||||
spacing = 'S',
|
||||
@ -81,7 +76,6 @@ const Button: React.FC<Props> = ({
|
||||
<Icon
|
||||
name={content}
|
||||
color={mainColor()}
|
||||
strokeWidth={strokeWidth}
|
||||
style={{ opacity: loading ? 0 : 1 }}
|
||||
size={StyleConstants.Font.Size[size] * (size === 'L' ? 1.25 : 1)}
|
||||
/>
|
||||
|
@ -39,7 +39,7 @@ const EmojisButton: React.FC = () => {
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
name={emojis.current && emojis.current.length ? 'Smile' : 'Meh'}
|
||||
name={emojis.current && emojis.current.length ? 'smile' : 'meh'}
|
||||
size={24}
|
||||
color={
|
||||
emojis.current && emojis.current.length ? colors.primaryDefault : colors.disabled
|
||||
|
@ -188,7 +188,7 @@ const EmojisList = () => {
|
||||
paddingRight: StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<Icon name='Search' size={StyleConstants.Font.Size.L} color={colors.secondary} />
|
||||
<Icon name='search' size={StyleConstants.Font.Size.L} color={colors.secondary} />
|
||||
</View>
|
||||
<TextInput
|
||||
style={{
|
||||
@ -214,7 +214,7 @@ const EmojisList = () => {
|
||||
emojisDispatch({ type: 'target', payload: -1 })
|
||||
}}
|
||||
>
|
||||
<Icon name='ChevronDown' size={StyleConstants.Font.Size.L} color={colors.secondary} />
|
||||
<Icon name='chevron-down' size={StyleConstants.Font.Size.L} color={colors.secondary} />
|
||||
</Pressable>
|
||||
</View>
|
||||
<SectionList
|
||||
|
@ -1,21 +1,19 @@
|
||||
import Icon from '@components/Icon'
|
||||
import Icon, { IconName } from '@components/Icon'
|
||||
import CustomText from '@components/Text'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React from 'react'
|
||||
import { Pressable } from 'react-native'
|
||||
|
||||
export interface Props {
|
||||
type?: 'icon' | 'text'
|
||||
content?: string
|
||||
export type Props = {
|
||||
native?: boolean
|
||||
background?: boolean
|
||||
|
||||
onPress: () => void
|
||||
}
|
||||
} & ({ type?: undefined; content?: IconName } | { type: 'text'; content: string })
|
||||
|
||||
const HeaderLeft: React.FC<Props> = ({
|
||||
type = 'icon',
|
||||
type,
|
||||
content,
|
||||
native = true,
|
||||
background = false,
|
||||
@ -25,18 +23,18 @@ const HeaderLeft: React.FC<Props> = ({
|
||||
|
||||
const children = () => {
|
||||
switch (type) {
|
||||
case 'icon':
|
||||
return (
|
||||
<Icon
|
||||
color={colors.primaryDefault}
|
||||
name={content || 'ChevronLeft'}
|
||||
size={StyleConstants.Spacing.M * 1.25}
|
||||
/>
|
||||
)
|
||||
case 'text':
|
||||
return (
|
||||
<CustomText fontStyle='M' style={{ color: colors.primaryDefault }} children={content} />
|
||||
)
|
||||
default:
|
||||
return (
|
||||
<Icon
|
||||
color={colors.primaryDefault}
|
||||
name={content || 'chevron-left'}
|
||||
size={StyleConstants.Spacing.M * 1.25}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +50,7 @@ const HeaderLeft: React.FC<Props> = ({
|
||||
minHeight: 44,
|
||||
minWidth: 44,
|
||||
marginLeft: native ? -StyleConstants.Spacing.S : StyleConstants.Spacing.S,
|
||||
...(type === 'icon' && {
|
||||
...(type === undefined && {
|
||||
borderRadius: 100
|
||||
}),
|
||||
...(type === 'text' && {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Icon from '@components/Icon'
|
||||
import Icon, { IconName } from '@components/Icon'
|
||||
import { Loading } from '@components/Loading'
|
||||
import CustomText from '@components/Text'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
@ -6,13 +6,11 @@ import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React from 'react'
|
||||
import { AccessibilityProps, Pressable, View } from 'react-native'
|
||||
|
||||
export interface Props {
|
||||
export type Props = {
|
||||
accessibilityLabel?: string
|
||||
accessibilityHint?: string
|
||||
accessibilityState?: AccessibilityProps['accessibilityState']
|
||||
|
||||
type?: 'icon' | 'text'
|
||||
content: string
|
||||
native?: boolean
|
||||
background?: boolean
|
||||
|
||||
@ -21,7 +19,7 @@ export interface Props {
|
||||
destructive?: boolean
|
||||
|
||||
onPress: () => void
|
||||
}
|
||||
} & ({ type?: undefined; content: IconName } | { type: 'text'; content: string })
|
||||
|
||||
const HeaderRight: React.FC<Props> = ({
|
||||
// Accessibility - Start
|
||||
@ -29,7 +27,7 @@ const HeaderRight: React.FC<Props> = ({
|
||||
accessibilityHint,
|
||||
accessibilityState,
|
||||
// Accessibility - End
|
||||
type = 'icon',
|
||||
type,
|
||||
content,
|
||||
native = true,
|
||||
background = false,
|
||||
@ -38,7 +36,7 @@ const HeaderRight: React.FC<Props> = ({
|
||||
destructive = false,
|
||||
onPress
|
||||
}) => {
|
||||
const { colors, theme } = useTheme()
|
||||
const { colors } = useTheme()
|
||||
|
||||
const loadingSpinkit = () =>
|
||||
loading ? (
|
||||
@ -49,18 +47,6 @@ const HeaderRight: React.FC<Props> = ({
|
||||
|
||||
const children = () => {
|
||||
switch (type) {
|
||||
case 'icon':
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name={content}
|
||||
style={{ opacity: loading ? 0 : 1 }}
|
||||
size={StyleConstants.Spacing.M * 1.25}
|
||||
color={disabled ? colors.secondary : destructive ? colors.red : colors.primaryDefault}
|
||||
/>
|
||||
{loadingSpinkit()}
|
||||
</>
|
||||
)
|
||||
case 'text':
|
||||
return (
|
||||
<>
|
||||
@ -80,6 +66,18 @@ const HeaderRight: React.FC<Props> = ({
|
||||
{loadingSpinkit()}
|
||||
</>
|
||||
)
|
||||
default:
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name={content}
|
||||
style={{ opacity: loading ? 0 : 1 }}
|
||||
size={StyleConstants.Spacing.M * 1.25}
|
||||
color={disabled ? colors.secondary : destructive ? colors.red : colors.primaryDefault}
|
||||
/>
|
||||
{loadingSpinkit()}
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,7 +98,7 @@ const HeaderRight: React.FC<Props> = ({
|
||||
minHeight: 44,
|
||||
minWidth: 44,
|
||||
marginRight: native ? -StyleConstants.Spacing.S : StyleConstants.Spacing.S,
|
||||
...(type === 'icon' && {
|
||||
...(type === undefined && {
|
||||
borderRadius: 100
|
||||
}),
|
||||
...(type === 'text' && {
|
||||
|
@ -1,15 +1,16 @@
|
||||
import React, { createElement } from 'react'
|
||||
import FeatherNames from '@expo/vector-icons/build/vendor/react-native-vector-icons/glyphmaps/Feather.json'
|
||||
import Feather from '@expo/vector-icons/Feather'
|
||||
import React from 'react'
|
||||
import { AccessibilityProps, StyleProp, View, ViewStyle } from 'react-native'
|
||||
import * as FeatherIcon from 'react-native-feather'
|
||||
|
||||
export type IconName = keyof typeof FeatherNames
|
||||
|
||||
export interface Props {
|
||||
accessibilityLabel?: AccessibilityProps['accessibilityLabel']
|
||||
|
||||
name: string
|
||||
name: IconName
|
||||
size: number
|
||||
color: string
|
||||
fill?: string
|
||||
strokeWidth?: number
|
||||
style?: StyleProp<ViewStyle>
|
||||
crossOut?: boolean
|
||||
}
|
||||
@ -19,8 +20,6 @@ const Icon: React.FC<Props> = ({
|
||||
name,
|
||||
size,
|
||||
color,
|
||||
fill,
|
||||
strokeWidth = 2,
|
||||
style,
|
||||
crossOut = false
|
||||
}) => {
|
||||
@ -37,13 +36,7 @@ const Icon: React.FC<Props> = ({
|
||||
}
|
||||
]}
|
||||
>
|
||||
{createElement(FeatherIcon[name], {
|
||||
width: size,
|
||||
height: size,
|
||||
color,
|
||||
fill,
|
||||
strokeWidth
|
||||
})}
|
||||
<Feather name={name} size={size} color={color} />
|
||||
{crossOut ? (
|
||||
<View
|
||||
style={{
|
||||
@ -51,7 +44,7 @@ const Icon: React.FC<Props> = ({
|
||||
transform: [{ rotate: '45deg' }],
|
||||
width: size * 1.35,
|
||||
borderBottomColor: color,
|
||||
borderBottomWidth: strokeWidth
|
||||
borderBottomWidth: 2
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
|
@ -345,7 +345,7 @@ const ComponentInstance: React.FC<Props> = ({
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
name='Lock'
|
||||
name='lock'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={colors.secondary}
|
||||
style={{
|
||||
@ -365,7 +365,7 @@ const ComponentInstance: React.FC<Props> = ({
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
name='CheckSquare'
|
||||
name='check-square'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={colors.secondary}
|
||||
style={{
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Icon from '@components/Icon'
|
||||
import Icon, { IconName } from '@components/Icon'
|
||||
import { Loading } from '@components/Loading'
|
||||
import CustomText from '@components/Text'
|
||||
import { useAccessibility } from '@utils/accessibility/AccessibilityManager'
|
||||
@ -10,7 +10,7 @@ import { View } from 'react-native'
|
||||
import { State, Switch, TapGestureHandler } from 'react-native-gesture-handler'
|
||||
|
||||
export interface Props {
|
||||
iconFront?: any
|
||||
iconFront?: IconName
|
||||
iconFrontColor?: ColorDefinitions
|
||||
|
||||
title: string
|
||||
@ -22,7 +22,7 @@ export interface Props {
|
||||
switchDisabled?: boolean
|
||||
switchOnValueChange?: () => void
|
||||
|
||||
iconBack?: 'ChevronRight' | 'ExternalLink' | 'Check'
|
||||
iconBack?: 'chevron-right' | 'external-link' | 'check'
|
||||
iconBackColor?: ColorDefinitions
|
||||
|
||||
loading?: boolean
|
||||
|
@ -54,13 +54,13 @@ const Message = React.forwardRef<FlashMessage>((_, ref) => {
|
||||
const { colors, theme } = useTheme()
|
||||
|
||||
enum iconMapping {
|
||||
success = 'CheckCircle',
|
||||
danger = 'XCircle',
|
||||
warning = 'AlertCircle',
|
||||
none = '',
|
||||
default = '',
|
||||
info = '',
|
||||
auto = ''
|
||||
success = 'check-circle',
|
||||
danger = 'x-circle',
|
||||
warning = 'alert-circle',
|
||||
none = 'x',
|
||||
default = 'x',
|
||||
info = 'x',
|
||||
auto = 'x'
|
||||
}
|
||||
enum colorMapping {
|
||||
success = 'blue',
|
||||
|
@ -286,9 +286,8 @@ const ParseHTML: React.FC<Props> = ({
|
||||
})}
|
||||
/>
|
||||
<Icon
|
||||
name={expanded ? 'Minimize2' : 'Maximize2'}
|
||||
name={expanded ? 'minimize-2' : 'maximize-2'}
|
||||
color={colors.primaryDefault}
|
||||
strokeWidth={2}
|
||||
size={StyleConstants.Font.Size[size]}
|
||||
/>
|
||||
</Pressable>
|
||||
|
@ -51,7 +51,7 @@ const RelationshipIncoming: React.FC<Props> = ({ id }) => {
|
||||
<Button
|
||||
round
|
||||
type='icon'
|
||||
content='X'
|
||||
content='x'
|
||||
loading={mutation.isLoading}
|
||||
onPress={() =>
|
||||
mutation.mutate({
|
||||
@ -64,7 +64,7 @@ const RelationshipIncoming: React.FC<Props> = ({ id }) => {
|
||||
<Button
|
||||
round
|
||||
type='icon'
|
||||
content='Check'
|
||||
content='check'
|
||||
loading={mutation.isLoading}
|
||||
onPress={() =>
|
||||
mutation.mutate({
|
||||
|
@ -130,7 +130,7 @@ const RelationshipOutgoing: React.FC<Props> = ({ id }: Props) => {
|
||||
{!isPageNotifications && canFollowNotify && query.data?.following ? (
|
||||
<Button
|
||||
type='icon'
|
||||
content={query.data.notifying ? 'BellOff' : 'Bell'}
|
||||
content={query.data.notifying ? 'bell-off' : 'bell'}
|
||||
round
|
||||
onPress={() =>
|
||||
mutation.mutate({
|
||||
|
@ -22,10 +22,14 @@ const Selections: React.FC<Props> = ({
|
||||
}) => {
|
||||
const { colors } = useTheme()
|
||||
|
||||
const isSelected = (index: number): string =>
|
||||
const isSelected = (index: number) =>
|
||||
options[index].selected
|
||||
? `Check${multiple ? 'Square' : 'Circle'}`
|
||||
: `${multiple ? 'Square' : 'Circle'}`
|
||||
? multiple
|
||||
? 'check-square'
|
||||
: 'check-circle'
|
||||
: multiple
|
||||
? 'square'
|
||||
: 'circle'
|
||||
|
||||
return (
|
||||
<View>
|
||||
|
@ -29,7 +29,7 @@ const TimelineEmpty: React.FC<Props> = ({ queryKey }) => {
|
||||
case 'error':
|
||||
return (
|
||||
<>
|
||||
<Icon name='Frown' size={StyleConstants.Font.Size.L} color={colors.primaryDefault} />
|
||||
<Icon name='frown' size={StyleConstants.Font.Size.L} color={colors.primaryDefault} />
|
||||
<CustomText
|
||||
fontStyle='M'
|
||||
style={{
|
||||
@ -47,7 +47,7 @@ const TimelineEmpty: React.FC<Props> = ({ queryKey }) => {
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='Smartphone'
|
||||
name='smartphone'
|
||||
size={StyleConstants.Font.Size.L}
|
||||
color={colors.primaryDefault}
|
||||
/>
|
||||
|
@ -38,7 +38,7 @@ const TimelineFooter: React.FC<Props> = ({ queryKey, disableInfinity }) => {
|
||||
ns='componentTimeline'
|
||||
i18nKey='end.message'
|
||||
components={[
|
||||
<Icon name='Coffee' size={StyleConstants.Font.Size.S} color={colors.secondary} />
|
||||
<Icon name='coffee' size={StyleConstants.Font.Size.S} color={colors.secondary} />
|
||||
]}
|
||||
/>
|
||||
</CustomText>
|
||||
|
@ -276,7 +276,7 @@ const TimelineRefresh: React.FC<Props> = ({
|
||||
]}
|
||||
children={
|
||||
<Icon
|
||||
name='ArrowLeft'
|
||||
name='arrow-left'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.primaryDefault}
|
||||
/>
|
||||
|
@ -46,7 +46,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='Anchor'
|
||||
name='anchor'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={iconColor}
|
||||
style={styles.icon}
|
||||
@ -58,7 +58,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='Heart'
|
||||
name='heart'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={iconColor}
|
||||
style={styles.icon}
|
||||
@ -72,7 +72,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='UserPlus'
|
||||
name='user-plus'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={iconColor}
|
||||
style={styles.icon}
|
||||
@ -86,7 +86,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='UserPlus'
|
||||
name='user-plus'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={iconColor}
|
||||
style={styles.icon}
|
||||
@ -100,7 +100,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='BarChart2'
|
||||
name='bar-chart-2'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={iconColor}
|
||||
style={styles.icon}
|
||||
@ -112,7 +112,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='Repeat'
|
||||
name='repeat'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={iconColor}
|
||||
style={styles.icon}
|
||||
@ -130,7 +130,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='Activity'
|
||||
name='activity'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={iconColor}
|
||||
style={styles.icon}
|
||||
@ -144,7 +144,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='BarChart2'
|
||||
name='bar-chart-2'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={iconColor}
|
||||
style={styles.icon}
|
||||
@ -156,7 +156,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='Users'
|
||||
name='users'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={iconColor}
|
||||
style={styles.icon}
|
||||
@ -168,7 +168,7 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='AlertOctagon'
|
||||
name='alert-octagon'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={colors.red}
|
||||
style={styles.icon}
|
||||
|
@ -165,7 +165,7 @@ const TimelineActions: React.FC = () => {
|
||||
|
||||
const childrenReply = () => (
|
||||
<>
|
||||
<Icon name='MessageCircle' color={iconColor} size={StyleConstants.Font.Size.L} />
|
||||
<Icon name='message-circle' color={iconColor} size={StyleConstants.Font.Size.L} />
|
||||
{status.replies_count > 0 ? (
|
||||
<CustomText
|
||||
fontStyle='S'
|
||||
@ -186,7 +186,7 @@ const TimelineActions: React.FC = () => {
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
name='Repeat'
|
||||
name='repeat'
|
||||
color={disabled ? colors.disabled : color(status.reblogged)}
|
||||
crossOut={disabled}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
@ -212,7 +212,7 @@ const TimelineActions: React.FC = () => {
|
||||
const color = (state: boolean) => (state ? colors.red : colors.secondary)
|
||||
return (
|
||||
<>
|
||||
<Icon name='Heart' color={color(status.favourited)} size={StyleConstants.Font.Size.L} />
|
||||
<Icon name='heart' color={color(status.favourited)} size={StyleConstants.Font.Size.L} />
|
||||
{status.favourites_count > 0 ? (
|
||||
<CustomText
|
||||
fontStyle='S'
|
||||
@ -227,7 +227,7 @@ const TimelineActions: React.FC = () => {
|
||||
const childrenBookmark = () => {
|
||||
const color = (state: boolean) => (state ? colors.yellow : colors.secondary)
|
||||
return (
|
||||
<Icon name='Bookmark' color={color(status.bookmarked)} size={StyleConstants.Font.Size.L} />
|
||||
<Icon name='bookmark' color={color(status.bookmarked)} size={StyleConstants.Font.Size.L} />
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ const TimelineAttachment = () => {
|
||||
) : (
|
||||
<Button
|
||||
type='icon'
|
||||
content='EyeOff'
|
||||
content='eye-off'
|
||||
round
|
||||
overlay
|
||||
onPress={() => {
|
||||
|
@ -92,7 +92,7 @@ const AttachmentAudio: React.FC<Props> = ({ total, index, sensitiveShown, audio
|
||||
) : null}
|
||||
<Button
|
||||
type='icon'
|
||||
content={audioPlaying ? 'PauseCircle' : 'PlayCircle'}
|
||||
content={audioPlaying ? 'pause-circle' : 'play-circle'}
|
||||
size='L'
|
||||
round
|
||||
overlay
|
||||
|
@ -127,7 +127,7 @@ const AttachmentVideo: React.FC<Props> = ({
|
||||
overlay
|
||||
size='L'
|
||||
type='icon'
|
||||
content='PlayCircle'
|
||||
content='play-circle'
|
||||
onPress={playOnPress}
|
||||
loading={videoLoading}
|
||||
/>
|
||||
|
@ -43,7 +43,7 @@ const TimelineHeaderAndroid: React.FC = () => {
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
name='MoreHorizontal'
|
||||
name='more-horizontal'
|
||||
color={colors.secondary}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
/>
|
||||
|
@ -87,7 +87,7 @@ const HeaderConversation = ({ conversation }: Props) => {
|
||||
id: conversation.id
|
||||
})
|
||||
}
|
||||
children={<Icon name='Trash' color={colors.secondary} size={StyleConstants.Font.Size.L} />}
|
||||
children={<Icon name='trash' color={colors.secondary} size={StyleConstants.Font.Size.L} />}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
|
@ -58,7 +58,7 @@ const TimelineHeaderDefault: React.FC = () => {
|
||||
>
|
||||
{isRemote ? (
|
||||
<Icon
|
||||
name='Wifi'
|
||||
name='wifi'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.secondary}
|
||||
style={{ marginRight: StyleConstants.Spacing.S }}
|
||||
@ -80,7 +80,7 @@ const TimelineHeaderDefault: React.FC = () => {
|
||||
<DropdownMenu.Root onOpenChange={setOpenChange}>
|
||||
<DropdownMenu.Trigger>
|
||||
<Icon
|
||||
name='MoreHorizontal'
|
||||
name='more-horizontal'
|
||||
color={colors.secondary}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
/>
|
||||
|
@ -81,7 +81,7 @@ const TimelineHeaderNotification: React.FC<Props> = ({ notification }) => {
|
||||
<DropdownMenu.Root onOpenChange={setOpenChange}>
|
||||
<DropdownMenu.Trigger>
|
||||
<Icon
|
||||
name='MoreHorizontal'
|
||||
name='more-horizontal'
|
||||
color={colors.secondary}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
/>
|
||||
|
@ -35,7 +35,7 @@ const HeaderSharedCreated: React.FC<Props> = ({ created_at }) => {
|
||||
{status.edited_at && !highlighted ? (
|
||||
<Icon
|
||||
accessibilityLabel={t('shared.header.shared.edited.accessibilityLabel')}
|
||||
name='Edit'
|
||||
name='edit'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={colors.secondary}
|
||||
style={{ marginLeft: StyleConstants.Spacing.S }}
|
||||
|
@ -13,7 +13,7 @@ const HeaderSharedMuted: React.FC = () => {
|
||||
return status?.muted ? (
|
||||
<Icon
|
||||
accessibilityLabel={t('shared.header.shared.muted.accessibilityLabel')}
|
||||
name='VolumeX'
|
||||
name='volume-x'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.secondary}
|
||||
style={{ marginLeft: StyleConstants.Spacing.S }}
|
||||
|
@ -16,7 +16,7 @@ const HeaderSharedVisibility: React.FC = () => {
|
||||
return (
|
||||
<Icon
|
||||
accessibilityLabel={t('shared.header.shared.visibility.private.accessibilityLabel')}
|
||||
name='Unlock'
|
||||
name='unlock'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={colors.secondary}
|
||||
style={styles.visibility}
|
||||
@ -26,7 +26,7 @@ const HeaderSharedVisibility: React.FC = () => {
|
||||
return (
|
||||
<Icon
|
||||
accessibilityLabel={t('shared.header.shared.visibility.private.accessibilityLabel')}
|
||||
name='Lock'
|
||||
name='lock'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={colors.secondary}
|
||||
style={styles.visibility}
|
||||
@ -36,7 +36,7 @@ const HeaderSharedVisibility: React.FC = () => {
|
||||
return (
|
||||
<Icon
|
||||
accessibilityLabel={t('shared.header.shared.visibility.direct.accessibilityLabel')}
|
||||
name='Mail'
|
||||
name='mail'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={colors.secondary}
|
||||
style={styles.visibility}
|
||||
|
@ -117,10 +117,14 @@ const TimelinePoll: React.FC = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const isSelected = (index: number): string =>
|
||||
const isSelected = (index: number) =>
|
||||
allOptions[index]
|
||||
? `Check${poll.multiple ? 'Square' : 'Circle'}`
|
||||
: `${poll.multiple ? 'Square' : 'Circle'}`
|
||||
? poll.multiple
|
||||
? 'check-square'
|
||||
: 'check-circle'
|
||||
: poll.multiple
|
||||
? 'square'
|
||||
: 'circle'
|
||||
|
||||
const pollBodyDisallow = () => {
|
||||
const maxValue = maxBy(poll.options, option => option.votes_count)?.votes_count
|
||||
|
@ -40,7 +40,7 @@ const ComposeDraftsList: React.FC<ScreenComposeStackScreenProps<'Screen-Compose-
|
||||
navigation.setOptions({
|
||||
title: t('content.draftsList.header.title'),
|
||||
headerLeft: () => (
|
||||
<HeaderLeft type='icon' content='ChevronDown' onPress={() => navigation.goBack()} />
|
||||
<HeaderLeft content='chevron-down' onPress={() => navigation.goBack()} />
|
||||
)
|
||||
})
|
||||
}, [])
|
||||
@ -65,7 +65,7 @@ const ComposeDraftsList: React.FC<ScreenComposeStackScreenProps<'Screen-Compose-
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
name='AlertTriangle'
|
||||
name='alert-triangle'
|
||||
color={colors.secondary}
|
||||
size={StyleConstants.Font.Size.M}
|
||||
style={{ marginRight: StyleConstants.Spacing.S }}
|
||||
@ -187,7 +187,7 @@ const ComposeDraftsList: React.FC<ScreenComposeStackScreenProps<'Screen-Compose-
|
||||
}}
|
||||
children={
|
||||
<Icon
|
||||
name='Trash'
|
||||
name='trash'
|
||||
size={StyleConstants.Font.Size.L}
|
||||
color={colors.primaryOverlay}
|
||||
/>
|
||||
|
@ -35,13 +35,12 @@ const ComposeEditAttachment: React.FC<
|
||||
navigation.setOptions({
|
||||
title: t('content.editAttachment.header.title'),
|
||||
headerLeft: () => (
|
||||
<HeaderLeft type='icon' content='ChevronDown' onPress={() => navigation.goBack()} />
|
||||
<HeaderLeft content='chevron-down' onPress={() => navigation.goBack()} />
|
||||
),
|
||||
headerRight: () => (
|
||||
<HeaderRight
|
||||
accessibilityLabel={t('content.editAttachment.header.right.accessibilityLabel')}
|
||||
type='icon'
|
||||
content='Save'
|
||||
content='save'
|
||||
loading={isSubmitting}
|
||||
onPress={() => {
|
||||
if (composeState.type === 'edit') {
|
||||
|
@ -60,13 +60,13 @@ const ComposeActions: React.FC = () => {
|
||||
const visibilityIcon = () => {
|
||||
switch (composeState.visibility) {
|
||||
case 'public':
|
||||
return 'Globe'
|
||||
return 'globe'
|
||||
case 'unlisted':
|
||||
return 'Unlock'
|
||||
return 'unlock'
|
||||
case 'private':
|
||||
return 'Lock'
|
||||
return 'lock'
|
||||
case 'direct':
|
||||
return 'Mail'
|
||||
return 'mail'
|
||||
}
|
||||
}
|
||||
const visibilityOnPress = () => {
|
||||
@ -162,7 +162,7 @@ const ComposeActions: React.FC = () => {
|
||||
}}
|
||||
style={styles.button}
|
||||
onPress={attachmentOnPress}
|
||||
children={<Icon name='Camera' size={24} color={attachmentColor()} />}
|
||||
children={<Icon name='camera' size={24} color={attachmentColor()} />}
|
||||
/>
|
||||
<Pressable
|
||||
accessibilityRole='button'
|
||||
@ -174,7 +174,7 @@ const ComposeActions: React.FC = () => {
|
||||
}}
|
||||
style={styles.button}
|
||||
onPress={pollOnPress}
|
||||
children={<Icon name='BarChart2' size={24} color={pollColor()} />}
|
||||
children={<Icon name='bar-chart-2' size={24} color={pollColor()} />}
|
||||
/>
|
||||
<Pressable
|
||||
accessibilityRole='button'
|
||||
@ -200,7 +200,7 @@ const ComposeActions: React.FC = () => {
|
||||
onPress={spoilerOnPress}
|
||||
children={
|
||||
<Icon
|
||||
name='AlertTriangle'
|
||||
name='alert-triangle'
|
||||
size={24}
|
||||
color={composeState.spoiler.active ? colors.primaryDefault : colors.secondary}
|
||||
/>
|
||||
@ -216,7 +216,7 @@ const ComposeActions: React.FC = () => {
|
||||
}}
|
||||
style={styles.button}
|
||||
onPress={emojiOnPress}
|
||||
children={<Icon name='Smile' size={24} color={emojiColor()} />}
|
||||
children={<Icon name='smile' size={24} color={emojiColor()} />}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
|
@ -151,7 +151,7 @@ const ComposeAttachments: React.FC<Props> = ({ accessibleRefAttachments }) => {
|
||||
attachment: index + 1
|
||||
})}
|
||||
type='icon'
|
||||
content='X'
|
||||
content='x'
|
||||
spacing='M'
|
||||
round
|
||||
overlay
|
||||
@ -170,7 +170,7 @@ const ComposeAttachments: React.FC<Props> = ({ accessibleRefAttachments }) => {
|
||||
attachment: index + 1
|
||||
})}
|
||||
type='icon'
|
||||
content='Edit'
|
||||
content='edit'
|
||||
spacing='M'
|
||||
round
|
||||
overlay
|
||||
@ -203,7 +203,7 @@ const ComposeAttachments: React.FC<Props> = ({ accessibleRefAttachments }) => {
|
||||
onPress={sensitiveOnPress}
|
||||
>
|
||||
<Icon
|
||||
name={composeState.attachments.sensitive ? 'CheckCircle' : 'Circle'}
|
||||
name={composeState.attachments.sensitive ? 'check-circle' : 'circle'}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
color={colors.primaryDefault}
|
||||
/>
|
||||
@ -251,7 +251,7 @@ const ComposeAttachments: React.FC<Props> = ({ accessibleRefAttachments }) => {
|
||||
>
|
||||
<Button
|
||||
type='icon'
|
||||
content='UploadCloud'
|
||||
content='upload-cloud'
|
||||
spacing='M'
|
||||
round
|
||||
overlay
|
||||
|
@ -55,7 +55,7 @@ const ComposePoll: React.FC = () => {
|
||||
return (
|
||||
<View key={i} style={styles.option}>
|
||||
<Icon
|
||||
name={multiple ? 'Square' : 'Circle'}
|
||||
name={multiple ? 'square' : 'circle'}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
color={colors.secondary}
|
||||
/>
|
||||
@ -128,7 +128,7 @@ const ComposePoll: React.FC = () => {
|
||||
})
|
||||
}}
|
||||
type='icon'
|
||||
content='Minus'
|
||||
content='minus'
|
||||
round
|
||||
disabled={!(total > 2)}
|
||||
/>
|
||||
@ -162,7 +162,7 @@ const ComposePoll: React.FC = () => {
|
||||
})
|
||||
}}
|
||||
type='icon'
|
||||
content='Plus'
|
||||
content='plus'
|
||||
round
|
||||
disabled={!(total < MAX_OPTIONS)}
|
||||
/>
|
||||
@ -196,7 +196,7 @@ const ComposePoll: React.FC = () => {
|
||||
}
|
||||
)
|
||||
}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
/>
|
||||
<MenuRow
|
||||
title={t('screenCompose:content.root.footer.poll.expiration.heading')}
|
||||
@ -236,7 +236,7 @@ const ComposePoll: React.FC = () => {
|
||||
}
|
||||
)
|
||||
}}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
@ -93,7 +93,7 @@ const ComposeRootSuggestions: React.FC = () => {
|
||||
props={{ onPress: () => onPress(`@${account.acct}`) }}
|
||||
children={
|
||||
<Icon
|
||||
name='Plus'
|
||||
name='plus'
|
||||
size={StyleConstants.Font.Size.L}
|
||||
color={colors.secondary}
|
||||
style={{ marginLeft: 8 }}
|
||||
|
@ -71,14 +71,14 @@ const ScreenImagesViewer = ({
|
||||
zIndex: 999
|
||||
}}
|
||||
>
|
||||
<HeaderLeft content='X' native={false} background onPress={() => navigation.goBack()} />
|
||||
<HeaderLeft content='x' native={false} background onPress={() => navigation.goBack()} />
|
||||
{!hideCounter ? (
|
||||
<HeaderCenter inverted content={`${currentIndex + 1} / ${imageUrls.length}`} />
|
||||
) : null}
|
||||
<HeaderRight
|
||||
accessibilityLabel={t('screenImageViewer:content.actions.accessibilityLabel')}
|
||||
accessibilityHint={t('screenImageViewer:content.actions.accessibilityHint')}
|
||||
content='MoreHorizontal'
|
||||
content='more-horizontal'
|
||||
native={false}
|
||||
background
|
||||
onPress={() =>
|
||||
|
@ -38,7 +38,7 @@ const Root: React.FC<NativeStackScreenProps<TabLocalStackParamList, 'Tab-Local-R
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
{page.page === 'List' ? (
|
||||
<Icon
|
||||
name='List'
|
||||
name='list'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.primaryDefault}
|
||||
style={{ marginRight: StyleConstants.Spacing.S }}
|
||||
@ -57,7 +57,7 @@ const Root: React.FC<NativeStackScreenProps<TabLocalStackParamList, 'Tab-Local-R
|
||||
/>
|
||||
{page.page === 'Following' && !pageLocal?.showBoosts ? (
|
||||
<Icon
|
||||
name='Repeat'
|
||||
name='repeat'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.red}
|
||||
style={{ marginLeft: StyleConstants.Spacing.S }}
|
||||
@ -66,7 +66,7 @@ const Root: React.FC<NativeStackScreenProps<TabLocalStackParamList, 'Tab-Local-R
|
||||
) : null}
|
||||
{page.page === 'Following' && !pageLocal?.showReplies ? (
|
||||
<Icon
|
||||
name='MessageCircle'
|
||||
name='message-circle'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.red}
|
||||
style={{ marginLeft: StyleConstants.Spacing.S }}
|
||||
@ -74,7 +74,7 @@ const Root: React.FC<NativeStackScreenProps<TabLocalStackParamList, 'Tab-Local-R
|
||||
/>
|
||||
) : null}
|
||||
<Icon
|
||||
name='ChevronDown'
|
||||
name='chevron-down'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.primaryDefault}
|
||||
style={{ marginLeft: StyleConstants.Spacing.S }}
|
||||
@ -169,7 +169,7 @@ const Root: React.FC<NativeStackScreenProps<TabLocalStackParamList, 'Tab-Local-R
|
||||
<HeaderRight
|
||||
accessibilityLabel={t('common.search.accessibilityLabel')}
|
||||
accessibilityHint={t('common.search.accessibilityHint')}
|
||||
content='Search'
|
||||
content='search'
|
||||
onPress={() => navigation.navigate('Tab-Shared-Search')}
|
||||
/>
|
||||
)
|
||||
|
@ -50,7 +50,7 @@ const TabMeListAccounts: React.FC<TabMeStackScreenProps<'Tab-Me-List-Accounts'>>
|
||||
children={
|
||||
<Button
|
||||
type='icon'
|
||||
content='X'
|
||||
content='x'
|
||||
round
|
||||
onPress={() =>
|
||||
mutation.mutate({ type: 'delete', payload: { id: params.id, accounts: [item.id] } })
|
||||
|
@ -90,7 +90,7 @@ const TabMeListEdit: React.FC<TabMeStackScreenProps<'Tab-Me-List-Edit'>> = ({
|
||||
: t('screenTabs:me.stacks.listEdit.name'),
|
||||
headerLeft: () => (
|
||||
<HeaderLeft
|
||||
content='X'
|
||||
content='x'
|
||||
onPress={() => {
|
||||
if (params.type === 'edit' ? params.payload.title !== title : title.length) {
|
||||
Alert.alert(t('common:discard.title'), t('common:discard.message'), [
|
||||
@ -112,7 +112,7 @@ const TabMeListEdit: React.FC<TabMeStackScreenProps<'Tab-Me-List-Edit'>> = ({
|
||||
),
|
||||
headerRight: () => (
|
||||
<HeaderRight
|
||||
content='Save'
|
||||
content='save'
|
||||
disabled={!title.length}
|
||||
loading={mutation.isLoading}
|
||||
onPress={() => {
|
||||
|
@ -26,8 +26,8 @@ const TabMeListList: React.FC<TabMeStackScreenProps<'Tab-Me-List-List'>> = ({ na
|
||||
{data?.map((list, index) => (
|
||||
<MenuRow
|
||||
key={index}
|
||||
iconFront='List'
|
||||
iconBack='ChevronRight'
|
||||
iconFront='list'
|
||||
iconBack='chevron-right'
|
||||
title={list.title}
|
||||
onPress={() => navigation.navigate('Tab-Me-List', { list })}
|
||||
/>
|
||||
|
@ -51,7 +51,7 @@ const TabMeList: React.FC<NativeStackScreenProps<TabMeStackParamList, 'Tab-Me-Li
|
||||
<DropdownMenu.Root>
|
||||
<DropdownMenu.Trigger>
|
||||
<Icon
|
||||
name='MoreHorizontal'
|
||||
name='more-horizontal'
|
||||
size={StyleConstants.Spacing.M * 1.25}
|
||||
color={colors.primaryDefault}
|
||||
/>
|
||||
|
@ -41,7 +41,7 @@ const TabMePreferences: React.FC<TabMeProfileStackScreenProps<'Tab-Me-Profile-Ro
|
||||
: undefined
|
||||
}
|
||||
loading={isFetching}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() =>
|
||||
showActionSheetWithOptions(
|
||||
{
|
||||
@ -110,7 +110,7 @@ const TabMePreferences: React.FC<TabMeProfileStackScreenProps<'Tab-Me-Profile-Ro
|
||||
</MenuContainer>
|
||||
<MenuContainer style={{ marginTop: StyleConstants.Spacing.L }}>
|
||||
<MenuRow
|
||||
iconBack='ExternalLink'
|
||||
iconBack='external-link'
|
||||
title={t('screenTabs:me.preferences.web_only.title')}
|
||||
description={t('screenTabs:me.preferences.web_only.description')}
|
||||
onPress={async () =>
|
||||
|
@ -90,7 +90,7 @@ const TabMeProfileFields: React.FC<
|
||||
navigation.setOptions({
|
||||
headerLeft: () => (
|
||||
<HeaderLeft
|
||||
content='X'
|
||||
content='x'
|
||||
onPress={() => {
|
||||
if (dirty) {
|
||||
Alert.alert(t('common:discard.title'), t('common:discard.message'), [
|
||||
@ -114,7 +114,7 @@ const TabMeProfileFields: React.FC<
|
||||
<HeaderRight
|
||||
disabled={!dirty}
|
||||
loading={status === 'loading'}
|
||||
content='Save'
|
||||
content='save'
|
||||
onPress={async () => {
|
||||
mutateAsync({
|
||||
messageRef,
|
||||
|
@ -44,7 +44,7 @@ const TabMeProfileName: React.FC<
|
||||
navigation.setOptions({
|
||||
headerLeft: () => (
|
||||
<HeaderLeft
|
||||
content='X'
|
||||
content='x'
|
||||
onPress={() => {
|
||||
if (dirty) {
|
||||
Alert.alert(t('common:discard.title'), t('common:discard.message'), [
|
||||
@ -68,7 +68,7 @@ const TabMeProfileName: React.FC<
|
||||
<HeaderRight
|
||||
disabled={!dirty}
|
||||
loading={status === 'loading'}
|
||||
content='Save'
|
||||
content='save'
|
||||
onPress={async () => {
|
||||
mutateAsync({
|
||||
messageRef,
|
||||
|
@ -44,7 +44,7 @@ const TabMeProfileNote: React.FC<
|
||||
navigation.setOptions({
|
||||
headerLeft: () => (
|
||||
<HeaderLeft
|
||||
content='X'
|
||||
content='x'
|
||||
onPress={() => {
|
||||
if (dirty) {
|
||||
Alert.alert(t('common:discard.title'), t('common:discard.message'), [
|
||||
@ -68,7 +68,7 @@ const TabMeProfileNote: React.FC<
|
||||
<HeaderRight
|
||||
disabled={!dirty}
|
||||
loading={status === 'loading'}
|
||||
content='Save'
|
||||
content='save'
|
||||
onPress={async () => {
|
||||
mutateAsync({
|
||||
messageRef,
|
||||
|
@ -24,7 +24,7 @@ const TabMeProfileRoot: React.FC<
|
||||
title={t('screenTabs:me.profile.root.name.title')}
|
||||
content={data?.display_name}
|
||||
loading={isFetching}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() => {
|
||||
data &&
|
||||
navigation.navigate('Tab-Me-Profile-Name', {
|
||||
@ -38,7 +38,7 @@ const TabMeProfileRoot: React.FC<
|
||||
title={t('screenTabs:me.profile.root.note.title')}
|
||||
content={data?.source?.note}
|
||||
loading={isFetching}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() => {
|
||||
data &&
|
||||
navigation.navigate('Tab-Me-Profile-Note', {
|
||||
@ -56,7 +56,7 @@ const TabMeProfileRoot: React.FC<
|
||||
: undefined
|
||||
}
|
||||
loading={isFetching}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() => {
|
||||
navigation.navigate('Tab-Me-Profile-Fields', {
|
||||
fields: data?.source.fields
|
||||
|
@ -25,7 +25,7 @@ const ProfileAvatarHeader: React.FC<Props> = ({ type, messageRef }) => {
|
||||
title={t(`screenTabs:me.profile.root.${type}.title`)}
|
||||
description={t(`screenTabs:me.profile.root.${type}.description`)}
|
||||
loading={query.isFetching || mutation.isLoading}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={async () => {
|
||||
const image = await mediaSelector({
|
||||
mediaType: 'photo',
|
||||
|
@ -28,7 +28,7 @@ const TabMeProfile: React.FC<TabMeStackScreenProps<'Tab-Me-Switch'>> = ({ naviga
|
||||
options={{
|
||||
title: t('me.stacks.profile.name'),
|
||||
headerLeft: () => (
|
||||
<HeaderLeft content='ChevronDown' onPress={() => navigation.goBack()} />
|
||||
<HeaderLeft content='chevron-down' onPress={() => navigation.goBack()} />
|
||||
)
|
||||
}}
|
||||
>
|
||||
|
@ -265,7 +265,7 @@ const TabMePush: React.FC = () => {
|
||||
/>
|
||||
<MenuRow
|
||||
title={t('me.push.howitworks')}
|
||||
iconBack='ExternalLink'
|
||||
iconBack='external-link'
|
||||
onPress={async () =>
|
||||
WebBrowser.openBrowserAsync('https://tooot.app/how-push-works', {
|
||||
...(await browserPackage())
|
||||
@ -286,7 +286,7 @@ const TabMePush: React.FC = () => {
|
||||
paddingHorizontal: StyleConstants.Spacing.Global.PagePadding
|
||||
}}
|
||||
>
|
||||
<Icon name='Frown' size={StyleConstants.Font.Size.L} color={colors.primaryDefault} />
|
||||
<Icon name='frown' size={StyleConstants.Font.Size.L} color={colors.primaryDefault} />
|
||||
<CustomText
|
||||
fontStyle='M'
|
||||
style={{
|
||||
@ -310,7 +310,7 @@ const TabMePush: React.FC = () => {
|
||||
paddingHorizontal: StyleConstants.Spacing.Global.PagePadding
|
||||
}}
|
||||
>
|
||||
<Icon name='Frown' size={StyleConstants.Font.Size.L} color={colors.primaryDefault} />
|
||||
<Icon name='frown' size={StyleConstants.Font.Size.L} color={colors.primaryDefault} />
|
||||
<CustomText
|
||||
fontStyle='M'
|
||||
style={{
|
||||
|
@ -43,43 +43,43 @@ const Collections: React.FC = () => {
|
||||
return (
|
||||
<MenuContainer>
|
||||
<MenuRow
|
||||
iconFront='Mail'
|
||||
iconBack='ChevronRight'
|
||||
iconFront='mail'
|
||||
iconBack='chevron-right'
|
||||
title={t('screenTabs:me.stacks.conversations.name')}
|
||||
onPress={() => navigation.navigate('Tab-Me-Conversations')}
|
||||
/>
|
||||
<MenuRow
|
||||
iconFront='Bookmark'
|
||||
iconBack='ChevronRight'
|
||||
iconFront='bookmark'
|
||||
iconBack='chevron-right'
|
||||
title={t('screenTabs:me.stacks.bookmarks.name')}
|
||||
onPress={() => navigation.navigate('Tab-Me-Bookmarks')}
|
||||
/>
|
||||
<MenuRow
|
||||
iconFront='Heart'
|
||||
iconBack='ChevronRight'
|
||||
iconFront='heart'
|
||||
iconBack='chevron-right'
|
||||
title={t('screenTabs:me.stacks.favourites.name')}
|
||||
onPress={() => navigation.navigate('Tab-Me-Favourites')}
|
||||
/>
|
||||
{pageMe?.lists?.shown ? (
|
||||
<MenuRow
|
||||
iconFront='List'
|
||||
iconBack='ChevronRight'
|
||||
iconFront='list'
|
||||
iconBack='chevron-right'
|
||||
title={t('screenTabs:me.stacks.lists.name')}
|
||||
onPress={() => navigation.navigate('Tab-Me-List-List')}
|
||||
/>
|
||||
) : null}
|
||||
{pageMe?.followedTags?.shown ? (
|
||||
<MenuRow
|
||||
iconFront='Hash'
|
||||
iconBack='ChevronRight'
|
||||
iconFront='hash'
|
||||
iconBack='chevron-right'
|
||||
title={t('screenTabs:me.stacks.followedTags.name')}
|
||||
onPress={() => navigation.navigate('Tab-Me-FollowedTags')}
|
||||
/>
|
||||
) : null}
|
||||
{pageMe?.announcements?.shown ? (
|
||||
<MenuRow
|
||||
iconFront='Clipboard'
|
||||
iconBack='ChevronRight'
|
||||
iconFront='clipboard'
|
||||
iconBack='chevron-right'
|
||||
title={t('screenAnnouncements:heading')}
|
||||
content={
|
||||
pageMe.announcements.unread
|
||||
@ -92,8 +92,8 @@ const Collections: React.FC = () => {
|
||||
/>
|
||||
) : null}
|
||||
<MenuRow
|
||||
iconFront={instancePush ? 'Bell' : 'BellOff'}
|
||||
iconBack='ChevronRight'
|
||||
iconFront={instancePush ? 'bell' : 'bell-off'}
|
||||
iconBack='chevron-right'
|
||||
title={t('screenTabs:me.stacks.push.name')}
|
||||
content={
|
||||
typeof instancePush.global === 'boolean'
|
||||
|
@ -10,8 +10,8 @@ const Settings: React.FC = () => {
|
||||
return (
|
||||
<MenuContainer>
|
||||
<MenuRow
|
||||
iconFront='Settings'
|
||||
iconBack='ChevronRight'
|
||||
iconFront='settings'
|
||||
iconBack='chevron-right'
|
||||
title={t('me.stacks.settings.name')}
|
||||
onPress={() => navigation.navigate('Tab-Me-Settings')}
|
||||
/>
|
||||
|
@ -29,7 +29,7 @@ const SettingsApp: React.FC = () => {
|
||||
<MenuRow
|
||||
title={t('screenTabs:me.stacks.fontSize.name')}
|
||||
content={t(`screenTabs:me.fontSize.sizes.${mapFontsizeToName(fontSize || 0)}`)}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() => navigation.navigate('Tab-Me-Settings-Fontsize')}
|
||||
/>
|
||||
<MenuRow
|
||||
@ -42,7 +42,7 @@ const SettingsApp: React.FC = () => {
|
||||
: i18n.language.toLowerCase()
|
||||
]
|
||||
}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() =>
|
||||
Platform.OS === 'ios'
|
||||
? Linking.openSettings()
|
||||
@ -52,7 +52,7 @@ const SettingsApp: React.FC = () => {
|
||||
<MenuRow
|
||||
title={t('screenTabs:me.settings.theme.heading')}
|
||||
content={t(`screenTabs:me.settings.theme.options.${theme || 'auto'}`)}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() =>
|
||||
showActionSheetWithOptions(
|
||||
{
|
||||
@ -88,7 +88,7 @@ const SettingsApp: React.FC = () => {
|
||||
<MenuRow
|
||||
title={t('screenTabs:me.settings.darkTheme.heading')}
|
||||
content={t(`screenTabs:me.settings.darkTheme.options.${themeDark || 'lighter'}`)}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() =>
|
||||
showActionSheetWithOptions(
|
||||
{
|
||||
@ -119,7 +119,7 @@ const SettingsApp: React.FC = () => {
|
||||
<MenuRow
|
||||
title={t('screenTabs:me.settings.browser.heading')}
|
||||
content={t(`screenTabs:me.settings.browser.options.${browser || 'internal'}`)}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() =>
|
||||
showActionSheetWithOptions(
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ const SettingsDev: React.FC = () => {
|
||||
<MenuRow
|
||||
title={'Saved local instances'}
|
||||
content={accounts?.length.toString()}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() =>
|
||||
showActionSheetWithOptions(
|
||||
{
|
||||
|
@ -24,22 +24,22 @@ const SettingsTooot: React.FC = () => {
|
||||
<MenuContainer>
|
||||
<MenuRow
|
||||
title={t('me.settings.support.heading')}
|
||||
content={<Icon name='Heart' size={StyleConstants.Font.Size.M} color={colors.red} />}
|
||||
iconBack='ChevronRight'
|
||||
content={<Icon name='heart' size={StyleConstants.Font.Size.M} color={colors.red} />}
|
||||
iconBack='chevron-right'
|
||||
onPress={() => Linking.openURL('https://www.buymeacoffee.com/xmflsct')}
|
||||
/>
|
||||
<MenuRow
|
||||
title={t('me.settings.feedback.heading')}
|
||||
content={
|
||||
<Icon name='MessageSquare' size={StyleConstants.Font.Size.M} color={colors.secondary} />
|
||||
<Icon name='message-square' size={StyleConstants.Font.Size.M} color={colors.secondary} />
|
||||
}
|
||||
iconBack='ChevronRight'
|
||||
iconBack='chevron-right'
|
||||
onPress={() => Linking.openURL('https://feedback.tooot.app/feature-requests')}
|
||||
/>
|
||||
<MenuRow
|
||||
title={t('me.settings.contact.heading')}
|
||||
content={<Icon name='Mail' size={StyleConstants.Font.Size.M} color={colors.secondary} />}
|
||||
iconBack='ChevronRight'
|
||||
content={<Icon name='mail' size={StyleConstants.Font.Size.M} color={colors.secondary} />}
|
||||
iconBack='chevron-right'
|
||||
onPress={async () => {
|
||||
if (accountActive) {
|
||||
navigation.navigate('Screen-Compose', {
|
||||
|
@ -114,7 +114,7 @@ const TabMeSettingsFontsize: React.FC<TabMeStackScreenProps<'Tab-Me-Settings-Fon
|
||||
}
|
||||
}}
|
||||
type='icon'
|
||||
content='Minus'
|
||||
content='minus'
|
||||
round
|
||||
disabled={(fontSize || 0) <= -1}
|
||||
style={{ marginHorizontal: StyleConstants.Spacing.S }}
|
||||
@ -128,7 +128,7 @@ const TabMeSettingsFontsize: React.FC<TabMeStackScreenProps<'Tab-Me-Settings-Fon
|
||||
}
|
||||
}}
|
||||
type='icon'
|
||||
content='Plus'
|
||||
content='plus'
|
||||
round
|
||||
disabled={(fontSize || 0) >= 3}
|
||||
style={{ marginHorizontal: StyleConstants.Spacing.S }}
|
||||
|
@ -41,7 +41,7 @@ const TabMeSettingsLanguage: React.FC<TabMeStackScreenProps<'Tab-Me-Settings-Lan
|
||||
<MenuRow
|
||||
key={item[0]}
|
||||
title={item[1]}
|
||||
iconBack={item[0] === i18n.language ? 'Check' : undefined}
|
||||
iconBack={item[0] === i18n.language ? 'check' : undefined}
|
||||
iconBackColor={'blue'}
|
||||
onPress={() => item[0] !== i18n.language && change(item[0])}
|
||||
/>
|
||||
|
@ -107,7 +107,7 @@ const TabMe: React.FC = () => {
|
||||
options={({ navigation }: any) => ({
|
||||
presentation: 'modal',
|
||||
title: t('me.stacks.preferences.name'),
|
||||
headerLeft: () => <HeaderLeft content='ChevronDown' onPress={() => navigation.pop(1)} />
|
||||
headerLeft: () => <HeaderLeft content='chevron-down' onPress={() => navigation.pop(1)} />
|
||||
})}
|
||||
/>
|
||||
<Stack.Screen
|
||||
@ -154,7 +154,7 @@ const TabMe: React.FC = () => {
|
||||
presentation: 'modal',
|
||||
headerShown: true,
|
||||
title: t('me.stacks.switch.name'),
|
||||
headerLeft: () => <HeaderLeft content='ChevronDown' onPress={() => navigation.goBack()} />
|
||||
headerLeft: () => <HeaderLeft content='chevron-down' onPress={() => navigation.goBack()} />
|
||||
})}
|
||||
/>
|
||||
|
||||
|
@ -26,7 +26,7 @@ const TabNotificationsFilters: React.FC<
|
||||
title: t('screenTabs:notifications.filters.title'),
|
||||
headerLeft: () => (
|
||||
<HeaderLeft
|
||||
content='ChevronDown'
|
||||
content='chevron-down'
|
||||
onPress={() => {
|
||||
if (changed) {
|
||||
Alert.alert(t('common:discard.title'), t('common:discard.message'), [
|
||||
|
@ -25,7 +25,7 @@ const Root: React.FC<
|
||||
<HeaderRight
|
||||
accessibilityLabel={t('notifications.filters.accessibilityLabel')}
|
||||
accessibilityHint={t('notifications.filters.accessibilityHint')}
|
||||
content='Filter'
|
||||
content='filter'
|
||||
onPress={() => navigation.navigate('Tab-Notifications-Filters')}
|
||||
/>
|
||||
)
|
||||
|
@ -64,7 +64,7 @@ const Root: React.FC<NativeStackScreenProps<TabPublicStackParamList, 'Tab-Public
|
||||
<HeaderRight
|
||||
accessibilityLabel={t('common.search.accessibilityLabel')}
|
||||
accessibilityHint={t('common.search.accessibilityHint')}
|
||||
content='Search'
|
||||
content='search'
|
||||
onPress={() => navigation.navigate('Tab-Shared-Search')}
|
||||
/>
|
||||
)
|
||||
|
@ -70,7 +70,7 @@ const AccountAttachments: React.FC = () => {
|
||||
}}
|
||||
children={
|
||||
<Icon
|
||||
name='MoreHorizontal'
|
||||
name='more-horizontal'
|
||||
color={colors.primaryOverlay}
|
||||
size={StyleConstants.Font.Size.L * 1.5}
|
||||
/>
|
||||
|
@ -50,7 +50,7 @@ const AccountInformationAccount: React.FC = () => {
|
||||
</CustomText>
|
||||
{account?.locked ? (
|
||||
<Icon
|
||||
name='Lock'
|
||||
name='lock'
|
||||
style={{ marginLeft: StyleConstants.Spacing.S }}
|
||||
color={colors.secondary}
|
||||
size={StyleConstants.Font.Size.M}
|
||||
@ -58,7 +58,7 @@ const AccountInformationAccount: React.FC = () => {
|
||||
) : null}
|
||||
{account?.bot ? (
|
||||
<Icon
|
||||
name='HardDrive'
|
||||
name='hard-drive'
|
||||
style={{ marginLeft: StyleConstants.Spacing.S }}
|
||||
color={colors.secondary}
|
||||
size={StyleConstants.Font.Size.M}
|
||||
|
@ -46,7 +46,7 @@ const AccountInformationActions: React.FC = () => {
|
||||
round
|
||||
type='icon'
|
||||
disabled={account === undefined}
|
||||
content='Settings'
|
||||
content='sliders'
|
||||
style={{ marginLeft: StyleConstants.Spacing.S }}
|
||||
onPress={() => navigation.navigate('Tab-Me-Preferences')}
|
||||
/>
|
||||
@ -68,7 +68,7 @@ const AccountInformationActions: React.FC = () => {
|
||||
<Button
|
||||
round
|
||||
type='icon'
|
||||
content='AtSign'
|
||||
content='at-sign'
|
||||
style={{ flex: 1, marginRight: StyleConstants.Spacing.S }}
|
||||
onPress={() => {}}
|
||||
/>
|
||||
|
@ -30,7 +30,7 @@ const AccountInformationCreated: React.FC = () => {
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
name='Calendar'
|
||||
name='calendar'
|
||||
size={StyleConstants.Font.Size.S}
|
||||
color={colors.secondary}
|
||||
style={{ marginRight: StyleConstants.Spacing.XS }}
|
||||
|
@ -87,7 +87,7 @@ const TabSharedAccount: React.FC<TabSharedStackScreenProps<'Tab-Shared-Account'>
|
||||
user: account.acct
|
||||
})}
|
||||
accessibilityHint={t('shared.account.actions.accessibilityHint')}
|
||||
content='MoreHorizontal'
|
||||
content='more-horizontal'
|
||||
onPress={() => {}}
|
||||
background
|
||||
/>
|
||||
|
@ -79,11 +79,11 @@ const TabSharedAccountInLists: React.FC<
|
||||
renderItem={({ index, item, section }) => (
|
||||
<MenuRow
|
||||
key={index}
|
||||
iconFront='List'
|
||||
iconFront='list'
|
||||
content={
|
||||
<Button
|
||||
type='icon'
|
||||
content={section.id === 'in' ? 'Minus' : 'Plus'}
|
||||
content={section.id === 'in' ? 'minus' : 'plus'}
|
||||
round
|
||||
disabled={accountInListsQuery.isFetching}
|
||||
onPress={() => {
|
||||
|
@ -103,7 +103,7 @@ const ContentView: React.FC<{
|
||||
paddingTop: StyleConstants.Font.LineHeight.M - StyleConstants.Font.Size.M,
|
||||
marginRight: StyleConstants.Spacing.S
|
||||
}}
|
||||
name={item.poll?.multiple ? 'Square' : 'Circle'}
|
||||
name={item.poll?.multiple ? 'square' : 'circle'}
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={
|
||||
prevItem?.poll?.multiple !== item.poll?.multiple ? colors.red : colors.disabled
|
||||
|
@ -51,7 +51,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||
>
|
||||
{hasRemoteContent ? (
|
||||
<Icon
|
||||
name='Wifi'
|
||||
name='wifi'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.primaryDefault}
|
||||
style={{ marginRight: StyleConstants.Spacing.S }}
|
||||
|
@ -115,7 +115,7 @@ const TabSharedUsers: React.FC<TabSharedStackScreenProps<'Tab-Shared-Users'>> =
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
name='AlertCircle'
|
||||
name='alert-circle'
|
||||
color={colors.secondary}
|
||||
size={StyleConstants.Font.Size.M}
|
||||
style={{ marginRight: StyleConstants.Spacing.S }}
|
||||
|
@ -41,13 +41,13 @@ const ScreenTabs = ({ navigation }: RootStackScreenProps<'Screen-Tabs'>) => {
|
||||
}) => {
|
||||
switch (route.name) {
|
||||
case 'Tab-Local':
|
||||
return <Icon name='Home' size={size} color={color} />
|
||||
return <Icon name='home' size={size} color={color} />
|
||||
case 'Tab-Public':
|
||||
return <Icon name='Globe' size={size} color={color} />
|
||||
return <Icon name='globe' size={size} color={color} />
|
||||
case 'Tab-Compose':
|
||||
return <Icon name='Plus' size={size} color={color} />
|
||||
return <Icon name='plus' size={size} color={color} />
|
||||
case 'Tab-Notifications':
|
||||
return <Icon name='Bell' size={size} color={color} />
|
||||
return <Icon name='bell' size={size} color={color} />
|
||||
case 'Tab-Me':
|
||||
return (
|
||||
<GracefullyImage
|
||||
@ -65,7 +65,7 @@ const ScreenTabs = ({ navigation }: RootStackScreenProps<'Screen-Tabs'>) => {
|
||||
/>
|
||||
)
|
||||
default:
|
||||
return <Icon name='AlertOctagon' size={size} color={color} />
|
||||
return <Icon name='alert-octagon' size={size} color={color} />
|
||||
}
|
||||
}
|
||||
})}
|
||||
|
@ -248,7 +248,7 @@ const Screens: React.FC = () => {
|
||||
headerShadowVisible: false,
|
||||
headerTransparent: true,
|
||||
headerStyle: { backgroundColor: 'transparent' },
|
||||
headerLeft: () => <HeaderLeft content='X' onPress={() => navigation.goBack()} />,
|
||||
headerLeft: () => <HeaderLeft content='x' onPress={() => navigation.goBack()} />,
|
||||
title: t('screenAnnouncements:heading')
|
||||
})}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user