mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
* moves login page styles to reusable component * Redirects successful login to homepage after 3s * Adds logout form * Adds logout page * Adds logout link to homepage * Adds gravatarURL to logged in user * Configure API Client to hit /me endpoint * Fetch user when the app loads * Configured API Client to make logout requests * Handle logout flow in redux * Logout form styles * Logout user when the logout form is submitted
44 lines
993 B
JavaScript
44 lines
993 B
JavaScript
import styles from '../../../styles';
|
|
|
|
const { border, color, font, padding } = styles;
|
|
const FORM_WIDTH = '460px';
|
|
|
|
export default {
|
|
avatarStyles: {
|
|
borderWidth: '1px',
|
|
borderStyle: 'solid',
|
|
borderColor: color.brand,
|
|
borderRadius: '50%',
|
|
},
|
|
containerStyles: {
|
|
alignItems: 'center',
|
|
backgroundColor: color.white,
|
|
borderTopLeftRadius: border.radius.base,
|
|
borderTopRightRadius: border.radius.base,
|
|
boxSizing: 'border-box',
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
padding: padding.base,
|
|
width: FORM_WIDTH,
|
|
minHeight: '350px',
|
|
},
|
|
formStyles: {
|
|
boxShadow: '0 5px 30px 0 rgba(0,0,0,0.30)',
|
|
},
|
|
submitButtonStyles: {
|
|
width: FORM_WIDTH,
|
|
},
|
|
subtextStyles: {
|
|
color: color.textLight,
|
|
fontSize: font.medium,
|
|
marginTop: padding.half,
|
|
},
|
|
usernameStyles: {
|
|
color: color.brand,
|
|
fontSize: font.large,
|
|
marginBottom: padding.half,
|
|
marginTop: padding.half,
|
|
textTransform: 'uppercase',
|
|
},
|
|
};
|
|
|