diff --git a/app/javascript/gabsocial/components/status/status.scss b/app/javascript/gabsocial/components/status/status.scss
index 35c88713..53e3fd18 100644
--- a/app/javascript/gabsocial/components/status/status.scss
+++ b/app/javascript/gabsocial/components/status/status.scss
@@ -28,11 +28,6 @@
margin-top: 8px;
}
- &.status-direct:not(.read) {
- background: lighten($ui-base-color, 8%);
- border-bottom-color: lighten($ui-base-color, 12%);
- }
-
&.light {
.status__relative-time {
color: $light-text-color;
diff --git a/app/javascript/gabsocial/components/status_action_bar/status_action_bar.js b/app/javascript/gabsocial/components/status_action_bar.js
similarity index 96%
rename from app/javascript/gabsocial/components/status_action_bar/status_action_bar.js
rename to app/javascript/gabsocial/components/status_action_bar.js
index 6ce8c033..4aaf3d58 100644
--- a/app/javascript/gabsocial/components/status_action_bar/status_action_bar.js
+++ b/app/javascript/gabsocial/components/status_action_bar.js
@@ -2,11 +2,11 @@ import ImmutablePropTypes from 'react-immutable-proptypes'
import ImmutablePureComponent from 'react-immutable-pure-component'
import { defineMessages, injectIntl } from 'react-intl'
import classNames from 'classnames/bind'
-import { openModal } from '../../actions/modal'
-import { me, isStaff } from '../../initial_state'
-import ComposeFormContainer from '../../features/compose/containers/compose_form_container'
-import Icon from '../icon'
-import StatusActionBarItem from '../status_action_bar_item'
+import { openModal } from '../actions/modal'
+import { me, isStaff } from '../initial_state'
+import ComposeFormContainer from '../features/compose/containers/compose_form_container'
+import Icon from './icon'
+import StatusActionBarItem from './status_action_bar_item'
const messages = defineMessages({
delete: { id: 'status.delete', defaultMessage: 'Delete' },
diff --git a/app/javascript/gabsocial/components/status_action_bar/index.js b/app/javascript/gabsocial/components/status_action_bar/index.js
index 290dff2f..acb1ab4f 100644
--- a/app/javascript/gabsocial/components/status_action_bar/index.js
+++ b/app/javascript/gabsocial/components/status_action_bar/index.js
@@ -1 +1 @@
-export { default } from './status_action_bar'
\ No newline at end of file
+export { default } from '../status_action_bar'
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/status_action_bar/status_action_bar.scss b/app/javascript/gabsocial/components/status_action_bar/status_action_bar.scss
deleted file mode 100644
index 6c11c721..00000000
--- a/app/javascript/gabsocial/components/status_action_bar/status_action_bar.scss
+++ /dev/null
@@ -1,59 +0,0 @@
-.status-action-bar {
- display: block;
- margin-top: 10px;
- z-index: 4;
-
- @include horizontal-padding(10px);
-
- &__dropdown {
- @include size(23px);
- }
-
- &__items {
- display: flex;
- align-items: center;
- border-top: 1px solid #161616;
-
- @include size(100%, 42px);
- }
-
- &__comment {
-
- }
-}
-
-.status-action-bar-item {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- height: 42px;
- width: 33%;
- padding: 5px;
- box-sizing: border-box;
-
- &__btn {
- border-radius: 4px;
- margin-right: 4px;
- font-size: 14px;
- font-weight: 500;
-
- @include size(100%);
-
- &:hover {
- background-color: #000;
- }
-
- i {
- margin-right: 4px;
- }
- }
-
- &__link {
- display: inline-block;
- color: $action-button-color;
- cursor: pointer;
- text-decoration: none;
-
- @include text-sizing(14px, 500);
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/status_list/status_list.js b/app/javascript/gabsocial/components/status_list.js
similarity index 95%
rename from app/javascript/gabsocial/components/status_list/status_list.js
rename to app/javascript/gabsocial/components/status_list.js
index dda05a8a..071c3c43 100644
--- a/app/javascript/gabsocial/components/status_list/status_list.js
+++ b/app/javascript/gabsocial/components/status_list.js
@@ -2,10 +2,10 @@ import { Fragment } from 'react';
import { debounce } from 'lodash';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import StatusContainer from '../../containers/status_container';
-import ScrollableList from '../scrollable_list';
-import TimelineQueueButtonHeader from '../timeline_queue_button_header';
-import ColumnIndicator from '../column_indicator';
+import StatusContainer from '../containers/status_container';
+import ScrollableList from './scrollable_list';
+import TimelineQueueButtonHeader from './timeline_queue_button_header';
+import ColumnIndicator from './column_indicator';
export default class StatusList extends ImmutablePureComponent {
diff --git a/app/javascript/gabsocial/components/status_list/index.js b/app/javascript/gabsocial/components/status_list/index.js
index 8c6aec58..377a5417 100644
--- a/app/javascript/gabsocial/components/status_list/index.js
+++ b/app/javascript/gabsocial/components/status_list/index.js
@@ -1 +1 @@
-export { default } from './status_list'
\ No newline at end of file
+export { default } from '../status_list'
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/status_quote/status_quote.js b/app/javascript/gabsocial/components/status_quote.js
similarity index 90%
rename from app/javascript/gabsocial/components/status_quote/status_quote.js
rename to app/javascript/gabsocial/components/status_quote.js
index 36d6777c..053eda6b 100644
--- a/app/javascript/gabsocial/components/status_quote/status_quote.js
+++ b/app/javascript/gabsocial/components/status_quote.js
@@ -1,6 +1,6 @@
import ImmutablePropTypes from 'react-immutable-proptypes';
-import StatusContent from '../status_content';
-import DisplayName from '../display_name';
+import StatusContent from './status_content';
+import DisplayName from './display_name';
import { NavLink } from 'react-router-dom';
const mapStateToProps = (state, { id }) => ({
diff --git a/app/javascript/gabsocial/components/status_quote/index.js b/app/javascript/gabsocial/components/status_quote/index.js
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/javascript/gabsocial/components/status_revision_list/status_revision_list.js b/app/javascript/gabsocial/components/status_revision_list.js
similarity index 77%
rename from app/javascript/gabsocial/components/status_revision_list/status_revision_list.js
rename to app/javascript/gabsocial/components/status_revision_list.js
index bc2d959f..a0437529 100644
--- a/app/javascript/gabsocial/components/status_revision_list/status_revision_list.js
+++ b/app/javascript/gabsocial/components/status_revision_list.js
@@ -1,7 +1,6 @@
import { injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import ModalLoading from './modal_loading';
import RelativeTimestamp from './relative_timestamp';
export default
@@ -17,13 +16,15 @@ class StatusRevisionsList extends ImmutablePureComponent {
render() {
const { loading, error, data } = this.props;
- if (loading || !data) return
diff --git a/app/javascript/gabsocial/components/status_revision_list/index.js b/app/javascript/gabsocial/components/status_revision_list/index.js
deleted file mode 100644
index e69de29b..00000000
diff --git a/app/javascript/gabsocial/features/account_timeline/account_timeline.js b/app/javascript/gabsocial/features/account_timeline/account_timeline.js
index 3f3bdda4..f54305bc 100644
--- a/app/javascript/gabsocial/features/account_timeline/account_timeline.js
+++ b/app/javascript/gabsocial/features/account_timeline/account_timeline.js
@@ -4,7 +4,7 @@ import { List as ImmutableList } from 'immutable'
import { injectIntl, defineMessages } from 'react-intl'
import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines'
import { fetchAccountIdentityProofs } from '../../actions/identity_proofs'
-import StatusList from '../../components/status_list/status_list'
+import StatusList from '../../components/status_list'
const messages = defineMessages({
empty: { id: 'empty_column.account_timeline', defaultMessage: 'No gabs here!' },
diff --git a/app/javascript/gabsocial/features/group_create.js b/app/javascript/gabsocial/features/group_create.js
index 4bbf6155..4d3f4040 100644
--- a/app/javascript/gabsocial/features/group_create.js
+++ b/app/javascript/gabsocial/features/group_create.js
@@ -1,5 +1,9 @@
+import ImmutablePropTypes from 'react-immutable-proptypes'
+import ImmutablePureComponent from 'react-immutable-pure-component'
import { defineMessages, injectIntl } from 'react-intl'
-import { changeValue, submit, reset } from '../actions/group_editor'
+import isObject from 'lodash.isobject'
+import { changeValue, submit, setUp, reset } from '../actions/group_editor'
+import ColumnIndicator from '../components/column_indicator';
import Button from '../components/button'
import Divider from '../components/divider'
import Input from '../components/input'
@@ -13,14 +17,25 @@ const messages = defineMessages({
coverImage: { id: 'groups.form.coverImage', defaultMessage: 'Upload a banner image' },
coverImageChange: { id: 'groups.form.coverImageChange', defaultMessage: 'Banner image selected' },
create: { id: 'groups.form.create', defaultMessage: 'Create group' },
+ update: { id: 'groups.form.update', defaultMessage: 'Update group' },
})
-const mapStateToProps = state => ({
- title: state.getIn(['group_editor', 'title']),
- description: state.getIn(['group_editor', 'description']),
- coverImage: state.getIn(['group_editor', 'coverImage']),
- disabled: state.getIn(['group_editor', 'isSubmitting']),
-})
+const mapStateToProps = (state, { params }) => {
+
+ console.log('params:', params)
+
+ const groupId = isObject(params) ? params['id'] : null
+ const group = state.getIn(['groups', groupId])
+
+ return {
+ group,
+ error: groupId && !group,
+ title: state.getIn(['group_editor', 'title']),
+ description: state.getIn(['group_editor', 'description']),
+ coverImage: state.getIn(['group_editor', 'coverImage']),
+ disabled: state.getIn(['group_editor', 'isSubmitting']),
+ }
+}
const mapDispatchToProps = dispatch => ({
onTitleChange: value => dispatch(changeValue('title', value)),
@@ -28,18 +43,20 @@ const mapDispatchToProps = dispatch => ({
onCoverImageChange: value => dispatch(changeValue('coverImage', value)),
onSubmit: routerHistory => dispatch(submit(routerHistory)),
reset: () => dispatch(reset()),
+ setUp: group => dispatch(setUp(group)),
})
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
-class Create extends PureComponent {
+class Create extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object
}
static propTypes = {
+ group: ImmutablePropTypes.map,
title: PropTypes.string.isRequired,
description: PropTypes.string.isRequired,
coverImage: PropTypes.object,
@@ -50,7 +67,17 @@ class Create extends PureComponent {
}
componentWillMount() {
- this.props.reset()
+ if (!this.props.group) {
+ this.props.reset()
+ } else {
+ this.props.setUp(this.props.group)
+ }
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (this.props.group !== nextProps.group && !!nextProps.group) {
+ this.props.setUp(nextProps.group)
+ }
}
handleTitleChange = e => {
@@ -72,6 +99,8 @@ class Create extends PureComponent {
render() {
const {
+ group,
+ error,
title,
description,
coverImage,
@@ -79,6 +108,10 @@ class Create extends PureComponent {
intl
} = this.props
+ if (!group && error) {
+ return
+ }
+
return (
- );
- }
-
-}
diff --git a/app/javascript/gabsocial/features/list_edit/components/edit_list_form/edit_list_form.js b/app/javascript/gabsocial/features/list_edit/components/edit_list_form/edit_list_form.js
index be6b3abc..3354a4ef 100644
--- a/app/javascript/gabsocial/features/list_edit/components/edit_list_form/edit_list_form.js
+++ b/app/javascript/gabsocial/features/list_edit/components/edit_list_form/edit_list_form.js
@@ -1,6 +1,5 @@
import { defineMessages, injectIntl } from 'react-intl';
import { changeListEditorTitle, submitListEditor } from '../../../../actions/lists';
-import ColumnInlineForm from '../../../../components/column_inline_form';
const messages = defineMessages({
title: { id: 'lists.edit.submit', defaultMessage: 'Change title' },
@@ -33,16 +32,18 @@ class ListForm extends PureComponent {
render () {
const { value, disabled, intl, onSubmit, onChange } = this.props;
- return (
-
- );
+ return null;
+
+ // return (
+ //
+ // );
}
}
diff --git a/app/javascript/gabsocial/features/ui/ui.js b/app/javascript/gabsocial/features/ui/ui.js
index 589b581e..937b2cad 100644
--- a/app/javascript/gabsocial/features/ui/ui.js
+++ b/app/javascript/gabsocial/features/ui/ui.js
@@ -46,7 +46,6 @@ import {
GettingStarted,
GroupsCollection,
GroupCreate,
- GroupEdit,
GroupMembers,
GroupRemovedAccounts,
GroupTimeline,
@@ -151,7 +150,7 @@ class SwitchingArea extends PureComponent {
-
+
diff --git a/app/javascript/gabsocial/features/ui/util/async-components.js b/app/javascript/gabsocial/features/ui/util/async-components.js
index 6b3b6ced..195087d0 100644
--- a/app/javascript/gabsocial/features/ui/util/async-components.js
+++ b/app/javascript/gabsocial/features/ui/util/async-components.js
@@ -58,10 +58,6 @@ export function GroupCreate() {
return import(/* webpackChunkName: "features/group_create" */'../../group_create')
}
-export function GroupEdit() {
- return import(/* webpackChunkName: "features/group_edit" */'../../group_edit')
-}
-
export function GroupMembers() {
return import(/* webpackChunkName: "features/group_members" */'../../group_members')
}
diff --git a/app/javascript/gabsocial/features/video/video.js b/app/javascript/gabsocial/features/video/video.js
index 44c1338e..903e1ce7 100644
--- a/app/javascript/gabsocial/features/video/video.js
+++ b/app/javascript/gabsocial/features/video/video.js
@@ -1,12 +1,16 @@
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { fromJS, is } from 'immutable';
-import { throttle } from 'lodash';
-import classNames from 'classnames';
-import { decode } from 'blurhash';
-import { isFullscreen, requestFullscreen, exitFullscreen } from '../../utils/fullscreen';
-import { isPanoramic, isPortrait, minimumAspectRatio, maximumAspectRatio } from '../../utils/media_aspect_ratio';
-import { displayMedia } from '../../initial_state';
-import Icon from '../../components/icon';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'
+import { fromJS, is } from 'immutable'
+import { throttle } from 'lodash'
+import classNames from 'classnames/bind'
+import { decode } from 'blurhash'
+import { isFullscreen, requestFullscreen, exitFullscreen } from '../../utils/fullscreen'
+import { isPanoramic, isPortrait, minimumAspectRatio, maximumAspectRatio } from '../../utils/media_aspect_ratio'
+import { displayMedia } from '../../initial_state'
+import Button from '../../components/button'
+import Icon from '../../components/icon'
+import Text from '../../components/text'
+
+const cx = classNames.bind(_s)
const messages = defineMessages({
play: { id: 'video.play', defaultMessage: 'Play' },
@@ -14,8 +18,6 @@ const messages = defineMessages({
mute: { id: 'video.mute', defaultMessage: 'Mute sound' },
unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },
hide: { id: 'video.hide', defaultMessage: 'Hide video' },
- expand: { id: 'video.expand', defaultMessage: 'Expand video' },
- close: { id: 'video.close', defaultMessage: 'Close video' },
fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },
exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },
});
@@ -106,7 +108,6 @@ class Video extends PureComponent {
onToggleVisibility: PropTypes.func,
intl: PropTypes.object.isRequired,
blurhash: PropTypes.string,
- link: PropTypes.node,
aspectRatio: PropTypes.number,
};
@@ -302,7 +303,7 @@ class Video extends PureComponent {
const hash = this.props.blurhash;
const pixels = decode(hash, 32, 32);
- if (pixels) {
+ if (pixels && this.canvas) {
const ctx = this.canvas.getContext('2d');
const imageData = new ImageData(pixels, 32, 32);
@@ -353,30 +354,35 @@ class Video extends PureComponent {
this.setState({ volume: this.video.volume, muted: this.video.muted });
}
- handleOpenVideo = () => {
- const { src, preview, width, height, alt } = this.props;
-
- const media = fromJS({
- type: 'video',
- url: src,
- preview_url: preview,
- description: alt,
- width,
- height,
- });
-
- this.video.pause();
- this.props.onOpenVideo(media, this.video.currentTime);
- }
-
- handleCloseVideo = () => {
- this.video.pause();
- this.props.onCloseVideo();
- }
-
render() {
- const { preview, src, inline, startTime, onOpenVideo, onCloseVideo, intl, alt, detailed, sensitive, link, aspectRatio } = this.props;
- const { containerWidth, currentTime, duration, volume, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state;
+ const {
+ preview,
+ src,
+ inline,
+ startTime,
+ onOpenVideo,
+ onCloseVideo,
+ intl,
+ alt,
+ detailed,
+ sensitive,
+ aspectRatio
+ } = this.props
+
+ const {
+ containerWidth,
+ currentTime,
+ duration,
+ volume,
+ buffer,
+ dragging,
+ paused,
+ fullscreen,
+ hovered,
+ muted,
+ revealed
+ } = this.state
+
const progress = (currentTime / duration) * 100;
const volumeWidth = (muted) ? 0 : volume * this.volWidth;
@@ -385,6 +391,8 @@ class Video extends PureComponent {
let { width, height } = this.props;
+ console.log("buffer, progress:", buffer, progress)
+
if (inline && containerWidth) {
width = containerWidth;
const minSize = containerWidth / (16 / 9);
@@ -418,10 +426,40 @@ class Video extends PureComponent {
warning =
;
}
+ // console.log("width, height:", width, height)
+
+ // className={classNames('video-player', {
+ // inactive: !revealed,
+ // detailed,
+ // inline: inline && !fullscreen,
+ // fullscreen
+ // })}
+
+ const seekHandleClasses = cx({
+ default: 1,
+ positionAbsolute: 1,
+ circle: 1,
+ paddingHorizontal10PX: 1,
+ paddingVertical10PX: 1,
+ backgroundColorBrand: 1,
+ marginLeftNeg5PX: 1,
+ z3: 1,
+ opacity0: !dragging,
+ opacity1: dragging || hovered,
+ })
+
+ const progressClasses = cx({
+ default: 1,
+ radiusSmall: 1,
+ marginTop10PX: 1,
+ positionAbsolute: 1,
+ height4PX: 1,
+ })
+
return (
-
- {revealed &&
}
+ {
+ !revealed &&
+
+ }
-
+
+ {
+ revealed &&
+
+ }
+
+ { /*
+
*/ }
+
+
-
-
-
-
+
+
+
-
-
-
-
+
+
-
+
+
+ {formatTime(currentTime)}
+ /
+ {formatTime(duration)}
+
- {(detailed || fullscreen) && (
-
- {formatTime(currentTime)}
- /
- {formatTime(duration)}
-
- )}
- {link && {link}}
-
+
-
- {!onCloseVideo && }
- {(!fullscreen && onOpenVideo) && }
- {onCloseVideo && }
-
+
+
);
diff --git a/app/javascript/gabsocial/features/video/video.scss b/app/javascript/gabsocial/features/video/video.scss
index 99e82f84..a0741a44 100644
--- a/app/javascript/gabsocial/features/video/video.scss
+++ b/app/javascript/gabsocial/features/video/video.scss
@@ -218,37 +218,6 @@
@include size(100%, 40x);
}
- &__progress,
- &__buffer {
- display: block;
- height: 4px;
- border-radius: 4px;
- background: lighten($ui-highlight-color, 8%);
-
- @include abs-position(10px);
- }
-
- &__buffer {
- background: rgba($white, 0.2);
- }
-
- &__handle {
- z-index: 3;
- opacity: 0;
- margin-left: -6px;
- 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(6px);
-
- &.active {
- opacity: 1;
- }
- }
-
&:hover {
.video-player__seek__handle {
opacity: 1;
diff --git a/app/javascript/styles/global.css b/app/javascript/styles/global.css
index 88b5c765..0354c450 100644
--- a/app/javascript/styles/global.css
+++ b/app/javascript/styles/global.css
@@ -281,6 +281,10 @@ body {
background-color: #fff;
}
+.backgroundColorWhite {
+ background-color: #fff;
+}
+
.backgroundColorPrimaryOpaque {
background-color: rgba(255, 255, 255, 0.8);
}
@@ -433,6 +437,10 @@ body {
height: 22px;
}
+.height4PX {
+ height: 4px;
+}
+
.height50PX {
height: 50px;
}
@@ -702,6 +710,10 @@ body {
margin-left: 5px;
}
+.marginLeftNeg5PX {
+ margin-left: -5px;
+}
+
.marginRight2PX {
margin-right: 2px;
}
@@ -775,6 +787,10 @@ body {
padding-top: 10px;
}
+.paddingBottom5PX {
+ padding-bottom: 5px;
+}
+
.paddingHorizontal15PX {
padding-left: 15px;
padding-right: 15px;
@@ -784,6 +800,14 @@ body {
padding-left: 15px;
}
+.paddingLeft0 {
+ padding-left: 0;
+}
+
+.paddingRight0 {
+ padding-right: 0;
+}
+
.paddingRight15PX {
padding-right: 15px;
}
@@ -825,4 +849,27 @@ body {
.paddingHorizontal20PX {
padding-left: 20px;
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