refine push notification ui and catch promises
This commit is contained in:
parent
3068252adf
commit
a17b4d1f1a
|
@ -951,7 +951,7 @@ export default {
|
|||
body: updatedItem.title ? updatedItem.title : updatedItem.text,
|
||||
data: { url: `/items/${updatedItem.id}` },
|
||||
tag: `TIP-${updatedItem.id}`
|
||||
})
|
||||
}).catch(console.error)
|
||||
|
||||
return {
|
||||
vote,
|
||||
|
@ -1212,7 +1212,7 @@ export const createMentions = async (item, models) => {
|
|||
body: item.text,
|
||||
data: { url: `/items/${item.id}` },
|
||||
tag: 'MENTION'
|
||||
})
|
||||
}).catch(console.error)
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
|
@ -298,7 +298,9 @@ function NotificationAlert () {
|
|||
: (
|
||||
<Form className='d-flex justify-content-end' initial={{ pushNotify: hasSubscription }}>
|
||||
<Checkbox
|
||||
name='pushNotify' label='push notifications' inline checked={hasSubscription} handleChange={async () => {
|
||||
name='pushNotify' label={<span className='text-muted'>push notifications</span>}
|
||||
groupClassName={`${styles.subFormGroup} mb-1 mr-sm-3 mr-0`}
|
||||
inline checked={hasSubscription} handleChange={async () => {
|
||||
await sw.togglePushSubscription().catch(setError)
|
||||
}}
|
||||
/>
|
||||
|
|
|
@ -22,4 +22,8 @@
|
|||
background-color: transparent;
|
||||
border: 0 solid transparent;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.subFormGroup > div {
|
||||
margin-right: 0 !important;
|
||||
}
|
Loading…
Reference in New Issue