Restore quick language select (#8981)
* restore quick language select * rm showCancel * rm margin from thread button * alf composer icons * stop hiding keyboard * use trans
This commit is contained in:
@@ -110,7 +110,6 @@ import {LabelsBtn} from '#/view/com/composer/labels/LabelsBtn'
|
||||
import {Gallery} from '#/view/com/composer/photos/Gallery'
|
||||
import {OpenCameraBtn} from '#/view/com/composer/photos/OpenCameraBtn'
|
||||
import {SelectGifBtn} from '#/view/com/composer/photos/SelectGifBtn'
|
||||
import {SelectPostLanguagesBtn} from '#/view/com/composer/select-language/SelectPostLanguagesDialog'
|
||||
import {SuggestedLanguage} from '#/view/com/composer/select-language/SuggestedLanguage'
|
||||
// TODO: Prevent naming components that coincide with RN primitives
|
||||
// due to linting false positives
|
||||
@@ -123,14 +122,16 @@ import {Text} from '#/view/com/util/text/Text'
|
||||
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
||||
import {atoms as a, native, useTheme, web} from '#/alf'
|
||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo'
|
||||
import {EmojiArc_Stroke2_Corner0_Rounded as EmojiSmile} from '#/components/icons/Emoji'
|
||||
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
|
||||
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfoIcon} from '#/components/icons/CircleInfo'
|
||||
import {EmojiArc_Stroke2_Corner0_Rounded as EmojiSmileIcon} from '#/components/icons/Emoji'
|
||||
import {PlusLarge_Stroke2_Corner0_Rounded as PlusIcon} from '#/components/icons/Plus'
|
||||
import {TimesLarge_Stroke2_Corner0_Rounded as XIcon} from '#/components/icons/Times'
|
||||
import {LazyQuoteEmbed} from '#/components/Post/Embed/LazyQuoteEmbed'
|
||||
import * as Prompt from '#/components/Prompt'
|
||||
import * as Toast from '#/components/Toast'
|
||||
import {Text as NewText} from '#/components/Typography'
|
||||
import {BottomSheetPortalProvider} from '../../../../modules/bottom-sheet'
|
||||
import {PostLanguageSelect} from './select-language/PostLanguageSelect'
|
||||
import {
|
||||
type AssetType,
|
||||
SelectMediaButton,
|
||||
@@ -941,7 +942,7 @@ let ComposerPost = React.memo(function ComposerPost({
|
||||
})
|
||||
}
|
||||
}}>
|
||||
<ButtonIcon icon={X} />
|
||||
<ButtonIcon icon={XIcon} />
|
||||
</Button>
|
||||
<Prompt.Basic
|
||||
control={discardPromptControl}
|
||||
@@ -1430,7 +1431,7 @@ function ComposerFooter({
|
||||
variant="ghost"
|
||||
shape="round"
|
||||
color="primary">
|
||||
<EmojiSmile size="lg" />
|
||||
<EmojiSmileIcon size="lg" />
|
||||
</Button>
|
||||
) : null}
|
||||
</ToolbarWrapper>
|
||||
@@ -1440,20 +1441,16 @@ function ComposerFooter({
|
||||
<View style={[a.flex_row, a.align_center, a.justify_between]}>
|
||||
{showAddButton && (
|
||||
<Button
|
||||
label={_(msg`Add new post`)}
|
||||
label={_(msg`Add another post to thread`)}
|
||||
onPress={onAddPost}
|
||||
style={[a.p_sm, a.m_2xs]}
|
||||
style={[a.p_sm]}
|
||||
variant="ghost"
|
||||
shape="round"
|
||||
color="primary">
|
||||
<FontAwesomeIcon
|
||||
icon="add"
|
||||
size={20}
|
||||
color={t.palette.primary_500}
|
||||
/>
|
||||
<PlusIcon size="lg" />
|
||||
</Button>
|
||||
)}
|
||||
<SelectPostLanguagesBtn />
|
||||
<PostLanguageSelect />
|
||||
<CharProgress
|
||||
count={post.shortenedGraphemeLength}
|
||||
style={{width: 65}}
|
||||
@@ -1753,7 +1750,7 @@ function ErrorBanner({
|
||||
t.atoms.bg_contrast_25,
|
||||
]}>
|
||||
<View style={[a.relative, a.flex_row, a.gap_sm, {paddingRight: 48}]}>
|
||||
<CircleInfo fill={t.palette.negative_400} />
|
||||
<CircleInfoIcon fill={t.palette.negative_400} />
|
||||
<NewText style={[a.flex_1, a.leading_snug, {paddingTop: 1}]}>
|
||||
{error}
|
||||
</NewText>
|
||||
@@ -1765,7 +1762,7 @@ function ErrorBanner({
|
||||
shape="round"
|
||||
style={[a.absolute, {top: 0, right: 0}]}
|
||||
onPress={onClearError}>
|
||||
<ButtonIcon icon={X} />
|
||||
<ButtonIcon icon={XIcon} />
|
||||
</Button>
|
||||
</View>
|
||||
{videoError && videoState.jobId && (
|
||||
|
||||
Reference in New Issue
Block a user