1
0
mirror of https://github.com/tooot-app/app synced 2024-12-22 07:34:06 +01:00
This commit is contained in:
xmflsct 2022-12-16 10:35:31 +01:00
parent d3d2202caa
commit be4eaa93ee
5 changed files with 11 additions and 9 deletions

View File

@ -29,6 +29,8 @@ Please **do not** create a pull request to update translation. tooot's translati
[@janlindblom](https://github.com/janlindblom) for Swedish
[@ihoryan](https://crowdin.com/profile/ihoryan) for Ukrainian
[@duy@mas.to](https://mas.to/@duy) for Vietnamese translation
[@jimmyorz](https://github.com/jimmyorz) for Traditional Chinese translation

View File

@ -17,7 +17,6 @@ const openLink = async (url: string, navigation?: any) => {
const handleNavigation = (page: 'Tab-Shared-Toot' | 'Tab-Shared-Account', options: {}) => {
if (navigation) {
// @ts-ignore
navigation.push(page, options)
} else {
// @ts-ignore

View File

@ -231,6 +231,9 @@
"status": {
"heading": "Toot from subscribed users"
},
"update": {
"heading": "Reblog has been edited"
},
"admin.sign_up": {
"heading": "Admin: sign up"
},

View File

@ -62,10 +62,9 @@ const pushRegister = async (
'BMn2PLpZrMefG981elzG6SB1EY9gU7QZwmtZ/a/J2vUeWG+zXgeskMPwHh4T/bxsD4l7/8QT94F57CbZqYRRfJo='
)
formData.append('subscription[keys][auth]', auth)
Object.keys(alerts).map(key =>
// @ts-ignore
formData.append(`data[alerts][${key}]`, alerts[key].value.toString())
)
for (const [key, value] of Object.entries(alerts)) {
formData.append(`data[alerts][${key}]`, value.toString())
}
const res = await apiInstance<Mastodon.PushSubscription>({
method: 'post',

View File

@ -10,10 +10,9 @@ export const updateInstancePushAlert = createAsyncThunk(
alerts: InstanceLatest['push']['alerts']
}): Promise<InstanceLatest['push']['alerts']> => {
const formData = new FormData()
Object.keys(alerts).map(alert =>
// @ts-ignore
formData.append(`data[alerts][${alert}]`, alerts[alert].value.toString())
)
for (const [key, value] of Object.entries(alerts)) {
formData.append(`data[alerts][${key}]`, value.toString())
}
await apiInstance<Mastodon.PushSubscription>({
method: 'put',