mirror of https://github.com/tooot-app/app
Compare commits
2 Commits
242b11761b
...
c94ef1882b
Author | SHA1 | Date |
---|---|---|
Zhiyuan Zheng | c94ef1882b | |
Zhiyuan Zheng | 6b4c2d18ec |
|
@ -14,11 +14,11 @@ name: "CodeQL"
|
|||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '35 4 * * 4'
|
||||
# pull_request:
|
||||
# # The branches below must be a subset of the branches above
|
||||
# branches: [ main ]
|
||||
# schedule:
|
||||
# - cron: '35 4 * * 4'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
|
|
|
@ -376,10 +376,12 @@ declare namespace Mastodon {
|
|||
endpoint: string
|
||||
alerts: {
|
||||
follow: boolean
|
||||
follow_request: boolean
|
||||
favourite: boolean
|
||||
reblog: boolean
|
||||
mention: boolean
|
||||
poll: boolean
|
||||
status: boolean
|
||||
}
|
||||
server_key: string
|
||||
}
|
||||
|
|
|
@ -169,6 +169,9 @@
|
|||
"follow": {
|
||||
"heading": "New follower"
|
||||
},
|
||||
"follow_request": {
|
||||
"heading": "Follow request"
|
||||
},
|
||||
"favourite": {
|
||||
"heading": "Favourited"
|
||||
},
|
||||
|
@ -181,6 +184,9 @@
|
|||
"poll": {
|
||||
"heading": "Poll updates"
|
||||
},
|
||||
"status": {
|
||||
"heading": "Toot from subscribed users"
|
||||
},
|
||||
"howitworks": "Learn how routing works"
|
||||
},
|
||||
"root": {
|
||||
|
|
|
@ -73,12 +73,22 @@ const TabMePush: React.FC = () => {
|
|||
const alerts = useMemo(() => {
|
||||
return instancePush?.alerts
|
||||
? (
|
||||
['follow', 'favourite', 'reblog', 'mention', 'poll'] as [
|
||||
[
|
||||
'follow',
|
||||
'follow_request',
|
||||
'favourite',
|
||||
'reblog',
|
||||
'mention',
|
||||
'poll'
|
||||
'poll',
|
||||
'status'
|
||||
] as [
|
||||
'follow',
|
||||
'follow_request',
|
||||
'favourite',
|
||||
'reblog',
|
||||
'mention',
|
||||
'poll',
|
||||
'status'
|
||||
]
|
||||
).map(alert => (
|
||||
<MenuRow
|
||||
|
|
|
@ -14,7 +14,7 @@ import { useDispatch, useSelector } from 'react-redux'
|
|||
|
||||
const TabMeSettingsLanguage: React.FC<
|
||||
TabMeStackScreenProps<'Tab-Me-Settings-Language'>
|
||||
> = () => {
|
||||
> = ({ navigation }) => {
|
||||
const { i18n, t } = useTranslation('screenTabs')
|
||||
const languages = Object.entries(LOCALES)
|
||||
const instances = useSelector(getInstances)
|
||||
|
@ -72,6 +72,8 @@ const TabMeSettingsLanguage: React.FC<
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
navigation.pop(1)
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
} from '@utils/slices/instancesSlice'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React, { useMemo } from 'react'
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { View } from 'react-native'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
@ -35,23 +35,6 @@ const AccountInformationAccount: React.FC<Props> = ({
|
|||
options: { enabled: account !== undefined }
|
||||
})
|
||||
|
||||
const movedContent = useMemo(() => {
|
||||
if (account?.moved) {
|
||||
return (
|
||||
<CustomText
|
||||
fontStyle='M'
|
||||
style={{
|
||||
marginLeft: StyleConstants.Spacing.S,
|
||||
color: colors.secondary
|
||||
}}
|
||||
selectable
|
||||
>
|
||||
@{account.moved.acct}
|
||||
</CustomText>
|
||||
)
|
||||
}
|
||||
}, [account?.moved])
|
||||
|
||||
if (account || (localInstance && instanceAccount)) {
|
||||
return (
|
||||
<View
|
||||
|
@ -62,23 +45,24 @@ const AccountInformationAccount: React.FC<Props> = ({
|
|||
marginBottom: StyleConstants.Spacing.L
|
||||
}}
|
||||
>
|
||||
<CustomText
|
||||
fontStyle='M'
|
||||
style={{
|
||||
textDecorationLine: account?.moved ? 'line-through' : undefined,
|
||||
color: colors.secondary
|
||||
}}
|
||||
selectable
|
||||
>
|
||||
@{localInstance ? instanceAccount?.acct : account?.acct}
|
||||
{localInstance ? `@${instanceUri}` : null}
|
||||
</CustomText>
|
||||
{relationship?.followed_by ? (
|
||||
<CustomText fontStyle='M' style={{ color: colors.secondary }}>
|
||||
{t('shared.account.followed_by')}
|
||||
<CustomText fontStyle='M' style={{ color: colors.secondary }}>
|
||||
{account?.moved ? (
|
||||
<>
|
||||
{' '}
|
||||
<CustomText selectable>@{account.moved.acct}</CustomText>
|
||||
</>
|
||||
) : null}
|
||||
<CustomText
|
||||
style={{
|
||||
textDecorationLine: account?.moved ? 'line-through' : undefined
|
||||
}}
|
||||
selectable
|
||||
>
|
||||
@{localInstance ? instanceAccount?.acct : account?.acct}
|
||||
{localInstance ? `@${instanceUri}` : null}
|
||||
</CustomText>
|
||||
) : null}
|
||||
{movedContent}
|
||||
{relationship?.followed_by ? t('shared.account.followed_by') : null}
|
||||
</CustomText>
|
||||
{account?.locked ? (
|
||||
<Icon
|
||||
name='Lock'
|
||||
|
|
|
@ -110,6 +110,20 @@ const instancesMigration = {
|
|||
...instance.notifications_filter,
|
||||
status: true,
|
||||
update: true
|
||||
},
|
||||
push: {
|
||||
...instance.push,
|
||||
alerts: {
|
||||
...instance.push.alerts,
|
||||
follow_request: {
|
||||
loading: false,
|
||||
value: true
|
||||
},
|
||||
status: {
|
||||
loading: false,
|
||||
value: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -38,6 +38,10 @@ export type InstanceV10 = {
|
|||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['follow']
|
||||
}
|
||||
follow_request: {
|
||||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['follow_request']
|
||||
}
|
||||
favourite: {
|
||||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['favourite']
|
||||
|
@ -54,6 +58,10 @@ export type InstanceV10 = {
|
|||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['poll']
|
||||
}
|
||||
status: {
|
||||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['status']
|
||||
}
|
||||
}
|
||||
keys: {
|
||||
auth?: string
|
||||
|
|
|
@ -94,10 +94,12 @@ const addInstance = createAsyncThunk(
|
|||
decode: { loading: false, value: false },
|
||||
alerts: {
|
||||
follow: { loading: false, value: true },
|
||||
follow_request: { loading: false, value: true },
|
||||
favourite: { loading: false, value: true },
|
||||
reblog: { loading: false, value: true },
|
||||
mention: { loading: false, value: true },
|
||||
poll: { loading: false, value: true }
|
||||
poll: { loading: false, value: true },
|
||||
status: { loading: false, value: true }
|
||||
},
|
||||
keys: { auth: undefined, public: undefined, private: undefined }
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue