diff --git a/app/javascript/gabsocial/containers/status_container.js b/app/javascript/gabsocial/containers/status_container.js
index 1ec59d3d..428ad736 100644
--- a/app/javascript/gabsocial/containers/status_container.js
+++ b/app/javascript/gabsocial/containers/status_container.js
@@ -109,9 +109,12 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
},
onFavorite (status) {
+ console.log("onFavorite...", status)
if (status.get('favourited')) {
+ console.log("unfav...")
dispatch(unfavorite(status));
} else {
+ console.log("fav...")
dispatch(favorite(status));
}
},
diff --git a/app/javascript/gabsocial/features/compose/components/compose_extra_button.js b/app/javascript/gabsocial/features/compose/components/compose_extra_button.js
index c5ca6848..bc4e385b 100644
--- a/app/javascript/gabsocial/features/compose/components/compose_extra_button.js
+++ b/app/javascript/gabsocial/features/compose/components/compose_extra_button.js
@@ -10,6 +10,7 @@ export default class ComposeExtraButton extends PureComponent {
onClick: PropTypes.func,
icon: PropTypes.string,
small: PropTypes.bool,
+ active: PropTypes.bool,
}
state = {
@@ -25,7 +26,15 @@ export default class ComposeExtraButton extends PureComponent {
}
render() {
- const { title, disabled, onClick, icon, children, small } = this.props
+ const {
+ title,
+ disabled,
+ onClick,
+ icon,
+ children,
+ small,
+ active
+ } = this.props
const { hovering } = this.state
const containerClasses = cx({
@@ -39,8 +48,10 @@ export default class ComposeExtraButton extends PureComponent {
circle: 1,
flexRow: 1,
cursorPointer: 1,
- backgroundSubtle: !hovering,
- backgroundSubtle2: hovering,
+ outlineNone: 1,
+ backgroundSubtle: !hovering && !active,
+ backgroundSubtle2: hovering && !active,
+ backgroundColorBrandLight: active,
paddingVertical10PX: !small,
paddingHorizontal10PX: !small,
paddingVertical5PX: small,
@@ -54,10 +65,16 @@ export default class ComposeExtraButton extends PureComponent {
lineHeight15: 1,
fontSize12PX: 1,
fontWeightMedium: 1,
- colorSecondary: 1,
+ colorSecondary: !active,
+ colorWhite: active,
displayNone: !hovering,
})
+ const iconClasses = cx({
+ fillColorSecondary: !active,
+ fillColorWhite: active,
+ })
+
const iconSize = !!small ? '12px' : '18px'
return (
@@ -70,9 +87,9 @@ export default class ComposeExtraButton extends PureComponent {
onMouseEnter={() => this.handleOnMouseEnter()}
onMouseLeave={() => this.handleOnMouseLeave()}
>
-
{
- !small &&
+ (!small && !!title) &&
diff --git a/app/javascript/gabsocial/features/compose/components/compose_form/compose_form.js b/app/javascript/gabsocial/features/compose/components/compose_form/compose_form.js
index 646c84dd..e02e4561 100644
--- a/app/javascript/gabsocial/features/compose/components/compose_form/compose_form.js
+++ b/app/javascript/gabsocial/features/compose/components/compose_form/compose_form.js
@@ -11,9 +11,9 @@ import PollButton from '../../components/poll_button';
import UploadButton from '../../components/upload_button';
import SpoilerButton from '../../components/spoiler_button';
import PrivacyDropdown from '../../components/privacy_dropdown';
+import EmojiPickerButton from '../../components/emoji_picker_button'
import EmojiPickerDropdown from '../../containers/emoji_picker_dropdown_container';
import PollFormContainer from '../../containers/poll_form_container';
-import WarningContainer from '../../containers/warning_container';
import SchedulePostDropdown from '../../components/schedule_post_dropdown';
import QuotedStatusPreviewContainer from '../../containers/quoted_status_preview_container';
import Icon from '../../../../components/icon';
@@ -228,7 +228,8 @@ class ComposeForm extends ImmutablePureComponent {
isModalOpen,
quoteOfId,
edit,
- scheduledAt
+ scheduledAt,
+ spoiler
} = this.props
const condensed = shouldCondense && !this.props.text && !this.state.composeFocused;
const disabled = this.props.isSubmitting;
@@ -258,6 +259,15 @@ class ComposeForm extends ImmutablePureComponent {
marginTop5PX: shouldCondense,
})
+ const contentWarningClasses = cx({
+ default: 1,
+ paddingTop5PX: 1,
+ paddingBottom10PX: 1,
+ borderBottom1PX: 1,
+ borderColorSecondary: 1,
+ displayNone: !spoiler
+ })
+
const avatarSize = shouldCondense ? 28 : 46
return (
@@ -265,34 +275,32 @@ class ComposeForm extends ImmutablePureComponent {
- { /*
*/}
{ /* !shouldCondense &&
*/}
- { /*
-
- */ }
+
{ /*
@@ -341,6 +349,7 @@ class ComposeForm extends ImmutablePureComponent {
}
+
{
diff --git a/app/javascript/gabsocial/features/compose/components/emoji_picker_button.js b/app/javascript/gabsocial/features/compose/components/emoji_picker_button.js
new file mode 100644
index 00000000..f9d54dc5
--- /dev/null
+++ b/app/javascript/gabsocial/features/compose/components/emoji_picker_button.js
@@ -0,0 +1,56 @@
+import { addPoll, removePoll } from '../../../actions/compose'
+import ComposeExtraButton from './compose_extra_button'
+
+const mapStateToProps = state => ({
+ // unavailable: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 0),
+ // active: state.getIn(['compose', 'poll']) !== null,
+})
+
+const mapDispatchToProps = dispatch => ({
+
+ onClick() {
+ dispatch((_, getState) => {
+ if (getState().getIn(['compose', 'poll'])) {
+ dispatch(removePoll())
+ } else {
+ dispatch(addPoll())
+ }
+ })
+ },
+
+})
+
+export default
+@connect(mapStateToProps, mapDispatchToProps)
+class EmojiPickerButton extends PureComponent {
+
+ static propTypes = {
+ disabled: PropTypes.bool,
+ unavailable: PropTypes.bool,
+ active: PropTypes.bool,
+ onClick: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ small: PropTypes.bool,
+ }
+
+ handleClick = () => {
+ this.props.onClick()
+ }
+
+ render() {
+ const { active, unavailable, disabled, small } = this.props
+
+ if (unavailable) return null
+
+ return (
+
+ )
+ }
+
+}
diff --git a/app/javascript/gabsocial/features/compose/components/poll_button.js b/app/javascript/gabsocial/features/compose/components/poll_button.js
index ce39faa4..4f9f78fd 100644
--- a/app/javascript/gabsocial/features/compose/components/poll_button.js
+++ b/app/javascript/gabsocial/features/compose/components/poll_button.js
@@ -1,31 +1,31 @@
-import { defineMessages, injectIntl } from 'react-intl';
-import { addPoll, removePoll } from '../../../actions/compose';
+import { defineMessages, injectIntl } from 'react-intl'
+import { addPoll, removePoll } from '../../../actions/compose'
import ComposeExtraButton from './compose_extra_button'
const messages = defineMessages({
add_poll: { id: 'poll_button.add_poll', defaultMessage: 'Add poll' },
title: { id: 'poll_button.title', defaultMessage: 'Poll' },
remove_poll: { id: 'poll_button.remove_poll', defaultMessage: 'Remove poll' },
-});
+})
const mapStateToProps = state => ({
unavailable: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 0),
active: state.getIn(['compose', 'poll']) !== null,
-});
+})
const mapDispatchToProps = dispatch => ({
onClick() {
dispatch((_, getState) => {
if (getState().getIn(['compose', 'poll'])) {
- dispatch(removePoll());
+ dispatch(removePoll())
} else {
- dispatch(addPoll());
+ dispatch(addPoll())
}
- });
+ })
},
-});
+})
export default
@connect(mapStateToProps, mapDispatchToProps)
@@ -39,16 +39,16 @@ class PollButton extends PureComponent {
onClick: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
small: PropTypes.bool,
- };
+ }
handleClick = () => {
- this.props.onClick();
+ this.props.onClick()
}
render() {
- const { intl, active, unavailable, disabled, small } = this.props;
+ const { intl, active, unavailable, disabled, small } = this.props
- if (unavailable) return null;
+ if (unavailable) return null
return (
)
}
diff --git a/app/javascript/gabsocial/features/compose/components/poll_form.js b/app/javascript/gabsocial/features/compose/components/poll_form.js
new file mode 100644
index 00000000..cdbf6e6e
--- /dev/null
+++ b/app/javascript/gabsocial/features/compose/components/poll_form.js
@@ -0,0 +1,247 @@
+import ImmutablePropTypes from 'react-immutable-proptypes'
+import ImmutablePureComponent from 'react-immutable-pure-component'
+import classNames from 'classnames/bind'
+import { defineMessages, injectIntl } from 'react-intl'
+import Button from '../../../components/button'
+import Text from '../../../components/text'
+import Select from '../../../components/select'
+import AutosuggestTextbox from '../../../components/autosuggest_textbox'
+
+const cx = classNames.bind(_s)
+
+const messages = defineMessages({
+ option_placeholder: { id: 'compose_form.poll.option_placeholder', defaultMessage: 'Choice {number}' },
+ add_option: { id: 'compose_form.poll.add_option', defaultMessage: 'Add a choice' },
+ remove_option: { id: 'compose_form.poll.remove_option', defaultMessage: 'Remove this choice' },
+ poll_duration: { id: 'compose_form.poll.duration', defaultMessage: 'Poll duration' },
+ minutes: { id: 'intervals.full.minutes', defaultMessage: '{number, plural, one {# minute} other {# minutes}}' },
+ hours: { id: 'intervals.full.hours', defaultMessage: '{number, plural, one {# hour} other {# hours}}' },
+ days: { id: 'intervals.full.days', defaultMessage: '{number, plural, one {# day} other {# days}}' },
+})
+
+@injectIntl
+class PollFormOption extends ImmutablePureComponent {
+
+ static propTypes = {
+ title: PropTypes.string.isRequired,
+ index: PropTypes.number.isRequired,
+ isPollMultiple: PropTypes.bool,
+ onChange: PropTypes.func.isRequired,
+ onRemove: PropTypes.func.isRequired,
+ onToggleMultiple: PropTypes.func.isRequired,
+ suggestions: ImmutablePropTypes.list,
+ onClearSuggestions: PropTypes.func.isRequired,
+ onFetchSuggestions: PropTypes.func.isRequired,
+ onSuggestionSelected: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ handleOptionTitleChange = e => {
+ this.props.onChange(this.props.index, e.target.value);
+ };
+
+ handleOptionRemove = () => {
+ this.props.onRemove(this.props.index);
+ };
+
+
+ handleToggleMultiple = e => {
+ this.props.onToggleMultiple();
+ e.preventDefault();
+ e.stopPropagation();
+ };
+
+ onSuggestionsClearRequested = () => {
+ this.props.onClearSuggestions();
+ }
+
+ onSuggestionsFetchRequested = (token) => {
+ this.props.onFetchSuggestions(token);
+ }
+
+ onSuggestionSelected = (tokenStart, token, value) => {
+ this.props.onSuggestionSelected(tokenStart, token, value, ['poll', 'options', this.props.index]);
+ }
+
+ render() {
+ const { isPollMultiple, title, index, intl } = this.props;
+
+ const toggleClasses = cx({
+ default: 1,
+ paddingHorizontal10PX: 1,
+ paddingVertical10PX: 1,
+ borderColorSecondary: 1,
+ border1PX: 1,
+ outlineNone: 1,
+ marginRight10PX: 1,
+ circle: !isPollMultiple,
+ })
+
+ return (
+
+
+
+
+
+ );
+ }
+
+}
+
+export default
+@injectIntl
+class PollForm extends ImmutablePureComponent {
+
+ static propTypes = {
+ options: ImmutablePropTypes.list,
+ expiresIn: PropTypes.number,
+ isMultiple: PropTypes.bool,
+ onChangeOption: PropTypes.func.isRequired,
+ onAddOption: PropTypes.func.isRequired,
+ onRemoveOption: PropTypes.func.isRequired,
+ onChangeSettings: PropTypes.func.isRequired,
+ suggestions: ImmutablePropTypes.list,
+ onClearSuggestions: PropTypes.func.isRequired,
+ onFetchSuggestions: PropTypes.func.isRequired,
+ onSuggestionSelected: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ handleAddOption = () => {
+ this.props.onAddOption('');
+ };
+
+ handleSelectDuration = e => {
+ this.props.onChangeSettings(e.target.value, this.props.isMultiple);
+ };
+
+ handleToggleMultiple = () => {
+ this.props.onChangeSettings(this.props.expiresIn, !this.props.isMultiple);
+ };
+
+ render() {
+ const {
+ options,
+ expiresIn,
+ isMultiple,
+ onChangeOption,
+ onRemoveOption,
+ intl,
+ ...otherProps
+ } = this.props;
+
+ if (!options) return null
+
+ return (
+
+
+ {
+ options.map((title, i) => (
+
+ ))
+ }
+
+
+
+ {
+ options.size < 4 && (
+
+ )
+ }
+
+
+
+
+
+
+ )
+ }
+
+}
diff --git a/app/javascript/gabsocial/features/compose/components/poll_form/index.js b/app/javascript/gabsocial/features/compose/components/poll_form/index.js
deleted file mode 100644
index 51524efb..00000000
--- a/app/javascript/gabsocial/features/compose/components/poll_form/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './poll_form'
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/compose/components/poll_form/poll_form.js b/app/javascript/gabsocial/features/compose/components/poll_form/poll_form.js
deleted file mode 100644
index ec1da27f..00000000
--- a/app/javascript/gabsocial/features/compose/components/poll_form/poll_form.js
+++ /dev/null
@@ -1,161 +0,0 @@
-import classNames from 'classnames';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import IconButton from '../../../../components/icon_button';
-import Icon from '../../../../components/icon';
-import AutosuggestTextbox from '../../../../components/autosuggest_textbox';
-
-const messages = defineMessages({
- option_placeholder: { id: 'compose_form.poll.option_placeholder', defaultMessage: 'Choice {number}' },
- add_option: { id: 'compose_form.poll.add_option', defaultMessage: 'Add a choice' },
- remove_option: { id: 'compose_form.poll.remove_option', defaultMessage: 'Remove this choice' },
- poll_duration: { id: 'compose_form.poll.duration', defaultMessage: 'Poll duration' },
- minutes: { id: 'intervals.full.minutes', defaultMessage: '{number, plural, one {# minute} other {# minutes}}' },
- hours: { id: 'intervals.full.hours', defaultMessage: '{number, plural, one {# hour} other {# hours}}' },
- days: { id: 'intervals.full.days', defaultMessage: '{number, plural, one {# day} other {# days}}' },
-});
-
-@injectIntl
-class Option extends ImmutablePureComponent {
-
- static propTypes = {
- title: PropTypes.string.isRequired,
- index: PropTypes.number.isRequired,
- isPollMultiple: PropTypes.bool,
- onChange: PropTypes.func.isRequired,
- onRemove: PropTypes.func.isRequired,
- onToggleMultiple: PropTypes.func.isRequired,
- suggestions: ImmutablePropTypes.list,
- onClearSuggestions: PropTypes.func.isRequired,
- onFetchSuggestions: PropTypes.func.isRequired,
- onSuggestionSelected: PropTypes.func.isRequired,
- intl: PropTypes.object.isRequired,
- };
-
- handleOptionTitleChange = e => {
- this.props.onChange(this.props.index, e.target.value);
- };
-
- handleOptionRemove = () => {
- this.props.onRemove(this.props.index);
- };
-
-
- handleToggleMultiple = e => {
- this.props.onToggleMultiple();
- e.preventDefault();
- e.stopPropagation();
- };
-
- onSuggestionsClearRequested = () => {
- this.props.onClearSuggestions();
- }
-
- onSuggestionsFetchRequested = (token) => {
- this.props.onFetchSuggestions(token);
- }
-
- onSuggestionSelected = (tokenStart, token, value) => {
- this.props.onSuggestionSelected(tokenStart, token, value, ['poll', 'options', this.props.index]);
- }
-
- render () {
- const { isPollMultiple, title, index, intl } = this.props;
-
- return (
-
-
-
-
-
-
-
- );
- }
-
-}
-
-export default
-@injectIntl
-class PollForm extends ImmutablePureComponent {
-
- static propTypes = {
- options: ImmutablePropTypes.list,
- expiresIn: PropTypes.number,
- isMultiple: PropTypes.bool,
- onChangeOption: PropTypes.func.isRequired,
- onAddOption: PropTypes.func.isRequired,
- onRemoveOption: PropTypes.func.isRequired,
- onChangeSettings: PropTypes.func.isRequired,
- suggestions: ImmutablePropTypes.list,
- onClearSuggestions: PropTypes.func.isRequired,
- onFetchSuggestions: PropTypes.func.isRequired,
- onSuggestionSelected: PropTypes.func.isRequired,
- intl: PropTypes.object.isRequired,
- };
-
- handleAddOption = () => {
- this.props.onAddOption('');
- };
-
- handleSelectDuration = e => {
- this.props.onChangeSettings(e.target.value, this.props.isMultiple);
- };
-
- handleToggleMultiple = () => {
- this.props.onChangeSettings(this.props.expiresIn, !this.props.isMultiple);
- };
-
- render () {
- const { options, expiresIn, isMultiple, onChangeOption, onRemoveOption, intl, ...other } = this.props;
-
- if (!options) {
- return null;
- }
-
- return (
-
-
- {options.map((title, i) => )}
-
-
-
- {options.size < 4 && (
-
- )}
-
-
-
-
- );
- }
-
-}
diff --git a/app/javascript/gabsocial/features/compose/components/poll_form/poll_form.scss b/app/javascript/gabsocial/features/compose/components/poll_form/poll_form.scss
deleted file mode 100644
index d1c2dbfd..00000000
--- a/app/javascript/gabsocial/features/compose/components/poll_form/poll_form.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-.poll-list-item {
- display: flex;
- align-items: center;
-
- &__text {
- flex: 0 0 auto;
- width: calc(100% - (23px + 6px));
- margin-right: 6px;
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/compose/components/spoiler_button.js b/app/javascript/gabsocial/features/compose/components/spoiler_button.js
index 112cd185..814ea03a 100644
--- a/app/javascript/gabsocial/features/compose/components/spoiler_button.js
+++ b/app/javascript/gabsocial/features/compose/components/spoiler_button.js
@@ -45,6 +45,7 @@ class SpoilerButton extends PureComponent {
icon='warning'
onClick={this.handleClick}
small={small}
+ active={active}
/>
)
}
diff --git a/app/javascript/gabsocial/features/compose/components/upload/upload.js b/app/javascript/gabsocial/features/compose/components/upload/upload.js
index 1ff818d3..414c6860 100644
--- a/app/javascript/gabsocial/features/compose/components/upload/upload.js
+++ b/app/javascript/gabsocial/features/compose/components/upload/upload.js
@@ -2,9 +2,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes'
import ImmutablePureComponent from 'react-immutable-pure-component'
import { defineMessages, injectIntl } from 'react-intl'
import classNames from 'classnames'
-import spring from 'react-motion/lib/spring'
-import Motion from '../../../ui/util/optional_motion'
import Button from '../../../../components/button'
+import Image from '../../../../components/image'
const messages = defineMessages({
description: { id: 'upload_form.description', defaultMessage: 'Describe for the visually impaired' },
@@ -72,7 +71,10 @@ class Upload extends ImmutablePureComponent {
handleInputBlur = () => {
const { dirtyDescription } = this.state
- this.setState({ focused: false, dirtyDescription: null })
+ this.setState({
+ focused: false,
+ dirtyDescription: null,
+ })
if (dirtyDescription !== null) {
this.props.onDescriptionChange(this.props.media.get('id'), dirtyDescription)
@@ -90,37 +92,33 @@ class Upload extends ImmutablePureComponent {
return (
-
- {({ scale }) => (
-
-
-
-
+
+
+
+
-
-
- )}
-
+
+
+
+
)
}
diff --git a/app/javascript/gabsocial/features/compose/components/warning/index.js b/app/javascript/gabsocial/features/compose/components/warning/index.js
deleted file mode 100644
index f38bc8ee..00000000
--- a/app/javascript/gabsocial/features/compose/components/warning/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './warning'
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/compose/components/warning/warning.js b/app/javascript/gabsocial/features/compose/components/warning/warning.js
deleted file mode 100644
index 0f4760f4..00000000
--- a/app/javascript/gabsocial/features/compose/components/warning/warning.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import Motion from '../../../ui/util/optional_motion';
-import spring from 'react-motion/lib/spring';
-
-export default class Warning extends PureComponent {
-
- static propTypes = {
- message: PropTypes.node.isRequired,
- };
-
- render () {
- const { message } = this.props;
-
- return (
-
- {({ opacity, scaleX, scaleY }) => (
-
- {message}
-
- )}
-
- );
- }
-
-}
diff --git a/app/javascript/gabsocial/features/compose/components/warning/warning.scss b/app/javascript/gabsocial/features/compose/components/warning/warning.scss
deleted file mode 100644
index 943c6cfc..00000000
--- a/app/javascript/gabsocial/features/compose/components/warning/warning.scss
+++ /dev/null
@@ -1,33 +0,0 @@
-.compose-form-warning {
- color: $inverted-text-color;
- margin-bottom: 10px;
- background: $ui-primary-color;
- box-shadow: 0 2px 6px rgba($base-shadow-color, 0.3);
- padding: 8px 10px;
- border-radius: 4px;
-
- @include text-sizing(13px, 400);
-
- strong {
- color: $inverted-text-color;
- font-weight: 500;
-
- @each $lang in $cjk-langs {
- &:lang(#{$lang}) {
- font-weight: 700;
- }
- }
- }
-
- a {
- color: $lighter-text-color;
- font-weight: 500;
- text-decoration: underline;
-
- &:hover,
- &:active,
- &:focus {
- text-decoration: none;
- }
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/compose/containers/warning_container.js b/app/javascript/gabsocial/features/compose/containers/warning_container.js
deleted file mode 100644
index 46135c42..00000000
--- a/app/javascript/gabsocial/features/compose/containers/warning_container.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import Warning from '../components/warning';
-import { FormattedMessage } from 'react-intl';
-import { me } from '../../../initial_state';
-
-const APPROX_HASHTAG_RE = /(?:^|[^\/\)\w])#(\w*[a-zA-Z·]\w*)/i;
-
-const mapStateToProps = state => ({
- needsLockWarning: state.getIn(['compose', 'privacy']) === 'private' && !state.getIn(['accounts', me, 'locked']),
- hashtagWarning: state.getIn(['compose', 'privacy']) !== 'public' && APPROX_HASHTAG_RE.test(state.getIn(['compose', 'text'])),
- directMessageWarning: state.getIn(['compose', 'privacy']) === 'direct',
-});
-
-const WarningWrapper = ({ needsLockWarning, hashtagWarning, directMessageWarning }) => {
- if (needsLockWarning) {
- return
}} />} />;
- }
-
- if (hashtagWarning) {
- return } />;
- }
-
- if (directMessageWarning) {
- const message = (
-
-
-
- );
-
- return ;
- }
-
- return null;
-};
-
-WarningWrapper.propTypes = {
- needsLockWarning: PropTypes.bool,
- hashtagWarning: PropTypes.bool,
- directMessageWarning: PropTypes.bool,
-};
-
-export default connect(mapStateToProps)(WarningWrapper);
diff --git a/app/javascript/gabsocial/features/status/status.js b/app/javascript/gabsocial/features/status/status.js
index f8d4339c..69487fe4 100644
--- a/app/javascript/gabsocial/features/status/status.js
+++ b/app/javascript/gabsocial/features/status/status.js
@@ -372,6 +372,7 @@ class Status extends ImmutablePureComponent {
}
renderChildren(list) {
+ // : todo : comments
return list.map(id => (
-
+
{ /*
{
- let hours = Math.floor(secondsNum / 3600);
- let minutes = Math.floor((secondsNum - (hours * 3600)) / 60);
- let seconds = secondsNum - (hours * 3600) - (minutes * 60);
+ let hours = Math.floor(secondsNum / 3600)
+ let minutes = Math.floor((secondsNum - (hours * 3600)) / 60)
+ let seconds = secondsNum - (hours * 3600) - (minutes * 60)
- if (hours < 10) hours = '0' + hours;
- if (minutes < 10) minutes = '0' + minutes;
- if (seconds < 10) seconds = '0' + seconds;
+ if (hours < 10) hours = '0' + hours
+ if (minutes < 10) minutes = '0' + minutes
+ if (seconds < 10) seconds = '0' + seconds
- return (hours === '00' ? '' : `${hours}:`) + `${minutes}:${seconds}`;
-};
+ return (hours === '00' ? '' : `${hours}:`) + `${minutes}:${seconds}`
+}
export const findElementPosition = el => {
- let box;
+ let box
if (el.getBoundingClientRect && el.parentNode) {
- box = el.getBoundingClientRect();
+ box = el.getBoundingClientRect()
}
if (!box) {
return {
left: 0,
top: 0,
- };
+ }
}
- const docEl = document.documentElement;
- const body = document.body;
+ const docEl = document.documentElement
+ const body = document.body
- const clientLeft = docEl.clientLeft || body.clientLeft || 0;
- const scrollLeft = window.pageXOffset || body.scrollLeft;
- const left = (box.left + scrollLeft) - clientLeft;
+ const clientLeft = docEl.clientLeft || body.clientLeft || 0
+ const scrollLeft = window.pageXOffset || body.scrollLeft
+ const left = (box.left + scrollLeft) - clientLeft
- const clientTop = docEl.clientTop || body.clientTop || 0;
- const scrollTop = window.pageYOffset || body.scrollTop;
- const top = (box.top + scrollTop) - clientTop;
+ const clientTop = docEl.clientTop || body.clientTop || 0
+ const scrollTop = window.pageYOffset || body.scrollTop
+ const top = (box.top + scrollTop) - clientTop
return {
left: Math.round(left),
top: Math.round(top),
- };
-};
+ }
+}
export const getPointerPosition = (el, event) => {
- const position = {};
- const box = findElementPosition(el);
- const boxW = el.offsetWidth;
- const boxH = el.offsetHeight;
- const boxY = box.top;
- const boxX = box.left;
+ const position = {}
+ const box = findElementPosition(el)
+ const boxW = el.offsetWidth
+ const boxH = el.offsetHeight
+ const boxY = box.top
+ const boxX = box.left
- let pageY = event.pageY;
- let pageX = event.pageX;
+ let pageY = event.pageY
+ let pageX = event.pageX
if (event.changedTouches) {
- pageX = event.changedTouches[0].pageX;
- pageY = event.changedTouches[0].pageY;
+ pageX = event.changedTouches[0].pageX
+ pageY = event.changedTouches[0].pageY
}
- position.y = Math.max(0, Math.min(1, (pageY - boxY) / boxH));
- position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));
+ position.y = Math.max(0, Math.min(1, (pageY - boxY) / boxH))
+ position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW))
- return position;
-};
+ return position
+}
export default
@injectIntl
@@ -99,8 +100,6 @@ class Video extends PureComponent {
height: PropTypes.number,
sensitive: PropTypes.bool,
startTime: PropTypes.number,
- onOpenVideo: PropTypes.func,
- onCloseVideo: PropTypes.func,
detailed: PropTypes.bool,
inline: PropTypes.bool,
cacheWidth: PropTypes.func,
@@ -109,7 +108,7 @@ class Video extends PureComponent {
intl: PropTypes.object.isRequired,
blurhash: PropTypes.string,
aspectRatio: PropTypes.number,
- };
+ }
state = {
currentTime: 0,
@@ -121,237 +120,267 @@ class Video extends PureComponent {
fullscreen: false,
hovered: false,
muted: false,
+ hoveringVolumeButton: false,
+ hoveringVolumeControl: false,
revealed: this.props.visible !== undefined ? this.props.visible : (displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all'),
- };
+ }
+
+ volHeight = 100
+ volOffset = 13
- // hard coded in components.scss
- // any way to get ::before values programatically?
- volWidth = 50;
- volOffset = 70;
volHandleOffset = v => {
- const offset = v * this.volWidth + this.volOffset;
- return (offset > 110) ? 110 : offset;
+ const offset = v * this.volHeight + this.volOffset
+ return (offset > 110) ? 110 : offset
}
setPlayerRef = c => {
- this.player = c;
+ this.player = c
if (c) {
- if (this.props.cacheWidth) this.props.cacheWidth(this.player.offsetWidth);
+ if (this.props.cacheWidth) this.props.cacheWidth(this.player.offsetWidth)
this.setState({
containerWidth: c.offsetWidth,
- });
+ })
}
}
setVideoRef = c => {
- this.video = c;
+ this.video = c
if (this.video) {
- this.setState({ volume: this.video.volume, muted: this.video.muted });
+ const { volume, muted } = this.video
+ this.setState({
+ volume,
+ muted,
+ })
}
}
setSeekRef = c => {
- this.seek = c;
+ this.seek = c
}
setVolumeRef = c => {
- this.volume = c;
+ this.volume = c
}
setCanvasRef = c => {
- this.canvas = c;
+ this.canvas = c
}
- handleClickRoot = e => e.stopPropagation();
+ handleClickRoot = e => e.stopPropagation()
handlePlay = () => {
- this.setState({ paused: false });
+ this.setState({ paused: false })
}
handlePause = () => {
- this.setState({ paused: true });
+ this.setState({ paused: true })
}
handleTimeUpdate = () => {
+ const { currentTime, duration } = this.video
this.setState({
- currentTime: Math.floor(this.video.currentTime),
- duration: Math.floor(this.video.duration),
- });
+ currentTime: Math.floor(currentTime),
+ duration: Math.floor(duration),
+ })
}
handleVolumeMouseDown = e => {
- document.addEventListener('mousemove', this.handleMouseVolSlide, true);
- document.addEventListener('mouseup', this.handleVolumeMouseUp, true);
- document.addEventListener('touchmove', this.handleMouseVolSlide, true);
- document.addEventListener('touchend', this.handleVolumeMouseUp, true);
+ document.addEventListener('mousemove', this.handleMouseVolSlide, true)
+ document.addEventListener('mouseup', this.handleVolumeMouseUp, true)
+ document.addEventListener('touchmove', this.handleMouseVolSlide, true)
+ document.addEventListener('touchend', this.handleVolumeMouseUp, true)
- this.handleMouseVolSlide(e);
+ this.handleMouseVolSlide(e)
- e.preventDefault();
- e.stopPropagation();
+ e.preventDefault()
+ e.stopPropagation()
}
handleVolumeMouseUp = () => {
- document.removeEventListener('mousemove', this.handleMouseVolSlide, true);
- document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);
- document.removeEventListener('touchmove', this.handleMouseVolSlide, true);
- document.removeEventListener('touchend', this.handleVolumeMouseUp, true);
+ document.removeEventListener('mousemove', this.handleMouseVolSlide, true)
+ document.removeEventListener('mouseup', this.handleVolumeMouseUp, true)
+ document.removeEventListener('touchmove', this.handleMouseVolSlide, true)
+ document.removeEventListener('touchend', this.handleVolumeMouseUp, true)
}
handleMouseVolSlide = throttle(e => {
- const rect = this.volume.getBoundingClientRect();
- const x = (e.clientX - rect.left) / this.volWidth; //x position within the element.
+ const rect = this.volume.getBoundingClientRect()
+ const y = 1 - ((e.clientY - rect.top) / this.volHeight)
- if (!isNaN(x)) {
- var slideamt = x;
- if (x > 1) {
- slideamt = 1;
- } else if (x < 0) {
- slideamt = 0;
+ if (!isNaN(y)) {
+ var slideamt = y
+ if (y > 1) {
+ slideamt = 1
+ } else if (y < 0) {
+ slideamt = 0
}
- this.video.volume = slideamt;
- this.setState({ volume: slideamt });
+ this.video.volume = slideamt
+ this.setState({ volume: slideamt })
}
- }, 60);
+ }, 60)
handleMouseDown = e => {
- document.addEventListener('mousemove', this.handleMouseMove, true);
- document.addEventListener('mouseup', this.handleMouseUp, true);
- document.addEventListener('touchmove', this.handleMouseMove, true);
- document.addEventListener('touchend', this.handleMouseUp, true);
+ document.addEventListener('mousemove', this.handleMouseMove, true)
+ document.addEventListener('mouseup', this.handleMouseUp, true)
+ document.addEventListener('touchmove', this.handleMouseMove, true)
+ document.addEventListener('touchend', this.handleMouseUp, true)
- this.setState({ dragging: true });
- this.video.pause();
- this.handleMouseMove(e);
+ this.setState({ dragging: true })
+ this.video.pause()
+ this.handleMouseMove(e)
- e.preventDefault();
- e.stopPropagation();
+ e.preventDefault()
+ e.stopPropagation()
}
handleMouseUp = () => {
- document.removeEventListener('mousemove', this.handleMouseMove, true);
- document.removeEventListener('mouseup', this.handleMouseUp, true);
- document.removeEventListener('touchmove', this.handleMouseMove, true);
- document.removeEventListener('touchend', this.handleMouseUp, true);
+ document.removeEventListener('mousemove', this.handleMouseMove, true)
+ document.removeEventListener('mouseup', this.handleMouseUp, true)
+ document.removeEventListener('touchmove', this.handleMouseMove, true)
+ document.removeEventListener('touchend', this.handleMouseUp, true)
- this.setState({ dragging: false });
- this.video.play();
+ this.setState({ dragging: false })
+ this.video.play()
}
handleMouseMove = throttle(e => {
- const { x } = getPointerPosition(this.seek, e);
- const currentTime = Math.floor(this.video.duration * x);
+ const { x } = getPointerPosition(this.seek, e)
+ const currentTime = Math.floor(this.video.duration * x)
if (!isNaN(currentTime)) {
- this.video.currentTime = currentTime;
- this.setState({ currentTime });
+ this.video.currentTime = currentTime
+ this.setState({ currentTime })
}
- }, 60);
+ }, 60)
togglePlay = () => {
if (this.state.paused) {
- this.video.play();
+ this.video.play()
} else {
- this.video.pause();
+ this.video.pause()
}
}
toggleFullscreen = () => {
if (isFullscreen()) {
- exitFullscreen();
+ exitFullscreen()
} else {
- requestFullscreen(this.player);
+ requestFullscreen(this.player)
}
}
componentDidMount() {
- document.addEventListener('fullscreenchange', this.handleFullscreenChange, true);
- document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);
- document.addEventListener('mozfullscreenchange', this.handleFullscreenChange, true);
- document.addEventListener('MSFullscreenChange', this.handleFullscreenChange, true);
+ document.addEventListener('fullscreenchange', this.handleFullscreenChange, true)
+ document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange, true)
+ document.addEventListener('mozfullscreenchange', this.handleFullscreenChange, true)
+ document.addEventListener('MSFullscreenChange', this.handleFullscreenChange, true)
if (this.props.blurhash) {
- this._decode();
+ this._decode()
}
}
componentWillUnmount() {
- document.removeEventListener('fullscreenchange', this.handleFullscreenChange, true);
- document.removeEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);
- document.removeEventListener('mozfullscreenchange', this.handleFullscreenChange, true);
- document.removeEventListener('MSFullscreenChange', this.handleFullscreenChange, true);
+ document.removeEventListener('fullscreenchange', this.handleFullscreenChange, true)
+ document.removeEventListener('webkitfullscreenchange', this.handleFullscreenChange, true)
+ document.removeEventListener('mozfullscreenchange', this.handleFullscreenChange, true)
+ document.removeEventListener('MSFullscreenChange', this.handleFullscreenChange, true)
}
componentWillReceiveProps(nextProps) {
if (!is(nextProps.visible, this.props.visible) && nextProps.visible !== undefined) {
- this.setState({ revealed: nextProps.visible });
+ this.setState({ revealed: nextProps.visible })
}
}
componentDidUpdate(prevProps, prevState) {
if (prevState.revealed && !this.state.revealed && this.video) {
- this.video.pause();
+ this.video.pause()
}
if (prevProps.blurhash !== this.props.blurhash && this.props.blurhash) {
- this._decode();
+ this._decode()
}
}
_decode() {
- const hash = this.props.blurhash;
- const pixels = decode(hash, 32, 32);
+ const hash = this.props.blurhash
+ const pixels = decode(hash, 32, 32)
if (pixels && this.canvas) {
- const ctx = this.canvas.getContext('2d');
- const imageData = new ImageData(pixels, 32, 32);
+ const ctx = this.canvas.getContext('2d')
+ const imageData = new ImageData(pixels, 32, 32)
- ctx.putImageData(imageData, 0, 0);
+ ctx.putImageData(imageData, 0, 0)
}
}
handleFullscreenChange = () => {
- this.setState({ fullscreen: isFullscreen() });
+ this.setState({ fullscreen: isFullscreen() })
}
handleMouseEnter = () => {
- this.setState({ hovered: true });
+ this.setState({ hovered: true })
}
handleMouseLeave = () => {
- this.setState({ hovered: false });
+ this.setState({ hovered: false })
}
+ handleMouseEnterAudio = () => {
+ this.setState({ hoveringVolumeButton: true })
+ }
+
+ handleMouseLeaveAudio = throttle(e => {
+ this.setState({ hoveringVolumeButton: false })
+ }, 2000)
+
+ handleMouseEnterVolumeControl = () => {
+ this.setState({ hoveringVolumeControl: true })
+ }
+
+ handleMouseLeaveVolumeControl = throttle(e => {
+ this.setState({ hoveringVolumeControl: false })
+ }, 2000)
+
toggleMute = () => {
- this.video.muted = !this.video.muted;
- this.setState({ muted: this.video.muted });
+ this.video.muted = !this.video.muted
+ this.setState({ muted: this.video.muted })
}
toggleReveal = () => {
if (this.props.onToggleVisibility) {
- this.props.onToggleVisibility();
+ this.props.onToggleVisibility()
} else {
- this.setState({ revealed: !this.state.revealed });
+ this.setState({ revealed: !this.state.revealed })
}
}
handleLoadedData = () => {
if (this.props.startTime) {
- this.video.currentTime = this.props.startTime;
- this.video.play();
+ this.video.currentTime = this.props.startTime
+ this.video.play()
}
}
handleProgress = () => {
- if (!this.video.buffered) return;
- if (this.video.buffered.length > 0) {
- this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });
+ const { buffered, duration } = this.video
+
+ if (!buffered) return
+ if (buffered.length > 0) {
+ this.setState({
+ buffer: buffered.end(0) / duration * 100,
+ })
}
}
handleVolumeChange = () => {
- this.setState({ volume: this.video.volume, muted: this.video.muted });
+ const { volume, muted } = this.video
+ this.setState({
+ volume,
+ muted,
+ })
}
render() {
@@ -360,8 +389,6 @@ class Video extends PureComponent {
src,
inline,
startTime,
- onOpenVideo,
- onCloseVideo,
intl,
alt,
detailed,
@@ -380,54 +407,44 @@ class Video extends PureComponent {
fullscreen,
hovered,
muted,
- revealed
+ revealed,
+ hoveringVolumeButton,
+ hoveringVolumeControl
} = this.state
- const progress = (currentTime / duration) * 100;
+ const progress = (currentTime / duration) * 100
- const volumeWidth = (muted) ? 0 : volume * this.volWidth;
- const volumeHandleLoc = (muted) ? this.volHandleOffset(0) : this.volHandleOffset(volume);
- const playerStyle = {};
+ const volumeHeight = (muted) ? 0 : volume * this.volHeight
+ const volumeHandleLoc = (muted) ? this.volHandleOffset(0) : this.volHandleOffset(volume)
+ const playerStyle = {}
- let { width, height } = this.props;
-
- console.log("buffer, progress:", buffer, progress)
+ let { width, height } = this.props
if (inline && containerWidth) {
- width = containerWidth;
- const minSize = containerWidth / (16 / 9);
+ width = containerWidth
+ const minSize = containerWidth / (16 / 9)
if (isPanoramic(aspectRatio)) {
- height = Math.max(Math.floor(containerWidth / maximumAspectRatio), minSize);
+ height = Math.max(Math.floor(containerWidth / maximumAspectRatio), minSize)
} else if (isPortrait(aspectRatio)) {
- height = Math.max(Math.floor(containerWidth / minimumAspectRatio), minSize);
+ height = Math.max(Math.floor(containerWidth / minimumAspectRatio), minSize)
} else {
- height = Math.floor(containerWidth / aspectRatio);
+ height = Math.floor(containerWidth / aspectRatio)
}
- playerStyle.height = height;
+ playerStyle.height = height
}
- let preload;
+ let preload
if (startTime || fullscreen || dragging) {
- preload = 'auto';
+ preload = 'auto'
} else if (detailed) {
- preload = 'metadata';
+ preload = 'metadata'
} else {
- preload = 'none';
+ preload = 'none'
}
- let warning;
-
- if (sensitive) {
- warning = ;
- } else {
- warning = ;
- }
-
- // console.log("width, height:", width, height)
-
// className={classNames('video-player', {
// inactive: !revealed,
// detailed,
@@ -444,6 +461,7 @@ class Video extends PureComponent {
backgroundColorBrand: 1,
marginLeftNeg5PX: 1,
z3: 1,
+ boxShadow1: 1,
opacity0: !dragging,
opacity1: dragging || hovered,
})
@@ -456,6 +474,16 @@ class Video extends PureComponent {
height4PX: 1,
})
+ const volumeControlClasses = cx({
+ default: 1,
+ positionAbsolute: 1,
+ backgroundColorOpaque: 1,
+ videoPlayerVolume: 1,
+ height122PX: 1,
+ circle: 1,
+ displayNone: !hoveringVolumeButton && !hoveringVolumeControl || !hovered,
+ })
+
return (
}
-
{
revealed &&
*/ }
-
-
+
@@ -562,7 +611,6 @@ class Video extends PureComponent {
{formatTime(duration)}
-
- );
+ )
}
}
diff --git a/app/javascript/gabsocial/features/video/video.scss b/app/javascript/gabsocial/features/video/video.scss
index a0741a44..6b39ad1f 100644
--- a/app/javascript/gabsocial/features/video/video.scss
+++ b/app/javascript/gabsocial/features/video/video.scss
@@ -26,30 +26,6 @@
}
}
- &.inline {
- video {
- object-fit: contain;
- position: relative;
- top: 50%;
- transform: translateY(-50%);
- }
- }
-
- &__controls {
- z-index: 2;
- box-sizing: border-box;
- background: linear-gradient(0deg, rgba($base-shadow-color, 0.85) 0, rgba($base-shadow-color, 0.45) 60%, transparent);
- padding: 0 15px;
- opacity: 0;
- transition: opacity .1s ease;
-
- @include abs-position(auto, 0, 0, 0);
-
- &.active {
- opacity: 1;
- }
- }
-
&.inactive {
video,
@@ -92,145 +68,4 @@
@include text-sizing(11px, 500);
}
}
-
- &__buttons-bar {
- padding-bottom: 10px;
-
- @include flex(space-between);
- }
-
- &__buttons {
- font-size: 16px;
-
- @include text-overflow(nowrap);
-
- &.left {
- button {
- padding-left: 0;
- }
- }
-
- &.right {
- button {
- padding-right: 0;
- }
- }
-
- button {
- background: transparent;
- padding: 2px 10px;
- font-size: 16px;
- border: 0;
- color: rgba($white, 0.75);
-
- &:active,
- &:hover,
- &:focus {
- color: $white;
- }
- }
- }
-
- &__time-sep,
- &__time-total,
- &__time-current {
- @include text-sizing(14px, 500);
- }
-
- &__time-current {
- color: $white;
- margin-left: 60px;
- }
-
- &__time-sep {
- display: inline-block;
- margin: 0 6px;
- }
-
- &__time-sep,
- &__time-total {
- color: $white;
- }
-
- &__volume {
- display: inline;
- height: 24px;
- cursor: pointer;
-
- &::before {
- background: rgba($white, 0.35);
- border-radius: 4px;
-
- @include pseudo;
- @include size(50px, 4px);
- @include abs-position(auto, auto, 20px, 70px, false);
- }
-
- &__current {
- display: block;
- height: 4px;
- border-radius: 4px;
- background: lighten($ui-highlight-color, 8%);
-
- @include abs-position(auto, auto, 20px, 70px);
- }
-
- &__handle {
- z-index: 3;
- transition: opacity .1s ease;
- background: lighten($ui-highlight-color, 8%);
- box-shadow: 1px 2px 6px rgba($base-shadow-color, 0.2);
- pointer-events: none;
-
- @include circle(12px);
- @include abs-position(auto, auto, 16px, 70px);
- }
- }
-
- &__link {
- padding: 2px 10px;
-
- a {
- text-decoration: none;
- color: $white;
-
- @include text-sizing(14px, 500);
-
- &:hover,
- &:active,
- &:focus {
- text-decoration: underline;
- }
- }
- }
-
- &__seek {
- cursor: pointer;
- height: 24px;
- position: relative;
-
- &::before {
- background: rgba($white, 0.35);
- border-radius: 4px;
- top: 10px;
-
- @include pseudo;
- @include size(100%, 40x);
- }
-
- &:hover {
- .video-player__seek__handle {
- opacity: 1;
- }
- }
- }
-
- &.detailed,
- &.fullscreen {
- .video-player__buttons {
- button {
- @include vertical-padding(10px);
- }
- }
- }
}
\ No newline at end of file
diff --git a/app/javascript/styles/global.css b/app/javascript/styles/global.css
index 0354c450..80848779 100644
--- a/app/javascript/styles/global.css
+++ b/app/javascript/styles/global.css
@@ -10,6 +10,7 @@ body {
overscroll-behavior-y: none;
}
+.statusContent,
.statusContent * {
margin-top: 0;
margin-bottom: 0;
@@ -18,6 +19,7 @@ body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
}
+.dangerousContent,
.dangerousContent * {
margin-top: 0;
margin-bottom: 0;
@@ -145,10 +147,6 @@ body {
outline: none;
}
-.outlineFocusBrand:focus {
- outline: 2px solid #21cf7a;
-}
-
.resizeNone {
resize: none;
}
@@ -286,7 +284,7 @@ body {
}
.backgroundColorPrimaryOpaque {
- background-color: rgba(255, 255, 255, 0.8);
+ background-color: rgba(255, 255, 255, 0.6);
}
.backgroundColorBrandLightOpaque {
@@ -509,6 +507,10 @@ body {
width: 25%;
}
+.width4PX {
+ width: 4px;
+}
+
.maxWidth100PC {
max-width: 100%;
}
@@ -714,6 +716,10 @@ body {
margin-left: -5px;
}
+.marginBottomNeg5PX {
+ margin-bottom: -5px;
+}
+
.marginRight2PX {
margin-right: 2px;
}
@@ -787,6 +793,14 @@ body {
padding-top: 10px;
}
+.paddingTop5PX {
+ padding-top: 5px;
+}
+
+.paddingBottom10PX {
+ padding-bottom: 10px;
+}
+
.paddingBottom5PX {
padding-bottom: 5px;
}
@@ -851,25 +865,59 @@ body {
padding-right: 20px;
}
-.videoPlayerControlsBackground {
- background: linear-gradient(0deg,rgba(0,0,0,.85),rgba(0,0,0,.45) 60%,transparent);
-}
-
-.videoPlayerSeek:before {
- content: '';
- display: block;
- position: absolute;
- /* background: rgba(255, 255, 255, 0.35); */
- border-radius: 4px;
- top: 10px;
- width: 100%;
- height: 40px;
-}
-
.opacity0 {
opacity: 0;
}
.opacity1 {
opacity: 1;
-}
\ No newline at end of file
+}
+
+.boxShadow1 {
+ box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, .25);
+}
+
+.listStyleNone {
+ list-style: none;
+}
+
+.videoPlayerControlsBackground {
+ background: linear-gradient(0deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .45) 60%, transparent);
+}
+
+.videoPlayerSeek:before {
+ content: '';
+ display: block;
+ position: absolute;
+ border-radius: 4px;
+ top: 10px;
+ width: 100%;
+ height: 40px;
+}
+
+.videoPlayerVolume {
+ width: 24px;
+ right: 65px;
+ bottom: 60px;
+}
+
+.select {
+ height: 42px;
+ line-height: 42px;
+ font-size: 18px;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+}
+
+.emojione {
+ margin: -3px 0 0;
+ height: 20px;
+ width: 20px;
+}
+
+/* .videoPlayerVolume:before {
+ content: '';
+ display: block;
+ position: absolute;
+} */
\ No newline at end of file
diff --git a/package.json b/package.json
index 704292f5..5be22b49 100644
--- a/package.json
+++ b/package.json
@@ -143,7 +143,6 @@
"react-redux-loading-bar": "^4.0.8",
"react-router-dom": "^4.1.1",
"react-router-scroll-4": "^1.0.0-beta.1",
- "react-select": "^2.4.4",
"react-stickynode": "^2.1.1",
"react-swipeable-views": "^0.13.0",
"react-textarea-autosize": "^7.1.0",
diff --git a/yarn.lock b/yarn.lock
index 309c4f8c..44c5e726 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1540,18 +1540,6 @@
exec-sh "^0.3.2"
minimist "^1.2.0"
-"@emotion/babel-utils@^0.6.4":
- version "0.6.10"
- resolved "https://registry.yarnpkg.com/@emotion/babel-utils/-/babel-utils-0.6.10.tgz#83dbf3dfa933fae9fc566e54fbb45f14674c6ccc"
- integrity sha512-/fnkM/LTEp3jKe++T0KyTszVGWNKPNOUJfjNKLO17BzQ6QPxgbg3whayom1Qr2oLFH3V92tDymU+dT5q676uow==
- dependencies:
- "@emotion/hash" "^0.6.6"
- "@emotion/memoize" "^0.6.6"
- "@emotion/serialize" "^0.9.1"
- convert-source-map "^1.5.1"
- find-root "^1.1.0"
- source-map "^0.7.2"
-
"@emotion/cache@^10.0.27":
version "10.0.27"
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.27.tgz#7895db204e2c1a991ae33d51262a3a44f6737303"
@@ -1588,11 +1576,6 @@
resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.7.4.tgz#f14932887422c9056b15a8d222a9074a7dfa2831"
integrity sha512-fxfMSBMX3tlIbKUdtGKxqB1fyrH6gVrX39Gsv3y8lRYKUqlgDt3UMqQyGnR1bQMa2B8aGnhLZokZgg8vT0Le+A==
-"@emotion/hash@^0.6.2", "@emotion/hash@^0.6.6":
- version "0.6.6"
- resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.6.6.tgz#62266c5f0eac6941fece302abad69f2ee7e25e44"
- integrity sha512-ojhgxzUHZ7am3D2jHkMzPpsBAiB005GF5YU4ea+8DNPybMk01JJUM9V9YRlF/GE95tcOm8DxQvWA2jq19bGalQ==
-
"@emotion/is-prop-valid@0.8.6":
version "0.8.6"
resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.6.tgz#4757646f0a58e9dec614c47c838e7147d88c263c"
@@ -1605,11 +1588,6 @@
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb"
integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==
-"@emotion/memoize@^0.6.1", "@emotion/memoize@^0.6.6":
- version "0.6.6"
- resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.6.tgz#004b98298d04c7ca3b4f50ca2035d4f60d2eed1b"
- integrity sha512-h4t4jFjtm1YV7UirAFuSuFGyLa+NNxjdkq6DpFLANNQY5rHueFZHVY+8Cu1HYVP6DrheB0kv4m5xPjo7eKT7yQ==
-
"@emotion/serialize@^0.11.15":
version "0.11.15"
resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.15.tgz#9a0f5873fb458d87d4f23e034413c12ed60a705a"
@@ -1621,16 +1599,6 @@
"@emotion/utils" "0.11.3"
csstype "^2.5.7"
-"@emotion/serialize@^0.9.1":
- version "0.9.1"
- resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.9.1.tgz#a494982a6920730dba6303eb018220a2b629c145"
- integrity sha512-zTuAFtyPvCctHBEL8KZ5lJuwBanGSutFEncqLn/m9T1a6a93smBStK+bZzcNPgj4QS8Rkw9VTwJGhRIUVO8zsQ==
- dependencies:
- "@emotion/hash" "^0.6.6"
- "@emotion/memoize" "^0.6.6"
- "@emotion/unitless" "^0.6.7"
- "@emotion/utils" "^0.8.2"
-
"@emotion/sheet@0.9.4":
version "0.9.4"
resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5"
@@ -1659,31 +1627,16 @@
resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04"
integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==
-"@emotion/stylis@^0.7.0":
- version "0.7.1"
- resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.7.1.tgz#50f63225e712d99e2b2b39c19c70fff023793ca5"
- integrity sha512-/SLmSIkN13M//53TtNxgxo57mcJk/UJIDFRKwOiLIBEyBHEcipgR6hNMQ/59Sl4VjCJ0Z/3zeAZyvnSLPG/1HQ==
-
"@emotion/unitless@0.7.5":
version "0.7.5"
resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed"
integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==
-"@emotion/unitless@^0.6.2", "@emotion/unitless@^0.6.7":
- version "0.6.7"
- resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.6.7.tgz#53e9f1892f725b194d5e6a1684a7b394df592397"
- integrity sha512-Arj1hncvEVqQ2p7Ega08uHLr1JuRYBuO5cIvcA+WWEQ5+VmkOE3ZXzl04NbQxeQpWX78G7u6MqxKuNX3wvYZxg==
-
"@emotion/utils@0.11.3":
version "0.11.3"
resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924"
integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw==
-"@emotion/utils@^0.8.2":
- version "0.8.2"
- resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.8.2.tgz#576ff7fb1230185b619a75d258cbc98f0867a8dc"
- integrity sha512-rLu3wcBWH4P5q1CGoSSH/i9hrXs7SlbRLkoq9IGuoPYNGQvDJ3pt/wmOM+XgYjIDRMVIdkUWt0RsfzF50JfnCw==
-
"@emotion/weak-memoize@0.2.5":
version "0.2.5"
resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46"
@@ -3232,24 +3185,6 @@ babel-plugin-emotion@^10.0.20, babel-plugin-emotion@^10.0.27:
find-root "^1.1.0"
source-map "^0.5.7"
-babel-plugin-emotion@^9.2.11:
- version "9.2.11"
- resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-9.2.11.tgz#319c005a9ee1d15bb447f59fe504c35fd5807728"
- integrity sha512-dgCImifnOPPSeXod2znAmgc64NhaaOjGEHROR/M+lmStb3841yK1sgaDYAYMnlvWNz8GnpwIPN0VmNpbWYZ+VQ==
- dependencies:
- "@babel/helper-module-imports" "^7.0.0"
- "@emotion/babel-utils" "^0.6.4"
- "@emotion/hash" "^0.6.2"
- "@emotion/memoize" "^0.6.1"
- "@emotion/stylis" "^0.7.0"
- babel-plugin-macros "^2.0.0"
- babel-plugin-syntax-jsx "^6.18.0"
- convert-source-map "^1.5.0"
- find-root "^1.1.0"
- mkdirp "^0.5.1"
- source-map "^0.5.7"
- touch "^2.0.1"
-
babel-plugin-istanbul@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854"
@@ -4475,7 +4410,7 @@ content-type@~1.0.4:
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
-convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1:
+convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==
@@ -4601,19 +4536,6 @@ create-ecdh@^4.0.0:
bn.js "^4.1.0"
elliptic "^6.0.0"
-create-emotion@^9.2.12:
- version "9.2.12"
- resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-9.2.12.tgz#0fc8e7f92c4f8bb924b0fef6781f66b1d07cb26f"
- integrity sha512-P57uOF9NL2y98Xrbl2OuiDQUZ30GVmASsv5fbsjF4Hlraip2kyAvMm+2PoYUvFFw03Fhgtxk3RqZSm2/qHL9hA==
- dependencies:
- "@emotion/hash" "^0.6.2"
- "@emotion/memoize" "^0.6.1"
- "@emotion/stylis" "^0.7.0"
- "@emotion/unitless" "^0.6.2"
- csstype "^2.5.2"
- stylis "^3.5.0"
- stylis-rule-sheet "^0.0.10"
-
create-hash@^1.1.0, create-hash@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196"
@@ -4936,7 +4858,7 @@ cssstyle@^1.0.0:
dependencies:
cssom "0.3.x"
-csstype@^2.2.0, csstype@^2.5.2:
+csstype@^2.2.0:
version "2.6.7"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.7.tgz#20b0024c20b6718f4eda3853a1f5a1cce7f5e4a5"
integrity sha512-9Mcn9sFbGBAdmimWb2gLVDtFJzeKtDGIr76TUqmjZrw9LFXBMSU70lcs+C0/7fyCd6iBDqmksUcCOUIkisPHsQ==
@@ -5497,14 +5419,6 @@ emotion-theming@^10.0.19:
"@emotion/weak-memoize" "0.2.5"
hoist-non-react-statics "^3.3.0"
-emotion@^9.1.2:
- version "9.2.12"
- resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.2.12.tgz#53925aaa005614e65c6e43db8243c843574d1ea9"
- integrity sha512-hcx7jppaI8VoXxIWEhxpDW7I+B4kq9RNzQLmsrF6LY8BGKqe2N+gFAQr0EfuFucFlPs2A9HM4+xNj4NeqEWIOQ==
- dependencies:
- babel-plugin-emotion "^9.2.11"
- create-emotion "^9.2.12"
-
encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
@@ -8975,11 +8889,6 @@ mem@^4.0.0:
mimic-fn "^2.0.0"
p-is-promise "^2.0.0"
-memoize-one@^5.0.0:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0"
- integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA==
-
memoizerific@^1.11.3:
version "1.11.3"
resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a"
@@ -9572,13 +9481,6 @@ nopt@^4.0.1:
abbrev "1"
osenv "^0.1.4"
-nopt@~1.0.10:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
- integrity sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=
- dependencies:
- abbrev "1"
-
normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
@@ -11393,13 +11295,6 @@ react-infinite-scroller@^1.0.12:
dependencies:
prop-types "^15.5.8"
-react-input-autosize@^2.2.1:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz#fcaa7020568ec206bc04be36f4eb68e647c4d8c2"
- integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw==
- dependencies:
- prop-types "^15.5.8"
-
react-intl-translations-manager@^5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/react-intl-translations-manager/-/react-intl-translations-manager-5.0.3.tgz#aee010ecf35975673e033ca5d7d3f4147894324d"
@@ -11559,19 +11454,6 @@ react-router@^4.3.1:
prop-types "^15.6.1"
warning "^4.0.1"
-react-select@^2.4.4:
- version "2.4.4"
- resolved "https://registry.yarnpkg.com/react-select/-/react-select-2.4.4.tgz#ba72468ef1060c7d46fbb862b0748f96491f1f73"
- integrity sha512-C4QPLgy9h42J/KkdrpVxNmkY6p4lb49fsrbDk/hRcZpX7JvZPNb6mGj+c5SzyEtBv1DmQ9oPH4NmhAFvCrg8Jw==
- dependencies:
- classnames "^2.2.5"
- emotion "^9.1.2"
- memoize-one "^5.0.0"
- prop-types "^15.6.0"
- raf "^3.4.0"
- react-input-autosize "^2.2.1"
- react-transition-group "^2.2.1"
-
react-sizeme@^2.6.7:
version "2.6.12"
resolved "https://registry.yarnpkg.com/react-sizeme/-/react-sizeme-2.6.12.tgz#ed207be5476f4a85bf364e92042520499455453e"
@@ -11660,7 +11542,7 @@ react-toggle@^4.0.1:
dependencies:
classnames "^2.2.5"
-react-transition-group@^2.2.0, react-transition-group@^2.2.1:
+react-transition-group@^2.2.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d"
integrity sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==
@@ -12742,11 +12624,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
-source-map@^0.7.2:
- version "0.7.3"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
- integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
-
space-separated-tokens@^1.0.0:
version "1.1.5"
resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899"
@@ -13141,16 +13018,6 @@ stylehacks@^4.0.0:
postcss "^7.0.0"
postcss-selector-parser "^3.0.0"
-stylis-rule-sheet@^0.0.10:
- version "0.0.10"
- resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430"
- integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==
-
-stylis@^3.5.0:
- version "3.5.4"
- resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe"
- integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==
-
subscribe-ui-event@^2.0.0:
version "2.0.5"
resolved "https://registry.yarnpkg.com/subscribe-ui-event/-/subscribe-ui-event-2.0.5.tgz#f276d8eae3f82b640e69d7b9d55f7334f9ec67ec"
@@ -13514,13 +13381,6 @@ toidentifier@1.0.0:
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
-touch@^2.0.1:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/touch/-/touch-2.0.2.tgz#ca0b2a3ae3211246a61b16ba9e6cbf1596287164"
- integrity sha512-qjNtvsFXTRq7IuMLweVgFxmEuQ6gLbRs2jQxL80TtZ31dEKWYIxRXquij6w6VimyDek5hD3PytljHmEtAs2u0A==
- dependencies:
- nopt "~1.0.10"
-
tough-cookie@^2.3.3, tough-cookie@^2.3.4:
version "2.5.0"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"