improve the flash message verbiage when deleting a user from the userspage and standardized the duration time for flash messages to be 4s
parent
ac7a9a4e2a
commit
91317a164d
|
@ -165,13 +165,14 @@ export const deleteUserAsync = (
|
|||
) => async dispatch => {
|
||||
dispatch(removeUser(user))
|
||||
try {
|
||||
console.log(user)
|
||||
await deleteUserAJAX(user)
|
||||
dispatch(
|
||||
publishAutoDismissingNotification(
|
||||
'success',
|
||||
`User removed from ${isAbsoluteDelete
|
||||
`${user.name} has been removed from ${isAbsoluteDelete
|
||||
? 'all organizations and deleted'
|
||||
: 'organization'}: ${user.scheme}::${user.provider}::${user.name}`
|
||||
: 'the current organization'}`
|
||||
)
|
||||
)
|
||||
} catch (error) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import {getLinksAsync} from 'shared/actions/links'
|
|||
import {publishAutoDismissingNotification} from 'shared/dispatchers'
|
||||
import {errorThrown} from 'shared/actions/errors'
|
||||
|
||||
import {LONG_NOTIFICATION_DISMISS_DELAY} from 'shared/constants'
|
||||
import {NOTIFICATION_DISMISS_DELAY} from 'shared/constants'
|
||||
|
||||
export const authExpired = auth => ({
|
||||
type: 'AUTH_EXPIRED',
|
||||
|
@ -96,7 +96,7 @@ export const meChangeOrganizationAsync = (
|
|||
'success',
|
||||
`Now logged in to '${me.currentOrganization
|
||||
.name}' as '${currentRole.name}'`,
|
||||
LONG_NOTIFICATION_DISMISS_DELAY
|
||||
NOTIFICATION_DISMISS_DELAY
|
||||
)
|
||||
)
|
||||
dispatch(meChangeOrganizationCompleted())
|
||||
|
|
|
@ -386,8 +386,7 @@ export const HEARTBEAT_INTERVAL = 10000 // ms
|
|||
export const PRESENTATION_MODE_ANIMATION_DELAY = 0 // In milliseconds.
|
||||
export const PRESENTATION_MODE_NOTIFICATION_DELAY = 2000 // In milliseconds.
|
||||
|
||||
export const SHORT_NOTIFICATION_DISMISS_DELAY = 2000 // in milliseconds
|
||||
export const LONG_NOTIFICATION_DISMISS_DELAY = 4000 // in milliseconds
|
||||
export const NOTIFICATION_DISMISS_DELAY = 4000 // in milliseconds
|
||||
|
||||
export const REVERT_STATE_DELAY = 1500 // ms
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
import {delayEnablePresentationMode} from 'shared/actions/app'
|
||||
|
||||
import {PRESENTATION_MODE_NOTIFICATION_DELAY} from 'shared/constants'
|
||||
import {SHORT_NOTIFICATION_DISMISS_DELAY} from 'shared/constants'
|
||||
import {NOTIFICATION_DISMISS_DELAY} from 'shared/constants'
|
||||
|
||||
export function delayDismissNotification(type, delay) {
|
||||
return dispatch => {
|
||||
|
@ -16,7 +16,7 @@ export function delayDismissNotification(type, delay) {
|
|||
export const publishAutoDismissingNotification = (
|
||||
type,
|
||||
message,
|
||||
delay = SHORT_NOTIFICATION_DISMISS_DELAY
|
||||
delay = NOTIFICATION_DISMISS_DELAY
|
||||
) => dispatch => {
|
||||
dispatch(publishNotification(type, message))
|
||||
dispatch(delayDismissNotification(type, delay))
|
||||
|
|
Loading…
Reference in New Issue