Skip to content
Snippets Groups Projects
Commit cc34ab08 authored by Sebastian's avatar Sebastian
Browse files

Merge branch 'master' of gitlab.coko.foundation:xpub/xpub-faraday

parents f7fa51d6 9aeff29c
No related branches found
No related tags found
No related merge requests found
...@@ -66,5 +66,5 @@ demo:now: ...@@ -66,5 +66,5 @@ demo:now:
- npm i -g --unsafe-perm now - npm i -g --unsafe-perm now
- cd ${HOME}/now - cd ${HOME}/now
- echo "FROM ${IMAGE_ORG}/${IMAGE_NAME}:${CI_COMMIT_SHA}" >> Dockerfile - echo "FROM ${IMAGE_ORG}/${IMAGE_NAME}:${CI_COMMIT_SHA}" >> Dockerfile
- now --public --docker --token $NOW_TOKEN -e AWS_S3_ACCESS_KEY=$AWS_S3_ACCESS_KEY -e AWS_S3_SECRET_KEY=$AWS_S3_SECRET_KEY -e AWS_S3_REGION=$AWS_S3_REGION -e AWS_S3_BUCKET=$AWS_S3_BUCKET -e AWS_SES_SECRET_KEY=$AWS_SES_SECRET_KEY -e AWS_SES_ACCESS_KEY=$AWS_SES_ACCESS_KEY -e AWS_SES_REGION=$AWS_SES_REGION -e EMAIL_SENDER=$EMAIL_SENDER -e secret=$SECRET - now --public --docker --token $NOW_TOKEN -e AWS_S3_ACCESS_KEY=$AWS_S3_ACCESS_KEY -e AWS_S3_SECRET_KEY=$AWS_S3_SECRET_KEY -e AWS_S3_REGION=$AWS_S3_REGION -e AWS_S3_BUCKET=$AWS_S3_BUCKET -e AWS_SES_SECRET_KEY=$AWS_SES_SECRET_KEY -e AWS_SES_ACCESS_KEY=$AWS_SES_ACCESS_KEY -e AWS_SES_REGION=$AWS_SES_REGION -e EMAIL_SENDER=$EMAIL_SENDER -e secret=$SECRET -e DATABASE=$DATABASE -e DB_USER=$DB_USER -e DB_PASS=$DB_PASS -e DB_HOST=$DB_HOST
- now alias $NOW_URL xpub-faraday --token $NOW_TOKEN - now alias $NOW_URL xpub-faraday --token $NOW_TOKEN
\ No newline at end of file
...@@ -164,6 +164,7 @@ export default compose( ...@@ -164,6 +164,7 @@ export default compose(
const assignedHE = const assignedHE =
assignedPeople && assignedPeople.find(p => p.role === 'handlingEditor') assignedPeople && assignedPeople.find(p => p.role === 'handlingEditor')
// this can be changed, but it works; cba
if (isAdmin || isEic) { if (isAdmin || isEic) {
if (status === 'submitted' || status === 'he-invited') if (status === 'submitted' || status === 'he-invited')
return <EditorInChiefActions project={project} /> return <EditorInChiefActions project={project} />
......
...@@ -26,12 +26,12 @@ const EditorInChiefActions = ({ ...@@ -26,12 +26,12 @@ const EditorInChiefActions = ({
const handlingEditor = getHandlingEditor() const handlingEditor = getHandlingEditor()
return ( return (
<Root> <Root>
<HEActions> <HEActions data-test="eic-assign">
{handlingEditor ? ( {handlingEditor ? (
<HEActions> <HEActions>
<HEName>{get(handlingEditor, 'name')}</HEName> <HEName>{get(handlingEditor, 'name')}</HEName>
{!handlingEditor.hasAnswer && ( {!handlingEditor.hasAnswer && (
<HEActions> <HEActions data-test="eic-after-assign">
<div onClick={showConfirmModal('resend')}> <div onClick={showConfirmModal('resend')}>
<Icon color={theme.colorPrimary}>refresh-cw</Icon> <Icon color={theme.colorPrimary}>refresh-cw</Icon>
</div> </div>
...@@ -180,9 +180,9 @@ const HEActions = styled.div` ...@@ -180,9 +180,9 @@ const HEActions = styled.div`
const AssignButton = styled(Button)` const AssignButton = styled(Button)`
${defaultText}; ${defaultText};
align-items: center; align-items: center;
background-color: ${th('colorPrimary')};
color: ${th('colorTextReverse')}; color: ${th('colorTextReverse')};
text-align: center; background-color: ${th('colorPrimary')};
height: calc(${th('subGridUnit')}*5); height: calc(${th('subGridUnit')}*5);
text-align: center;
` `
// #endregion // #endregion
import React from 'react' import React from 'react'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import styled from 'styled-components'
import { th, Button } from '@pubsweet/ui'
import { actions } from 'pubsweet-client' import { actions } from 'pubsweet-client'
import { th, Button } from '@pubsweet/ui'
import styled, { css } from 'styled-components'
import { withHandlers, compose, withState } from 'recompose' import { withHandlers, compose, withState } from 'recompose'
import { import {
withModal, withModal,
...@@ -27,7 +27,7 @@ const DeclineModal = compose( ...@@ -27,7 +27,7 @@ const DeclineModal = compose(
placeholder="Decline reason (optional)" placeholder="Decline reason (optional)"
value={reason} value={reason}
/> />
<div> <div data-test="he-buttons">
<Button onClick={hideModal}>Cancel</Button> <Button onClick={hideModal}>Cancel</Button>
<Button onClick={onConfirm(reason)} primary> <Button onClick={onConfirm(reason)} primary>
Decline Decline
...@@ -45,10 +45,10 @@ const ModalComponent = ({ type, ...rest }) => ...@@ -45,10 +45,10 @@ const ModalComponent = ({ type, ...rest }) =>
const HandlingEditorActions = ({ showHEModal }) => ( const HandlingEditorActions = ({ showHEModal }) => (
<Root> <Root>
<Button onClick={showHEModal('decline')}>DECLINE</Button> <DecisionButton onClick={showHEModal('decline')}>DECLINE</DecisionButton>
<Button onClick={showHEModal()} primary> <DecisionButton onClick={showHEModal()} primary>
AGREE AGREE
</Button> </DecisionButton>
</Root> </Root>
) )
...@@ -111,6 +111,22 @@ export default compose( ...@@ -111,6 +111,22 @@ export default compose(
)(HandlingEditorActions) )(HandlingEditorActions)
// #region styled-components // #region styled-components
const defaultText = css`
font-family: ${th('fontReading')};
font-size: ${th('fontSizeBaseSmall')};
`
const DecisionButton = styled(Button)`
${defaultText};
align-items: center;
color: ${({ primary }) =>
primary ? th('colorTextReverse') : th('colorPrimary')});
background-color: ${({ primary }) =>
primary ? th('colorPrimary') : th('backgroundColorReverse')};
height: calc(${th('subGridUnit')}*5);
text-align: center;
`
const DeclineRoot = styled.div` const DeclineRoot = styled.div`
align-items: center; align-items: center;
background-color: ${th('backgroundColor')}; background-color: ${th('backgroundColor')};
......
...@@ -5,6 +5,20 @@ const logger = require('winston') ...@@ -5,6 +5,20 @@ const logger = require('winston')
// const environment = process.env.NODE_ENV || 'development' // const environment = process.env.NODE_ENV || 'development'
const getDbConfig = () => {
if (process.env.DATABASE) {
return {
user: process.env.DB_USER,
password: process.env.DB_PASS,
database: process.env.DATABASE,
host: process.env.DB_HOST,
port: 5432,
ssl: true,
}
}
return {}
}
module.exports = { module.exports = {
authsome: { authsome: {
mode: path.resolve(__dirname, 'authsome.js'), mode: path.resolve(__dirname, 'authsome.js'),
...@@ -17,7 +31,7 @@ module.exports = { ...@@ -17,7 +31,7 @@ module.exports = {
components, components,
}, },
'pubsweet-server': { 'pubsweet-server': {
db: {}, db: getDbConfig(),
port: 3000, port: 3000,
logger, logger,
uploads: 'uploads', uploads: 'uploads',
......
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