mirror of https://github.com/tooot-app/app
commit
264fe23d22
|
@ -5,7 +5,7 @@ import { StyleConstants } from '@utils/styles/constants'
|
|||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import { ColorDefinitions } from '@utils/styles/themes'
|
||||
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 { State, Switch, TapGestureHandler } from 'react-native-gesture-handler'
|
||||
|
||||
|
@ -61,7 +61,7 @@ const MenuRow: React.FC<Props> = ({
|
|||
|
||||
return (
|
||||
<View
|
||||
style={styles.base}
|
||||
style={{ minHeight: 50 }}
|
||||
accessible
|
||||
accessibilityRole={switchValue ? 'switch' : 'button'}
|
||||
accessibilityState={switchValue ? { checked: switchValue } : undefined}
|
||||
|
@ -78,14 +78,26 @@ const MenuRow: React.FC<Props> = ({
|
|||
}}
|
||||
>
|
||||
<View style={{ flex: 1 }}>
|
||||
<View style={styles.core}>
|
||||
<View style={styles.front}>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
paddingTop: StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
flex: 3,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center'
|
||||
}}
|
||||
>
|
||||
{iconFront && (
|
||||
<Icon
|
||||
name={iconFront}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
color={colors[iconFrontColor]}
|
||||
style={styles.iconFront}
|
||||
style={{ marginRight: StyleConstants.Spacing.S }}
|
||||
/>
|
||||
)}
|
||||
{badge ? (
|
||||
|
@ -99,7 +111,7 @@ const MenuRow: React.FC<Props> = ({
|
|||
}}
|
||||
/>
|
||||
) : null}
|
||||
<View style={styles.main}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<CustomText
|
||||
fontStyle='M'
|
||||
style={{ color: colors.primaryDefault }}
|
||||
|
@ -111,7 +123,15 @@ const MenuRow: React.FC<Props> = ({
|
|||
</View>
|
||||
|
||||
{content || switchValue !== undefined || iconBack ? (
|
||||
<View style={styles.back}>
|
||||
<View
|
||||
style={{
|
||||
flexShrink: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-end',
|
||||
alignItems: 'center',
|
||||
marginLeft: StyleConstants.Spacing.M
|
||||
}}
|
||||
>
|
||||
{content ? (
|
||||
typeof content === 'string' ? (
|
||||
<CustomText
|
||||
|
@ -141,7 +161,7 @@ const MenuRow: React.FC<Props> = ({
|
|||
name={iconBack}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
color={colors[iconBackColor]}
|
||||
style={[styles.iconBack, { opacity: loading ? 0 : 1 }]}
|
||||
style={{ marginLeft: 8, opacity: loading ? 0 : 1 }}
|
||||
/>
|
||||
) : null}
|
||||
{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
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{
|
||||
"accessibilityHint": "Funktionen für diesen Tröt - wie z. B. Autor und Originaltröt",
|
||||
"account": {
|
||||
"title": "",
|
||||
"title": "Benutzeraktionen",
|
||||
"mute": {
|
||||
"action": "Profil stummschalten"
|
||||
"action_false": "Profil stummschalten",
|
||||
"action_true": ""
|
||||
},
|
||||
"block": {
|
||||
"action": "Nutzer blockieren"
|
||||
"action_false": "Nutzer blockieren",
|
||||
"action_true": ""
|
||||
},
|
||||
"reports": {
|
||||
"action": "User melden"
|
||||
|
@ -59,12 +61,12 @@
|
|||
}
|
||||
},
|
||||
"mute": {
|
||||
"action-muted_false": "",
|
||||
"action-muted_true": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
},
|
||||
"pin": {
|
||||
"action-pinned_false": "",
|
||||
"action-pinned_true": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -139,7 +139,7 @@
|
|||
},
|
||||
"expiration": {
|
||||
"expired": "Abstimmung abgelaufen",
|
||||
"until": "Läuft in <0 /> ab"
|
||||
"until": "Läuft <0 /> ab"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
"account": {
|
||||
"title": "",
|
||||
"mute": {
|
||||
"action": "Muta utente"
|
||||
"action_false": "Muta utente",
|
||||
"action_true": ""
|
||||
},
|
||||
"block": {
|
||||
"action": "Blocca utente"
|
||||
"action_false": "Blocca utente",
|
||||
"action_true": ""
|
||||
},
|
||||
"reports": {
|
||||
"action": "Segnala utente"
|
||||
|
@ -59,12 +61,12 @@
|
|||
}
|
||||
},
|
||||
"mute": {
|
||||
"action-muted_false": "",
|
||||
"action-muted_true": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
},
|
||||
"pin": {
|
||||
"action-pinned_false": "",
|
||||
"action-pinned_true": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -139,7 +139,7 @@
|
|||
},
|
||||
"expiration": {
|
||||
"expired": "Voto scaduto",
|
||||
"until": "Scade in <0 />"
|
||||
"until": "Scade <0 />"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
"account": {
|
||||
"title": "",
|
||||
"mute": {
|
||||
"action": "사용자 음소거"
|
||||
"action_false": "사용자 음소거",
|
||||
"action_true": ""
|
||||
},
|
||||
"block": {
|
||||
"action": "사용자 차단"
|
||||
"action_false": "사용자 차단",
|
||||
"action_true": ""
|
||||
},
|
||||
"reports": {
|
||||
"action": "사용자 신고"
|
||||
|
@ -59,12 +61,12 @@
|
|||
}
|
||||
},
|
||||
"mute": {
|
||||
"action-muted_false": "",
|
||||
"action-muted_true": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
},
|
||||
"pin": {
|
||||
"action-pinned_false": "",
|
||||
"action-pinned_true": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,10 +3,12 @@
|
|||
"account": {
|
||||
"title": "Ações do Usuário",
|
||||
"mute": {
|
||||
"action": "Silenciar usuário"
|
||||
"action_false": "Silenciar usuário",
|
||||
"action_true": "Desativar o silêncio do usuário"
|
||||
},
|
||||
"block": {
|
||||
"action": "Bloquear usuário"
|
||||
"action_false": "Bloquear usuário",
|
||||
"action_true": "Desbloquear usuário"
|
||||
},
|
||||
"reports": {
|
||||
"action": "Denunciar usuário"
|
||||
|
@ -59,12 +61,12 @@
|
|||
}
|
||||
},
|
||||
"mute": {
|
||||
"action-muted_false": "Silenciar este toot e respostas",
|
||||
"action-muted_true": "Desbloquear este toot e respostas"
|
||||
"action_false": "Silenciar este toot e respostas",
|
||||
"action_true": "Desbloquear este toot e respostas"
|
||||
},
|
||||
"pin": {
|
||||
"action-pinned_false": "Toot fixado",
|
||||
"action-pinned_true": "Desafixar toot"
|
||||
"action_false": "Toot fixado",
|
||||
"action_true": "Desafixar toot"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -139,7 +139,7 @@
|
|||
},
|
||||
"expiration": {
|
||||
"expired": "Voto expirado",
|
||||
"until": "Expira em <0 />"
|
||||
"until": "Expira <0 />"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
"account": {
|
||||
"title": "Hành động người dùng",
|
||||
"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": {
|
||||
"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": {
|
||||
"action": "Báo cáo"
|
||||
|
@ -59,12 +61,12 @@
|
|||
}
|
||||
},
|
||||
"mute": {
|
||||
"action-muted_false": "Ẩn tút này",
|
||||
"action-muted_true": "Bỏ ẩn tút này"
|
||||
"action_false": "Ẩn tút này",
|
||||
"action_true": "Bỏ ẩn tút này"
|
||||
},
|
||||
"pin": {
|
||||
"action-pinned_false": "Tút ghim",
|
||||
"action-pinned_true": "Bỏ ghim tút"
|
||||
"action_false": "Tút ghim",
|
||||
"action_true": "Bỏ ghim tút"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -139,7 +139,7 @@
|
|||
},
|
||||
"expiration": {
|
||||
"expired": "Đã kết thúc",
|
||||
"until": "Kết thúc sau <0 />"
|
||||
"until": "Kết thúc <0 />"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
"account": {
|
||||
"title": "用户操作",
|
||||
"mute": {
|
||||
"action": "静音用户"
|
||||
"action_false": "静音用户",
|
||||
"action_true": "取消静音用户"
|
||||
},
|
||||
"block": {
|
||||
"action": "屏蔽用户"
|
||||
"action_false": "屏蔽用户",
|
||||
"action_true": "取消屏蔽用户"
|
||||
},
|
||||
"reports": {
|
||||
"action": "举报用户"
|
||||
|
@ -59,12 +61,12 @@
|
|||
}
|
||||
},
|
||||
"mute": {
|
||||
"action-muted_false": "静音嘟文及回复",
|
||||
"action-muted_true": "取消静音嘟文及回复"
|
||||
"action_false": "静音嘟文及回复",
|
||||
"action_true": "取消静音嘟文及回复"
|
||||
},
|
||||
"pin": {
|
||||
"action-pinned_false": "置顶嘟文",
|
||||
"action-pinned_true": "取消置顶嘟文"
|
||||
"action_false": "置顶嘟文",
|
||||
"action_true": "取消置顶嘟文"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,10 +3,12 @@
|
|||
"account": {
|
||||
"title": "",
|
||||
"mute": {
|
||||
"action": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
},
|
||||
"block": {
|
||||
"action": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
},
|
||||
"reports": {
|
||||
"action": ""
|
||||
|
@ -59,12 +61,12 @@
|
|||
}
|
||||
},
|
||||
"mute": {
|
||||
"action-muted_false": "",
|
||||
"action-muted_true": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
},
|
||||
"pin": {
|
||||
"action-pinned_false": "",
|
||||
"action-pinned_true": ""
|
||||
"action_false": "",
|
||||
"action_true": ""
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue