diff --git a/hyperion/index.js b/hyperion/index.js index 5d2b59961c..3b3514d652 100644 --- a/hyperion/index.js +++ b/hyperion/index.js @@ -154,7 +154,10 @@ if (process.env.NODE_ENV === 'development') { app.get('*', (req: express$Request, res, next) => { // Electron requests should only be client-side rendered - if (req.headers['user-agent'].indexOf('Electron') > -1) { + if ( + req.headers['user-agent'] && + req.headers['user-agent'].indexOf('Electron') > -1 + ) { return res.sendFile(path.resolve(__dirname, '../build/index.html')); } next(); diff --git a/package.json b/package.json index 1d2db2551c..bbf681a747 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Spectrum", - "version": "2.4.7", + "version": "2.4.8", "license": "BSD-3-Clause", "devDependencies": { "babel-cli": "^6.24.1", diff --git a/shared/middlewares/thread-param.js b/shared/middlewares/thread-param.js index d922a01cdc..cb59d78dda 100644 --- a/shared/middlewares/thread-param.js +++ b/shared/middlewares/thread-param.js @@ -2,7 +2,7 @@ const threadParamRedirect = (req, res, next) => { // Redirect /?t=asdf123 if the user isn't logged in - if (!req.user && req.query.t) { + if (req.query.t) { res.redirect(`/thread/${req.query.t}`); // Redirect /anything?thread=asdf123 } else if (req.query.thread) { diff --git a/src/components/profile/style.js b/src/components/profile/style.js index 4ab9c9c465..2f4581be62 100644 --- a/src/components/profile/style.js +++ b/src/components/profile/style.js @@ -1,3 +1,4 @@ +// @flow import styled from 'styled-components'; import Link from 'src/components/link'; import { @@ -261,6 +262,11 @@ export const ProfileCard = styled(Card)` } `; +export const ThreadProfileCard = styled(ProfileCard)` + border-radius: 8px; + box-shadow: ${Shadow.low} ${({ theme }) => hexa(theme.text.default, 0.1)}; +`; + export const ProUpgrade = styled.div` margin: 16px; margin-top: 0; diff --git a/src/components/profile/thread.js b/src/components/profile/thread.js index 15c778e78c..21c511c7e5 100644 --- a/src/components/profile/thread.js +++ b/src/components/profile/thread.js @@ -5,7 +5,7 @@ import compose from 'recompose/compose'; import Link from 'src/components/link'; import { connect } from 'react-redux'; import { ThreadListItem } from '../listItems'; -import { ProfileCard } from './style'; +import { ThreadProfileCard } from './style'; import type { GetThreadType } from 'shared/graphql/queries/thread/getThread'; type Props = { @@ -39,7 +39,7 @@ class ThreadWithData extends React.Component { } return ( - + { }`} /> - + ); } } diff --git a/src/views/community/index.js b/src/views/community/index.js index 2d55fd89eb..3fcabc899c 100644 --- a/src/views/community/index.js +++ b/src/views/community/index.js @@ -290,6 +290,7 @@ class CommunityView extends React.Component { icon={isMember ? 'checkmark' : null} loading={state.isLoading} dataCy={'join-community-button'} + style={{ marginTop: '16px' }} > {isMember ? 'Member' : `Join ${community.name}`} diff --git a/src/views/notifications/components/newMessageNotification.js b/src/views/notifications/components/newMessageNotification.js index 3c3780aa35..415f843f17 100644 --- a/src/views/notifications/components/newMessageNotification.js +++ b/src/views/notifications/components/newMessageNotification.js @@ -31,7 +31,11 @@ export const NewMessageNotification = ({ notification, currentUser }) => { const date = parseNotificationDate(notification.modifiedAt); const context = parseContext(notification.context, currentUser); const unsortedMessages = notification.entities.map(notif => notif.payload); - const messages = sortAndGroupNotificationMessages(unsortedMessages); + let messages = sortAndGroupNotificationMessages(unsortedMessages); + + if (messages.length > 3) { + messages = messages.splice(0, messages.length - 3); + } return ( diff --git a/src/views/notifications/style.js b/src/views/notifications/style.js index b6b5923d97..771e175cb7 100644 --- a/src/views/notifications/style.js +++ b/src/views/notifications/style.js @@ -23,6 +23,8 @@ export const NotificationCard = styled(Card)` padding-bottom: 24px; overflow: hidden; transition: ${Transition.hover.off}; + border-radius: 8px; + box-shadow: ${Shadow.low} ${({ theme }) => hexa(theme.text.default, 0.1)}; &:hover { transition: none; @@ -34,6 +36,8 @@ export const SegmentedNotificationCard = styled(Card)` padding: 0; padding-top: 16px; transition: ${Transition.hover.off}; + border-radius: 8px; + box-shadow: ${Shadow.low} ${({ theme }) => hexa(theme.text.default, 0.1)}; &:hover { transition: none; @@ -259,6 +263,8 @@ export const RequestCard = styled(Card)` align-items: center; justify-content: space-between; padding: 16px 16px 16px 24px; + border-radius: 8px; + box-shadow: ${Shadow.low} ${({ theme }) => hexa(theme.text.default, 0.1)}; > p { font-weight: 700; diff --git a/src/views/thread/components/actionBar.js b/src/views/thread/components/actionBar.js index 801ab2c86e..484d2d88ee 100644 --- a/src/views/thread/components/actionBar.js +++ b/src/views/thread/components/actionBar.js @@ -385,6 +385,37 @@ class ActionBar extends React.Component { )} + {thread.channel.isPrivate && ( + + + this.props.dispatch( + addToastWithTimeout('success', 'Copied to clipboard') + ) + } + > + + + + track(events.THREAD_SHARED, { method: 'link' }) + } + /> + + + + + )}