mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
* Adds loadAll action to redux entity config * API Client get invites * Add invites to the user management page * Updates user block styles on user management page * Submit modal form on enter * Modify details form styles * Enter submits edit user form * Removes unused admin dashboard page * API Client - revoke invites * Delete invite entities in redux * Revoke invites from admin manage users page * Show success flash message after user invite is revoked
57 lines
1.3 KiB
JavaScript
57 lines
1.3 KiB
JavaScript
import Style from '../../styles';
|
|
|
|
const { color, padding } = Style;
|
|
|
|
export default {
|
|
containerStyles: (alertType) => {
|
|
const successAlert = { backgroundColor: color.success };
|
|
const errorAlert = { backgroundColor: color.alert };
|
|
const baseStyles = {
|
|
alignItems: 'center',
|
|
color: color.white,
|
|
display: 'flex',
|
|
height: '50px',
|
|
justifyContent: 'space-between',
|
|
paddingLeft: padding.half,
|
|
paddingRight: padding.half,
|
|
position: 'fixed',
|
|
left: '223px',
|
|
right: 0,
|
|
top: 0,
|
|
zIndex: '2',
|
|
'@media (max-width: 760px)': {
|
|
left: '54px',
|
|
},
|
|
};
|
|
|
|
if (alertType === 'success') {
|
|
return { ...baseStyles, ...successAlert };
|
|
}
|
|
|
|
if (alertType === 'error') {
|
|
return { ...baseStyles, ...errorAlert };
|
|
}
|
|
|
|
return {};
|
|
},
|
|
contentStyles: {},
|
|
flashActionStyles: {
|
|
display: 'flex',
|
|
justifyContent: 'space-between',
|
|
width: '96px',
|
|
},
|
|
removeFlashMessageStyles: (alertType) => {
|
|
const backgroundColor = alertType === 'success' ? color.successLight : color.alertLight;
|
|
return {
|
|
backgroundColor,
|
|
borderRadius: '50%',
|
|
cursor: 'pointer',
|
|
height: '30px',
|
|
textAlign: 'center',
|
|
width: '30px',
|
|
};
|
|
},
|
|
undoStyles: {
|
|
cursor: 'pointer',
|
|
},
|
|
};
|