1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Small fixes

This commit is contained in:
Zhiyuan Zheng
2021-03-22 00:04:47 +01:00
parent 63e8fb00e4
commit 544af1936c
9 changed files with 205 additions and 186 deletions

View File

@ -37,7 +37,7 @@ const TimelinePoll: React.FC<Props> = ({
sameAccount
}) => {
const { mode, theme } = useTheme()
const { t } = useTranslation('componentTimeline')
const { t, i18n } = useTranslation('componentTimeline')
const [allOptions, setAllOptions] = useState(
new Array(poll.options.length).fill(false)
@ -136,7 +136,14 @@ const TimelinePoll: React.FC<Props> = ({
)
}
}
}, [mode, poll.expired, poll.voted, allOptions, mutation.isLoading])
}, [
mode,
i18n.language,
poll.expired,
poll.voted,
allOptions,
mutation.isLoading
])
const pollExpiration = useMemo(() => {
if (poll.expired) {
@ -155,7 +162,7 @@ const TimelinePoll: React.FC<Props> = ({
</Text>
)
}
}, [mode, poll.expired, poll.expires_at])
}, [mode, i18n.language, poll.expired, poll.expires_at])
const isSelected = useCallback(
(index: number): string =>
@ -186,7 +193,9 @@ const TimelinePoll: React.FC<Props> = ({
<Text style={styles.optionText}>
<ParseEmojis content={option.title} emojis={poll.emojis} />
</Text>
<Text style={[styles.optionPercentage, { color: theme.primaryDefault }]}>
<Text
style={[styles.optionPercentage, { color: theme.primaryDefault }]}
>
{poll.votes_count
? Math.round(
(option.votes_count /

View File

@ -13,7 +13,7 @@ export default {
},
disclaimer: {
base:
"Logging in process uses system broswer that, your account informationo won't be visible to tooot app. Read more ",
"Logging in process uses system broswer that, your account information won't be visible to tooot app. Read more ",
privacy: 'privacy policy'
}
},

View File

@ -3,7 +3,8 @@ export default {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'ago',
suffixFromNow: 'from now',
// suffixFromNow: 'from now',
suffixFromNow: null,
seconds: '%d seconds',
minute: 'about a minute',
minutes: '%d minutes',

View File

@ -152,7 +152,7 @@ export default {
},
expiration: {
expired: 'Vote expired',
until: 'Open until <0 />'
until: 'Expires in <0 />'
}
}
}

View File

@ -1,5 +1,5 @@
export default {
heading: 'Toot font size',
heading: 'Toot Font Size',
content: {
showcase: 'Example toot',
demo:

View File

@ -1,5 +1,5 @@
export default {
heading: 'Switch account',
heading: 'Switch Account',
content: {
existing: 'Choose from logged in',
new: 'Log in to instance'

View File

@ -62,7 +62,7 @@ const ComposePoll: React.FC = () => {
? t('content.root.footer.poll.option.placeholder.multiple')
: t('content.root.footer.poll.option.placeholder.single')
}
placeholderTextColor={theme.secondary}
placeholderTextColor={theme.disabled}
maxLength={50}
// @ts-ignore
value={options[i]}