Merge pull request #341 from tooot-app/main

Release v4.1.2
This commit is contained in:
xmflsct 2022-06-15 00:21:34 +02:00 committed by GitHub
commit 264fe23d22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 89 additions and 93 deletions

View File

@ -5,7 +5,7 @@ import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager' import { useTheme } from '@utils/styles/ThemeManager'
import { ColorDefinitions } from '@utils/styles/themes' import { ColorDefinitions } from '@utils/styles/themes'
import React, { useMemo } from 'react' import React, { useMemo } from 'react'
import { StyleSheet, Text, View } from 'react-native' import { View } from 'react-native'
import { Flow } from 'react-native-animated-spinkit' import { Flow } from 'react-native-animated-spinkit'
import { State, Switch, TapGestureHandler } from 'react-native-gesture-handler' import { State, Switch, TapGestureHandler } from 'react-native-gesture-handler'
@ -61,7 +61,7 @@ const MenuRow: React.FC<Props> = ({
return ( return (
<View <View
style={styles.base} style={{ minHeight: 50 }}
accessible accessible
accessibilityRole={switchValue ? 'switch' : 'button'} accessibilityRole={switchValue ? 'switch' : 'button'}
accessibilityState={switchValue ? { checked: switchValue } : undefined} accessibilityState={switchValue ? { checked: switchValue } : undefined}
@ -78,14 +78,26 @@ const MenuRow: React.FC<Props> = ({
}} }}
> >
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<View style={styles.core}> <View
<View style={styles.front}> style={{
flex: 1,
flexDirection: 'row',
paddingTop: StyleConstants.Spacing.S
}}
>
<View
style={{
flex: 3,
flexDirection: 'row',
alignItems: 'center'
}}
>
{iconFront && ( {iconFront && (
<Icon <Icon
name={iconFront} name={iconFront}
size={StyleConstants.Font.Size.L} size={StyleConstants.Font.Size.L}
color={colors[iconFrontColor]} color={colors[iconFrontColor]}
style={styles.iconFront} style={{ marginRight: StyleConstants.Spacing.S }}
/> />
)} )}
{badge ? ( {badge ? (
@ -99,7 +111,7 @@ const MenuRow: React.FC<Props> = ({
}} }}
/> />
) : null} ) : null}
<View style={styles.main}> <View style={{ flex: 1 }}>
<CustomText <CustomText
fontStyle='M' fontStyle='M'
style={{ color: colors.primaryDefault }} style={{ color: colors.primaryDefault }}
@ -111,7 +123,15 @@ const MenuRow: React.FC<Props> = ({
</View> </View>
{content || switchValue !== undefined || iconBack ? ( {content || switchValue !== undefined || iconBack ? (
<View style={styles.back}> <View
style={{
flexShrink: 1,
flexDirection: 'row',
justifyContent: 'flex-end',
alignItems: 'center',
marginLeft: StyleConstants.Spacing.M
}}
>
{content ? ( {content ? (
typeof content === 'string' ? ( typeof content === 'string' ? (
<CustomText <CustomText
@ -141,7 +161,7 @@ const MenuRow: React.FC<Props> = ({
name={iconBack} name={iconBack}
size={StyleConstants.Font.Size.L} size={StyleConstants.Font.Size.L}
color={colors[iconBackColor]} color={colors[iconBackColor]}
style={[styles.iconBack, { opacity: loading ? 0 : 1 }]} style={{ marginLeft: 8, opacity: loading ? 0 : 1 }}
/> />
) : null} ) : null}
{loading && loadingSpinkit} {loading && loadingSpinkit}
@ -159,42 +179,4 @@ const MenuRow: React.FC<Props> = ({
) )
} }
const styles = StyleSheet.create({
base: {
minHeight: 50
},
core: {
flex: 1,
flexDirection: 'row',
paddingTop: StyleConstants.Spacing.S
},
front: {
flex: 2,
flexDirection: 'row',
alignItems: 'center'
},
back: {
flex: 1,
flexDirection: 'row',
justifyContent: 'flex-end',
alignItems: 'center',
marginLeft: StyleConstants.Spacing.M
},
iconFront: {
marginRight: StyleConstants.Spacing.S
},
main: {
flex: 1
},
description: {
...StyleConstants.FontStyle.S
},
content: {
...StyleConstants.FontStyle.M
},
iconBack: {
marginLeft: 8
}
})
export default MenuRow export default MenuRow

View File

@ -1,12 +1,14 @@
{ {
"accessibilityHint": "Funktionen für diesen Tröt - wie z. B. Autor und Originaltröt", "accessibilityHint": "Funktionen für diesen Tröt - wie z. B. Autor und Originaltröt",
"account": { "account": {
"title": "", "title": "Benutzeraktionen",
"mute": { "mute": {
"action": "Profil stummschalten" "action_false": "Profil stummschalten",
"action_true": ""
}, },
"block": { "block": {
"action": "Nutzer blockieren" "action_false": "Nutzer blockieren",
"action_true": ""
}, },
"reports": { "reports": {
"action": "User melden" "action": "User melden"
@ -59,12 +61,12 @@
} }
}, },
"mute": { "mute": {
"action-muted_false": "", "action_false": "",
"action-muted_true": "" "action_true": ""
}, },
"pin": { "pin": {
"action-pinned_false": "", "action_false": "",
"action-pinned_true": "" "action_true": ""
} }
} }
} }

View File

@ -139,7 +139,7 @@
}, },
"expiration": { "expiration": {
"expired": "Abstimmung abgelaufen", "expired": "Abstimmung abgelaufen",
"until": "Läuft in <0 /> ab" "until": "Läuft <0 /> ab"
} }
} }
} }

View File

@ -3,10 +3,12 @@
"account": { "account": {
"title": "", "title": "",
"mute": { "mute": {
"action": "Muta utente" "action_false": "Muta utente",
"action_true": ""
}, },
"block": { "block": {
"action": "Blocca utente" "action_false": "Blocca utente",
"action_true": ""
}, },
"reports": { "reports": {
"action": "Segnala utente" "action": "Segnala utente"
@ -59,12 +61,12 @@
} }
}, },
"mute": { "mute": {
"action-muted_false": "", "action_false": "",
"action-muted_true": "" "action_true": ""
}, },
"pin": { "pin": {
"action-pinned_false": "", "action_false": "",
"action-pinned_true": "" "action_true": ""
} }
} }
} }

View File

@ -139,7 +139,7 @@
}, },
"expiration": { "expiration": {
"expired": "Voto scaduto", "expired": "Voto scaduto",
"until": "Scade in <0 />" "until": "Scade <0 />"
} }
} }
} }

View File

@ -3,10 +3,12 @@
"account": { "account": {
"title": "", "title": "",
"mute": { "mute": {
"action": "사용자 음소거" "action_false": "사용자 음소거",
"action_true": ""
}, },
"block": { "block": {
"action": "사용자 차단" "action_false": "사용자 차단",
"action_true": ""
}, },
"reports": { "reports": {
"action": "사용자 신고" "action": "사용자 신고"
@ -59,12 +61,12 @@
} }
}, },
"mute": { "mute": {
"action-muted_false": "", "action_false": "",
"action-muted_true": "" "action_true": ""
}, },
"pin": { "pin": {
"action-pinned_false": "", "action_false": "",
"action-pinned_true": "" "action_true": ""
} }
} }
} }

View File

@ -3,10 +3,12 @@
"account": { "account": {
"title": "Ações do Usuário", "title": "Ações do Usuário",
"mute": { "mute": {
"action": "Silenciar usuário" "action_false": "Silenciar usuário",
"action_true": "Desativar o silêncio do usuário"
}, },
"block": { "block": {
"action": "Bloquear usuário" "action_false": "Bloquear usuário",
"action_true": "Desbloquear usuário"
}, },
"reports": { "reports": {
"action": "Denunciar usuário" "action": "Denunciar usuário"
@ -59,12 +61,12 @@
} }
}, },
"mute": { "mute": {
"action-muted_false": "Silenciar este toot e respostas", "action_false": "Silenciar este toot e respostas",
"action-muted_true": "Desbloquear este toot e respostas" "action_true": "Desbloquear este toot e respostas"
}, },
"pin": { "pin": {
"action-pinned_false": "Toot fixado", "action_false": "Toot fixado",
"action-pinned_true": "Desafixar toot" "action_true": "Desafixar toot"
} }
} }
} }

View File

@ -139,7 +139,7 @@
}, },
"expiration": { "expiration": {
"expired": "Voto expirado", "expired": "Voto expirado",
"until": "Expira em <0 />" "until": "Expira <0 />"
} }
} }
} }

View File

@ -3,10 +3,12 @@
"account": { "account": {
"title": "Hành động người dùng", "title": "Hành động người dùng",
"mute": { "mute": {
"action": "Ẩn người này" "action_false": "Ẩn người này",
"action_true": "Tương tác người dùng"
}, },
"block": { "block": {
"action": "Chặn người này" "action_false": "Chặn người này",
"action_true": "Bỏ chặn người dùng"
}, },
"reports": { "reports": {
"action": "Báo cáo" "action": "Báo cáo"
@ -59,12 +61,12 @@
} }
}, },
"mute": { "mute": {
"action-muted_false": "Ẩn tút này", "action_false": "Ẩn tút này",
"action-muted_true": "Bỏ ẩn tút này" "action_true": "Bỏ ẩn tút này"
}, },
"pin": { "pin": {
"action-pinned_false": "Tút ghim", "action_false": "Tút ghim",
"action-pinned_true": "Bỏ ghim tút" "action_true": "Bỏ ghim tút"
} }
} }
} }

View File

@ -139,7 +139,7 @@
}, },
"expiration": { "expiration": {
"expired": "Đã kết thúc", "expired": "Đã kết thúc",
"until": "Kết thúc sau <0 />" "until": "Kết thúc <0 />"
} }
} }
} }

View File

@ -3,10 +3,12 @@
"account": { "account": {
"title": "用户操作", "title": "用户操作",
"mute": { "mute": {
"action": "静音用户" "action_false": "静音用户",
"action_true": "取消静音用户"
}, },
"block": { "block": {
"action": "屏蔽用户" "action_false": "屏蔽用户",
"action_true": "取消屏蔽用户"
}, },
"reports": { "reports": {
"action": "举报用户" "action": "举报用户"
@ -59,12 +61,12 @@
} }
}, },
"mute": { "mute": {
"action-muted_false": "静音嘟文及回复", "action_false": "静音嘟文及回复",
"action-muted_true": "取消静音嘟文及回复" "action_true": "取消静音嘟文及回复"
}, },
"pin": { "pin": {
"action-pinned_false": "置顶嘟文", "action_false": "置顶嘟文",
"action-pinned_true": "取消置顶嘟文" "action_true": "取消置顶嘟文"
} }
} }
} }

View File

@ -3,10 +3,12 @@
"account": { "account": {
"title": "", "title": "",
"mute": { "mute": {
"action": "" "action_false": "",
"action_true": ""
}, },
"block": { "block": {
"action": "" "action_false": "",
"action_true": ""
}, },
"reports": { "reports": {
"action": "" "action": ""
@ -59,12 +61,12 @@
} }
}, },
"mute": { "mute": {
"action-muted_false": "", "action_false": "",
"action-muted_true": "" "action_true": ""
}, },
"pin": { "pin": {
"action-pinned_false": "", "action_false": "",
"action-pinned_true": "" "action_true": ""
} }
} }
} }