mirror of
https://github.com/tooot-app/app
synced 2025-05-03 19:40:08 +02:00
Fixed #352
This commit is contained in:
parent
51a2ff012a
commit
b9cf0ceb6b
@ -78,9 +78,7 @@
|
||||
}
|
||||
},
|
||||
"fontSize": {
|
||||
"showcase": "Beispieltröt",
|
||||
"demo": "<p>Dies ist ein Beispieltröt😊. Du kannst aus mehreren der unteren Möglichkeiten auswählen.<br /><br />Diese Einstellung betrifft ausschließlich die Haupteinstellungen, nicht die Schriftgröße in anderen Bereichen der App.</p>",
|
||||
"availableSizes": "Verfügbare Größen",
|
||||
"sizes": {
|
||||
"S": "S",
|
||||
"M": "M – Standard",
|
||||
|
@ -78,9 +78,7 @@
|
||||
}
|
||||
},
|
||||
"fontSize": {
|
||||
"showcase": "Example toot",
|
||||
"demo": "<p>This is a demo toot😊. You can choose from several options from below.<br /><br />This setting only affects the main content of toots, but not other font sizes.</p>",
|
||||
"availableSizes": "Available sizes",
|
||||
"sizes": {
|
||||
"S": "S",
|
||||
"M": "M - Default",
|
||||
|
@ -78,9 +78,7 @@
|
||||
}
|
||||
},
|
||||
"fontSize": {
|
||||
"showcase": "Toot di esempio",
|
||||
"demo": "<p>Questo toot è un esempio 😺️. Puoi scegliere diverse opzioni di grandezza del testo qui sotto.<br /><br />Questa impostazione si applica solo al testo dei toot, non anche agli altri testi della app.</p>",
|
||||
"availableSizes": "Dimensioni testo",
|
||||
"sizes": {
|
||||
"S": "S",
|
||||
"M": "M - Predefinito",
|
||||
|
@ -78,9 +78,7 @@
|
||||
}
|
||||
},
|
||||
"fontSize": {
|
||||
"showcase": "예시 툿",
|
||||
"demo": "<p>데모 툿이에요😊. 아래의 여러 옵션 중에서 선택할 수 있어요.<br /><br />이 설정은 툿의 메인 내용에만 적용되고, 다른 폰트 크기에 영향을 미치지 않아요.</p>",
|
||||
"availableSizes": "사용할 수 있는 크기",
|
||||
"sizes": {
|
||||
"S": "작게",
|
||||
"M": "중간 - 기본값",
|
||||
|
@ -78,9 +78,7 @@
|
||||
}
|
||||
},
|
||||
"fontSize": {
|
||||
"showcase": "Exemplo de toot",
|
||||
"demo": "<p>Esta é uma demonstração também😊. Você pode escolher entre várias opções abaixo.<br /><br />Esta configuração afeta apenas o conteúdo principal dos toots, mas não os tamanhos de outra fonte.</p>",
|
||||
"availableSizes": "Tamanhos disponíveis",
|
||||
"sizes": {
|
||||
"S": "P",
|
||||
"M": "M - Padrão",
|
||||
|
@ -78,9 +78,7 @@
|
||||
}
|
||||
},
|
||||
"fontSize": {
|
||||
"showcase": "Xem trước",
|
||||
"demo": "<p>Đây là một tút mẫu 😊 Bạn có thể chọn một trong nhiều lựa chọn bên dưới.<br /><br />Tùy chọn này chỉ áp dụng cho nội dung tút chứ không ảnh hưởng những phần tử khác của app.</p>",
|
||||
"availableSizes": "Kích cỡ",
|
||||
"sizes": {
|
||||
"S": "S",
|
||||
"M": "M - Mặc định",
|
||||
|
@ -78,9 +78,7 @@
|
||||
}
|
||||
},
|
||||
"fontSize": {
|
||||
"showcase": "嘟文示例",
|
||||
"demo": "<p>这是一条测试用的嘟文😊。以下是可供选择的字号,从小号至超大号。<br /><br />这个设置仅会调整嘟文的正文字号,不影响其它字号。</p>",
|
||||
"availableSizes": "可选字号",
|
||||
"sizes": {
|
||||
"S": "小号",
|
||||
"M": "默认",
|
||||
|
@ -78,9 +78,7 @@
|
||||
}
|
||||
},
|
||||
"fontSize": {
|
||||
"showcase": "嘟文範例",
|
||||
"demo": "",
|
||||
"availableSizes": "",
|
||||
"sizes": {
|
||||
"S": "",
|
||||
"M": "",
|
||||
|
@ -1,9 +1,12 @@
|
||||
import CustomText from '@components/Text'
|
||||
import { getSettingsFontsize } from '@utils/slices/settingsSlice'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { adaptiveScale } from '@utils/styles/scaling'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React, { useContext } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { TextInput } from 'react-native'
|
||||
import { useSelector } from 'react-redux'
|
||||
import formatText from '../../formatText'
|
||||
import ComposeContext from '../../utils/createContext'
|
||||
|
||||
@ -12,6 +15,16 @@ const ComposeSpoilerInput: React.FC = () => {
|
||||
const { t } = useTranslation('screenCompose')
|
||||
const { colors, mode } = useTheme()
|
||||
|
||||
const adaptiveFontsize = useSelector(getSettingsFontsize)
|
||||
const adaptedFontsize = adaptiveScale(
|
||||
StyleConstants.Font.Size.M,
|
||||
adaptiveFontsize
|
||||
)
|
||||
const adaptedLineheight = adaptiveScale(
|
||||
StyleConstants.Font.LineHeight.M,
|
||||
adaptiveFontsize
|
||||
)
|
||||
|
||||
return (
|
||||
<TextInput
|
||||
keyboardAppearance={mode}
|
||||
@ -23,7 +36,9 @@ const ComposeSpoilerInput: React.FC = () => {
|
||||
marginRight: StyleConstants.Spacing.Global.PagePadding,
|
||||
borderBottomWidth: 0.5,
|
||||
color: colors.primaryDefault,
|
||||
borderBottomColor: colors.border
|
||||
borderBottomColor: colors.border,
|
||||
fontSize: adaptedFontsize,
|
||||
lineHeight: adaptedLineheight
|
||||
}}
|
||||
autoCapitalize='none'
|
||||
autoCorrect={false}
|
||||
|
@ -1,7 +1,9 @@
|
||||
import CustomText from '@components/Text'
|
||||
import PasteInput, { PastedFile } from '@mattermost/react-native-paste-input'
|
||||
import { getInstanceConfigurationStatusMaxAttachments } from '@utils/slices/instancesSlice'
|
||||
import { getSettingsFontsize } from '@utils/slices/settingsSlice'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { adaptiveScale } from '@utils/styles/scaling'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React, { useContext } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
@ -21,6 +23,16 @@ const ComposeTextInput: React.FC = () => {
|
||||
() => true
|
||||
)
|
||||
|
||||
const adaptiveFontsize = useSelector(getSettingsFontsize)
|
||||
const adaptedFontsize = adaptiveScale(
|
||||
StyleConstants.Font.Size.M,
|
||||
adaptiveFontsize
|
||||
)
|
||||
const adaptedLineheight = adaptiveScale(
|
||||
StyleConstants.Font.LineHeight.M,
|
||||
adaptiveFontsize
|
||||
)
|
||||
|
||||
return (
|
||||
<PasteInput
|
||||
keyboardAppearance={mode}
|
||||
@ -31,7 +43,9 @@ const ComposeTextInput: React.FC = () => {
|
||||
marginLeft: StyleConstants.Spacing.Global.PagePadding,
|
||||
marginRight: StyleConstants.Spacing.Global.PagePadding,
|
||||
color: colors.primaryDefault,
|
||||
borderBottomColor: colors.border
|
||||
borderBottomColor: colors.border,
|
||||
fontSize: adaptedFontsize,
|
||||
lineHeight: adaptedLineheight
|
||||
}}
|
||||
autoFocus
|
||||
enablesReturnKeyAutomatically
|
||||
|
@ -102,49 +102,12 @@ const TabMeSettingsFontsize: React.FC<
|
||||
|
||||
return (
|
||||
<ScrollView>
|
||||
<CustomText
|
||||
fontStyle='M'
|
||||
style={{
|
||||
textAlign: 'center',
|
||||
marginTop: StyleConstants.Spacing.M,
|
||||
marginBottom: StyleConstants.Spacing.M,
|
||||
color: colors.primaryDefault
|
||||
}}
|
||||
>
|
||||
{t('me.fontSize.showcase')}
|
||||
</CustomText>
|
||||
<View>
|
||||
<ComponentSeparator
|
||||
extraMarginLeft={-StyleConstants.Spacing.Global.PagePadding}
|
||||
extraMarginRight={-StyleConstants.Spacing.Global.PagePadding}
|
||||
/>
|
||||
<TimelineDefault
|
||||
// @ts-ignore
|
||||
item={item}
|
||||
disableDetails
|
||||
disableOnPress
|
||||
/>
|
||||
<ComponentSeparator
|
||||
extraMarginLeft={-StyleConstants.Spacing.Global.PagePadding}
|
||||
extraMarginRight={-StyleConstants.Spacing.Global.PagePadding}
|
||||
/>
|
||||
</View>
|
||||
<CustomText
|
||||
fontStyle='M'
|
||||
style={{
|
||||
textAlign: 'center',
|
||||
marginTop: StyleConstants.Spacing.M,
|
||||
marginBottom: StyleConstants.Spacing.M,
|
||||
color: colors.primaryDefault
|
||||
}}
|
||||
>
|
||||
{t('me.fontSize.availableSizes')}
|
||||
</CustomText>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
justifyContent: 'center',
|
||||
marginTop: StyleConstants.Spacing.M
|
||||
}}
|
||||
>
|
||||
{sizesDemo}
|
||||
@ -185,6 +148,26 @@ const TabMeSettingsFontsize: React.FC<
|
||||
style={{ marginHorizontal: StyleConstants.Spacing.S }}
|
||||
/>
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
marginVertical: StyleConstants.Spacing.L
|
||||
}}
|
||||
>
|
||||
<ComponentSeparator
|
||||
extraMarginLeft={-StyleConstants.Spacing.Global.PagePadding}
|
||||
extraMarginRight={-StyleConstants.Spacing.Global.PagePadding}
|
||||
/>
|
||||
<TimelineDefault
|
||||
// @ts-ignore
|
||||
item={item}
|
||||
disableDetails
|
||||
disableOnPress
|
||||
/>
|
||||
<ComponentSeparator
|
||||
extraMarginLeft={-StyleConstants.Spacing.Global.PagePadding}
|
||||
extraMarginRight={-StyleConstants.Spacing.Global.PagePadding}
|
||||
/>
|
||||
</View>
|
||||
</ScrollView>
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user