mirror of
https://github.com/tooot-app/app
synced 2025-05-08 13:58:48 +02:00
Fixed #352
This commit is contained in:
parent
51a2ff012a
commit
b9cf0ceb6b
@ -78,9 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fontSize": {
|
"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>",
|
"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": {
|
"sizes": {
|
||||||
"S": "S",
|
"S": "S",
|
||||||
"M": "M – Standard",
|
"M": "M – Standard",
|
||||||
|
@ -78,9 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fontSize": {
|
"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>",
|
"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": {
|
"sizes": {
|
||||||
"S": "S",
|
"S": "S",
|
||||||
"M": "M - Default",
|
"M": "M - Default",
|
||||||
|
@ -78,9 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fontSize": {
|
"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>",
|
"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": {
|
"sizes": {
|
||||||
"S": "S",
|
"S": "S",
|
||||||
"M": "M - Predefinito",
|
"M": "M - Predefinito",
|
||||||
|
@ -78,9 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fontSize": {
|
"fontSize": {
|
||||||
"showcase": "예시 툿",
|
|
||||||
"demo": "<p>데모 툿이에요😊. 아래의 여러 옵션 중에서 선택할 수 있어요.<br /><br />이 설정은 툿의 메인 내용에만 적용되고, 다른 폰트 크기에 영향을 미치지 않아요.</p>",
|
"demo": "<p>데모 툿이에요😊. 아래의 여러 옵션 중에서 선택할 수 있어요.<br /><br />이 설정은 툿의 메인 내용에만 적용되고, 다른 폰트 크기에 영향을 미치지 않아요.</p>",
|
||||||
"availableSizes": "사용할 수 있는 크기",
|
|
||||||
"sizes": {
|
"sizes": {
|
||||||
"S": "작게",
|
"S": "작게",
|
||||||
"M": "중간 - 기본값",
|
"M": "중간 - 기본값",
|
||||||
|
@ -78,9 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fontSize": {
|
"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>",
|
"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": {
|
"sizes": {
|
||||||
"S": "P",
|
"S": "P",
|
||||||
"M": "M - Padrão",
|
"M": "M - Padrão",
|
||||||
|
@ -78,9 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fontSize": {
|
"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>",
|
"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": {
|
"sizes": {
|
||||||
"S": "S",
|
"S": "S",
|
||||||
"M": "M - Mặc định",
|
"M": "M - Mặc định",
|
||||||
|
@ -78,9 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fontSize": {
|
"fontSize": {
|
||||||
"showcase": "嘟文示例",
|
|
||||||
"demo": "<p>这是一条测试用的嘟文😊。以下是可供选择的字号,从小号至超大号。<br /><br />这个设置仅会调整嘟文的正文字号,不影响其它字号。</p>",
|
"demo": "<p>这是一条测试用的嘟文😊。以下是可供选择的字号,从小号至超大号。<br /><br />这个设置仅会调整嘟文的正文字号,不影响其它字号。</p>",
|
||||||
"availableSizes": "可选字号",
|
|
||||||
"sizes": {
|
"sizes": {
|
||||||
"S": "小号",
|
"S": "小号",
|
||||||
"M": "默认",
|
"M": "默认",
|
||||||
|
@ -78,9 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fontSize": {
|
"fontSize": {
|
||||||
"showcase": "嘟文範例",
|
|
||||||
"demo": "",
|
"demo": "",
|
||||||
"availableSizes": "",
|
|
||||||
"sizes": {
|
"sizes": {
|
||||||
"S": "",
|
"S": "",
|
||||||
"M": "",
|
"M": "",
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
import CustomText from '@components/Text'
|
import CustomText from '@components/Text'
|
||||||
|
import { getSettingsFontsize } from '@utils/slices/settingsSlice'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
|
import { adaptiveScale } from '@utils/styles/scaling'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { useContext } from 'react'
|
import React, { useContext } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { TextInput } from 'react-native'
|
import { TextInput } from 'react-native'
|
||||||
|
import { useSelector } from 'react-redux'
|
||||||
import formatText from '../../formatText'
|
import formatText from '../../formatText'
|
||||||
import ComposeContext from '../../utils/createContext'
|
import ComposeContext from '../../utils/createContext'
|
||||||
|
|
||||||
@ -12,6 +15,16 @@ const ComposeSpoilerInput: React.FC = () => {
|
|||||||
const { t } = useTranslation('screenCompose')
|
const { t } = useTranslation('screenCompose')
|
||||||
const { colors, mode } = useTheme()
|
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 (
|
return (
|
||||||
<TextInput
|
<TextInput
|
||||||
keyboardAppearance={mode}
|
keyboardAppearance={mode}
|
||||||
@ -23,7 +36,9 @@ const ComposeSpoilerInput: React.FC = () => {
|
|||||||
marginRight: StyleConstants.Spacing.Global.PagePadding,
|
marginRight: StyleConstants.Spacing.Global.PagePadding,
|
||||||
borderBottomWidth: 0.5,
|
borderBottomWidth: 0.5,
|
||||||
color: colors.primaryDefault,
|
color: colors.primaryDefault,
|
||||||
borderBottomColor: colors.border
|
borderBottomColor: colors.border,
|
||||||
|
fontSize: adaptedFontsize,
|
||||||
|
lineHeight: adaptedLineheight
|
||||||
}}
|
}}
|
||||||
autoCapitalize='none'
|
autoCapitalize='none'
|
||||||
autoCorrect={false}
|
autoCorrect={false}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
import CustomText from '@components/Text'
|
import CustomText from '@components/Text'
|
||||||
import PasteInput, { PastedFile } from '@mattermost/react-native-paste-input'
|
import PasteInput, { PastedFile } from '@mattermost/react-native-paste-input'
|
||||||
import { getInstanceConfigurationStatusMaxAttachments } from '@utils/slices/instancesSlice'
|
import { getInstanceConfigurationStatusMaxAttachments } from '@utils/slices/instancesSlice'
|
||||||
|
import { getSettingsFontsize } from '@utils/slices/settingsSlice'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
|
import { adaptiveScale } from '@utils/styles/scaling'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { useContext } from 'react'
|
import React, { useContext } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
@ -21,6 +23,16 @@ const ComposeTextInput: React.FC = () => {
|
|||||||
() => true
|
() => true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const adaptiveFontsize = useSelector(getSettingsFontsize)
|
||||||
|
const adaptedFontsize = adaptiveScale(
|
||||||
|
StyleConstants.Font.Size.M,
|
||||||
|
adaptiveFontsize
|
||||||
|
)
|
||||||
|
const adaptedLineheight = adaptiveScale(
|
||||||
|
StyleConstants.Font.LineHeight.M,
|
||||||
|
adaptiveFontsize
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PasteInput
|
<PasteInput
|
||||||
keyboardAppearance={mode}
|
keyboardAppearance={mode}
|
||||||
@ -31,7 +43,9 @@ const ComposeTextInput: React.FC = () => {
|
|||||||
marginLeft: StyleConstants.Spacing.Global.PagePadding,
|
marginLeft: StyleConstants.Spacing.Global.PagePadding,
|
||||||
marginRight: StyleConstants.Spacing.Global.PagePadding,
|
marginRight: StyleConstants.Spacing.Global.PagePadding,
|
||||||
color: colors.primaryDefault,
|
color: colors.primaryDefault,
|
||||||
borderBottomColor: colors.border
|
borderBottomColor: colors.border,
|
||||||
|
fontSize: adaptedFontsize,
|
||||||
|
lineHeight: adaptedLineheight
|
||||||
}}
|
}}
|
||||||
autoFocus
|
autoFocus
|
||||||
enablesReturnKeyAutomatically
|
enablesReturnKeyAutomatically
|
||||||
|
@ -102,49 +102,12 @@ const TabMeSettingsFontsize: React.FC<
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView>
|
<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
|
<View
|
||||||
style={{
|
style={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center'
|
justifyContent: 'center',
|
||||||
|
marginTop: StyleConstants.Spacing.M
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{sizesDemo}
|
{sizesDemo}
|
||||||
@ -185,6 +148,26 @@ const TabMeSettingsFontsize: React.FC<
|
|||||||
style={{ marginHorizontal: StyleConstants.Spacing.S }}
|
style={{ marginHorizontal: StyleConstants.Spacing.S }}
|
||||||
/>
|
/>
|
||||||
</View>
|
</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>
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user