Progress
This commit is contained in:
parent
d31d5fcd81
commit
c7da9da84e
|
@ -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 && <a href={status.get('url')} onClick={this.handleStatusClick}><FormattedMessage id='lightbox.view_context' defaultMessage='View context' /></a>;
|
||||
|
||||
return (
|
||||
<div className='modal-root__modal video-modal'>
|
||||
<div>
|
||||
<Video
|
||||
preview={media.get('preview_url')}
|
||||
blurhash={media.get('blurhash')}
|
||||
src={media.get('url')}
|
||||
startTime={time}
|
||||
onCloseVideo={onClose}
|
||||
link={link}
|
||||
detailed
|
||||
alt={media.get('description')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
export { default } from '../domain_blocks'
|
|
@ -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 {
|
|
@ -1 +0,0 @@
|
|||
export { default } from './favorited_statuses'
|
|
@ -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();
|
|
@ -1 +0,0 @@
|
|||
export { default } from './favorites'
|
|
@ -1 +0,0 @@
|
|||
export { default } from '../following'
|
|
@ -1 +0,0 @@
|
|||
export { default } from '../generic_not_found'
|
|
@ -1 +0,0 @@
|
|||
export { default } from './group_create'
|
|
@ -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]),
|
|
@ -1 +0,0 @@
|
|||
export { default } from './group_members'
|
|
@ -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({
|
|
@ -1 +0,0 @@
|
|||
export { default } from './group_removed_accounts'
|
|
@ -1 +0,0 @@
|
|||
export { default } from '../group_timeline'
|
|
@ -1 +0,0 @@
|
|||
export { default } from '../groups_collection'
|
|
@ -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 = {
|
|
@ -1 +1 @@
|
|||
export { default } from './introduction'
|
||||
export { default } from '../introduction'
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -51,9 +51,11 @@ class Mutes extends ImmutablePureComponent {
|
|||
hasMore={hasMore}
|
||||
emptyMessage={<FormattedMessage id='empty_column.mutes' defaultMessage="You haven't muted any users yet." />}
|
||||
>
|
||||
{accountIds.map(id =>
|
||||
<AccountContainer key={id} id={id} />
|
||||
)}
|
||||
{
|
||||
accountIds.map(id =>
|
||||
<AccountContainer key={id} id={id} />
|
||||
)
|
||||
}
|
||||
</ScrollableList>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
export { default } from '../mutes'
|
|
@ -1 +0,0 @@
|
|||
export { default } from '../search'
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue