Skip to content
Snippets Groups Projects
Commit 651d6a38 authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

fix(footer): add mailto in footer; fix paddings

parent 90dd9820
No related branches found
No related tags found
1 merge request!43Sprint #19
...@@ -145,3 +145,20 @@ export const currentUserIsReviewer = (state, fragmentId) => { ...@@ -145,3 +145,20 @@ export const currentUserIsReviewer = (state, fragmentId) => {
i.isAccepted, i.isAccepted,
) )
} }
export const getAdminUsers = state =>
chain(state)
.get('users.users')
.map(u => {
let sortValue = -1
if (u.isActive) sortValue = 1
if (!u.isConfirmed) sortValue = 0
return {
user: u,
sortValue,
}
})
.sortBy('sortValue')
.map(s => s.user)
.reverse()
.value()
import React from 'react' import React from 'react'
import { get } from 'lodash'
import styled from 'styled-components' import styled from 'styled-components'
import { th } from '@pubsweet/ui-toolkit' import { th } from '@pubsweet/ui-toolkit'
import { withJournal } from 'xpub-journal'
import { ActionLink, Row, Text } from './' import { ActionLink, Row, Text } from './'
const Footer = () => ( const Footer = ({ journal }) => (
<Root alignItems="center" justify="center"> <Root alignItems="center" justify="center">
<ActionLink to="https://hindawi.com">Hindawi</ActionLink> <ActionLink to="https://hindawi.com">Hindawi</ActionLink>
<ActionLink ml={4} to="https://www.hindawi.com/privacy/"> <ActionLink ml={3} to="https://www.hindawi.com/privacy/">
Privacy Policy Privacy Policy
</ActionLink> </ActionLink>
<ActionLink ml={4} to="https://www.hindawi.com/terms/"> <ActionLink ml={3} to="https://www.hindawi.com/terms/">
Terms of Service Terms of Service
</ActionLink> </ActionLink>
<Text ml={4} secondary> <Text ml={4} secondary>
{`Support: `} {`Support: `}
<ActionLink to="https://hindawi.com">bca@hindawi.com</ActionLink> <ActionLink to={`mailto:${get(journal, 'metadata.email')}`}>
{get(journal, 'metadata.email')}
</ActionLink>
</Text> </Text>
</Root> </Root>
) )
export default Footer export default withJournal(Footer)
const Root = styled(Row)` const Root = styled(Row)`
background-color: ${th('colorBackground')}; background-color: ${th('colorBackground')};
......
...@@ -8,6 +8,7 @@ import { actions } from 'pubsweet-client' ...@@ -8,6 +8,7 @@ import { actions } from 'pubsweet-client'
import { ConnectPage } from 'xpub-connect' import { ConnectPage } from 'xpub-connect'
import { withJournal } from 'xpub-journal' import { withJournal } from 'xpub-journal'
import { compose, withHandlers, withProps } from 'recompose' import { compose, withHandlers, withProps } from 'recompose'
import { getAdminUsers } from 'pubsweet-component-faraday-selectors'
import { import {
Row, Row,
...@@ -141,9 +142,14 @@ const Users = ({ ...@@ -141,9 +142,14 @@ const Users = ({
export default compose( export default compose(
ConnectPage(() => [actions.getUsers()]), ConnectPage(() => [actions.getUsers()]),
connect(state => ({ items: get(state, 'users.users') }), { connect(
getUsers: actions.getUsers, state => ({
}), items: getAdminUsers(state),
}),
{
getUsers: actions.getUsers,
},
),
withJournal, withJournal,
withFetching, withFetching,
withPagination, withPagination,
......
...@@ -56,7 +56,7 @@ export default compose( ...@@ -56,7 +56,7 @@ export default compose(
// #region styles // #region styles
const Root = styled.div` const Root = styled.div`
max-height: calc(100vh - ${th('gridUnit')} * 23); max-height: calc(100vh - ${th('gridUnit')} * 25);
overflow-y: auto; overflow-y: auto;
padding-right: ${th('gridUnit')}; padding-right: ${th('gridUnit')};
overflow-x: hidden; overflow-x: hidden;
......
...@@ -18,7 +18,7 @@ const SignUpInvitation = ({ ...@@ -18,7 +18,7 @@ const SignUpInvitation = ({
initialValues, initialValues,
title = 'Add New Account Details', title = 'Add New Account Details',
}) => ( }) => (
<ShadowedBox center mt={10}> <ShadowedBox center mb={3} mt={10}>
<H2>{title}</H2> <H2>{title}</H2>
{error && <Text error>Token expired or Something went wrong.</Text>} {error && <Text error>Token expired or Something went wrong.</Text>}
{step === 0 && ( {step === 0 && (
......
...@@ -93,7 +93,7 @@ const Root = styled.div` ...@@ -93,7 +93,7 @@ const Root = styled.div`
const appBarPaddingHelper = props => const appBarPaddingHelper = props =>
props.canCreateDraft props.canCreateDraft
? css` ? css`
padding-top: calc(${th('appBar.height')}); padding-top: calc(${th('appBar.height')} + ${th('gridUnit')});
padding-right: calc(${th('gridUnit')} * 12); padding-right: calc(${th('gridUnit')} * 12);
padding-left: calc(${th('gridUnit')} * 12); padding-left: calc(${th('gridUnit')} * 12);
padding-bottom: calc(${th('gridUnit')} * 5); padding-bottom: calc(${th('gridUnit')} * 5);
...@@ -104,7 +104,7 @@ const appBarPaddingHelper = props => ...@@ -104,7 +104,7 @@ const appBarPaddingHelper = props =>
} }
` `
: css` : css`
padding-top: calc(${th('appBar.height')} + ${th('gridUnit')} * 3); padding-top: calc(${th('appBar.height')} + ${th('gridUnit')} * 4);
padding-right: calc(${th('gridUnit')} * 12); padding-right: calc(${th('gridUnit')} * 12);
padding-left: calc(${th('gridUnit')} * 12); padding-left: calc(${th('gridUnit')} * 12);
padding-bottom: calc(${th('gridUnit')} * 5); padding-bottom: calc(${th('gridUnit')} * 5);
......
...@@ -2,13 +2,13 @@ module.exports = { ...@@ -2,13 +2,13 @@ module.exports = {
issn: '2474-7394', issn: '2474-7394',
logo: '/assets/logo-hindawi@2x.png', logo: '/assets/logo-hindawi@2x.png',
nameText: 'Bioinorganic Chemistry and Applications', nameText: 'Bioinorganic Chemistry and Applications',
email: 'hindawi+staff@thinslices.com', email: 'bca.support@hindawi.com',
mts: { mts: {
doctype: 'article SYSTEM "JATS-archivearticle1-mathml3.dtd"', doctype: 'article SYSTEM "JATS-archivearticle1-mathml3.dtd"',
dtdVersion: '1.1d1', dtdVersion: '1.1d1',
articleType: 'Research Article', articleType: 'Research Article',
journalIdPublisher: 'research', journalIdPublisher: 'research',
email: 'hindawi+staff@thinslices.com', email: 'bca.support@hindawi.com',
journalTitle: 'Bioinorganic Chemistry and Applications', journalTitle: 'Bioinorganic Chemistry and Applications',
issn: '2474-7394', issn: '2474-7394',
prefix: 'RESEARCH-BCA-', prefix: 'RESEARCH-BCA-',
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment