-
+
@@ -261,9 +261,9 @@ class Notification extends ImmutablePureComponent {
// case 'mention':
// return this.renderMention(notification);
case 'favourite':
- return this.renderFavourite(notification, link);
+ return this.renderFavorite(notification, link);
// case 'reblog':
- // return this.renderReblog(notification, link);
+ // return this.renderRepost(notification, link);
// case 'poll':
// return this.renderPoll(notification);
}
diff --git a/app/javascript/gabsocial/features/notifications/components/notification/notification.scss b/app/javascript/gabsocial/features/notifications/components/notification/notification.scss
deleted file mode 100644
index 50bc9d50..00000000
--- a/app/javascript/gabsocial/features/notifications/components/notification/notification.scss
+++ /dev/null
@@ -1,59 +0,0 @@
-.notification {
-
-
- &--favourite {
- .status.status-direct {
- background: transparent;
-
- .icon-button.disabled {
- color: lighten($action-button-color, 13%);
- }
- }
- }
-
- &--follow {}
-
- &--reblog {}
-
- &--poll {}
-
- &__message {
- margin: 0 10px 0 68px;
- padding: 8px 0 0;
- cursor: default;
- color: $gab-secondary-text;
- position: relative;
-
- @include text-sizing(15px, 400, 22px);
-
- .fa {
- color: $highlight-text-color;
- }
-
- >span {
- display: inline;
-
- @include text-overflow(nowrap);
- }
- }
-
- &__display-name {
- color: inherit;
- font-weight: 500;
- text-decoration: none;
-
- &:hover {
- color: $primary-text-color;
- text-decoration: underline;
- }
- }
-
- &__favourite-icon-wrapper {
- left: -26px;
- position: absolute;
-
- .star-icon {
- color: $gold-star;
- }
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/notifications/components/notification_filter_bar/notification_filter_bar.js b/app/javascript/gabsocial/features/notifications/components/notification_filter_bar/notification_filter_bar.js
index 7718c59d..c2234de3 100644
--- a/app/javascript/gabsocial/features/notifications/components/notification_filter_bar/notification_filter_bar.js
+++ b/app/javascript/gabsocial/features/notifications/components/notification_filter_bar/notification_filter_bar.js
@@ -2,7 +2,7 @@ import { defineMessages, injectIntl } from 'react-intl';
const messages = defineMessages({
mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' },
- favourites: { id: 'notifications.filter.favourites', defaultMessage: 'Favorites' },
+ favorites: { id: 'notifications.filter.favorites', defaultMessage: 'Favorites' },
boosts: { id: 'notifications.filter.boosts', defaultMessage: 'Reposts' },
polls: { id: 'notifications.filter.polls', defaultMessage: 'Poll results' },
follows: { id: 'notifications.filter.follows', defaultMessage: 'Follows' },
@@ -65,9 +65,9 @@ class NotificationFilterBar extends PureComponent {
icon: 'at',
},
{
- className: selectedFilter === 'favourite' ? 'active' : '',
- onClick: this.onClick('favourite'),
- title: intl.formatMessage(messages.favourites),
+ className: selectedFilter === 'favorite' ? 'active' : '',
+ onClick: this.onClick('favorite'),
+ title: intl.formatMessage(messages.favorites),
icon: 'star',
},
{
diff --git a/app/javascript/gabsocial/features/notifications/containers/notification_container.js b/app/javascript/gabsocial/features/notifications/containers/notification_container.js
index aca7b28f..b564688d 100644
--- a/app/javascript/gabsocial/features/notifications/containers/notification_container.js
+++ b/app/javascript/gabsocial/features/notifications/containers/notification_container.js
@@ -2,9 +2,9 @@ import { openModal } from '../../../actions/modal'
import { mentionCompose } from '../../../actions/compose'
import {
reblog,
- favourite,
+ favorite,
unreblog,
- unfavourite,
+ unfavorite,
} from '../../../actions/interactions'
import {
hideStatus,
@@ -38,27 +38,27 @@ const mapDispatchToProps = dispatch => ({
dispatch(mentionCompose(account, router))
},
- onModalReblog (status) {
- dispatch(reblog(status))
+ onModalRepost (status) {
+ dispatch(repost(status))
},
- onReblog (status, e) {
+ onRepost (status, e) {
if (status.get('reblogged')) {
- dispatch(unreblog(status))
+ dispatch(unrepost(status))
} else {
if (e.shiftKey || !boostModal) {
- this.onModalReblog(status)
+ this.onModalRepost(status)
} else {
- dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog }))
+ dispatch(openModal('BOOST', { status, onRepost: this.onModalRepost }))
}
}
},
- onFavourite (status) {
- if (status.get('favourited')) {
- dispatch(unfavourite(status))
+ onFavorite (status) {
+ if (status.get('favorited')) {
+ dispatch(unfavorite(status))
} else {
- dispatch(favourite(status))
+ dispatch(favorite(status))
}
},
diff --git a/app/javascript/gabsocial/features/reblogs/index.js b/app/javascript/gabsocial/features/reblogs/index.js
index d603c6fb..fb98ab51 100644
--- a/app/javascript/gabsocial/features/reblogs/index.js
+++ b/app/javascript/gabsocial/features/reblogs/index.js
@@ -1 +1 @@
-export { default } from './reblogs'
\ No newline at end of file
+export { default } from '../reblogs'
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/reblogs/reblogs.js b/app/javascript/gabsocial/features/reposts.js
similarity index 64%
rename from app/javascript/gabsocial/features/reblogs/reblogs.js
rename to app/javascript/gabsocial/features/reposts.js
index d2f0cba0..4aded0d7 100644
--- a/app/javascript/gabsocial/features/reblogs/reblogs.js
+++ b/app/javascript/gabsocial/features/reposts.js
@@ -1,12 +1,12 @@
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
-import { fetchReblogs } 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();
@@ -23,7 +23,7 @@ const mapStateToProps = (state, props) => {
export default
@connect(mapStateToProps)
-class Reblogs extends ImmutablePureComponent {
+class Reposts extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,
@@ -33,13 +33,13 @@ class Reblogs extends ImmutablePureComponent {
};
componentWillMount () {
- this.props.dispatch(fetchReblogs(this.props.params.statusId));
+ this.props.dispatch(fetchReposts(this.props.params.statusId));
this.props.dispatch(fetchStatus(this.props.params.statusId));
}
componentWillReceiveProps(nextProps) {
if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {
- this.props.dispatch(fetchReblogs(nextProps.params.statusId));
+ this.props.dispatch(fetchReposts(nextProps.params.statusId));
this.props.dispatch(fetchStatus(nextProps.params.statusId));
}
}
@@ -48,19 +48,21 @@ class Reblogs extends ImmutablePureComponent {
const { accountIds, status } = this.props;
if (!accountIds) {
- return (
);
+ return
} else if (!status) {
- return (
);
+ return
}
return (
}
>
- {accountIds.map(id =>
-
- )}
+ {
+ accountIds.map(id =>
+
+ )
+ }
);
}
diff --git a/app/javascript/gabsocial/features/search/search.js b/app/javascript/gabsocial/features/search.js
similarity index 83%
rename from app/javascript/gabsocial/features/search/search.js
rename to app/javascript/gabsocial/features/search.js
index ce41ae59..418189f8 100644
--- a/app/javascript/gabsocial/features/search/search.js
+++ b/app/javascript/gabsocial/features/search.js
@@ -1,5 +1,5 @@
// import SearchContainer from '../compose/containers/search_container';
-import SearchResultsContainer from '../compose/containers/search_results_container';
+import SearchResultsContainer from './compose/containers/search_results_container';
export default class Search extends PureComponent {
diff --git a/app/javascript/gabsocial/features/search/components/header/header.js b/app/javascript/gabsocial/features/search/components/header/header.js
deleted file mode 100644
index 320b8641..00000000
--- a/app/javascript/gabsocial/features/search/components/header/header.js
+++ /dev/null
@@ -1,57 +0,0 @@
-import { FormattedMessage } from 'react-intl';
-
-const mapStateToProps = state => ({
- value: state.getIn(['search', 'value']),
- submitted: state.getIn(['search', 'submitted']),
-});
-
-export default
-@connect(mapStateToProps)
-class Header extends PureComponent {
-
- static propTypes = {
- value: PropTypes.string,
- submitted: PropTypes.bool,
- };
-
- state = {
- submittedValue: '',
- };
-
- componentWillReceiveProps (nextProps) {
- if (nextProps.submitted) {
- const submittedValue = nextProps.value;
- this.setState({submittedValue})
- }
- }
-
- render () {
- const { submittedValue } = this.state;
-
- if (!submittedValue) {
- return null;
- }
-
- return (
-
-
-
- {submittedValue}
-
-
-
-
- { /*
- }
- ]}
- /> */ }
-
-
-
- );
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/search/components/header/header.scss b/app/javascript/gabsocial/features/search/components/header/header.scss
deleted file mode 100644
index 94bdbf72..00000000
--- a/app/javascript/gabsocial/features/search/components/header/header.scss
+++ /dev/null
@@ -1,44 +0,0 @@
-.search-header {
- display: block;
- width: 100%;
-
- &__text-container {
- display: none;
- padding: 25px 0;
- background-color: lighten($ui-base-color, 6%);
-
- @media (min-width:895px) {
- display: block;
- }
- }
-
- &__title-text {
- color: $primary-text-color;
- padding-left: 20px;
- max-width: 1200px;
-
- @include text-sizing(27px, bold, 32px);
- @include text-overflow(nowrap);
- @include margin-center;
-
- @media (min-width:895px) and (max-width:1190px) {
- max-width: 900px;
- }
- }
-
- &__type-filters-tabs {
- display: flex;
- width: 100%;
- max-width: 1200px;
-
- @include margin-center;
-
- @media screen and (max-width:895px) {
- max-width: 580px;
- }
-
- @media (min-width:895px) and (max-width:1190px) {
- max-width: 900px;
- }
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/search/components/header/index.js b/app/javascript/gabsocial/features/search/components/header/index.js
deleted file mode 100644
index 08b400a2..00000000
--- a/app/javascript/gabsocial/features/search/components/header/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './header'
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/search/index.js b/app/javascript/gabsocial/features/search/index.js
index 507d55af..a2fb37de 100644
--- a/app/javascript/gabsocial/features/search/index.js
+++ b/app/javascript/gabsocial/features/search/index.js
@@ -1 +1 @@
-export { default } from './search'
\ No newline at end of file
+export { default } from '../search'
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/status/containers/detailed_status_container.js b/app/javascript/gabsocial/features/status/containers/detailed_status_container.js
index ee8b5751..07cf4cbb 100644
--- a/app/javascript/gabsocial/features/status/containers/detailed_status_container.js
+++ b/app/javascript/gabsocial/features/status/containers/detailed_status_container.js
@@ -6,9 +6,9 @@ import {
} from '../../../actions/compose';
import {
reblog,
- favourite,
+ favorite,
unreblog,
- unfavourite,
+ unfavorite,
pin,
unpin,
} from '../../../actions/interactions';
@@ -65,27 +65,27 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
});
},
- onModalReblog (status) {
- dispatch(reblog(status));
+ onModalRepost (status) {
+ dispatch(repost(status));
},
- onReblog (status, e) {
+ onRepost (status, e) {
if (status.get('reblogged')) {
- dispatch(unreblog(status));
+ dispatch(unrepost(status));
} else {
if (e.shiftKey || !boostModal) {
- this.onModalReblog(status);
+ this.onModalRepost(status);
} else {
- dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog }));
+ dispatch(openModal('BOOST', { status, onRepost: this.onModalRepost }));
}
}
},
- onFavourite (status) {
- if (status.get('favourited')) {
- dispatch(unfavourite(status));
+ onFavorite (status) {
+ if (status.get('favorited')) {
+ dispatch(unfavorite(status));
} else {
- dispatch(favourite(status));
+ dispatch(favorite(status));
}
},
diff --git a/app/javascript/gabsocial/features/status/status.js b/app/javascript/gabsocial/features/status/status.js
index 1658e48c..f8d4339c 100644
--- a/app/javascript/gabsocial/features/status/status.js
+++ b/app/javascript/gabsocial/features/status/status.js
@@ -6,8 +6,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import { HotKeys } from 'react-hotkeys';
import { fetchStatus } from '../../actions/statuses';
import {
- favourite,
- unfavourite,
+ favorite,
+ unfavorite,
reblog,
unreblog,
pin,
@@ -155,11 +155,11 @@ class Status extends ImmutablePureComponent {
this.setState({ showMedia: !this.state.showMedia });
}
- handleFavouriteClick = (status) => {
+ handleFavoriteClick = (status) => {
if (status.get('favourited')) {
- this.props.dispatch(unfavourite(status));
+ this.props.dispatch(unfavorite(status));
} else {
- this.props.dispatch(favourite(status));
+ this.props.dispatch(favorite(status));
}
}
@@ -184,18 +184,18 @@ class Status extends ImmutablePureComponent {
}
}
- handleModalReblog = (status) => {
- this.props.dispatch(reblog(status));
+ handleModalRepost = (status) => {
+ this.props.dispatch(repost(status));
}
- handleReblogClick = (status, e) => {
+ handleRepostClick = (status, e) => {
if (status.get('reblogged')) {
- this.props.dispatch(unreblog(status));
+ this.props.dispatch(unrepost(status));
} else {
if ((e && e.shiftKey) || !boostModal) {
- this.handleModalReblog(status);
+ this.handleModalRepost(status);
} else {
- this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));
+ this.props.dispatch(openModal('BOOST', { status, onRepost: this.handleModalRepost }));
}
}
}
@@ -298,12 +298,12 @@ class Status extends ImmutablePureComponent {
this.handleReplyClick(this.props.status);
}
- handleHotkeyFavourite = () => {
- this.handleFavouriteClick(this.props.status);
+ handleHotkeyFavorite = () => {
+ this.handleFavoriteClick(this.props.status);
}
handleHotkeyBoost = () => {
- this.handleReblogClick(this.props.status);
+ this.handleRepostClick(this.props.status);
}
handleHotkeyMention = e => {
@@ -432,7 +432,7 @@ class Status extends ImmutablePureComponent {
moveUp: this.handleHotkeyMoveUp,
moveDown: this.handleHotkeyMoveDown,
reply: this.handleHotkeyReply,
- favourite: this.handleHotkeyFavourite,
+ favorite: this.handleHotkeyFavorite,
boost: this.handleHotkeyBoost,
mention: this.handleHotkeyMention,
openProfile: this.handleHotkeyOpenProfile,
@@ -481,11 +481,11 @@ class Status extends ImmutablePureComponent {
showThread
/>
-
+ />*/}
diff --git a/app/javascript/gabsocial/features/ui/ui.js b/app/javascript/gabsocial/features/ui/ui.js
index 608f55ed..ff1d5633 100644
--- a/app/javascript/gabsocial/features/ui/ui.js
+++ b/app/javascript/gabsocial/features/ui/ui.js
@@ -182,8 +182,10 @@ class SwitchingArea extends PureComponent {
+ { /*
+ */ }
@@ -191,11 +193,8 @@ class SwitchingArea extends PureComponent {
-
-
-
-
-
+
+
@@ -203,8 +202,8 @@ class SwitchingArea extends PureComponent {
-
-
+
+
diff --git a/app/javascript/gabsocial/features/ui/ui.scss b/app/javascript/gabsocial/features/ui/ui.scss
deleted file mode 100644
index 54e63a7e..00000000
--- a/app/javascript/gabsocial/features/ui/ui.scss
+++ /dev/null
@@ -1,47 +0,0 @@
-.ui {
- display: block;
- width: 100%;
- padding: 0 0 100px 0;
-}
-
-@media screen and (max-width: 630px) and (max-height: 400px) {
- .is-composing {
-
- .tabs-bar,
- .search {
- margin-top: -50px;
- }
-
- .navigation-bar {
- padding-bottom: 0;
-
- &>a:first-child {
- margin: -100px 10px 0 -50px;
- }
-
- &__profile {
- padding-top: 2px;
- }
-
- &__profile-edit {
- position: absolute;
- margin-top: -60px;
- }
-
- &__actions {
- .icon-button.close {
- pointer-events: auto;
- opacity: 1;
- transform: scale(1.0, 1.0) translate(0, 0);
- bottom: 5px;
- }
-
- .compose__action-bar .icon-button {
- pointer-events: none;
- opacity: 0;
- transform: scale(0.0, 1.0) translate(100%, 0);
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/ui/util/async-components.js b/app/javascript/gabsocial/features/ui/util/async-components.js
index 9360eb70..ce7729c1 100644
--- a/app/javascript/gabsocial/features/ui/util/async-components.js
+++ b/app/javascript/gabsocial/features/ui/util/async-components.js
@@ -114,8 +114,8 @@ export function Notifications() {
return import(/* webpackChunkName: "features/notifications" */'../../notifications')
}
-export function Reblogs() {
- return import(/* webpackChunkName: "features/reblogs" */'../../reblogs')
+export function Reposts() {
+ return import(/* webpackChunkName: "features/reblogs" */'../../reposts')
}
export function ReportModal() {
diff --git a/app/javascript/gabsocial/layouts/profile_layout.js b/app/javascript/gabsocial/layouts/profile_layout.js
index 944edb6c..22ae13ae 100644
--- a/app/javascript/gabsocial/layouts/profile_layout.js
+++ b/app/javascript/gabsocial/layouts/profile_layout.js
@@ -29,12 +29,8 @@ export default class ProfileLayout extends ImmutablePureComponent {
title: 'Comments',
},
{
- to: `/${account.get('acct')}/photos`,
- title: 'Photos',
- },
- {
- to: `/${account.get('acct')}/videos`,
- title: 'Videos',
+ to: `/${account.get('acct')}/media`,
+ title: 'Media',
},
{
to: '',
diff --git a/app/javascript/gabsocial/locales/ast.json b/app/javascript/gabsocial/locales/ast.json
index 6527fa40..4d24b205 100644
--- a/app/javascript/gabsocial/locales/ast.json
+++ b/app/javascript/gabsocial/locales/ast.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's gabs with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/bg.json b/app/javascript/gabsocial/locales/bg.json
index 1c3255a7..6543a1a1 100644
--- a/app/javascript/gabsocial/locales/bg.json
+++ b/app/javascript/gabsocial/locales/bg.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/cy.json b/app/javascript/gabsocial/locales/cy.json
index 7c61d8a0..0e999217 100644
--- a/app/javascript/gabsocial/locales/cy.json
+++ b/app/javascript/gabsocial/locales/cy.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Gorffen tiwtorial!",
"introduction.interactions.favourite.headline": "Ffefryn",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Hwb",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Ateb",
diff --git a/app/javascript/gabsocial/locales/da.json b/app/javascript/gabsocial/locales/da.json
index 8ca7e11e..ebf47e2b 100644
--- a/app/javascript/gabsocial/locales/da.json
+++ b/app/javascript/gabsocial/locales/da.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Slut tutorial!",
"introduction.interactions.favourite.headline": "Favorisere",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Svar",
diff --git a/app/javascript/gabsocial/locales/defaultMessages.json b/app/javascript/gabsocial/locales/defaultMessages.json
index 08450499..7bd0aad5 100644
--- a/app/javascript/gabsocial/locales/defaultMessages.json
+++ b/app/javascript/gabsocial/locales/defaultMessages.json
@@ -1507,7 +1507,7 @@
"id": "introduction.interactions.favourite.headline"
},
{
- "defaultMessage": "You can save a gab for later, and let the author know that you liked it, by favouriting it.",
+ "defaultMessage": "You can save a gab for later, and let the author know that you liked it, by favoriting it.",
"id": "introduction.interactions.favourite.text"
},
{
diff --git a/app/javascript/gabsocial/locales/en.json b/app/javascript/gabsocial/locales/en.json
index 68123775..db859e22 100644
--- a/app/javascript/gabsocial/locales/en.json
+++ b/app/javascript/gabsocial/locales/en.json
@@ -170,7 +170,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favorite",
- "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's gabs with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/es.json b/app/javascript/gabsocial/locales/es.json
index e64c5956..0aecd42e 100644
--- a/app/javascript/gabsocial/locales/es.json
+++ b/app/javascript/gabsocial/locales/es.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/fi.json b/app/javascript/gabsocial/locales/fi.json
index b9a0b3b5..6369db87 100644
--- a/app/javascript/gabsocial/locales/fi.json
+++ b/app/javascript/gabsocial/locales/fi.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's gabs with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/he.json b/app/javascript/gabsocial/locales/he.json
index d890d195..5a71f1fa 100644
--- a/app/javascript/gabsocial/locales/he.json
+++ b/app/javascript/gabsocial/locales/he.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Boost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by boosting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/hi.json b/app/javascript/gabsocial/locales/hi.json
index ef78608b..12aade9c 100644
--- a/app/javascript/gabsocial/locales/hi.json
+++ b/app/javascript/gabsocial/locales/hi.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish toot-orial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/hr.json b/app/javascript/gabsocial/locales/hr.json
index 62d30f1c..6e1b80a9 100644
--- a/app/javascript/gabsocial/locales/hr.json
+++ b/app/javascript/gabsocial/locales/hr.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/hu.json b/app/javascript/gabsocial/locales/hu.json
index 80f6efc1..bd4e017f 100644
--- a/app/javascript/gabsocial/locales/hu.json
+++ b/app/javascript/gabsocial/locales/hu.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/hy.json b/app/javascript/gabsocial/locales/hy.json
index bb48975a..266d534f 100644
--- a/app/javascript/gabsocial/locales/hy.json
+++ b/app/javascript/gabsocial/locales/hy.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/id.json b/app/javascript/gabsocial/locales/id.json
index e387ca5b..3595e267 100644
--- a/app/javascript/gabsocial/locales/id.json
+++ b/app/javascript/gabsocial/locales/id.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/io.json b/app/javascript/gabsocial/locales/io.json
index cfdc6be7..1b14fb1b 100644
--- a/app/javascript/gabsocial/locales/io.json
+++ b/app/javascript/gabsocial/locales/io.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/ka.json b/app/javascript/gabsocial/locales/ka.json
index f983b8db..9dcc303c 100644
--- a/app/javascript/gabsocial/locales/ka.json
+++ b/app/javascript/gabsocial/locales/ka.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's gabs with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/lv.json b/app/javascript/gabsocial/locales/lv.json
index 39cfde76..ed545564 100644
--- a/app/javascript/gabsocial/locales/lv.json
+++ b/app/javascript/gabsocial/locales/lv.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/ms.json b/app/javascript/gabsocial/locales/ms.json
index b007233c..03c2f97b 100644
--- a/app/javascript/gabsocial/locales/ms.json
+++ b/app/javascript/gabsocial/locales/ms.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/no.json b/app/javascript/gabsocial/locales/no.json
index 106e8619..0cf7cba6 100644
--- a/app/javascript/gabsocial/locales/no.json
+++ b/app/javascript/gabsocial/locales/no.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/sl.json b/app/javascript/gabsocial/locales/sl.json
index 091f7f8f..b6ce8129 100644
--- a/app/javascript/gabsocial/locales/sl.json
+++ b/app/javascript/gabsocial/locales/sl.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/sr-Latn.json b/app/javascript/gabsocial/locales/sr-Latn.json
index 7e942cb1..dd079229 100644
--- a/app/javascript/gabsocial/locales/sr-Latn.json
+++ b/app/javascript/gabsocial/locales/sr-Latn.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/sr.json b/app/javascript/gabsocial/locales/sr.json
index 7948b2e0..08157a99 100644
--- a/app/javascript/gabsocial/locales/sr.json
+++ b/app/javascript/gabsocial/locales/sr.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/sv.json b/app/javascript/gabsocial/locales/sv.json
index 182ffe13..7c262bb3 100644
--- a/app/javascript/gabsocial/locales/sv.json
+++ b/app/javascript/gabsocial/locales/sv.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a gab for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's gabs with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/ta.json b/app/javascript/gabsocial/locales/ta.json
index 1ddcda18..69a2dc1a 100644
--- a/app/javascript/gabsocial/locales/ta.json
+++ b/app/javascript/gabsocial/locales/ta.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/th.json b/app/javascript/gabsocial/locales/th.json
index 0f898de4..e9d5aba9 100644
--- a/app/javascript/gabsocial/locales/th.json
+++ b/app/javascript/gabsocial/locales/th.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/uk.json b/app/javascript/gabsocial/locales/uk.json
index 30521fc3..ea6b9677 100644
--- a/app/javascript/gabsocial/locales/uk.json
+++ b/app/javascript/gabsocial/locales/uk.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/zh-CN.json b/app/javascript/gabsocial/locales/zh-CN.json
index 72abd771..c8eec528 100644
--- a/app/javascript/gabsocial/locales/zh-CN.json
+++ b/app/javascript/gabsocial/locales/zh-CN.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/locales/zh-HK.json b/app/javascript/gabsocial/locales/zh-HK.json
index 1fdc43a4..9f582c4e 100644
--- a/app/javascript/gabsocial/locales/zh-HK.json
+++ b/app/javascript/gabsocial/locales/zh-HK.json
@@ -169,7 +169,7 @@
"introduction.federation.local.text": "Public posts from people on the same server as you will appear in the local timeline.",
"introduction.interactions.action": "Finish tutorial!",
"introduction.interactions.favourite.headline": "Favourite",
- "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favouriting it.",
+ "introduction.interactions.favourite.text": "You can save a toot for later, and let the author know that you liked it, by favoriting it.",
"introduction.interactions.reblog.headline": "Repost",
"introduction.interactions.reblog.text": "You can share other people's toots with your followers by reposting them.",
"introduction.interactions.reply.headline": "Reply",
diff --git a/app/javascript/gabsocial/pages/profile_page.js b/app/javascript/gabsocial/pages/profile_page.js
index 5dce5683..4a481ccb 100644
--- a/app/javascript/gabsocial/pages/profile_page.js
+++ b/app/javascript/gabsocial/pages/profile_page.js
@@ -3,25 +3,30 @@ import ImmutablePropTypes from 'react-immutable-proptypes'
import ImmutablePureComponent from 'react-immutable-pure-component'
import { fetchAccountByUsername } from '../actions/accounts'
import { makeGetAccount } from '../selectors'
+import { me } from '../initial_state'
import LinkFooter from '../components/link_footer'
import ProfileStatsPanel from '../components/panel/profile_stats_panel'
import ProfileInfoPanel from '../components/panel/profile_info_panel'
import MediaGalleryPanel from '../components/panel/media_gallery_panel'
+import ColumnIndicator from '../components/column_indicator'
import ProfileLayout from '../layouts/profile_layout'
-const mapStateToProps = (state, { params: { username }, withReplies = false }) => {
+const mapStateToProps = (state, { params: { username } }) => {
const accounts = state.getIn(['accounts'])
- const accountFetchError = (state.getIn(['accounts', -1, 'username'], '').toLowerCase() == username.toLowerCase())
+ const account = accounts.find(acct => username.toLowerCase() == acct.getIn(['acct'], '').toLowerCase())
- let account = null
- if (!accountFetchError) {
- account = accounts.find(acct => username.toLowerCase() == acct.getIn(['acct'], '').toLowerCase())
- }
+ const accountId = !!account ? account.get('id') : -1
+ const isBlocked = state.getIn(['relationships', accountId, 'blocked_by'], false)
+ const isLocked = state.getIn(['accounts', accountId, 'locked'], false)
+ const isFollowing = state.getIn(['relationships', accountId, 'following'], false)
+
+ const unavailable = (me === accountId) ? false : (isBlocked || (isLocked && !isFollowing))
const getAccount = makeGetAccount()
return {
- account: account ? getAccount(state, account.get('id')) : null,
+ unavailable,
+ account: accountId !== -1 ? getAccount(state, accountId) : null,
}
}
@@ -29,10 +34,11 @@ export default
@connect(mapStateToProps)
class ProfilePage extends ImmutablePureComponent {
static propTypes = {
+ children: PropTypes.node,
params: PropTypes.object.isRequired,
account: ImmutablePropTypes.map,
dispatch: PropTypes.func.isRequired,
- children: PropTypes.node,
+ unavailable: PropTypes.bool.isRequired,
}
componentWillMount() {
@@ -41,7 +47,11 @@ class ProfilePage extends ImmutablePureComponent {
}
render() {
- const { account } = this.props
+ const {
+ account,
+ children,
+ unavailable
+ } = this.props
return (
)}
>
- { this.props.children }
+ {
+ !account &&
+ }
+ {
+ !!account && !unavailable &&
+ React.cloneElement(children, {
+ account,
+ })
+ }
)
}
diff --git a/app/javascript/gabsocial/reducers/user_lists.js b/app/javascript/gabsocial/reducers/user_lists.js
index 2edc7ecd..5a95b34c 100644
--- a/app/javascript/gabsocial/reducers/user_lists.js
+++ b/app/javascript/gabsocial/reducers/user_lists.js
@@ -9,7 +9,7 @@ import {
FOLLOW_REQUEST_REJECT_SUCCESS,
} from '../actions/accounts';
import {
- REBLOGS_FETCH_SUCCESS,
+ REPOSTS_FETCH_SUCCESS,
} from '../actions/interactions';
import {
BLOCKS_FETCH_SUCCESS,
@@ -63,7 +63,7 @@ export default function userLists(state = initialState, action) {
return normalizeList(state, 'following', action.id, action.accounts, action.next);
case FOLLOWING_EXPAND_SUCCESS:
return appendToList(state, 'following', action.id, action.accounts, action.next);
- case REBLOGS_FETCH_SUCCESS:
+ case REPOSTS_FETCH_SUCCESS:
return state.setIn(['reblogged_by', action.id], ImmutableList(action.accounts.map(item => item.id)));
case FOLLOW_REQUESTS_FETCH_SUCCESS:
return state.setIn(['follow_requests', 'items'], ImmutableList(action.accounts.map(item => item.id))).setIn(['follow_requests', 'next'], action.next);
diff --git a/app/javascript/gabsocial/service_worker/web_push_notifications.js b/app/javascript/gabsocial/service_worker/web_push_notifications.js
index f4ee34c3..a95c61b2 100644
--- a/app/javascript/gabsocial/service_worker/web_push_notifications.js
+++ b/app/javascript/gabsocial/service_worker/web_push_notifications.js
@@ -103,7 +103,7 @@ const handlePush = (event) => {
options.image = undefined;
options.actions = [actionExpand(preferred_locale)];
} else if (notification.type === 'mention') {
- options.actions = [actionReblog(preferred_locale), actionFavourite(preferred_locale)];
+ options.actions = [actionRepost(preferred_locale), actionFavorite(preferred_locale)];
}
return notify(options);
@@ -127,13 +127,13 @@ const actionExpand = preferred_locale => ({
title: formatMessage('status.show_more', preferred_locale),
});
-const actionReblog = preferred_locale => ({
+const actionRepost = preferred_locale => ({
action: 'reblog',
icon: '/web-push-icon_reblog.png',
title: formatMessage('status.reblog', preferred_locale),
});
-const actionFavourite = preferred_locale => ({
+const actionFavorite = preferred_locale => ({
action: 'favourite',
icon: '/web-push-icon_favourite.png',
title: formatMessage('status.favourite', preferred_locale),
@@ -151,7 +151,7 @@ const expandNotification = notification => {
newNotification.body = newNotification.data.hiddenBody;
newNotification.image = newNotification.data.hiddenImage;
- newNotification.actions = [actionReblog(notification.data.preferred_locale), actionFavourite(notification.data.preferred_locale)];
+ newNotification.actions = [actionRepost(notification.data.preferred_locale), actionFavorite(notification.data.preferred_locale)];
return self.registration.showNotification(newNotification.title, newNotification);
};
diff --git a/app/javascript/styles/global.css b/app/javascript/styles/global.css
index 2599f9ce..80adbf54 100644
--- a/app/javascript/styles/global.css
+++ b/app/javascript/styles/global.css
@@ -409,6 +409,10 @@ body {
min-height: 100vh;
}
+.heightMin50VH {
+ min-height: 50vh;
+}
+
.height100VH {
height: 100vh;
}
@@ -437,6 +441,10 @@ body {
height: 122px;
}
+.height158PX {
+ height: 158px;
+}
+
.height220PX {
height: 220px;
}
@@ -469,18 +477,22 @@ body {
width: 240px;
}
-.width100PC {
- width: 100%;
-}
-
.width72PX {
width: 72px;
}
+.width100PC {
+ width: 100%;
+}
+
.width50PC {
width: 50%;
}
+.width25PC {
+ width: 25%;
+}
+
.maxWidth100PC {
max-width: 100%;
}
@@ -743,6 +755,10 @@ body {
padding-top: 56.25%;
}
+.paddingTop25PC {
+ padding-top: 25%;
+}
+
.paddingTop10PX {
padding-top: 10px;
}
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 39cd6cc1..e4616069 100755
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -28,8 +28,6 @@
%title= content_for?(:page_title) ? safe_join([yield(:page_title).chomp.html_safe, title], ' - ') : title
= stylesheet_pack_tag 'common', media: 'all'
- -# = stylesheet_pack_tag 'application', media: 'all'
- -# = stylesheet_pack_tag current_theme, media: 'all'
= javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
= javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
= csrf_meta_tags
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 0f29e4f5..f267caaf 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -958,7 +958,7 @@ en:
- Basic account information: If you register on this server, you may be asked to enter a username, an e-mail address and a password. You may also enter additional profile information such as a display name and biography, and upload a profile picture and header image. The username, display name, biography, profile picture and header image are always listed publicly.
- - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favouriting another post is always public.
+ - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favoriting another post is always public.
- Direct and followers-only posts: All posts are stored and processed on the server. Followers-only posts are delivered to your followers and users who are mentioned in them, and direct posts are delivered only to users mentioned in them. In some cases it means they are delivered to different servers and copies are stored there. We make a good faith effort to limit the access to those posts only to authorized persons, but other servers may fail to do so. Therefore it's important to review servers your followers belong to. You may toggle an option to approve and reject new followers manually in the settings. Please keep in mind that the operators of the server and any receiving server may view such messages, and that recipients may screenshot, copy or otherwise re-share them. Do not share any dangerous information over Gab Social.
- IPs and other metadata: When you log in, we record the IP address you log in from, as well as the name of your browser application. All the logged in sessions are available for your review and revocation in the settings. The latest IP address used is stored for up to 12 months. We also may retain server logs which include the IP address of every request to our server.
diff --git a/config/locales/en_GB.yml b/config/locales/en_GB.yml
index b1f37172..6e8fba54 100644
--- a/config/locales/en_GB.yml
+++ b/config/locales/en_GB.yml
@@ -903,7 +903,7 @@ en_GB:
- Basic account information: If you register on this server, you may be asked to enter a username, an e-mail address and a password. You may also enter additional profile information such as a display name and biography, and upload a profile picture and header image. The username, display name, biography, profile picture and header image are always listed publicly.
- - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favouriting another post is always public.
+ - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favoriting another post is always public.
- Direct and followers-only posts: All posts are stored and processed on the server. Followers-only posts are delivered to your followers and users who are mentioned in them, and direct posts are delivered only to users mentioned in them. In some cases it means they are delivered to different servers and copies are stored there. We make a good faith effort to limit the access to those posts only to authorized persons, but other servers may fail to do so. Therefore it's important to review servers your followers belong to. You may toggle an option to approve and reject new followers manually in the settings. Please keep in mind that the operators of the server and any receiving server may view such messages, and that recipients may screenshot, copy or otherwise re-share them. Do not share any dangerous information over Gab Social.
- IPs and other metadata: When you log in, we record the IP address you log in from, as well as the name of your browser application. All the logged in sessions are available for your review and revocation in the settings. The latest IP address used is stored for up to 12 months. We also may retain server logs which include the IP address of every request to our server.
diff --git a/config/locales/kk.yml b/config/locales/kk.yml
index eac164fd..9e266366 100644
--- a/config/locales/kk.yml
+++ b/config/locales/kk.yml
@@ -846,7 +846,7 @@ kk:
- Basic account information: If you register on this server, you may be asked to enter a username, an e-mail address and a password. You may also enter additional profile information such as a display name and biography, and upload a profile picture and header image. The username, display name, biography, profile picture and header image are always listed publicly.
- - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favouriting another post is always public.
+ - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favoriting another post is always public.
- Direct and followers-only posts: All posts are stored and processed on the server. Followers-only posts are delivered to your followers and users who are mentioned in them, and direct posts are delivered only to users mentioned in them. In some cases it means they are delivered to different servers and copies are stored there. We make a good faith effort to limit the access to those posts only to authorized persons, but other servers may fail to do so. Therefore it's important to review servers your followers belong to. You may toggle an option to approve and reject new followers manually in the settings. Please keep in mind that the operators of the server and any receiving server may view such messages, and that recipients may screenshot, copy or otherwise re-share them. Do not share any dangerous information over Gab Social.
- IPs and other metadata: When you log in, we record the IP address you log in from, as well as the name of your browser application. All the logged in sessions are available for your review and revocation in the settings. The latest IP address used is stored for up to 12 months. We also may retain server logs which include the IP address of every request to our server.
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index 8739b622..0914534b 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -927,7 +927,7 @@ nl:
- Basic account information: If you register on this server, you may be asked to enter a username, an e-mail address and a password. You may also enter additional profile information such as a display name and biography, and upload a profile picture and header image. The username, display name, biography, profile picture and header image are always listed publicly.
- - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favouriting another post is always public.
+ - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favoriting another post is always public.
- Direct and followers-only posts: All posts are stored and processed on the server. Followers-only posts are delivered to your followers and users who are mentioned in them, and direct posts are delivered only to users mentioned in them. In some cases it means they are delivered to different servers and copies are stored there. We make a good faith effort to limit the access to those posts only to authorized persons, but other servers may fail to do so. Therefore it's important to review servers your followers belong to. You may toggle an option to approve and reject new followers manually in the settings. Please keep in mind that the operators of the server and any receiving server may view such messages, and that recipients may screenshot, copy or otherwise re-share them. Do not share any dangerous information over Gab Social.
- IPs and other metadata: When you log in, we record the IP address you log in from, as well as the name of your browser application. All the logged in sessions are available for your review and revocation in the settings. The latest IP address used is stored for up to 12 months. We also may retain server logs which include the IP address of every request to our server.
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index 02e86b81..7fe8e442 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -957,7 +957,7 @@ ru:
- Basic account information: If you register on this server, you may be asked to enter a username, an e-mail address and a password. You may also enter additional profile information such as a display name and biography, and upload a profile picture and header image. The username, display name, biography, profile picture and header image are always listed publicly.
- - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favouriting another post is always public.
+ - Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favoriting another post is always public.
- Direct and followers-only posts: All posts are stored and processed on the server. Followers-only posts are delivered to your followers and users who are mentioned in them, and direct posts are delivered only to users mentioned in them. In some cases it means they are delivered to different servers and copies are stored there. We make a good faith effort to limit the access to those posts only to authorized persons, but other servers may fail to do so. Therefore it's important to review servers your followers belong to. You may toggle an option to approve and reject new followers manually in the settings. Please keep in mind that the operators of the server and any receiving server may view such messages, and that recipients may screenshot, copy or otherwise re-share them. Do not share any dangerous information over Gab Social.
- IPs and other metadata: When you log in, we record the IP address you log in from, as well as the name of your browser application. All the logged in sessions are available for your review and revocation in the settings. The latest IP address used is stored for up to 12 months. We also may retain server logs which include the IP address of every request to our server.
diff --git a/config/locales/sv.yml b/config/locales/sv.yml
index 021e235d..2dd44cbc 100644
--- a/config/locales/sv.yml
+++ b/config/locales/sv.yml
@@ -643,7 +643,7 @@ sv:
- Grundläggande kontoinformation: Det användarnamn du väljer, visningsnamn, biografi, avatar/profilbild och bakgrundsbild kommer alltid vara tillgängliga för alla som kan nå webbsidan.
- - Inlägg, vem du följer och annan tillgänglig information: Dina följare och de konton du följer är alltid tillgängliga. När du skapar ett nytt inlägg sparas datum och tid för meddelandet, samt vilket program du använde för att skapa inlägget. Detta gäller även bilder och media som inlägg kan innehålla.Både "Publika" och "Olistade" inlägg kan vara tillgängliga för alla som har åtkomst till webbsidan. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favouriting another post is always public.
+ - Inlägg, vem du följer och annan tillgänglig information: Dina följare och de konton du följer är alltid tillgängliga. När du skapar ett nytt inlägg sparas datum och tid för meddelandet, samt vilket program du använde för att skapa inlägget. Detta gäller även bilder och media som inlägg kan innehålla.Både "Publika" och "Olistade" inlägg kan vara tillgängliga för alla som har åtkomst till webbsidan. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favoriting another post is always public.
- Direct and followers-only posts: All posts are stored and processed on the server. Followers-only posts are delivered to your followers and users who are mentioned in them, and direct posts are delivered only to users mentioned in them. In some cases it means they are delivered to different servers and copies are stored there. We make a good faith effort to limit the access to those posts only to authorized persons, but other servers may fail to do so. Therefore it's important to review servers your followers belong to. You may toggle an option to approve and reject new followers manually in the settings. Please keep in mind that the operators of the server and any receiving server may view such messages, and that recipients may screenshot, copy or otherwise re-share them. Do not share any dangerous information over Gab Social.
- IPs and other metadata: When you log in, we record the IP address you log in from, as well as the name of your browser application. All the logged in sessions are available for your review and revocation in the settings. The latest IP address used is stored for up to 12 months. We also may retain server logs which include the IP address of every request to our server.
diff --git a/config/webpack/shared.js b/config/webpack/shared.js
index 61ef7f0e..c09d9b52 100644
--- a/config/webpack/shared.js
+++ b/config/webpack/shared.js
@@ -113,8 +113,8 @@ module.exports = {
},
node: {
- // Called by http-link-header in an API we never use, increases
- // bundle size unnecessarily
+ // Called by http-link-header in an API we never use,
+ // increases bundle size unnecessarily
Buffer: false,
},
};
diff --git a/streaming/index.js b/streaming/index.js
index 551df417..08471d10 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -89,27 +89,27 @@ const startWorker = (workerId) => {
const pgConfigs = {
development: {
- user: process.env.DB_USER || pg.defaults.user,
+ user: process.env.DB_USER || pg.defaults.user,
password: process.env.DB_PASS || pg.defaults.password,
database: process.env.DB_NAME || 'gabsocial_development',
- host: process.env.DB_HOST || pg.defaults.host,
- port: process.env.DB_PORT || pg.defaults.port,
- max: 10,
+ host: process.env.DB_HOST || pg.defaults.host,
+ port: process.env.DB_PORT || pg.defaults.port,
+ max: 10,
},
production: {
- user: process.env.DB_USER || 'gabsocial',
+ user: process.env.DB_USER || 'gabsocial',
password: process.env.DB_PASS || '',
database: process.env.DB_NAME || 'gabsocial_production',
- host: process.env.DB_HOST || 'localhost',
- port: process.env.DB_PORT || 5432,
- max: 10,
+ host: process.env.DB_HOST || 'localhost',
+ port: process.env.DB_PORT || 5432,
+ max: 10,
},
};
if (!!process.env.DB_SSLMODE && process.env.DB_SSLMODE !== 'disable') {
pgConfigs.development.ssl = true;
- pgConfigs.production.ssl = true;
+ pgConfigs.production.ssl = true;
}
const app = express();
@@ -120,9 +120,9 @@ const startWorker = (workerId) => {
const redisNamespace = process.env.REDIS_NAMESPACE || null;
const redisParams = {
- host: process.env.REDIS_HOST || '127.0.0.1',
- port: process.env.REDIS_PORT || 6379,
- db: process.env.REDIS_DB || 0,
+ host: process.env.REDIS_HOST || '127.0.0.1',
+ port: process.env.REDIS_PORT || 6379,
+ db: process.env.REDIS_DB || 0,
password: process.env.REDIS_PASSWORD,
};
@@ -150,12 +150,12 @@ const startWorker = (workerId) => {
});
const subscriptionHeartbeat = (channel) => {
- const interval = 6*60;
+ const interval = 6 * 60;
const tellSubscribed = () => {
- redisClient.set(`${redisPrefix}subscribed:${channel}`, '1', 'EX', interval*3);
+ redisClient.set(`${redisPrefix}subscribed:${channel}`, '1', 'EX', interval * 3);
};
tellSubscribed();
- const heartbeat = setInterval(tellSubscribed, interval*1000);
+ const heartbeat = setInterval(tellSubscribed, interval * 1000);
return () => {
clearInterval(heartbeat);
};
@@ -327,7 +327,7 @@ const startWorker = (workerId) => {
accountFromRequest(req, next, authRequired, allowedScopes);
};
- const errorMiddleware = (err, req, res, {}) => {
+ const errorMiddleware = (err, req, res, { }) => {
log.error(req.requestId, err.toString());
res.writeHead(err.statusCode || 500, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ error: err.statusCode ? err.toString() : 'An unexpected error occurred' }));
@@ -385,8 +385,8 @@ const startWorker = (workerId) => {
const { event, payload, queued_at } = JSON.parse(message);
const transmit = () => {
- const now = new Date().getTime();
- const delta = now - queued_at;
+ const now = new Date().getTime();
+ const delta = now - queued_at;
const encodedPayload = typeof payload === 'object' ? JSON.stringify(payload) : payload;
log.silly(req.requestId, `Transmitting for ${accountId}: ${event} ${encodedPayload} Delay: ${delta}ms`);
@@ -408,9 +408,9 @@ const startWorker = (workerId) => {
return;
}
- const unpackedPayload = payload;
+ const unpackedPayload = payload;
const targetAccountIds = [unpackedPayload.account.id].concat(unpackedPayload.mentions.map(item => item.id));
- const accountDomain = unpackedPayload.account.acct.split('@')[1];
+ const accountDomain = unpackedPayload.account.acct.split('@')[1];
if (Array.isArray(req.chosenLanguages) && unpackedPayload.language !== null && req.chosenLanguages.indexOf(unpackedPayload.language) === -1) {
log.silly(req.requestId, `Message ${unpackedPayload.id} filtered by language (${unpackedPayload.language})`);
@@ -550,14 +550,14 @@ const startWorker = (workerId) => {
app.get('/api/v1/streaming/public', (req, res) => {
const onlyMedia = req.query.only_media === '1' || req.query.only_media === 'true';
- const channel = onlyMedia ? 'timeline:public:media' : 'timeline:public';
+ const channel = onlyMedia ? 'timeline:public:media' : 'timeline:public';
streamFrom(channel, req, streamToHttp(req, res), streamHttpEnd(req), true);
});
app.get('/api/v1/streaming/public/local', (req, res) => {
const onlyMedia = req.query.only_media === '1' || req.query.only_media === 'true';
- const channel = onlyMedia ? 'timeline:public:local:media' : 'timeline:public:local';
+ const channel = onlyMedia ? 'timeline:public:local:media' : 'timeline:public:local';
streamFrom(channel, req, streamToHttp(req, res), streamHttpEnd(req), true);
});
@@ -607,84 +607,84 @@ const startWorker = (workerId) => {
wss.on('connection', (ws, req) => {
const location = url.parse(req.url, true);
- req.requestId = uuid.v4();
+ req.requestId = uuid.v4();
req.remoteAddress = ws._socket.remoteAddress;
let channel;
- switch(location.query.stream) {
- case 'statuscard':
- channel = `statuscard:${req.accountId}`;
- streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)));
- break;
- case 'user':
- channel = `timeline:${req.accountId}`;
- streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)));
- break;
- case 'user:notification':
- streamFrom(`timeline:${req.accountId}`, req, streamToWs(req, ws), streamWsEnd(req, ws), false, true);
- break;
- case 'public':
- streamFrom('timeline:public', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
- break;
- case 'public:local':
- streamFrom('timeline:public:local', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
- break;
- case 'public:media':
- streamFrom('timeline:public:media', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
- break;
- case 'public:local:media':
- streamFrom('timeline:public:local:media', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
- break;
- case 'direct':
- channel = `timeline:direct:${req.accountId}`;
- streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)), true);
- break;
- case 'hashtag':
- if (!location.query.tag || location.query.tag.length === 0) {
- ws.close();
- return;
- }
-
- streamFrom(`timeline:hashtag:${location.query.tag.toLowerCase()}`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
- break;
- case 'hashtag:local':
- if (!location.query.tag || location.query.tag.length === 0) {
- ws.close();
- return;
- }
-
- streamFrom(`timeline:hashtag:${location.query.tag.toLowerCase()}:local`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
- break;
- case 'list':
- const listId = location.query.list;
-
- authorizeListAccess(listId, req, authorized => {
- if (!authorized) {
+ switch (location.query.stream) {
+ case 'statuscard':
+ channel = `statuscard:${req.accountId}`;
+ streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)));
+ break;
+ case 'user':
+ channel = `timeline:${req.accountId}`;
+ streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)));
+ break;
+ case 'user:notification':
+ streamFrom(`timeline:${req.accountId}`, req, streamToWs(req, ws), streamWsEnd(req, ws), false, true);
+ break;
+ case 'public':
+ streamFrom('timeline:public', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
+ break;
+ case 'public:local':
+ streamFrom('timeline:public:local', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
+ break;
+ case 'public:media':
+ streamFrom('timeline:public:media', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
+ break;
+ case 'public:local:media':
+ streamFrom('timeline:public:local:media', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
+ break;
+ case 'direct':
+ channel = `timeline:direct:${req.accountId}`;
+ streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)), true);
+ break;
+ case 'hashtag':
+ if (!location.query.tag || location.query.tag.length === 0) {
ws.close();
return;
}
- channel = `timeline:list:${listId}`;
- streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)));
- });
- break;
-
- case 'group':
- const groupId = location.query.group;
-
- authorizeGroupAccess(groupId, req, authorized => {
- if (!authorized) {
+ streamFrom(`timeline:hashtag:${location.query.tag.toLowerCase()}`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
+ break;
+ case 'hashtag:local':
+ if (!location.query.tag || location.query.tag.length === 0) {
ws.close();
return;
}
- channel = `timeline:group:${groupId}`;
- streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)));
- });
- break;
- default:
- ws.close();
+ streamFrom(`timeline:hashtag:${location.query.tag.toLowerCase()}:local`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
+ break;
+ case 'list':
+ const listId = location.query.list;
+
+ authorizeListAccess(listId, req, authorized => {
+ if (!authorized) {
+ ws.close();
+ return;
+ }
+
+ channel = `timeline:list:${listId}`;
+ streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)));
+ });
+ break;
+
+ case 'group':
+ const groupId = location.query.group;
+
+ authorizeGroupAccess(groupId, req, authorized => {
+ if (!authorized) {
+ ws.close();
+ return;
+ }
+
+ channel = `timeline:group:${groupId}`;
+ streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel)));
+ });
+ break;
+ default:
+ ws.close();
}
});