diff --git a/app/javascript/gabsocial/components/upload_area/upload_area.js b/app/javascript/gabsocial/components/upload_area/upload_area.js
index ee810b20..a7f9247f 100644
--- a/app/javascript/gabsocial/components/upload_area/upload_area.js
+++ b/app/javascript/gabsocial/components/upload_area/upload_area.js
@@ -1,6 +1,6 @@
-import Motion from '../../features/ui/util/optional_motion';
-import spring from 'react-motion/lib/spring';
import { FormattedMessage } from 'react-intl';
+import spring from 'react-motion/lib/spring';
+import Motion from '../../features/ui/util/optional_motion';
import './upload_area.scss';
diff --git a/app/javascript/gabsocial/components/user_panel/user_panel.js b/app/javascript/gabsocial/components/user_panel/user_panel.js
index f6fe6bf6..cef32037 100644
--- a/app/javascript/gabsocial/components/user_panel/user_panel.js
+++ b/app/javascript/gabsocial/components/user_panel/user_panel.js
@@ -4,8 +4,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { autoPlayGif, me } from '../../initial_state';
import { makeGetAccount } from '../../selectors';
-import Avatar from '../avatar';
import { shortNumberFormat } from '../../utils/numbers';
+import Avatar from '../avatar';
import './user_panel.scss';
diff --git a/app/javascript/gabsocial/containers/account_container.js b/app/javascript/gabsocial/containers/account_container.js
index cfbe3d0a..c0e0287d 100644
--- a/app/javascript/gabsocial/containers/account_container.js
+++ b/app/javascript/gabsocial/containers/account_container.js
@@ -1,6 +1,4 @@
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { makeGetAccount } from '../selectors';
-import Account from '../components/account';
import {
followAccount,
unfollowAccount,
@@ -12,6 +10,8 @@ import {
import { openModal } from '../actions/modal';
import { initMuteModal } from '../actions/mutes';
import { unfollowModal } from '../initial_state';
+import { makeGetAccount } from '../selectors';
+import Account from '../components/account';
const messages = defineMessages({
unfollowConfirm: { id: 'confirmations.unfollow.confirm', defaultMessage: 'Unfollow' },
diff --git a/app/javascript/gabsocial/containers/compose_container.js b/app/javascript/gabsocial/containers/compose_container.js
index 99134fb5..5de350f0 100644
--- a/app/javascript/gabsocial/containers/compose_container.js
+++ b/app/javascript/gabsocial/containers/compose_container.js
@@ -1,11 +1,11 @@
import { Provider } from 'react-redux';
import { IntlProvider, addLocaleData } from 'react-intl';
+import { getLocale } from '../locales';
import configureStore from '../store/configureStore';
import { hydrateStore } from '../actions/store';
-import { getLocale } from '../locales';
-import Compose from '../features/standalone/compose';
-import initialState from '../initial_state';
import { fetchCustomEmojis } from '../actions/custom_emojis';
+import initialState from '../initial_state';
+import Compose from '../features/standalone/compose';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
diff --git a/app/javascript/gabsocial/containers/domain_container.js b/app/javascript/gabsocial/containers/domain_container.js
index c5e17c25..5baceb97 100644
--- a/app/javascript/gabsocial/containers/domain_container.js
+++ b/app/javascript/gabsocial/containers/domain_container.js
@@ -1,7 +1,7 @@
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { blockDomain, unblockDomain } from '../actions/domain_blocks';
-import Domain from '../components/domain';
import { openModal } from '../actions/modal';
+import Domain from '../components/domain';
const messages = defineMessages({
blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Hide entire domain' },
diff --git a/app/javascript/gabsocial/containers/dropdown_menu_container.js b/app/javascript/gabsocial/containers/dropdown_menu_container.js
index 46a6dae5..7aa30ffc 100644
--- a/app/javascript/gabsocial/containers/dropdown_menu_container.js
+++ b/app/javascript/gabsocial/containers/dropdown_menu_container.js
@@ -1,7 +1,7 @@
import { openDropdownMenu, closeDropdownMenu } from '../actions/dropdown_menu';
import { openModal, closeModal } from '../actions/modal';
-import DropdownMenu from '../components/dropdown_menu';
import { isUserTouching } from '../utils/is_mobile';
+import DropdownMenu from '../components/dropdown_menu';
const mapStateToProps = state => ({
isModalOpen: state.get('modal').modalType === 'ACTIONS',
diff --git a/app/javascript/gabsocial/containers/gabsocial.js b/app/javascript/gabsocial/containers/gabsocial.js
index 86e4398b..1e172f72 100644
--- a/app/javascript/gabsocial/containers/gabsocial.js
+++ b/app/javascript/gabsocial/containers/gabsocial.js
@@ -5,18 +5,18 @@ import configureStore from '../store/configureStore';
import { INTRODUCTION_VERSION } from '../actions/onboarding';
import { BrowserRouter, Route } from 'react-router-dom';
import { ScrollContext } from 'react-router-scroll-4';
-import UI from '../features/ui';
-import Introduction from '../features/introduction';
+import { IntlProvider, addLocaleData } from 'react-intl';
import { fetchCustomEmojis } from '../actions/custom_emojis';
import { hydrateStore } from '../actions/store';
import {
connectUserStream,
connectStatusUpdateStream,
} from '../actions/streaming';
-import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
import initialState from '../initial_state';
import { me } from '../initial_state';
+import UI from '../features/ui';
+// import Introduction from '../features/introduction';
import ErrorBoundary from '../components/error_boundary';
const { localeData, messages } = getLocale();
diff --git a/app/javascript/gabsocial/containers/intersection_observer_article_container.js b/app/javascript/gabsocial/containers/intersection_observer_article_container.js
index a44c6654..6ab487bf 100644
--- a/app/javascript/gabsocial/containers/intersection_observer_article_container.js
+++ b/app/javascript/gabsocial/containers/intersection_observer_article_container.js
@@ -1,5 +1,5 @@
-import IntersectionObserverArticle from '../components/intersection_observer_article';
import { setHeight } from '../actions/height_cache';
+import IntersectionObserverArticle from '../components/intersection_observer_article';
const makeMapStateToProps = (state, props) => ({
cachedHeight: state.getIn(['height_cache', props.saveHeightKey, props.id]),
diff --git a/app/javascript/gabsocial/containers/status_container.js b/app/javascript/gabsocial/containers/status_container.js
index f3cc2260..ba635cf6 100644
--- a/app/javascript/gabsocial/containers/status_container.js
+++ b/app/javascript/gabsocial/containers/status_container.js
@@ -1,5 +1,4 @@
-import Status from '../components/status';
-import { makeGetStatus } from '../selectors';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import {
replyCompose,
mentionCompose,
@@ -26,13 +25,14 @@ import {
import { initMuteModal } from '../actions/mutes';
import { initReport } from '../actions/reports';
import { openModal } from '../actions/modal';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { boostModal, deleteModal } from '../initial_state';
import { showAlertForError } from '../actions/alerts';
import {
createRemovedAccount,
groupRemoveStatus
} from '../actions/groups';
+import { makeGetStatus } from '../selectors';
+import Status from '../components/status';
const messages = defineMessages({
deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
diff --git a/app/javascript/gabsocial/containers/status_list_container.js b/app/javascript/gabsocial/containers/status_list_container.js
index cd657643..7fe40b98 100644
--- a/app/javascript/gabsocial/containers/status_list_container.js
+++ b/app/javascript/gabsocial/containers/status_list_container.js
@@ -1,10 +1,10 @@
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import { createSelector } from 'reselect';
import { debounce, sample } from 'lodash';
-import { me, promotions } from '../initial_state';
import { dequeueTimeline } from '../actions/timelines';
import { scrollTopTimeline } from '../actions/timelines';
import { fetchStatus } from '../actions/statuses';
+import { me, promotions } from '../initial_state';
import StatusList from '../components/status_list';
const makeGetStatusIds = () => createSelector([
diff --git a/app/javascript/gabsocial/features/ui/containers/status_revision_list_container.js b/app/javascript/gabsocial/containers/status_revision_list_container.js
similarity index 100%
rename from app/javascript/gabsocial/features/ui/containers/status_revision_list_container.js
rename to app/javascript/gabsocial/containers/status_revision_list_container.js
diff --git a/app/javascript/gabsocial/containers/timeline_container.js b/app/javascript/gabsocial/containers/timeline_container.js
index c5da92fd..28cf657e 100644
--- a/app/javascript/gabsocial/containers/timeline_container.js
+++ b/app/javascript/gabsocial/containers/timeline_container.js
@@ -2,13 +2,13 @@ import { Fragment } from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { IntlProvider, addLocaleData } from 'react-intl';
+import { getLocale } from '../locales';
import configureStore from '../store/configureStore';
import { hydrateStore } from '../actions/store';
-import { getLocale } from '../locales';
+import initialState from '../initial_state';
import PublicTimeline from '../features/standalone/public_timeline';
import HashtagTimeline from '../features/standalone/hashtag_timeline';
import ModalContainer from './modal_container';
-import initialState from '../initial_state';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
diff --git a/app/javascript/gabsocial/features/account_gallery/account_gallery.js b/app/javascript/gabsocial/features/account_gallery/account_gallery.js
index f1d4303b..5260981c 100644
--- a/app/javascript/gabsocial/features/account_gallery/account_gallery.js
+++ b/app/javascript/gabsocial/features/account_gallery/account_gallery.js
@@ -5,14 +5,14 @@ import {
fetchAccount,
fetchAccountByUsername,
} from '../../actions/accounts';
+import { openModal } from '../../actions/modal';
import { expandAccountMediaTimeline } from '../../actions/timelines';
+import { me } from '../../initial_state';
+import { getAccountGallery } from '../../selectors';
import ColumnIndicator from '../../components/column_indicator';
import Column from '../../components/column';
-import { getAccountGallery } from '../../selectors';
import MediaItem from './components/media_item';
import LoadMore from '../../components/load_more';
-import { openModal } from '../../actions/modal';
-import { me } from '../../initial_state';
import SectionHeadlineBar from '../../components/section_headline_bar';
import './account_gallery.scss';
diff --git a/app/javascript/gabsocial/features/account_timeline/account_timeline.js b/app/javascript/gabsocial/features/account_timeline/account_timeline.js
index d3ff29d2..2ae4bd00 100644
--- a/app/javascript/gabsocial/features/account_timeline/account_timeline.js
+++ b/app/javascript/gabsocial/features/account_timeline/account_timeline.js
@@ -4,11 +4,11 @@ import { List as ImmutableList } from 'immutable';
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
import { fetchAccount, fetchAccountByUsername } from '../../actions/accounts';
import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines';
+import { fetchAccountIdentityProofs } from '../../actions/identity_proofs';
+import { me } from '../../initial_state';
import StatusList from '../../components/status_list/status_list';
import ColumnIndicator from '../../components/column_indicator/column_indicator';
import Column from '../../components/column';
-import { fetchAccountIdentityProofs } from '../../actions/identity_proofs';
-import { me } from '../../initial_state';
import SectionHeadlineBar from '../../components/section_headline_bar' ;
const messages = defineMessages({
diff --git a/app/javascript/gabsocial/features/compose/components/search_results/search_results.js b/app/javascript/gabsocial/features/compose/components/search_results/search_results.js
index 1ae0d1fa..4844bc5f 100644
--- a/app/javascript/gabsocial/features/compose/components/search_results/search_results.js
+++ b/app/javascript/gabsocial/features/compose/components/search_results/search_results.js
@@ -39,7 +39,6 @@ export default class SearchResults extends ImmutablePureComponent {
let accounts, statuses, hashtags, groups;
let count = 0;
-
if (results.get('accounts') && results.get('accounts').size > 0 && (isTop || showPeople)) {
const size = isTop ? Math.min(results.get('accounts').size, 5) : results.get('accounts').size;
count += size;
@@ -51,7 +50,6 @@ export default class SearchResults extends ImmutablePureComponent {
);
}
-
if (results.get('groups') && results.get('groups').size > 0 && (isTop || showGroups)) {
const size = isTop ? Math.min(results.get('groups').size, 5) : results.get('groups').size;
count += size;
diff --git a/app/javascript/gabsocial/features/compose/compose.js b/app/javascript/gabsocial/features/compose/compose.js
index 80083548..28076570 100644
--- a/app/javascript/gabsocial/features/compose/compose.js
+++ b/app/javascript/gabsocial/features/compose/compose.js
@@ -2,15 +2,18 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { injectIntl, defineMessages } from 'react-intl';
import spring from 'react-motion/lib/spring';
+import {
+ changeComposing,
+ mountCompose,
+ unmountCompose,
+} from '../../actions/compose';
+import { mascot } from '../../initial_state';
import Motion from '../ui/util/optional_motion';
import ComposeFormContainer from './containers/compose_form_container';
-import NavigationBar from './components/navigation_bar';
-import { mountCompose, unmountCompose } from '../../actions/compose';
import SearchContainer from './containers/search_container';
import SearchResultsContainer from './containers/search_results_container';
-import { changeComposing } from '../../actions/compose';
+import NavigationBar from './components/navigation_bar';
import elephantUIPlane from '../../../images/logo_ui_column_footer.png';
-import { mascot } from '../../initial_state';
import './compose.scss';
diff --git a/app/javascript/gabsocial/features/domain_blocks/domain_blocks.js b/app/javascript/gabsocial/features/domain_blocks/domain_blocks.js
index 151acae5..31620841 100644
--- a/app/javascript/gabsocial/features/domain_blocks/domain_blocks.js
+++ b/app/javascript/gabsocial/features/domain_blocks/domain_blocks.js
@@ -2,10 +2,10 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
+import { fetchDomainBlocks, expandDomainBlocks } from '../../actions/domain_blocks';
+import DomainContainer from '../../containers/domain_container';
import ColumnIndicator from '../../components/column_indicator';
import Column from '../../components/column';
-import DomainContainer from '../../containers/domain_container';
-import { fetchDomainBlocks, expandDomainBlocks } from '../../actions/domain_blocks';
import ScrollableList from '../../components/scrollable_list';
const messages = defineMessages({
diff --git a/app/javascript/gabsocial/features/favourited_statuses/favourited_statuses.js b/app/javascript/gabsocial/features/favourited_statuses/favourited_statuses.js
index 265c1eb5..a4f2e54e 100644
--- a/app/javascript/gabsocial/features/favourited_statuses/favourited_statuses.js
+++ b/app/javascript/gabsocial/features/favourited_statuses/favourited_statuses.js
@@ -3,9 +3,9 @@ import { FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { debounce } from 'lodash';
import { fetchFavouritedStatuses, expandFavouritedStatuses } from '../../actions/favourites';
+import { meUsername } from '../../initial_state';
import Column from '../../components/column';
import StatusList from '../../components/status_list';
-import { meUsername } from '../../initial_state';
import ColumnIndicator from '../../components/column_indicator';
const mapStateToProps = (state, { params: { username } }) => {
diff --git a/app/javascript/gabsocial/features/follow_requests/components/account_authorize/account_authorize.js b/app/javascript/gabsocial/features/follow_requests/components/account_authorize/account_authorize.js
index 32441054..0834ff61 100644
--- a/app/javascript/gabsocial/features/follow_requests/components/account_authorize/account_authorize.js
+++ b/app/javascript/gabsocial/features/follow_requests/components/account_authorize/account_authorize.js
@@ -1,12 +1,12 @@
import { defineMessages, injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
+import { authorizeFollowRequest, rejectFollowRequest } from '../../../../actions/accounts';
+import { makeGetAccount } from '../../../../selectors';
import Permalink from '../../../../components/permalink';
import Avatar from '../../../../components/avatar';
import DisplayName from '../../../../components/display_name';
import IconButton from '../../../../components/icon_button';
-import { makeGetAccount } from '../../../../selectors';
-import { authorizeFollowRequest, rejectFollowRequest } from '../../../../actions/accounts';
import './account_authorize.scss';
diff --git a/app/javascript/gabsocial/features/follow_requests/follow_requests.js b/app/javascript/gabsocial/features/follow_requests/follow_requests.js
index c26831f2..38913ded 100644
--- a/app/javascript/gabsocial/features/follow_requests/follow_requests.js
+++ b/app/javascript/gabsocial/features/follow_requests/follow_requests.js
@@ -2,10 +2,10 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
+import { fetchFollowRequests, expandFollowRequests } from '../../actions/accounts';
import ColumnIndicator from '../../components/column_indicator';
import Column from '../../components/column';
import AccountAuthorize from './components/account_authorize';
-import { fetchFollowRequests, expandFollowRequests } from '../../actions/accounts';
import ScrollableList from '../../components/scrollable_list';
const messages = defineMessages({
diff --git a/app/javascript/gabsocial/features/followers/followers.js b/app/javascript/gabsocial/features/followers/followers.js
index 4043e67e..cab73911 100644
--- a/app/javascript/gabsocial/features/followers/followers.js
+++ b/app/javascript/gabsocial/features/followers/followers.js
@@ -9,10 +9,10 @@ import {
expandFollowers,
fetchAccountByUsername,
} from '../../actions/accounts';
+import { me } from '../../initial_state';
import AccountContainer from '../../containers/account_container';
import Column from '../../components/column';
import ScrollableList from '../../components/scrollable_list';
-import { me } from '../../initial_state';
const mapStateToProps = (state, { params: { username } }) => {
const accounts = state.getIn(['accounts']);
diff --git a/app/javascript/gabsocial/features/following/following.js b/app/javascript/gabsocial/features/following/following.js
index 1e595b63..59ee2308 100644
--- a/app/javascript/gabsocial/features/following/following.js
+++ b/app/javascript/gabsocial/features/following/following.js
@@ -2,13 +2,13 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
import { FormattedMessage } from 'react-intl';
-import { me } from '../../initial_state';
import {
fetchAccount,
fetchFollowing,
expandFollowing,
fetchAccountByUsername,
} from '../../actions/accounts';
+import { me } from '../../initial_state';
import AccountContainer from '../../containers/account_container';
import ColumnIndicator from '../../components/column_indicator';
import Column from '../../components/column';
diff --git a/app/javascript/gabsocial/features/hashtag_timeline/hashtag_timeline.js b/app/javascript/gabsocial/features/hashtag_timeline/hashtag_timeline.js
index c3c36300..d4cbd631 100644
--- a/app/javascript/gabsocial/features/hashtag_timeline/hashtag_timeline.js
+++ b/app/javascript/gabsocial/features/hashtag_timeline/hashtag_timeline.js
@@ -1,11 +1,10 @@
+import { FormattedMessage } from 'react-intl';
+import { isEqual } from 'lodash';
+import { expandHashtagTimeline, clearTimeline } from '../../actions/timelines';
+import { connectHashtagStream } from '../../actions/streaming';
import StatusListContainer from '../../containers/status_list_container';
import Column from '../../components/column';
import { ColumnHeader } from '../../components/column_header';
-import { expandHashtagTimeline, clearTimeline } from '../../actions/timelines';
-import { FormattedMessage } from 'react-intl';
-import { connectHashtagStream } from '../../actions/streaming';
-import { isEqual } from 'lodash';
-import ColumnBackButton from '../../components/column_back_button';
const mapStateToProps = (state, props) => ({
hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0,
@@ -43,11 +42,11 @@ class HashtagTimeline extends PureComponent {
additionalFor = (mode) => {
const { tags } = this.props.params;
- if (tags && (tags[mode] || []).length > 0) {
+ try {
return tags[mode].map(tag => tag.value).join('/');
+ } catch (error) {
+ return '';
}
-
- return '';
}
_subscribe (dispatch, id, tags = {}) {
diff --git a/app/javascript/gabsocial/features/home_timeline/index.js b/app/javascript/gabsocial/features/home_timeline/index.js
index bdb71114..5b58b7a5 100644
--- a/app/javascript/gabsocial/features/home_timeline/index.js
+++ b/app/javascript/gabsocial/features/home_timeline/index.js
@@ -1,9 +1,9 @@
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { expandHomeTimeline } from '../../actions/timelines';
import StatusListContainer from '../../containers/status_list_container';
-import Column from '../../components/column';
import ColumnSettings from './components/column_settings';
-import HomeColumnHeader from '../../components/column_header';
+import Column from '../../components/column';
+import { HomeColumnHeader } from '../../components/column_header';
const messages = defineMessages({
title: { id: 'column.home', defaultMessage: 'Home' },
@@ -67,9 +67,9 @@ class HomeTimeline extends PureComponent {
return (
- { /*
+
- */}
+
{
diff --git a/app/javascript/gabsocial/features/list_editor/components/account.js b/app/javascript/gabsocial/features/list_editor/components/account.js
index 2457f02e..5bc79f7d 100644
--- a/app/javascript/gabsocial/features/list_editor/components/account.js
+++ b/app/javascript/gabsocial/features/list_editor/components/account.js
@@ -1,11 +1,12 @@
-import { makeGetAccount } from '../../../selectors';
+
+import { defineMessages, injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
+import { removeFromListEditor, addToListEditor } from '../../../actions/lists';
+import { makeGetAccount } from '../../../selectors';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import IconButton from '../../../components/icon_button';
-import { defineMessages, injectIntl } from 'react-intl';
-import { removeFromListEditor, addToListEditor } from '../../../actions/lists';
const messages = defineMessages({
remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' },
diff --git a/app/javascript/gabsocial/features/list_editor/list_editor.js b/app/javascript/gabsocial/features/list_editor/list_editor.js
index 8085faa9..f19d3e83 100644
--- a/app/javascript/gabsocial/features/list_editor/list_editor.js
+++ b/app/javascript/gabsocial/features/list_editor/list_editor.js
@@ -1,7 +1,7 @@
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { injectIntl, defineMessages } from 'react-intl';
-import { setupListEditor, clearListSuggestions, resetListEditor } from '../../actions/lists';
+import { setupListEditor, resetListEditor } from '../../actions/lists';
import Account from './components/account';
import ListEditorSearch from './components/list_editor_search';
import EditListForm from './components/edit_list_form/edit_list_form';
@@ -48,8 +48,7 @@ class ListEditor extends ImmutablePureComponent {
}
componentWillUnmount() {
- const { onReset } = this.props;
- onReset();
+ this.props.onReset();
}
onClickClose = () => {
diff --git a/app/javascript/gabsocial/features/list_timeline/list_timeline.js b/app/javascript/gabsocial/features/list_timeline/list_timeline.js
index 0c16b28a..674895aa 100644
--- a/app/javascript/gabsocial/features/list_timeline/list_timeline.js
+++ b/app/javascript/gabsocial/features/list_timeline/list_timeline.js
@@ -1,15 +1,13 @@
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import { Link } from 'react-router-dom';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
-import StatusListContainer from '../../containers/status_list_container';
-import Column from '../../components/column';
import { connectListStream } from '../../actions/streaming';
import { expandListTimeline } from '../../actions/timelines';
import { fetchList, deleteList } from '../../actions/lists';
import { openModal } from '../../actions/modal';
+import StatusListContainer from '../../containers/status_list_container';
+import Column from '../../components/column';
import ColumnIndicator from '../../components/column_indicator';
-import Icon from '../../components/icon';
import { HomeColumnHeader } from '../../components/column_header';
import Button from '../../components/button';
import ColumnHeaderSettingButton from '../../components/column_header_setting_button';
diff --git a/app/javascript/gabsocial/features/lists/lists.js b/app/javascript/gabsocial/features/lists/lists.js
index 736f6c4b..0ef71451 100644
--- a/app/javascript/gabsocial/features/lists/lists.js
+++ b/app/javascript/gabsocial/features/lists/lists.js
@@ -2,9 +2,9 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import { createSelector } from 'reselect';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import { fetchLists } from '../../actions/lists';
import ColumnIndicator from '../../components/column_indicator';
import Column from '../../components/column';
-import { fetchLists } from '../../actions/lists';
import ColumnLink from '../../components/column_link';
import ColumnSubheading from '../../components/column_subheading';
import NewListForm from './components/new_list_form';
diff --git a/app/javascript/gabsocial/features/mutes/mutes.js b/app/javascript/gabsocial/features/mutes/mutes.js
index 55a48252..81acbb2b 100644
--- a/app/javascript/gabsocial/features/mutes/mutes.js
+++ b/app/javascript/gabsocial/features/mutes/mutes.js
@@ -2,10 +2,10 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
+import { fetchMutes, expandMutes } from '../../actions/mutes';
+import AccountContainer from '../../containers/account_container';
import ColumnIndicator from '../../components/column_indicator';
import Column from '../../components/column';
-import AccountContainer from '../../containers/account_container';
-import { fetchMutes, expandMutes } from '../../actions/mutes';
import ScrollableList from '../../components/scrollable_list';
const messages = defineMessages({
diff --git a/app/javascript/gabsocial/features/notifications/containers/filter_bar_container.js b/app/javascript/gabsocial/features/notifications/containers/filter_bar_container.js
index e7f306cc..64765700 100644
--- a/app/javascript/gabsocial/features/notifications/containers/filter_bar_container.js
+++ b/app/javascript/gabsocial/features/notifications/containers/filter_bar_container.js
@@ -1,5 +1,5 @@
-import FilterBar from '../components/notification_filter_bar/notification_filter_bar';
import { setFilter } from '../../../actions/notifications';
+import FilterBar from '../components/notification_filter_bar';
const makeMapStateToProps = state => ({
selectedFilter: state.getIn(['settings', 'notifications', 'quickFilter', 'active']),
diff --git a/app/javascript/gabsocial/features/notifications/containers/notification_container.js b/app/javascript/gabsocial/features/notifications/containers/notification_container.js
index bcb0a7e6..456e8bdf 100644
--- a/app/javascript/gabsocial/features/notifications/containers/notification_container.js
+++ b/app/javascript/gabsocial/features/notifications/containers/notification_container.js
@@ -1,5 +1,3 @@
-import { makeGetNotification, makeGetStatus } from '../../../selectors';
-import Notification from '../components/notification/notification';
import { openModal } from '../../../actions/modal';
import { mentionCompose } from '../../../actions/compose';
import {
@@ -13,6 +11,8 @@ import {
revealStatus,
} from '../../../actions/statuses';
import { boostModal } from '../../../initial_state';
+import { makeGetNotification, makeGetStatus } from '../../../selectors';
+import Notification from '../components/notification/notification';
const makeMapStateToProps = () => {
const getNotification = makeGetNotification();
diff --git a/app/javascript/gabsocial/features/notifications/notifications.js b/app/javascript/gabsocial/features/notifications/notifications.js
index e4d07612..921306a0 100644
--- a/app/javascript/gabsocial/features/notifications/notifications.js
+++ b/app/javascript/gabsocial/features/notifications/notifications.js
@@ -4,8 +4,6 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { createSelector } from 'reselect';
import { List as ImmutableList } from 'immutable';
import { debounce } from 'lodash';
-import Column from '../../components/column';
-import { ColumnHeader } from '../../components/column_header';
import {
expandNotifications,
scrollTopNotifications,
@@ -17,6 +15,8 @@ import FilterBarContainer from './containers/filter_bar_container';
import ScrollableList from '../../components/scrollable_list';
import LoadMore from '../../components/load_more';
import TimelineQueueButtonHeader from '../../components/timeline_queue_button_header';
+import Column from '../../components/column';
+import { ColumnHeader } from '../../components/column_header';
const messages = defineMessages({
title: { id: 'column.notifications', defaultMessage: 'Notifications' },
diff --git a/app/javascript/gabsocial/features/pinned_statuses/pinned_statuses.js b/app/javascript/gabsocial/features/pinned_statuses/pinned_statuses.js
index 64f0e586..9ae36db1 100644
--- a/app/javascript/gabsocial/features/pinned_statuses/pinned_statuses.js
+++ b/app/javascript/gabsocial/features/pinned_statuses/pinned_statuses.js
@@ -2,9 +2,9 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
import { fetchPinnedStatuses } from '../../actions/pin_statuses';
+import { meUsername } from '../../initial_state';
import Column from '../../components/column';
import StatusList from '../../components/status_list/status_list';
-import { meUsername } from '../../initial_state';
import ColumnIndicator from '../../components/column_indicator/column_indicator';
const mapStateToProps = (state, { params: { username } }) => {
diff --git a/app/javascript/gabsocial/features/reblogs/reblogs.js b/app/javascript/gabsocial/features/reblogs/reblogs.js
index f81251f8..959a4cff 100644
--- a/app/javascript/gabsocial/features/reblogs/reblogs.js
+++ b/app/javascript/gabsocial/features/reblogs/reblogs.js
@@ -1,13 +1,13 @@
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
-import ColumnIndicator from '../../components/column_indicator';
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 Column from '../../components/column';
import ScrollableList from '../../components/scrollable_list';
-import { makeGetStatus } from '../../selectors';
const mapStateToProps = (state, props) => {
const getStatus = makeGetStatus();
diff --git a/app/javascript/gabsocial/features/search/search.js b/app/javascript/gabsocial/features/search/search.js
index 28a21f5c..4e7f6cab 100644
--- a/app/javascript/gabsocial/features/search/search.js
+++ b/app/javascript/gabsocial/features/search/search.js
@@ -1,8 +1,6 @@
import SearchContainer from '../compose/containers/search_container';
import SearchResultsContainer from '../compose/containers/search_results_container';
-
-// : TODO : test
export default class Search extends PureComponent {
render() {
diff --git a/app/javascript/gabsocial/features/status/components/detailed_status/detailed_status.js b/app/javascript/gabsocial/features/status/components/detailed_status/detailed_status.js
index f5bc1902..776005f7 100644
--- a/app/javascript/gabsocial/features/status/components/detailed_status/detailed_status.js
+++ b/app/javascript/gabsocial/features/status/components/detailed_status/detailed_status.js
@@ -3,16 +3,16 @@ import { FormattedDate, FormattedNumber } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import classNames from 'classnames';
+import scheduleIdleTask from '../../../../utils/schedule_idle_task';
import StatusQuote from '../../../../components/status_quote';
import Avatar from '../../../../components/avatar';
import DisplayName from '../../../../components/display_name';
import StatusContent from '../../../../components/status_content';
import MediaGallery from '../../../../components/media_gallery';
-import Card from '../card';
-import Video from '../../../video';
-import scheduleIdleTask from '../../../../utils/schedule_idle_task';
import Icon from '../../../../components/icon';
import Poll from '../../../../components/poll';
+import Card from '../card';
+import Video from '../../../video';
import './detailed_status.scss';
diff --git a/app/javascript/gabsocial/features/status/components/detailed_status_action_bar/detailed_status_action_bar.js b/app/javascript/gabsocial/features/status/components/detailed_status_action_bar/detailed_status_action_bar.js
index 334cda1a..11390877 100644
--- a/app/javascript/gabsocial/features/status/components/detailed_status_action_bar/detailed_status_action_bar.js
+++ b/app/javascript/gabsocial/features/status/components/detailed_status_action_bar/detailed_status_action_bar.js
@@ -1,10 +1,10 @@
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, injectIntl } from 'react-intl';
-import DropdownMenuContainer from '../../../../containers/dropdown_menu_container';
import { openModal } from '../../../../actions/modal';
-import IconButton from '../../../../components/icon_button';
import { me, isStaff } from '../../../../initial_state';
+import DropdownMenuContainer from '../../../../containers/dropdown_menu_container';
+import IconButton from '../../../../components/icon_button';
import './detailed_status_action_bar.scss';
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 bc6c9fef..ee8b5751 100644
--- a/app/javascript/gabsocial/features/status/containers/detailed_status_container.js
+++ b/app/javascript/gabsocial/features/status/containers/detailed_status_container.js
@@ -1,5 +1,4 @@
-import DetailedStatus from '../components/detailed_status';
-import { makeGetStatus } from '../../../selectors';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import {
replyCompose,
mentionCompose,
@@ -24,9 +23,10 @@ import {
import { initMuteModal } from '../../../actions/mutes';
import { initReport } from '../../../actions/reports';
import { openModal } from '../../../actions/modal';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
-import { boostModal, deleteModal } from '../../../initial_state';
import { showAlertForError } from '../../../actions/alerts';
+import { boostModal, deleteModal } from '../../../initial_state';
+import { makeGetStatus } from '../../../selectors';
+import DetailedStatus from '../components/detailed_status';
const messages = defineMessages({
deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
diff --git a/app/javascript/gabsocial/features/status/status.js b/app/javascript/gabsocial/features/status/status.js
index 1a8b382b..55c5906b 100644
--- a/app/javascript/gabsocial/features/status/status.js
+++ b/app/javascript/gabsocial/features/status/status.js
@@ -5,9 +5,6 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { HotKeys } from 'react-hotkeys';
import { fetchStatus } from '../../actions/statuses';
-import DetailedStatus from './components/detailed_status';
-import ActionBar from './components/detailed_status_action_bar';
-import Column from '../../components/column';
import {
favourite,
unfavourite,
@@ -31,15 +28,18 @@ import {
} from '../../actions/statuses';
import { initMuteModal } from '../../actions/mutes';
import { initReport } from '../../actions/reports';
-import { makeGetStatus } from '../../selectors';
-import { ColumnHeader } from '../../components/column_header';
-import StatusContainer from '../../containers/status_container';
import { openModal } from '../../actions/modal';
import { boostModal, deleteModal, me } from '../../initial_state';
+import { makeGetStatus } from '../../selectors';
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../../utils/fullscreen';
+import StatusContainer from '../../containers/status_container';
+import { ColumnHeader } from '../../components/column_header';
import { textForScreenReader, defaultMediaVisibility } from '../../components/status/status';
import Icon from '../../components/icon';
import ColumnIndicator from '../../components/column_indicator';
+import DetailedStatus from './components/detailed_status';
+import ActionBar from './components/detailed_status_action_bar';
+import Column from '../../components/column';
const messages = defineMessages({
deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
@@ -417,7 +417,6 @@ class Status extends ImmutablePureComponent {
render () {
let ancestors, descendants;
const { status, ancestorsIds, descendantsIds, intl, domain } = this.props;
- const { fullscreen } = this.state;
if (status === null) {
return ();
diff --git a/app/javascript/gabsocial/features/ui/components/status_revision_list.js b/app/javascript/gabsocial/features/ui/components/status_revision_list.js
deleted file mode 100644
index 5d3e8dae..00000000
--- a/app/javascript/gabsocial/features/ui/components/status_revision_list.js
+++ /dev/null
@@ -1,43 +0,0 @@
-
-import { injectIntl } from 'react-intl';
-import ImmutablePureComponent from 'react-immutable-pure-component';
-import ModalLoading from '../../../components/modal_loading';
-import RelativeTimestamp from '../../../components/relative_timestamp';
-
-export default @injectIntl
-class StatusRevisionsList extends ImmutablePureComponent {
-
- static propTypes = {
- loading: PropTypes.bool.isRequired,
- error: PropTypes.object,
- data: PropTypes.array
- };
-
- render () {
- const { loading, error, data } = this.props;
-
- if (loading || !data) return ;
-
- if (error) return (
-
- );
-
- return (
-
- {data.map((revision, i) => (
-
-
-
-
-
-
{revision.text}
-
- ))}
-
- );
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/features/ui/ui.js b/app/javascript/gabsocial/features/ui/ui.js
index 343f8686..9fe308d5 100644
--- a/app/javascript/gabsocial/features/ui/ui.js
+++ b/app/javascript/gabsocial/features/ui/ui.js
@@ -21,7 +21,7 @@ import LoadingBarContainer from '../../containers/loading_bar_container';
import ModalContainer from '../../containers/modal_container';
import UploadArea from '../../components/upload_area';
import TabsBar from '../../components/tabs_bar';
-import FooterBar from './components/footer_bar';
+import FooterBar from '../../components/footer_bar';
// import TrendsPanel from './components/trends_panel';
import { WhoToFollowPanel } from '../../components/panel';
import LinkFooter from '../../components/link_footer';
@@ -178,8 +178,7 @@ class SwitchingColumnsArea extends React.PureComponent {
}
render() {
- const { children, account } = this.props;
- const { mobile } = this.state;
+ const { children } = this.props;
return (
diff --git a/app/javascript/gabsocial/features/ui/util/async-components.js b/app/javascript/gabsocial/features/ui/util/async-components.js
index efa5061b..95804a96 100644
--- a/app/javascript/gabsocial/features/ui/util/async-components.js
+++ b/app/javascript/gabsocial/features/ui/util/async-components.js
@@ -111,7 +111,7 @@ export function MuteModal () {
}
export function StatusRevisionModal () {
- return import(/* webpackChunkName: "modals/mute_modal" */'../components/status_revision_modal');
+ return import(/* webpackChunkName: "modals/mute_modal" */'../../../components/modal');
}
export function ReportModal () {
diff --git a/app/javascript/gabsocial/pages/group_page.js b/app/javascript/gabsocial/pages/group_page.js
index 2b0ac73d..390af745 100644
--- a/app/javascript/gabsocial/pages/group_page.js
+++ b/app/javascript/gabsocial/pages/group_page.js
@@ -1,14 +1,14 @@
import { Fragment } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import { fetchGroup } from '../actions/groups';
+import HeaderContainer from '../features/groups/timeline/containers/header_container';
+import GroupPanel from '../features/groups/timeline/components/panel';
+import GroupSidebarPanel from '../features/groups/sidebar_panel';
+import ColumnsArea from '../components/columns_area';
import { WhoToFollowPanel } from '../components/panel';
import LinkFooter from '../components/link_footer';
import PromoPanel from '../components/promo_panel';
-import HeaderContainer from '../features/groups/timeline/containers/header_container';
-import GroupPanel from '../features/groups/timeline/components/panel';
-import { fetchGroup } from '../actions/groups';
-import GroupSidebarPanel from '../features/groups/sidebar_panel';
-import ColumnsArea from '../components/columns_area';
const mapStateToProps = (state, { params: { id } }) => ({
group: state.getIn(['groups', id]),
diff --git a/app/javascript/gabsocial/pages/home_page.js b/app/javascript/gabsocial/pages/home_page.js
index 9d65c6d6..44e2e757 100644
--- a/app/javascript/gabsocial/pages/home_page.js
+++ b/app/javascript/gabsocial/pages/home_page.js
@@ -1,9 +1,8 @@
import { Fragment } from 'react';
-import WhoToFollowPanel from '../components/panel';
+import GroupSidebarPanel from '../features/groups/sidebar_panel';
import LinkFooter from '../components/link_footer';
import PromoPanel from '../components/promo_panel';
import UserPanel from '../components/user_panel';
-import GroupSidebarPanel from '../features/groups/sidebar_panel';
import ColumnsArea from '../components/columns_area';
import TimelineComposeBlock from '../components/timeline_compose_block';
@@ -18,7 +17,6 @@ export default class HomePage extends PureComponent {
RIGHT: (
- { /* */ }
),
LEFT: (
diff --git a/app/javascript/gabsocial/pages/profile_page.js b/app/javascript/gabsocial/pages/profile_page.js
index ccc143fc..b5072ba7 100644
--- a/app/javascript/gabsocial/pages/profile_page.js
+++ b/app/javascript/gabsocial/pages/profile_page.js
@@ -2,9 +2,9 @@ import { Fragment } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import HeaderContainer from '../features/account_timeline/containers/header_container';
+import ProfileInfoPanel from '../features/account_timeline/components/profile_info_panel/profile_info_panel';
import { WhoToFollowPanel, SignUpPanel } from '../components/panel';
import LinkFooter from '../components/link_footer';
-import ProfileInfoPanel from '../features/account_timeline/components/profile_info_panel/profile_info_panel';
import ColumnsArea from '../components/columns_area';
const mapStateToProps = (state, { params: { username }, withReplies = false }) => {
diff --git a/app/javascript/gabsocial/selectors/index.js b/app/javascript/gabsocial/selectors/index.js
index 5ebd1e9c..bcddc5c7 100644
--- a/app/javascript/gabsocial/selectors/index.js
+++ b/app/javascript/gabsocial/selectors/index.js
@@ -2,10 +2,10 @@ import { createSelector } from 'reselect';
import { List as ImmutableList } from 'immutable';
import { me } from '../initial_state';
-const getAccountBase = (state, id) => state.getIn(['accounts', id], null);
-const getAccountCounters = (state, id) => state.getIn(['accounts_counters', id], null);
+const getAccountBase = (state, id) => state.getIn(['accounts', id], null);
+const getAccountCounters = (state, id) => state.getIn(['accounts_counters', id], null);
const getAccountRelationship = (state, id) => state.getIn(['relationships', id], null);
-const getAccountMoved = (state, id) => state.getIn(['accounts', state.getIn(['accounts', id, 'moved'])]);
+const getAccountMoved = (state, id) => state.getIn(['accounts', state.getIn(['accounts', id, 'moved'])]);
export const makeGetAccount = () => {
return createSelector([getAccountBase, getAccountCounters, getAccountRelationship, getAccountMoved], (base, counters, relationship, moved) => {
@@ -22,17 +22,17 @@ export const makeGetAccount = () => {
const toServerSideType = columnType => {
switch (columnType) {
- case 'home':
- case 'notifications':
- case 'public':
- case 'thread':
- return columnType;
- default:
- if (columnType.indexOf('list:') > -1) {
- return 'home';
- } else {
- return 'public'; // community, account, hashtag
- }
+ case 'home':
+ case 'notifications':
+ case 'public':
+ case 'thread':
+ return columnType;
+ default:
+ if (columnType.indexOf('list:') > -1) {
+ return 'home';
+ } else {
+ return 'public'; // community, account, hashtag
+ }
}
};
@@ -91,7 +91,7 @@ export const makeGetStatus = () => {
statusReblog = null;
}
- const regex = (accountReblog || accountBase).get('id') !== me && regexFromFilters(filters);
+ const regex = (accountReblog || accountBase).get('id') !== me && regexFromFilters(filters);
const filtered = regex && regex.test(statusBase.get('reblog') ? statusReblog.get('search_index') : statusBase.get('search_index'));
return statusBase.withMutations(map => {
@@ -125,7 +125,7 @@ export const getAlerts = createSelector([getAlertsBase], (base) => {
export const makeGetNotification = () => {
return createSelector([
- (_, base) => base,
+ (_, base) => base,
(state, _, accountId) => state.getIn(['accounts', accountId]),
], (base, account) => {
return base.set('account', account);
@@ -134,7 +134,7 @@ export const makeGetNotification = () => {
export const getAccountGallery = createSelector([
(state, id) => state.getIn(['timelines', `account:${id}:media`, 'items'], ImmutableList()),
- state => state.get('statuses'),
+ state => state.get('statuses'),
], (statusIds, statuses) => {
let medias = ImmutableList();
diff --git a/app/javascript/gabsocial/service_worker/entry.js b/app/javascript/gabsocial/service_worker/entry.js
index e1412888..dd040c63 100644
--- a/app/javascript/gabsocial/service_worker/entry.js
+++ b/app/javascript/gabsocial/service_worker/entry.js
@@ -18,13 +18,13 @@ function fetchRoot() {
// Cause a new version of a registered Service Worker to replace an existing one
// that is already installed, and replace the currently active worker on open pages.
-self.addEventListener('install', function(event) {
+self.addEventListener('install', function (event) {
event.waitUntil(Promise.all([openWebCache(), fetchRoot()]).then(([cache, root]) => cache.put('/', root)));
});
-self.addEventListener('activate', function(event) {
+self.addEventListener('activate', function (event) {
event.waitUntil(self.clients.claim());
});
-self.addEventListener('fetch', function(event) {
+self.addEventListener('fetch', function (event) {
const url = new URL(event.request.url);
if (url.pathname === '/auth/sign_out') {
diff --git a/app/javascript/gabsocial/service_worker/web_push_locales.js b/app/javascript/gabsocial/service_worker/web_push_locales.js
index 5ce8c7b5..7eb24035 100644
--- a/app/javascript/gabsocial/service_worker/web_push_locales.js
+++ b/app/javascript/gabsocial/service_worker/web_push_locales.js
@@ -1,17 +1,17 @@
/* @preval */
-const fs = require('fs');
+const fs = require('fs');
const path = require('path');
-const filtered = {};
+const filtered = {};
const filenames = fs.readdirSync(path.resolve(__dirname, '../locales'));
filenames.forEach(filename => {
if (!filename.match(/\.json$/) || filename.match(/defaultMessages|whitelist/)) return;
const content = fs.readFileSync(path.resolve(__dirname, `../locales/${filename}`), 'utf-8');
- const full = JSON.parse(content);
- const locale = filename.split('.')[0];
+ const full = JSON.parse(content);
+ const locale = filename.split('.')[0];
filtered[locale] = {
'notification.favourite': full['notification.favourite'] || '',
diff --git a/app/javascript/gabsocial/service_worker/web_push_notifications.js b/app/javascript/gabsocial/service_worker/web_push_notifications.js
index f0aede7a..f4ee34c3 100644
--- a/app/javascript/gabsocial/service_worker/web_push_notifications.js
+++ b/app/javascript/gabsocial/service_worker/web_push_notifications.js
@@ -28,8 +28,8 @@ const notify = options =>
const group = cloneNotification(notifications[0]);
group.title = formatMessage('notifications.group', options.data.preferred_locale, { count: group.data.count + 1 });
- group.body = `${options.title}\n${group.body}`;
- group.data = { ...group.data, count: group.data.count + 1 };
+ group.body = `${options.title}\n${group.body}`;
+ group.data = { ...group.data, count: group.data.count + 1 };
return self.registration.showNotification(group.title, group);
}
@@ -62,7 +62,7 @@ const cloneNotification = notification => {
let k;
// Object.assign() does not work with notifications
- for(k in notification) {
+ for (k in notification) {
clone[k] = notification[k];
}
@@ -83,24 +83,24 @@ const handlePush = (event) => {
fetchFromApi(`/api/v1/notifications/${notification_id}`, 'get', access_token).then(notification => {
const options = {};
- options.title = formatMessage(`notification.${notification.type}`, preferred_locale, { name: notification.account.display_name.length > 0 ? notification.account.display_name : notification.account.username });
- options.body = notification.status && htmlToPlainText(notification.status.content);
- options.icon = notification.account.avatar_static;
+ options.title = formatMessage(`notification.${notification.type}`, preferred_locale, { name: notification.account.display_name.length > 0 ? notification.account.display_name : notification.account.username });
+ options.body = notification.status && htmlToPlainText(notification.status.content);
+ options.icon = notification.account.avatar_static;
options.timestamp = notification.created_at && new Date(notification.created_at);
- options.tag = notification.id;
- options.badge = '/badge.png';
- options.image = notification.status && notification.status.media_attachments.length > 0 && notification.status.media_attachments[0].preview_url || undefined;
- options.data = { access_token, preferred_locale, id: notification.status ? notification.status.id : notification.account.id, url: notification.status ? `/${notification.account.username}/posts/${notification.status.id}` : `/${notification.account.username}` };
+ options.tag = notification.id;
+ options.badge = '/badge.png';
+ options.image = notification.status && notification.status.media_attachments.length > 0 && notification.status.media_attachments[0].preview_url || undefined;
+ options.data = { access_token, preferred_locale, id: notification.status ? notification.status.id : notification.account.id, url: notification.status ? `/${notification.account.username}/posts/${notification.status.id}` : `/${notification.account.username}` };
if (notification.status && notification.status.spoiler_text || notification.status.sensitive) {
- options.data.hiddenBody = htmlToPlainText(notification.status.content);
+ options.data.hiddenBody = htmlToPlainText(notification.status.content);
options.data.hiddenImage = notification.status.media_attachments.length > 0 && notification.status.media_attachments[0].preview_url;
if (notification.status.spoiler_text) {
- options.body = notification.status.spoiler_text;
+ options.body = notification.status.spoiler_text;
}
- options.image = undefined;
+ options.image = undefined;
options.actions = [actionExpand(preferred_locale)];
} else if (notification.type === 'mention') {
options.actions = [actionReblog(preferred_locale), actionFavourite(preferred_locale)];
@@ -149,8 +149,8 @@ const findBestClient = clients => {
const expandNotification = notification => {
const newNotification = cloneNotification(notification);
- newNotification.body = newNotification.data.hiddenBody;
- newNotification.image = newNotification.data.hiddenImage;
+ newNotification.body = newNotification.data.hiddenBody;
+ newNotification.image = newNotification.data.hiddenImage;
newNotification.actions = [actionReblog(notification.data.preferred_locale), actionFavourite(notification.data.preferred_locale)];
return self.registration.showNotification(newNotification.title, newNotification);
@@ -171,7 +171,7 @@ const openUrl = url =>
const webClients = clientList.filter(client => /\//.test(client.url));
if (webClients.length !== 0) {
- const client = findBestClient(webClients);
+ const client = findBestClient(webClients);
const { pathname } = new URL(url, self.location);
// : TODO :
diff --git a/app/javascript/gabsocial/stream.js b/app/javascript/gabsocial/stream.js
index 99427f71..68aa37e8 100644
--- a/app/javascript/gabsocial/stream.js
+++ b/app/javascript/gabsocial/stream.js
@@ -4,7 +4,7 @@ import WebSocketClient from 'websocket.js';
const randomIntUpTo = max => Math.floor(Math.random() * Math.floor(max));
-export function connectStream(path, pollingRefresh = null, callbacks = () => ({ onConnect() {}, onDisconnect() {}, onReceive() {} })) {
+export function connectStream(path, pollingRefresh = null, callbacks = () => ({ onConnect() { }, onDisconnect() { }, onReceive() { } })) {
return (dispatch, getState) => {
const streamingAPIBaseURL = getState().getIn(['meta', 'streaming_api_base_url']);
const accessToken = getState().getIn(['meta', 'access_token']);
@@ -26,7 +26,7 @@ export function connectStream(path, pollingRefresh = null, callbacks = () => ({
};
const subscription = getStream(streamingAPIBaseURL, accessToken, path, {
- connected () {
+ connected() {
if (pollingRefresh) {
clearPolling();
}
@@ -34,7 +34,7 @@ export function connectStream(path, pollingRefresh = null, callbacks = () => ({
onConnect();
},
- disconnected () {
+ disconnected() {
if (pollingRefresh) {
polling = setTimeout(() => setupPolling(), randomIntUpTo(40000));
}
@@ -42,11 +42,11 @@ export function connectStream(path, pollingRefresh = null, callbacks = () => ({
onDisconnect();
},
- received (data) {
+ received(data) {
onReceive(data);
},
- reconnected () {
+ reconnected() {
if (pollingRefresh) {
clearPolling();
pollingRefresh(dispatch);
@@ -71,13 +71,13 @@ export function connectStream(path, pollingRefresh = null, callbacks = () => ({
export default function getStream(streamingAPIBaseURL, accessToken, stream, { connected, received, disconnected, reconnected }) {
- const params = [ `stream=${stream}` ];
+ const params = [`stream=${stream}`];
const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?${params.join('&')}`, accessToken);
- ws.onopen = connected;
- ws.onmessage = e => received(JSON.parse(e.data));
- ws.onclose = disconnected;
+ ws.onopen = connected;
+ ws.onmessage = e => received(JSON.parse(e.data));
+ ws.onclose = disconnected;
ws.onreconnect = reconnected;
return ws;
diff --git a/app/javascript/gabsocial/utils/compare_id.js b/app/javascript/gabsocial/utils/compare_id.js
index f8c15e32..75df6d8a 100644
--- a/app/javascript/gabsocial/utils/compare_id.js
+++ b/app/javascript/gabsocial/utils/compare_id.js
@@ -6,7 +6,7 @@ export default function compareId(id1, id2) {
}
if (id1.length === id2.length) {
return id1 > id2 ? 1 : -1;
- } else {
- return id1.length > id2.length ? 1 : -1;
}
+
+ return id1.length > id2.length ? 1 : -1;
}
diff --git a/app/javascript/gabsocial/utils/numbers.js b/app/javascript/gabsocial/utils/numbers.js
index 8059eb78..7ae77d4c 100644
--- a/app/javascript/gabsocial/utils/numbers.js
+++ b/app/javascript/gabsocial/utils/numbers.js
@@ -3,7 +3,7 @@ import { FormattedNumber } from 'react-intl';
export const shortNumberFormat = number => {
if (number < 1000) {
return ;
- } else {
- return K;
}
+
+ return K;
};
diff --git a/app/javascript/gabsocial/utils/resize_image.js b/app/javascript/gabsocial/utils/resize_image.js
index bbdbc865..04e472a9 100644
--- a/app/javascript/gabsocial/utils/resize_image.js
+++ b/app/javascript/gabsocial/utils/resize_image.js
@@ -14,7 +14,7 @@ const getImageUrl = inputFile => new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onerror = (...args) => reject(...args);
- reader.onload = ({ target }) => resolve(target.result);
+ reader.onload = ({ target }) => resolve(target.result);
reader.readAsDataURL(inputFile);
});
@@ -24,7 +24,7 @@ const loadImage = inputFile => new Promise((resolve, reject) => {
const img = new Image();
img.onerror = (...args) => reject(...args);
- img.onload = () => resolve(img);
+ img.onload = () => resolve(img);
img.src = url;
}).catch(reject);
@@ -43,26 +43,26 @@ const getOrientation = (img, type = 'image/png') => new Promise(resolve => {
});
const processImage = (img, { width, height, orientation, type = 'image/png' }) => new Promise(resolve => {
- const canvas = document.createElement('canvas');
+ const canvas = document.createElement('canvas');
if (4 < orientation && orientation < 9) {
- canvas.width = height;
+ canvas.width = height;
canvas.height = width;
} else {
- canvas.width = width;
+ canvas.width = width;
canvas.height = height;
}
const context = canvas.getContext('2d');
switch (orientation) {
- case 2: context.transform(-1, 0, 0, 1, width, 0); break;
- case 3: context.transform(-1, 0, 0, -1, width, height); break;
- case 4: context.transform(1, 0, 0, -1, 0, height); break;
- case 5: context.transform(0, 1, 1, 0, 0, 0); break;
- case 6: context.transform(0, 1, -1, 0, height, 0); break;
- case 7: context.transform(0, -1, -1, 0, height, width); break;
- case 8: context.transform(0, -1, 1, 0, 0, width); break;
+ case 2: context.transform(-1, 0, 0, 1, width, 0); break;
+ case 3: context.transform(-1, 0, 0, -1, width, height); break;
+ case 4: context.transform(1, 0, 0, -1, 0, height); break;
+ case 5: context.transform(0, 1, 1, 0, 0, 0); break;
+ case 6: context.transform(0, 1, -1, 0, height, 0); break;
+ case 7: context.transform(0, -1, -1, 0, height, width); break;
+ case 8: context.transform(0, -1, 1, 0, 0, width); break;
}
context.drawImage(img, 0, 0, width, height);
@@ -73,7 +73,7 @@ const processImage = (img, { width, height, orientation, type = 'image/png' }) =
const resizeImage = (img, type = 'image/png') => new Promise((resolve, reject) => {
const { width, height } = img;
- const newWidth = Math.round(Math.sqrt(MAX_IMAGE_PIXELS * (width / height)));
+ const newWidth = Math.round(Math.sqrt(MAX_IMAGE_PIXELS * (width / height)));
const newHeight = Math.round(Math.sqrt(MAX_IMAGE_PIXELS * (height / width)));
getOrientation(img, type)
diff --git a/app/javascript/styles/gabsocial/components/footer-bar.scss b/app/javascript/styles/gabsocial/components/footer-bar.scss
index ab0ce2e7..e69de29b 100644
--- a/app/javascript/styles/gabsocial/components/footer-bar.scss
+++ b/app/javascript/styles/gabsocial/components/footer-bar.scss
@@ -1,45 +0,0 @@
-.footer-bar {
- display: block;
- position: fixed;
- background: #000;
- height: 58px;
- bottom: 0;
- left: 0;
- right: 0;
- z-index: 1000;
- transition: transform 0.2s ease;
- overflow: hidden;
- padding-bottom: 0;
- padding-bottom: env(safe-area-inset-bottom);
-
- @media screen and (min-width: 895px) {
- display: none !important;
- }
-
- &__container {
- display: flex;
- flex-direction: row;
- align-items: stretch;
- }
-
- &__link {
- display: flex;
- flex: 1 1 auto;
- margin: 0;
- min-width: 36px;
- height: 58px;
- padding-top: 4px;
- justify-content: center;
- color: white;
- text-decoration: none;
- border-top: 2px solid transparent;
-
- &.active {
- border-top-color: $gab-brand-default;
- }
-
- & > span {
- display: none;
- }
- }
-}
\ No newline at end of file
diff --git a/app/javascript/styles/gabsocial/components/sidebar-menu.scss b/app/javascript/styles/gabsocial/components/sidebar-menu.scss
index 8d6068d5..e69de29b 100644
--- a/app/javascript/styles/gabsocial/components/sidebar-menu.scss
+++ b/app/javascript/styles/gabsocial/components/sidebar-menu.scss
@@ -1,174 +0,0 @@
-.sidebar-menu {
- display: flex;
- position: fixed;
- flex-direction: column;
- width: 275px;
- height: 100vh;
- top: 0;
- bottom: 0;
- left: 0;
- background: $gab-background-container;
- transform: translateX(-275px);
- transition: all 0.15s linear;
- z-index: 10001;
-
- body.theme-gabsocial-light & {
- background: $gab-background-container-light;
- }
-
- &__root {
- display: none;
- }
-
- &__wrapper {
- display: block;
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 10000;
- background-color: transparent;
- transition: background-color 0.2s linear;
- transition-delay: 0.1s;
- }
-
- &__content {
- display: flex;
- flex: 1 1;
- flex-direction: column;
- padding-bottom: 40px;
- overflow: hidden;
- overflow-y: scroll;
- -webkit-overflow-scrolling: touch;
- }
-
- &__section {
- display: block;
- margin: 4px 0;
- border-top: 1px solid lighten($ui-base-color, 4%);
-
- &--borderless {
- margin: 0;
- border-top: none;
- }
- }
-
- @media (max-width: 400px) {
- width: 90vw;
- }
-}
-
-.sidebar-menu__root--visible {
- display: block;
-
- .sidebar-menu {
- transform: translateX(0);
- }
-
- .sidebar-menu__wrapper {
- background-color: rgba(0,0,0,0.3);
- }
-}
-
-.sidebar-menu-header {
- display: flex;
- height: 46px;
- padding: 12px 14px;
- border-bottom: 1px solid lighten($ui-base-color, 4%);
- box-sizing: border-box;
- align-items: center;
-
- &__title {
- display: block;
- font-size: 18px;
- font-weight: 600;
- color: $primary-text-color;
- }
-
- &__btn {
- margin-left: auto;
- }
-}
-
-.sidebar-menu-profile {
- display: block;
- padding: 14px 18px;
-
- &__avatar {
- display: block;
- width: 56px;
- height: 56px;
- }
-
- &__name {
- display: block;
- margin-top: 10px;
-
- .display-name__account {
- display: block;
- margin-top: 2px;
- }
- }
-
- &__stats {
- display: flex;
- margin-top: 12px;
- }
-}
-
-.sidebar-menu-profile-stat {
- display: flex;
- font-size: 14px;
- text-decoration: none;
-
- &:not(:first-of-type) {
- margin-left: 18px;
- }
-
- &__value {
- display: flex;
- margin-right: 3px;
- font-weight: 700;
- color: $primary-text-color;
- }
-
- &__label {
- display: flex;
- color: $primary-text-color;
- }
-
- &:hover {
- text-decoration: underline;
- }
-}
-
-.sidebar-menu-item {
- display: flex;
- padding: 16px 18px;
- cursor: pointer;
- text-decoration: none;
- color: $primary-text-color;
- font-size: 15px;
- font-weight: 400;
- height: 50px;
- box-sizing: border-box;
-
- &:hover {
- background-color: rgba($gab-brand-default, 0.1);
-
- .fa {
- color: $primary-text-color;
- }
- }
-
- .fa {
- margin-right: 10px;
- }
-
- &:hover {
- &__title {
- color: $primary-text-color;
- }
- }
-}
\ No newline at end of file