diff --git a/.codeclimate.yml b/.codeclimate.yml index f0c238b1..8558e313 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,6 +1,8 @@ engines: duplication: enabled: true + exclude_paths: + - app/assets/javascripts/components/locales/ config: languages: - ruby diff --git a/.env.production.sample b/.env.production.sample index 97bba5e3..7c82c014 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -35,6 +35,7 @@ SMTP_PORT=587 SMTP_LOGIN= SMTP_PASSWORD= SMTP_FROM_ADDRESS=notifications@example.com +#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail #SMTP_AUTH_METHOD=plain #SMTP_OPENSSL_VERIFY_MODE=peer #SMTP_ENABLE_STARTTLS_AUTO=true diff --git a/.gitignore b/.gitignore index b671bcb9..5c95f780 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,7 @@ config/deploy/* # Ignore IDE files .vscode/ + +# Ignore postgres + redis volume optionally created by docker-compose +postgres +redis diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index 1b3cc60d..88e91c35 100644 --- a/app/assets/javascripts/components/actions/compose.jsx +++ b/app/assets/javascripts/components/actions/compose.jsx @@ -2,6 +2,8 @@ import api from '../api'; import { updateTimeline } from './timelines'; +import * as emojione from 'emojione'; + export const COMPOSE_CHANGE = 'COMPOSE_CHANGE'; export const COMPOSE_SUBMIT_REQUEST = 'COMPOSE_SUBMIT_REQUEST'; export const COMPOSE_SUBMIT_SUCCESS = 'COMPOSE_SUBMIT_SUCCESS'; @@ -72,9 +74,8 @@ export function mentionCompose(account, router) { export function submitCompose() { return function (dispatch, getState) { dispatch(submitComposeRequest()); - api(getState).post('/api/v1/statuses', { - status: getState().getIn(['compose', 'text'], ''), + status: emojione.shortnameToUnicode(getState().getIn(['compose', 'text'], '')), in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null), media_ids: getState().getIn(['compose', 'media_attachments']).map(item => item.get('id')), sensitive: getState().getIn(['compose', 'sensitive']), diff --git a/app/assets/javascripts/components/actions/reports.jsx b/app/assets/javascripts/components/actions/reports.jsx index 2c1245dc..094670d6 100644 --- a/app/assets/javascripts/components/actions/reports.jsx +++ b/app/assets/javascripts/components/actions/reports.jsx @@ -7,7 +7,8 @@ export const REPORT_SUBMIT_REQUEST = 'REPORT_SUBMIT_REQUEST'; export const REPORT_SUBMIT_SUCCESS = 'REPORT_SUBMIT_SUCCESS'; export const REPORT_SUBMIT_FAIL = 'REPORT_SUBMIT_FAIL'; -export const REPORT_STATUS_TOGGLE = 'REPORT_STATUS_TOGGLE'; +export const REPORT_STATUS_TOGGLE = 'REPORT_STATUS_TOGGLE'; +export const REPORT_COMMENT_CHANGE = 'REPORT_COMMENT_CHANGE'; export function initReport(account, status) { return { @@ -62,3 +63,10 @@ export function submitReportFail(error) { error }; }; + +export function changeReportComment(comment) { + return { + type: REPORT_COMMENT_CHANGE, + comment + }; +}; diff --git a/app/assets/javascripts/components/components/extended_video_player.jsx b/app/assets/javascripts/components/components/extended_video_player.jsx index 66e5dee1..a6451558 100644 --- a/app/assets/javascripts/components/components/extended_video_player.jsx +++ b/app/assets/javascripts/components/components/extended_video_player.jsx @@ -3,15 +3,43 @@ import PureRenderMixin from 'react-addons-pure-render-mixin'; const ExtendedVideoPlayer = React.createClass({ propTypes: { - src: React.PropTypes.string.isRequired + src: React.PropTypes.string.isRequired, + time: React.PropTypes.number, + controls: React.PropTypes.bool.isRequired, + muted: React.PropTypes.bool.isRequired }, mixins: [PureRenderMixin], + handleLoadedData () { + if (this.props.time) { + this.video.currentTime = this.props.time; + } + }, + + componentDidMount () { + this.video.addEventListener('loadeddata', this.handleLoadedData); + }, + + componentWillUnmount () { + this.video.removeEventListener('loadeddata', this.handleLoadedData); + }, + + setRef (c) { + this.video = c; + }, + render () { return ( -
-