diff --git a/app/javascript/gabsocial/components/modal/home_timeline_settings_modal.js b/app/javascript/gabsocial/components/modal/home_timeline_settings_modal.js new file mode 100644 index 00000000..a28bf122 --- /dev/null +++ b/app/javascript/gabsocial/components/modal/home_timeline_settings_modal.js @@ -0,0 +1,73 @@ +import ImmutablePropTypes from 'react-immutable-proptypes'; +import ImmutablePureComponent from 'react-immutable-pure-component'; +import { FormattedMessage } from 'react-intl'; +import Video from '../../features/video'; + +export const previewState = 'previewVideoModal'; + +export default class VideoModal extends ImmutablePureComponent { + + static propTypes = { + media: ImmutablePropTypes.map.isRequired, + 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; + + history.push(history.location.pathname, previewState); + + this.unlistenHistory = history.listen(() => { + this.props.onClose(); + }); + } + } + + componentWillUnmount () { + if (this.context.router) { + this.unlistenHistory(); + + if (this.context.router.history.location.state === previewState) { + 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')}`); + } + } + + render () { + const { media, status, time, onClose } = this.props; + + const link = status && ; + + return ( +
+
+
+
+ ); + } + +} diff --git a/app/javascript/gabsocial/features/domain_blocks/index.js b/app/javascript/gabsocial/features/domain_blocks/index.js deleted file mode 100644 index 728ed2c0..00000000 --- a/app/javascript/gabsocial/features/domain_blocks/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../domain_blocks' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/favorited_statuses/favorited_statuses.js b/app/javascript/gabsocial/features/favorited_statuses.js similarity index 90% rename from app/javascript/gabsocial/features/favorited_statuses/favorited_statuses.js rename to app/javascript/gabsocial/features/favorited_statuses.js index 67acf41c..dc0964ed 100644 --- a/app/javascript/gabsocial/features/favorited_statuses/favorited_statuses.js +++ b/app/javascript/gabsocial/features/favorited_statuses.js @@ -2,10 +2,10 @@ import ImmutablePropTypes from 'react-immutable-proptypes' import { FormattedMessage } from 'react-intl' import ImmutablePureComponent from 'react-immutable-pure-component' import { debounce } from 'lodash' -import { fetchFavoritedStatuses, expandFavoritedStatuses } from '../../actions/favorites' -import { meUsername } from '../../initial_state' -import StatusList from '../../components/status_list' -import ColumnIndicator from '../../components/column_indicator' +import { fetchFavoritedStatuses, expandFavoritedStatuses } from '../actions/favorites' +import { meUsername } from '../initial_state' +import StatusList from '../components/status_list' +import ColumnIndicator from '../components/column_indicator' const mapStateToProps = (state, { params: { username } }) => { return { diff --git a/app/javascript/gabsocial/features/favorited_statuses/index.js b/app/javascript/gabsocial/features/favorited_statuses/index.js deleted file mode 100644 index b38a0407..00000000 --- a/app/javascript/gabsocial/features/favorited_statuses/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './favorited_statuses' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/favorites/favorites.js b/app/javascript/gabsocial/features/favorites.js similarity index 83% rename from app/javascript/gabsocial/features/favorites/favorites.js rename to app/javascript/gabsocial/features/favorites.js index 8247f37d..c1b46ab2 100644 --- a/app/javascript/gabsocial/features/favorites/favorites.js +++ b/app/javascript/gabsocial/features/favorites.js @@ -1,12 +1,12 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; -import { fetchReposts } from '../../actions/interactions'; -import { fetchStatus } from '../../actions/statuses'; -import { makeGetStatus } from '../../selectors'; -import AccountContainer from '../../containers/account_container'; -import ColumnIndicator from '../../components/column_indicator'; -import ScrollableList from '../../components/scrollable_list'; +import { fetchReposts } from '../actions/interactions'; +import { fetchStatus } from '../actions/statuses'; +import { makeGetStatus } from '../selectors'; +import AccountContainer from '../containers/account_container'; +import ColumnIndicator from '../components/column_indicator'; +import ScrollableList from '../components/scrollable_list'; const mapStateToProps = (state, props) => { const getStatus = makeGetStatus(); diff --git a/app/javascript/gabsocial/features/favorites/index.js b/app/javascript/gabsocial/features/favorites/index.js deleted file mode 100644 index fe8f1099..00000000 --- a/app/javascript/gabsocial/features/favorites/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './favorites' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/following/index.js b/app/javascript/gabsocial/features/following/index.js deleted file mode 100644 index d85d95b3..00000000 --- a/app/javascript/gabsocial/features/following/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../following' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/generic_not_found/index.js b/app/javascript/gabsocial/features/generic_not_found/index.js deleted file mode 100644 index c08f418e..00000000 --- a/app/javascript/gabsocial/features/generic_not_found/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../generic_not_found' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/group_create/group_create.js b/app/javascript/gabsocial/features/group_create.js similarity index 100% rename from app/javascript/gabsocial/features/group_create/group_create.js rename to app/javascript/gabsocial/features/group_create.js diff --git a/app/javascript/gabsocial/features/group_create/index.js b/app/javascript/gabsocial/features/group_create/index.js deleted file mode 100644 index 355f41c5..00000000 --- a/app/javascript/gabsocial/features/group_create/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './group_create' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/group_members/group_members.js b/app/javascript/gabsocial/features/group_members.js similarity index 93% rename from app/javascript/gabsocial/features/group_members/group_members.js rename to app/javascript/gabsocial/features/group_members.js index 72fb43ed..a6054edd 100644 --- a/app/javascript/gabsocial/features/group_members/group_members.js +++ b/app/javascript/gabsocial/features/group_members.js @@ -6,10 +6,10 @@ import { expandMembers, updateRole, createRemovedAccount, -} from '../../actions/groups'; +} from '../actions/groups'; import { FormattedMessage } from 'react-intl'; -import AccountContainer from '../../containers/account_container'; -import ScrollableList from '../../components/scrollable_list'; +import AccountContainer from '../containers/account_container'; +import ScrollableList from '../components/scrollable_list'; const mapStateToProps = (state, { params: { id } }) => ({ group: state.getIn(['groups', id]), diff --git a/app/javascript/gabsocial/features/group_members/index.js b/app/javascript/gabsocial/features/group_members/index.js deleted file mode 100644 index 46ae1701..00000000 --- a/app/javascript/gabsocial/features/group_members/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './group_members' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/group_removed_accounts/group_removed_accounts.js b/app/javascript/gabsocial/features/group_removed_accounts.js similarity index 90% rename from app/javascript/gabsocial/features/group_removed_accounts/group_removed_accounts.js rename to app/javascript/gabsocial/features/group_removed_accounts.js index 0c991924..98cc0ac5 100644 --- a/app/javascript/gabsocial/features/group_removed_accounts/group_removed_accounts.js +++ b/app/javascript/gabsocial/features/group_removed_accounts.js @@ -1,15 +1,15 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; -import ColumnIndicator from '../../components/column_indicator'; +import ColumnIndicator from '../components/column_indicator'; import { fetchRemovedAccounts, expandRemovedAccounts, removeRemovedAccount, -} from '../../actions/groups'; +} from '../actions/groups'; import { FormattedMessage } from 'react-intl'; -import AccountContainer from '../../containers/account_container'; -import ScrollableList from '../../components/scrollable_list'; +import AccountContainer from '../containers/account_container'; +import ScrollableList from '../components/scrollable_list'; import { defineMessages, injectIntl } from 'react-intl'; const messages = defineMessages({ diff --git a/app/javascript/gabsocial/features/group_removed_accounts/index.js b/app/javascript/gabsocial/features/group_removed_accounts/index.js deleted file mode 100644 index 5f9c7630..00000000 --- a/app/javascript/gabsocial/features/group_removed_accounts/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './group_removed_accounts' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/group_timeline/index.js b/app/javascript/gabsocial/features/group_timeline/index.js deleted file mode 100644 index 1fcf2547..00000000 --- a/app/javascript/gabsocial/features/group_timeline/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../group_timeline' diff --git a/app/javascript/gabsocial/features/groups_collection/index.js b/app/javascript/gabsocial/features/groups_collection/index.js deleted file mode 100644 index f00320d1..00000000 --- a/app/javascript/gabsocial/features/groups_collection/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../groups_collection' diff --git a/app/javascript/gabsocial/features/introduction/introduction.js b/app/javascript/gabsocial/features/introduction.js similarity index 99% rename from app/javascript/gabsocial/features/introduction/introduction.js rename to app/javascript/gabsocial/features/introduction.js index aa2c96f1..28483cf2 100644 --- a/app/javascript/gabsocial/features/introduction/introduction.js +++ b/app/javascript/gabsocial/features/introduction.js @@ -1,7 +1,7 @@ import ReactSwipeableViews from 'react-swipeable-views'; import classNames from 'classnames'; import { FormattedMessage } from 'react-intl'; -import { closeOnboarding } from '../../actions/onboarding'; +import { closeOnboarding } from '../actions/onboarding'; class FrameWelcome extends Component { static propTypes = { diff --git a/app/javascript/gabsocial/features/introduction/index.js b/app/javascript/gabsocial/features/introduction/index.js index 04a57a6f..ece390d7 100644 --- a/app/javascript/gabsocial/features/introduction/index.js +++ b/app/javascript/gabsocial/features/introduction/index.js @@ -1 +1 @@ -export { default } from './introduction' +export { default } from '../introduction' diff --git a/app/javascript/gabsocial/features/introduction/introduction.scss b/app/javascript/gabsocial/features/introduction/introduction.scss deleted file mode 100644 index aaffc948..00000000 --- a/app/javascript/gabsocial/features/introduction/introduction.scss +++ /dev/null @@ -1,142 +0,0 @@ -.introduction { - @include flex(center, center, column); - - @media screen and (max-width: 920px) { - background: darken($ui-base-color, 8%); - display: block !important; - } - - &__pager { - background: darken($ui-base-color, 8%); - box-shadow: 0 0 15px rgba($base-shadow-color, 0.2); - overflow: hidden; - } - - &__pager, - &__frame { - border-radius: 10px; - width: 50vw; - min-width: 920px; - - @media screen and (max-width: 920px) { - min-width: 0; - width: 100%; - border-radius: 0; - box-shadow: none; - } - } - - &__frame-wrapper { - opacity: 0; - transition: opacity 500ms linear; - - &.active { - opacity: 1; - transition: opacity 50ms linear; - } - } - - &__frame { - overflow: hidden; - } - - &__illustration { - height: 50vh; - - @media screen and (max-width: 630px) { - height: auto; - } - - img { - object-fit: cover; - display: block; - margin: 0; - - @include size(100%); - } - } - - &__text { - &--columnized { - display: flex; - - &>div { - flex: 1 1 33.33%; - text-align: center; - padding: 25px; - padding-bottom: 30px; - } - - @media screen and (max-width: 630px) { - display: block; - padding: 15px 0; - padding-bottom: 20px; - - &>div { - padding: 10px 25px; - } - } - } - - h3 { - margin-bottom: 10px; - - @include text-sizing(24px, 700, 1.5); - } - - p { - color: $darker-text-color; - - @include text-sizing(16px, 400, 24px); - - code { - display: inline-block; - background: darken($ui-base-color, 8%); - font-size: 15px; - padding: 1px 3px; - - @include border-design(lighten($ui-base-color, 8%), 1px, 2px); - } - } - - &--centered { - padding: 25px; - padding-bottom: 30px; - text-align: center; - } - } - - &__dots { - padding: 25px; - - @include flex(center, center); - - @media screen and (max-width: 630px) { - display: none; - } - } - - &__dot { - background: transparent; - margin: 0 3px; - cursor: pointer; - - @include size(14px); - @include border-design($ui-highlight-color, 1px, 14px); - - &:hover { - background: lighten($ui-base-color, 8%); - } - - &.active { - cursor: default; - background: $ui-highlight-color; - } - } - - &__action { - padding: 0 25px 25px 25px; - - @include flex(center, center); - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/features/mutes.js b/app/javascript/gabsocial/features/mutes.js index 364fe6ea..a143b688 100644 --- a/app/javascript/gabsocial/features/mutes.js +++ b/app/javascript/gabsocial/features/mutes.js @@ -51,9 +51,11 @@ class Mutes extends ImmutablePureComponent { hasMore={hasMore} emptyMessage={} > - {accountIds.map(id => - - )} + { + accountIds.map(id => + + ) + } ) } diff --git a/app/javascript/gabsocial/features/mutes/index.js b/app/javascript/gabsocial/features/mutes/index.js deleted file mode 100644 index 6fa32a9b..00000000 --- a/app/javascript/gabsocial/features/mutes/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../mutes' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/search/index.js b/app/javascript/gabsocial/features/search/index.js deleted file mode 100644 index a2fb37de..00000000 --- a/app/javascript/gabsocial/features/search/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../search' \ No newline at end of file diff --git a/app/javascript/gabsocial/features/ui/ui.js b/app/javascript/gabsocial/features/ui/ui.js index 8ce8e193..841efcbc 100644 --- a/app/javascript/gabsocial/features/ui/ui.js +++ b/app/javascript/gabsocial/features/ui/ui.js @@ -18,9 +18,6 @@ import NotificationsContainer from '../../containers/notifications_container' import ModalRoot from '../../components/modal/modal_root' import PopoverRoot from '../../components/popover/popover_root' import UploadArea from '../../components/upload_area' -// import TrendsPanel from './components/trends_panel' -// import { WhoToFollowPanel } from '../../components/panel' -// import LinkFooter from '../../components/link_footer' import ProfilePage from '../../pages/profile_page' import GroupPage from '../../pages/group_page' import GroupsPage from '../../pages/groups_page' @@ -32,7 +29,6 @@ import ListPage from '../../pages/list_page' import ListsPage from '../../pages/lists_page' import BasicPage from '../../pages/basic_page' import SettingsPage from '../../pages/settings_page' -// import GroupSidebarPanel from '../groups/sidebar_panel' import { AccountGallery, @@ -40,7 +36,6 @@ import { Blocks, CommunityTimeline, DomainBlocks, - Explore, Favorites, FavoritedStatuses, Followers,