mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Update color scheme
This commit is contained in:
@@ -27,7 +27,7 @@ const Core: React.FC<Props> = ({ text, destructive = false }) => {
|
||||
|
||||
return (
|
||||
<View style={styles.core}>
|
||||
<Text style={{ color: destructive ? theme.error : theme.primary }}>
|
||||
<Text style={{ color: destructive ? theme.red : theme.primary }}>
|
||||
{text}
|
||||
</Text>
|
||||
</View>
|
||||
|
@@ -36,7 +36,7 @@ const renderNode = ({
|
||||
<Text
|
||||
key={index}
|
||||
style={{
|
||||
color: theme.link,
|
||||
color: theme.blue,
|
||||
fontSize: StyleConstants.Font.Size[size]
|
||||
}}
|
||||
onPress={() => {
|
||||
@@ -55,7 +55,7 @@ const renderNode = ({
|
||||
<Text
|
||||
key={index}
|
||||
style={{
|
||||
color: theme.link,
|
||||
color: theme.blue,
|
||||
fontSize: StyleConstants.Font.Size[size]
|
||||
}}
|
||||
onPress={() => {
|
||||
@@ -79,7 +79,7 @@ const renderNode = ({
|
||||
<Text
|
||||
key={index}
|
||||
style={{
|
||||
color: theme.link,
|
||||
color: theme.blue,
|
||||
fontSize: StyleConstants.Font.Size[size]
|
||||
}}
|
||||
onPress={async () => await openLink(href)}
|
||||
@@ -87,7 +87,7 @@ const renderNode = ({
|
||||
<Feather
|
||||
name='external-link'
|
||||
size={StyleConstants.Font.Size[size]}
|
||||
color={theme.link}
|
||||
color={theme.blue}
|
||||
/>{' '}
|
||||
{showFullLink ? href : domain[1]}
|
||||
</Text>
|
||||
@@ -152,7 +152,7 @@ const ParseContent: React.FC<Props> = ({
|
||||
const [totalLines, setTotalLines] = useState<number | undefined>()
|
||||
const [lineHeight, setLineHeight] = useState<number | undefined>()
|
||||
const [shownLines, setShownLines] = useState(numberOfLines)
|
||||
// console.log(children)
|
||||
|
||||
return (
|
||||
<>
|
||||
<Text
|
||||
|
@@ -143,16 +143,19 @@ const TimelineActions: React.FC<Props> = ({
|
||||
}
|
||||
})
|
||||
}, [])
|
||||
const onPressReblog = useCallback(
|
||||
() =>
|
||||
const onPressReblog = useCallback(() => {
|
||||
if (status.visibility === 'private' || status.visibility === 'direct') {
|
||||
console.log('awjerio')
|
||||
toast({ type: 'error', content: '禁止转发' })
|
||||
} else {
|
||||
mutate({
|
||||
id: status.id,
|
||||
type: 'reblog',
|
||||
stateKey: 'reblogged',
|
||||
prevState: status.reblogged
|
||||
}),
|
||||
[status.reblogged]
|
||||
)
|
||||
})
|
||||
}
|
||||
}, [status.reblogged])
|
||||
const onPressFavourite = useCallback(
|
||||
() =>
|
||||
mutate({
|
||||
@@ -218,11 +221,7 @@ const TimelineActions: React.FC<Props> = ({
|
||||
() => (
|
||||
<Feather
|
||||
name='repeat'
|
||||
color={
|
||||
status.visibility === 'public' || status.visibility === 'unlisted'
|
||||
? iconColorAction(status.reblogged)
|
||||
: theme.disabled
|
||||
}
|
||||
color={iconColorAction(status.reblogged)}
|
||||
size={StyleConstants.Font.Size.M + 2}
|
||||
/>
|
||||
),
|
||||
@@ -270,11 +269,7 @@ const TimelineActions: React.FC<Props> = ({
|
||||
|
||||
<Pressable
|
||||
style={styles.action}
|
||||
onPress={
|
||||
status.visibility === 'public' || status.visibility === 'unlisted'
|
||||
? onPressReblog
|
||||
: null
|
||||
}
|
||||
onPress={onPressReblog}
|
||||
children={childrenReblog}
|
||||
/>
|
||||
|
||||
|
@@ -93,8 +93,8 @@ const AttachmentAudio: React.FC<Props> = ({ sensitiveShown, audio }) => {
|
||||
minimumValue={0}
|
||||
maximumValue={audio.meta.original.duration * 1000}
|
||||
value={audioPosition}
|
||||
minimumTrackTintColor={theme.secondary}
|
||||
maximumTrackTintColor={theme.disabled}
|
||||
minimumTrackTintColor={theme.primary}
|
||||
maximumTrackTintColor={theme.secondary}
|
||||
onSlidingStart={() => {
|
||||
audioPlayer?.pauseAsync()
|
||||
setAudioPlaying(false)
|
||||
|
@@ -53,6 +53,11 @@ const ToastBase = ({ config }: { config: Config }) => {
|
||||
error: 'x-circle',
|
||||
warning: 'alert-circle'
|
||||
}
|
||||
enum colorMapping {
|
||||
success = 'blue',
|
||||
error = 'red',
|
||||
warning = 'primary'
|
||||
}
|
||||
|
||||
return (
|
||||
<SafeAreaView
|
||||
@@ -65,7 +70,7 @@ const ToastBase = ({ config }: { config: Config }) => {
|
||||
<Feather
|
||||
// @ts-ignore
|
||||
name={iconSet[config.type]}
|
||||
color={theme[config.type]}
|
||||
color={theme[colorMapping[config.type]]}
|
||||
size={StyleConstants.Font.Size.M + 2}
|
||||
/>
|
||||
<View style={styles.texts}>
|
||||
|
Reference in New Issue
Block a user