-
*/}
+
+
+
{ /*
- case 'angle-right':
- return
- case 'apps':
- return
- case 'audio':
- return
- case 'audio-mute':
- return
- case 'back':
- return
- case 'calendar':
- return
- case 'chat':
- return
- case 'close':
- return
- case 'comment':
- return
- case 'dissenter':
- return
- case 'ellipsis':
- return
- case 'error':
- return
- case 'fullscreen':
- return
- case 'globe':
- return
- case 'group':
- return
- case 'group-add':
- return
- case 'happy':
- return
- case 'home':
- return
- case 'like':
- return
- case 'link':
- return
- case 'list':
- return
- case 'list-add':
- return
- case 'loading':
- return
- case 'media':
- return
- case 'minimize-fullscreen':
- return
- case 'missing':
- return
- case 'more':
- return
- case 'notifications':
- return
- case 'pause':
- return
- case 'pin':
- return
- case 'play':
- return
- case 'poll':
- return
- case 'repost':
- return
- case 'search':
- return
- case 'search-alt':
- return
- case 'share':
- return
- case 'shop':
- return
- case 'subtract':
- return
- case 'trends':
- return
- case 'verified':
- return
- case 'warning':
- return
- default:
- return
- }
+ // : todo : add all required icons
+ const Asset = ICONS[id] || CircleIcon
+
+ return
}
}
diff --git a/app/javascript/gabsocial/components/intersection_observer_article.js b/app/javascript/gabsocial/components/intersection_observer_article.js
index cfc8a99f..940ff6e1 100644
--- a/app/javascript/gabsocial/components/intersection_observer_article.js
+++ b/app/javascript/gabsocial/components/intersection_observer_article.js
@@ -115,12 +115,19 @@ class IntersectionObserverArticle extends Component {
}
render() {
- const { children, id, index, listLength, cachedHeight } = this.props
+ const {
+ children,
+ id,
+ index,
+ listLength,
+ cachedHeight
+ } = this.props
const { isIntersecting, isHidden } = this.state
if (!isIntersecting && (isHidden || cachedHeight)) {
return (
- {children && React.cloneElement(children, { hidden: true })}
+ {
+ children &&
+ React.cloneElement(children, { hidden: true })
+ }
)
}
@@ -141,7 +151,10 @@ class IntersectionObserverArticle extends Component {
data-id={id}
tabIndex='0'
>
- {children && React.cloneElement(children, { hidden: false })}
+ {
+ children &&
+ React.cloneElement(children, { hidden: false })
+ }
)
}
diff --git a/app/javascript/gabsocial/components/modal/edit_profile_modal.js b/app/javascript/gabsocial/components/modal/edit_profile_modal.js
new file mode 100644
index 00000000..120275c3
--- /dev/null
+++ b/app/javascript/gabsocial/components/modal/edit_profile_modal.js
@@ -0,0 +1,27 @@
+import { defineMessages, injectIntl } from 'react-intl'
+import ImmutablePureComponent from 'react-immutable-pure-component'
+import Button from '../button'
+import Text from '../text'
+import ModalLayout from './modal_layout'
+
+const messages = defineMessages({
+
+})
+
+export default
+@injectIntl
+class EditProfileModal extends ImmutablePureComponent {
+
+ static propTypes = {
+ intl: PropTypes.object.isRequired,
+ }
+
+ render() {
+ const { intl } = this.props
+
+ return (
+
+
+ )
+ }
+}
diff --git a/app/javascript/gabsocial/components/modal/media_modal.js b/app/javascript/gabsocial/components/modal/media_modal.js
index ba549dd7..a389ecc5 100644
--- a/app/javascript/gabsocial/components/modal/media_modal.js
+++ b/app/javascript/gabsocial/components/modal/media_modal.js
@@ -1,20 +1,20 @@
-import classNames from 'classnames';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import ReactSwipeableViews from 'react-swipeable-views';
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import Video from '../../features/video';
-import ExtendedVideoPlayer from '../extended_video_player';
-import Button from '../button';
-import ImageLoader from '../image_loader';
-import Icon from '../icon';
+import classNames from 'classnames'
+import { defineMessages, injectIntl } from 'react-intl'
+import ReactSwipeableViews from 'react-swipeable-views'
+import ImmutablePropTypes from 'react-immutable-proptypes'
+import ImmutablePureComponent from 'react-immutable-pure-component'
+import Video from '../video'
+import ExtendedVideoPlayer from '../extended_video_player'
+import Button from '../button'
+import ImageLoader from '../image_loader'
+import Icon from '../icon'
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
previous: { id: 'lightbox.previous', defaultMessage: 'Previous' },
next: { id: 'lightbox.next', defaultMessage: 'Next' },
viewContext: { id: 'lightbox.view_context', defaultMessage: 'View context' },
-});
+})
export const previewState = 'previewMediaModal';
diff --git a/app/javascript/gabsocial/components/modal/modal_root.js b/app/javascript/gabsocial/components/modal/modal_root.js
index 38150964..5dafd3b5 100644
--- a/app/javascript/gabsocial/components/modal/modal_root.js
+++ b/app/javascript/gabsocial/components/modal/modal_root.js
@@ -7,7 +7,7 @@ import {
EmbedModal,
// ListEditor,
// ListAdder,
- StatusRevisionModal,
+ StatusRevisionsModal,
} from '../../features/ui/util/async_components'
import ModalBase from './modal_base'
@@ -57,10 +57,10 @@ const MODAL_COMPONENTS = {
LIST_EDITOR: () => Promise.resolve({ default: ListEditorModal }),
LIST_TIMELINE_SETTINGS: () => Promise.resolve({ default: ListTimelineSettingsModal }),
MEDIA: () => Promise.resolve({ default: MediaModal }),
- 'MUTE': MuteModal,
+ MUTE: MuteModal,
PRO_UPGRADE: () => Promise.resolve({ default: ProUpgradeModal }),
REPORT: ReportModal,
- STATUS_REVISION: () => Promise.resolve({ default: StatusRevisionModal }),
+ STATUS_REVISIONS: StatusRevisionsModal,
UNAUTHORIZED: () => Promise.resolve({ default: UnauthorizedModal }),
UNFOLLOW: () => Promise.resolve({ default: UnfollowModal }),
VIDEO: () => Promise.resolve({ default: VideoModal }),
diff --git a/app/javascript/gabsocial/components/modal/status_revision_modal.js b/app/javascript/gabsocial/components/modal/status_revision_modal.js
deleted file mode 100644
index f8ae4e28..00000000
--- a/app/javascript/gabsocial/components/modal/status_revision_modal.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'
-import ImmutablePropTypes from 'react-immutable-proptypes'
-import ImmutablePureComponent from 'react-immutable-pure-component'
-import StatusRevisionListContainer from '../../containers/status_revision_list_container'
-import Button from '../button'
-
-const messages = defineMessages({
- close: { id: 'lightbox.close', defaultMessage: 'Close' },
-})
-
-export default
-@injectIntl
-class StatusRevisionModal extends ImmutablePureComponent {
-
- static propTypes = {
- intl: PropTypes.object.isRequired,
- onClose: PropTypes.func.isRequired,
- status: ImmutablePropTypes.map.isRequired
- }
-
- render() {
- const { intl, onClose, status } = this.props
-
- return (
-
- )
- }
-}
diff --git a/app/javascript/gabsocial/components/modal/status_revisions_modal.js b/app/javascript/gabsocial/components/modal/status_revisions_modal.js
new file mode 100644
index 00000000..4d823c82
--- /dev/null
+++ b/app/javascript/gabsocial/components/modal/status_revisions_modal.js
@@ -0,0 +1,97 @@
+import { defineMessages, injectIntl } from 'react-intl'
+import ImmutablePropTypes from 'react-immutable-proptypes'
+import ImmutablePureComponent from 'react-immutable-pure-component'
+import classNames from 'classnames/bind'
+// import StatusRevisionListContainer from '../../containers/status_revisions_list_container'
+import { loadStatusRevisions } from '../../actions/status_revisions'
+import ModalLayout from './modal_layout'
+import RelativeTimestamp from '../relative_timestamp'
+import ScrollableList from '../scrollable_list'
+import Text from '../text'
+
+const cx = classNames.bind(_s)
+
+const messages = defineMessages({
+ title: { id: 'status_revisions.heading', defaultMessage: 'Revision History' },
+})
+
+const mapStateToProps = state => ({
+ loading: state.getIn(['status_revisions', 'loading']),
+ error: state.getIn(['status_revisions', 'error']),
+ revisions: state.getIn(['status_revisions', 'revisions']),
+})
+
+const mapDispatchToProps = dispatch => ({
+ onLoadStatusRevisions(statusId) {
+ dispatch(loadStatusRevisions(statusId))
+ },
+})
+
+export default
+@injectIntl
+@connect(mapStateToProps, mapDispatchToProps)
+class StatusRevisionsModal extends ImmutablePureComponent {
+
+ static propTypes = {
+ intl: PropTypes.object.isRequired,
+ status: ImmutablePropTypes.map.isRequired,
+ onLoadStatusRevisions: PropTypes.func.isRequired,
+ loading: PropTypes.bool.isRequired,
+ error: PropTypes.bool,
+ revisions: ImmutablePropTypes.list.isRequired,
+ }
+
+ componentDidMount() {
+ this.props.onLoadStatusRevisions(this.props.status.get('id'))
+ }
+
+ render() {
+ const {
+ intl,
+ status,
+ revisions
+ } = this.props
+
+ console.log("revisions:", revisions)
+ console.log("revisions.size:", revisions.size)
+
+ return (
+
+
+
+ {
+ revisions.map((revision, i) => {
+ const isFirst = i === 0
+ const isLast = i === revisions.size - 1
+
+ const containerClasses = cx({
+ default: 1,
+ pt5: 1,
+ pb10: 1,
+ mt5: !isFirst,
+ borderColorSecondary: !isLast,
+ borderBottom1PX: !isLast,
+ })
+
+ return (
+
+
+
+ {revision.get('text')}
+
+
+
+
+ Edited on
+
+
+
+ )
+ })
+ }
+
+
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/modal/video_modal.js b/app/javascript/gabsocial/components/modal/video_modal.js
index a28bf122..844eecc8 100644
--- a/app/javascript/gabsocial/components/modal/video_modal.js
+++ b/app/javascript/gabsocial/components/modal/video_modal.js
@@ -1,9 +1,9 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { FormattedMessage } from 'react-intl';
-import Video from '../../features/video';
+import ImmutablePropTypes from 'react-immutable-proptypes'
+import ImmutablePureComponent from 'react-immutable-pure-component'
+import { FormattedMessage } from 'react-intl'
+import Video from '../video'
-export const previewState = 'previewVideoModal';
+export const previewState = 'previewVideoModal'
export default class VideoModal extends ImmutablePureComponent {
@@ -12,45 +12,45 @@ export default class VideoModal extends ImmutablePureComponent {
status: ImmutablePropTypes.map,
time: PropTypes.number,
onClose: PropTypes.func.isRequired,
- };
+ }
static contextTypes = {
router: PropTypes.object,
- };
+ }
componentDidMount () {
if (this.context.router) {
- const history = this.context.router.history;
+ const history = this.context.router.history
- history.push(history.location.pathname, previewState);
+ history.push(history.location.pathname, previewState)
this.unlistenHistory = history.listen(() => {
- this.props.onClose();
- });
+ this.props.onClose()
+ })
}
}
componentWillUnmount () {
if (this.context.router) {
- this.unlistenHistory();
+ this.unlistenHistory()
if (this.context.router.history.location.state === previewState) {
- this.context.router.history.goBack();
+ this.context.router.history.goBack()
}
}
}
handleStatusClick = e => {
if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
- e.preventDefault();
- this.context.router.history.push(`/${this.props.status.getIn(['account', 'acct'])}/posts/${this.props.status.get('id')}`);
+ e.preventDefault()
+ this.context.router.history.push(`/${this.props.status.getIn(['account', 'acct'])}/posts/${this.props.status.get('id')}`)
}
}
render () {
- const { media, status, time, onClose } = this.props;
+ const { media, status, time, onClose } = this.props
- const link = status &&
;
+ const link = status &&
return (
@@ -67,7 +67,7 @@ export default class VideoModal extends ImmutablePureComponent {
/>
- );
+ )
}
}
diff --git a/app/javascript/gabsocial/components/moved_note.js b/app/javascript/gabsocial/components/moved_note.js
index 81b49275..e8b8bc13 100644
--- a/app/javascript/gabsocial/components/moved_note.js
+++ b/app/javascript/gabsocial/components/moved_note.js
@@ -1,23 +1,23 @@
-import ImmutablePropTypes from 'react-immutable-proptypes';
-import { FormattedMessage } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import { NavLink } from 'react-router-dom';
-import DisplayName from './display_name';
-import Icon from './icon';
+import ImmutablePropTypes from 'react-immutable-proptypes'
+import { FormattedMessage } from 'react-intl'
+import ImmutablePureComponent from 'react-immutable-pure-component'
+import { NavLink } from 'react-router-dom'
+import DisplayName from './display_name'
+import Icon from './icon'
export default class MovedNote extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,
- };
+ }
static propTypes = {
to: ImmutablePropTypes.map.isRequired,
- };
+ }
render () {
const { to } = this.props;
- const displayNameHtml = { __html: from.get('display_name_html') };
+ const displayNameHtml = { __html: from.get('display_name_html') }
return (
diff --git a/app/javascript/gabsocial/components/popover/date_picker_popover.js b/app/javascript/gabsocial/components/popover/date_picker_popover.js
index c2d80683..85fb916b 100644
--- a/app/javascript/gabsocial/components/popover/date_picker_popover.js
+++ b/app/javascript/gabsocial/components/popover/date_picker_popover.js
@@ -1,9 +1,82 @@
-export default class DatePickerPopover extends PureComponent {
+import DatePicker from 'react-datepicker'
+import { changeScheduledAt } from '../../actions/compose'
+import { openModal } from '../../actions/modal'
+import { me } from '../../initial_state'
+import { isMobile } from '../../utils/is_mobile'
+import PopoverLayout from './popover_layout'
+
+// import 'react-datepicker/dist/react-datepicker.css'
+
+const mapStateToProps = state => ({
+ date: state.getIn(['compose', 'scheduled_at']),
+ isPro: state.getIn(['accounts', me, 'is_pro']),
+})
+
+const mapDispatchToProps = dispatch => ({
+ setScheduledAt (date) {
+ dispatch(changeScheduledAt(date))
+ },
+
+ onOpenProUpgradeModal() {
+ dispatch(openModal('PRO_UPGRADE'))
+ },
+})
+
+
+export default
+@connect(mapStateToProps, mapDispatchToProps)
+class DatePickerPopover extends PureComponent {
+ static propTypes = {
+ date: PropTypes.instanceOf(Date),
+ setScheduledAt: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ isPro: PropTypes.bool,
+ onOpenProUpgradeModal: PropTypes.func.isRequired,
+ position: PropTypes.string,
+ small: PropTypes.bool,
+ }
+
+ handleSetDate = (date) => {
+ this.props.setScheduledAt(date)
+ }
+
render() {
+ const { date, isPro, position } = this.props
+
+ const open = !!date
+ const datePickerDisabled = !isPro
+ const withPortal = isMobile(window.innerWidth)
+ const popperPlacement = position || undefined
+
return (
-
- { /* */ }
-
+
+ this.handleSetDate(date)}
+ timeFormat='p'
+ timeIntervals={15}
+ timeCaption='Time'
+ dateFormat='MMM d, yyyy h:mm aa'
+ disabled={datePickerDisabled}
+ showTimeSelect
+ withPortal={withPortal}
+ popperPlacement={popperPlacement}
+ popperModifiers={{
+ offset: {
+ enabled: true,
+ offset: '0px, 5px'
+ },
+ preventOverflow: {
+ enabled: true,
+ escapeWithReference: false,
+ boundariesElement: 'viewport'
+ }
+ }}
+ />
+
)
}
}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/popover/emoji_picker_popover.js b/app/javascript/gabsocial/components/popover/emoji_picker_popover.js
index b9cc46e2..02e7721a 100644
--- a/app/javascript/gabsocial/components/popover/emoji_picker_popover.js
+++ b/app/javascript/gabsocial/components/popover/emoji_picker_popover.js
@@ -9,6 +9,7 @@ import { changeSetting } from '../../actions/settings'
import { useEmoji } from '../../actions/emojis'
import { EmojiPicker as EmojiPickerAsync } from '../../features/ui/util/async_components'
import { buildCustomEmojis } from '../emoji/emoji'
+import PopoverLayout from './popover_layout'
const messages = defineMessages({
emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' },
@@ -430,21 +431,23 @@ class EmojiPickerPopover extends ImmutablePureComponent {
frequentlyUsedEmojis
} = this.props
- const { active, loading } = this.state;
+ const { active, loading } = this.state
return (
-
-
-
- );
+
+
+
+
+
+ )
}
}
diff --git a/app/javascript/gabsocial/components/status/status.js b/app/javascript/gabsocial/components/status/status.js
index d4950718..02894868 100644
--- a/app/javascript/gabsocial/components/status/status.js
+++ b/app/javascript/gabsocial/components/status/status.js
@@ -6,7 +6,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import { HotKeys } from 'react-hotkeys';
import classNames from 'classnames/bind'
import { displayMedia } from '../../initial_state';
-import Card from '../../features/status/components/card';
+import StatusCard from '../status_card'
import { MediaGallery, Video } from '../../features/ui/util/async_components';
import ComposeFormContainer from '../../features/compose/containers/compose_form_container'
import Avatar from '../avatar';
@@ -425,7 +425,7 @@ class Status extends ImmutablePureComponent {
} else if (status.get('spoiler_text').length === 0 && status.get('card')) {
// console.log("card:", status.get('card'))
media = (
-
{
return domain
.split('.')
.map(part => part.indexOf(IDNA_PREFIX) === 0 ? punycode.decode(part.slice(IDNA_PREFIX.length)) : part)
- .join('.');
-};
+ .join('.')
+}
const getHostname = url => {
- const parser = document.createElement('a');
- parser.href = url;
- return parser.hostname;
-};
+ const parser = document.createElement('a')
+ parser.href = url
+ return parser.hostname
+}
const trim = (text, len) => {
- const cut = text.indexOf(' ', len);
+ const cut = text.indexOf(' ', len)
if (cut === -1) {
- return text;
+ return text
}
- return text.substring(0, cut) + (text.length > len ? '…' : '');
-};
+ return text.substring(0, cut) + (text.length > len ? '…' : '')
+}
-const domParser = new DOMParser();
+const domParser = new DOMParser()
const addAutoPlay = html => {
- const document = domParser.parseFromString(html, 'text/html').documentElement;
- const iframe = document.querySelector('iframe');
+ const document = domParser.parseFromString(html, 'text/html').documentElement
+ const iframe = document.querySelector('iframe')
if (iframe) {
if (iframe.src.indexOf('?') !== -1) {
- iframe.src += '&';
+ iframe.src += '&'
} else {
- iframe.src += '?';
+ iframe.src += '?'
}
- iframe.src += 'autoplay=1&auto_play=1';
+ iframe.src += 'autoplay=1&auto_play=1'
// DOM parser creates html/body elements around original HTML fragment,
// so we need to get innerHTML out of the body and not the entire document
- return document.querySelector('body').innerHTML;
+ return document.querySelector('body').innerHTML
}
- return html;
-};
+ return html
+}
export default class Card extends ImmutablePureComponent {
@@ -60,24 +59,21 @@ export default class Card extends ImmutablePureComponent {
onOpenMedia: PropTypes.func.isRequired,
defaultWidth: PropTypes.number,
cacheWidth: PropTypes.func,
- };
-
- static defaultProps = {
- };
+ }
state = {
width: this.props.defaultWidth || 280,
embedded: false,
- };
+ }
componentWillReceiveProps (nextProps) {
if (!Immutable.is(this.props.card, nextProps.card)) {
- this.setState({ embedded: false });
+ this.setState({ embedded: false })
}
}
handlePhotoClick = () => {
- const { card, onOpenMedia } = this.props;
+ const { card, onOpenMedia } = this.props
onOpenMedia(
Immutable.fromJS([
@@ -94,23 +90,23 @@ export default class Card extends ImmutablePureComponent {
},
]),
0
- );
- };
+ )
+ }
handleEmbedClick = () => {
- const { card } = this.props;
+ const { card } = this.props
if (card.get('type') === 'photo') {
- this.handlePhotoClick();
+ this.handlePhotoClick()
} else {
- this.setState({ embedded: true });
+ this.setState({ embedded: true })
}
}
setRef = c => {
if (c) {
- if (this.props.cacheWidth) this.props.cacheWidth(c.offsetWidth);
- this.setState({ width: c.offsetWidth });
+ if (this.props.cacheWidth) this.props.cacheWidth(c.offsetWidth)
+ this.setState({ width: c.offsetWidth })
}
}
diff --git a/app/javascript/gabsocial/components/status_header.js b/app/javascript/gabsocial/components/status_header.js
index a1f9a939..9af78afa 100644
--- a/app/javascript/gabsocial/components/status_header.js
+++ b/app/javascript/gabsocial/components/status_header.js
@@ -13,6 +13,12 @@ import Button from './button'
import Avatar from './avatar'
const mapDispatchToProps = (dispatch) => ({
+ onOpenStatusRevisionsPopover(status) {
+ dispatch(openModal('STATUS_REVISIONS', {
+ status,
+ }))
+ },
+
onOpenStatusOptionsPopover(targetRef, status) {
dispatch(openPopover('STATUS_OPTIONS', {
targetRef,
@@ -28,6 +34,7 @@ class StatusHeader extends ImmutablePureComponent {
static propTypes = {
status: ImmutablePropTypes.map,
+ onOpenStatusRevisionsPopover: PropTypes.func.isRequired,
onOpenStatusOptionsPopover: PropTypes.func.isRequired,
}
@@ -36,12 +43,7 @@ class StatusHeader extends ImmutablePureComponent {
}
handleOpenStatusEdits = () => {
- // : todo :
- this.props.dispatch(openPopover('REPOST', {
- targetRef: this.statusOptionsButton,
- position: 'top',
- status: this.props.status,
- }))
+ this.props.onOpenStatusRevisionsPopover(this.props.status)
}
handleDeleteClick = () => {
diff --git a/app/javascript/gabsocial/components/status_revision_list.js b/app/javascript/gabsocial/components/status_revision_item.js
similarity index 94%
rename from app/javascript/gabsocial/components/status_revision_list.js
rename to app/javascript/gabsocial/components/status_revision_item.js
index a0437529..ca444770 100644
--- a/app/javascript/gabsocial/components/status_revision_list.js
+++ b/app/javascript/gabsocial/components/status_revision_item.js
@@ -5,7 +5,7 @@ import RelativeTimestamp from './relative_timestamp';
export default
@injectIntl
-class StatusRevisionsList extends ImmutablePureComponent {
+class StatusRevisionItem extends ImmutablePureComponent {
static propTypes = {
loading: PropTypes.bool.isRequired,
diff --git a/app/javascript/gabsocial/components/video.js b/app/javascript/gabsocial/components/video.js
index ca6d8234..ec56d79e 100644
--- a/app/javascript/gabsocial/components/video.js
+++ b/app/javascript/gabsocial/components/video.js
@@ -3,11 +3,11 @@ import { 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 Text from '../../components/text'
+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 './button'
+import Text from './text'
const cx = classNames.bind(_s)
diff --git a/app/javascript/gabsocial/containers/media_container.js b/app/javascript/gabsocial/containers/media_container.js
index 69a70606..e18f814c 100644
--- a/app/javascript/gabsocial/containers/media_container.js
+++ b/app/javascript/gabsocial/containers/media_container.js
@@ -1,19 +1,19 @@
-import { Fragment } from 'react';
-import ReactDOM from 'react-dom';
-import { List as ImmutableList, fromJS } from 'immutable';
-import { IntlProvider, addLocaleData } from 'react-intl';
-import { getLocale } from '../locales';
-import Video from '../features/video';
-import Card from '../features/status/components/card';
-import Poll from '../components/poll';
-import MediaGallery from '../components/media_gallery';
-import ModalRoot from '../components/modal/modal_root';
-import MediaModal from '../components/modal/media_modal';
+import { Fragment } from 'react'
+import ReactDOM from 'react-dom'
+import { List as ImmutableList, fromJS } from 'immutable'
+import { IntlProvider, addLocaleData } from 'react-intl'
+import { getLocale } from '../locales'
+import Video from '../components/video'
+import StatusCard from '../components/status_card'
+import Poll from '../components/poll'
+import MediaGallery from '../components/media_gallery'
+import ModalRoot from '../components/modal/modal_root'
+import MediaModal from '../components/modal/media_modal'
const { localeData, messages } = getLocale();
addLocaleData(localeData);
-const MEDIA_COMPONENTS = { MediaGallery, Video, Card, Poll };
+const MEDIA_COMPONENTS = { MediaGallery, Video, StatusCard, Poll };
export default class MediaContainer extends PureComponent {
diff --git a/app/javascript/gabsocial/containers/status_revision_list_container.js b/app/javascript/gabsocial/containers/status_revision_list_container.js
deleted file mode 100644
index 0b8bde9c..00000000
--- a/app/javascript/gabsocial/containers/status_revision_list_container.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import ImmutablePureComponent from 'react-immutable-pure-component'
-import { load } from '../actions/status_revision_list'
-import StatusRevisionList from '../components/status_revision_list'
-
-class StatusRevisionListContainer extends ImmutablePureComponent {
- componentDidMount() {
- this.props.load(this.props.id)
- }
-
- render() {
- return
- }
-}
-
-const mapStateToProps = state => ({
- loading: state.getIn(['status_revision_list', 'loading']),
- error: state.getIn(['status_revision_list', 'error']),
- data: state.getIn(['status_revision_list', 'data']),
-})
-
-const mapDispatchToProps = {
- load
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(StatusRevisionListContainer)
\ No newline at end of file
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 02ea4185..167ef78b 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
@@ -3,19 +3,19 @@ import ImmutablePureComponent from 'react-immutable-pure-component'
import { length } from 'stringz'
import ImmutablePropTypes from 'react-immutable-proptypes'
import classNames from 'classnames/bind'
-import CharacterCounter from '../character_counter'
+import CharacterCounter from '../../../../components/character_counter'
import UploadForm from '../upload_form'
import ReplyIndicatorContainer from '../../containers/reply_indicator_container'
import AutosuggestTextbox from '../../../../components/autosuggest_textbox'
import PollButton from '../../components/poll_button'
-import UploadButton from '../../components/upload_button'
+import UploadButton from '../media_upload_button'
import SpoilerButton from '../../components/spoiler_button'
import RichTextEditorButton from '../../components/rich_text_editor_button'
import GifSelectorButton from '../../components/gif_selector_button'
import StatusVisibilityButton from '../../components/status_visibility_button'
import EmojiPickerButton from '../../components/emoji_picker_button'
import PollFormContainer from '../../containers/poll_form_container'
-import SchedulePostDropdown from '../../components/schedule_post_dropdown'
+import SchedulePostButton from '../schedule_post_button'
import QuotedStatusPreviewContainer from '../../containers/quoted_status_preview_container'
import Icon from '../../../../components/icon'
import Button from '../../../../components/button'
@@ -347,11 +347,13 @@ class ComposeForm extends ImmutablePureComponent {
}
-
+