diff --git a/app/javascript/core/embed.js b/app/javascript/core/embed.js
index 9083eb7a3e..d1e8f6b108 100644
--- a/app/javascript/core/embed.js
+++ b/app/javascript/core/embed.js
@@ -15,7 +15,7 @@ window.addEventListener('message', e => {
id: data.id,
height: document.getElementsByTagName('html')[0].scrollHeight,
}, '*');
- };
+ }
if (['interactive', 'complete'].includes(document.readyState)) {
setEmbedHeight();
diff --git a/app/javascript/core/settings.js b/app/javascript/core/settings.js
index d5bb9532c4..d578463a33 100644
--- a/app/javascript/core/settings.js
+++ b/app/javascript/core/settings.js
@@ -2,7 +2,9 @@
import 'packs/public-path';
import escapeTextContentForBrowser from 'escape-html';
+
const { delegate } = require('@rails/ujs');
+
import emojify from '../mastodon/features/emoji/emoji';
delegate(document, '#account_display_name', 'input', ({ target }) => {
@@ -65,7 +67,7 @@ delegate(document, '.input-copy button', 'click', ({ target }) => {
input.blur();
target.parentNode.classList.add('copied');
- setTimeout(() => {
+ setTimeout(() => {
target.parentNode.classList.remove('copied');
}, 700);
}
diff --git a/app/javascript/flavours/glitch/actions/account_notes.js b/app/javascript/flavours/glitch/actions/account_notes.js
index 059ed9e803..62a6b4cbb8 100644
--- a/app/javascript/flavours/glitch/actions/account_notes.js
+++ b/app/javascript/flavours/glitch/actions/account_notes.js
@@ -21,27 +21,27 @@ export function submitAccountNote() {
dispatch(submitAccountNoteSuccess(response.data));
}).catch(error => dispatch(submitAccountNoteFail(error)));
};
-};
+}
export function submitAccountNoteRequest() {
return {
type: ACCOUNT_NOTE_SUBMIT_REQUEST,
};
-};
+}
export function submitAccountNoteSuccess(relationship) {
return {
type: ACCOUNT_NOTE_SUBMIT_SUCCESS,
relationship,
};
-};
+}
export function submitAccountNoteFail(error) {
return {
type: ACCOUNT_NOTE_SUBMIT_FAIL,
error,
};
-};
+}
export function initEditAccountNote(account) {
return (dispatch, getState) => {
@@ -53,17 +53,17 @@ export function initEditAccountNote(account) {
comment,
});
};
-};
+}
export function cancelAccountNote() {
return {
type: ACCOUNT_NOTE_CANCEL,
};
-};
+}
export function changeAccountNoteComment(comment) {
return {
type: ACCOUNT_NOTE_CHANGE_COMMENT,
comment,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/accounts.js b/app/javascript/flavours/glitch/actions/accounts.js
index dc670e50ac..6b5b2ade5c 100644
--- a/app/javascript/flavours/glitch/actions/accounts.js
+++ b/app/javascript/flavours/glitch/actions/accounts.js
@@ -108,7 +108,7 @@ export function fetchAccount(id) {
dispatch(fetchAccountFail(id, error));
});
};
-};
+}
export const lookupAccount = acct => (dispatch, getState) => {
dispatch(lookupAccountRequest(acct));
@@ -143,13 +143,13 @@ export function fetchAccountRequest(id) {
type: ACCOUNT_FETCH_REQUEST,
id,
};
-};
+}
export function fetchAccountSuccess() {
return {
type: ACCOUNT_FETCH_SUCCESS,
};
-};
+}
export function fetchAccountFail(id, error) {
return {
@@ -158,7 +158,7 @@ export function fetchAccountFail(id, error) {
error,
skipAlert: true,
};
-};
+}
export function followAccount(id, options = { reblogs: true }) {
return (dispatch, getState) => {
@@ -173,7 +173,7 @@ export function followAccount(id, options = { reblogs: true }) {
dispatch(followAccountFail(error, locked));
});
};
-};
+}
export function unfollowAccount(id) {
return (dispatch, getState) => {
@@ -185,7 +185,7 @@ export function unfollowAccount(id) {
dispatch(unfollowAccountFail(error));
});
};
-};
+}
export function followAccountRequest(id, locked) {
return {
@@ -194,7 +194,7 @@ export function followAccountRequest(id, locked) {
locked,
skipLoading: true,
};
-};
+}
export function followAccountSuccess(relationship, alreadyFollowing) {
return {
@@ -203,7 +203,7 @@ export function followAccountSuccess(relationship, alreadyFollowing) {
alreadyFollowing,
skipLoading: true,
};
-};
+}
export function followAccountFail(error, locked) {
return {
@@ -212,7 +212,7 @@ export function followAccountFail(error, locked) {
locked,
skipLoading: true,
};
-};
+}
export function unfollowAccountRequest(id) {
return {
@@ -220,7 +220,7 @@ export function unfollowAccountRequest(id) {
id,
skipLoading: true,
};
-};
+}
export function unfollowAccountSuccess(relationship, statuses) {
return {
@@ -229,7 +229,7 @@ export function unfollowAccountSuccess(relationship, statuses) {
statuses,
skipLoading: true,
};
-};
+}
export function unfollowAccountFail(error) {
return {
@@ -237,7 +237,7 @@ export function unfollowAccountFail(error) {
error,
skipLoading: true,
};
-};
+}
export function blockAccount(id) {
return (dispatch, getState) => {
@@ -250,7 +250,7 @@ export function blockAccount(id) {
dispatch(blockAccountFail(id, error));
});
};
-};
+}
export function unblockAccount(id) {
return (dispatch, getState) => {
@@ -262,14 +262,14 @@ export function unblockAccount(id) {
dispatch(unblockAccountFail(id, error));
});
};
-};
+}
export function blockAccountRequest(id) {
return {
type: ACCOUNT_BLOCK_REQUEST,
id,
};
-};
+}
export function blockAccountSuccess(relationship, statuses) {
return {
@@ -277,35 +277,35 @@ export function blockAccountSuccess(relationship, statuses) {
relationship,
statuses,
};
-};
+}
export function blockAccountFail(error) {
return {
type: ACCOUNT_BLOCK_FAIL,
error,
};
-};
+}
export function unblockAccountRequest(id) {
return {
type: ACCOUNT_UNBLOCK_REQUEST,
id,
};
-};
+}
export function unblockAccountSuccess(relationship) {
return {
type: ACCOUNT_UNBLOCK_SUCCESS,
relationship,
};
-};
+}
export function unblockAccountFail(error) {
return {
type: ACCOUNT_UNBLOCK_FAIL,
error,
};
-};
+}
export function muteAccount(id, notifications, duration=0) {
@@ -319,7 +319,7 @@ export function muteAccount(id, notifications, duration=0) {
dispatch(muteAccountFail(id, error));
});
};
-};
+}
export function unmuteAccount(id) {
return (dispatch, getState) => {
@@ -331,14 +331,14 @@ export function unmuteAccount(id) {
dispatch(unmuteAccountFail(id, error));
});
};
-};
+}
export function muteAccountRequest(id) {
return {
type: ACCOUNT_MUTE_REQUEST,
id,
};
-};
+}
export function muteAccountSuccess(relationship, statuses) {
return {
@@ -346,35 +346,35 @@ export function muteAccountSuccess(relationship, statuses) {
relationship,
statuses,
};
-};
+}
export function muteAccountFail(error) {
return {
type: ACCOUNT_MUTE_FAIL,
error,
};
-};
+}
export function unmuteAccountRequest(id) {
return {
type: ACCOUNT_UNMUTE_REQUEST,
id,
};
-};
+}
export function unmuteAccountSuccess(relationship) {
return {
type: ACCOUNT_UNMUTE_SUCCESS,
relationship,
};
-};
+}
export function unmuteAccountFail(error) {
return {
type: ACCOUNT_UNMUTE_FAIL,
error,
};
-};
+}
export function fetchFollowers(id) {
@@ -391,14 +391,14 @@ export function fetchFollowers(id) {
dispatch(fetchFollowersFail(id, error));
});
};
-};
+}
export function fetchFollowersRequest(id) {
return {
type: FOLLOWERS_FETCH_REQUEST,
id,
};
-};
+}
export function fetchFollowersSuccess(id, accounts, next) {
return {
@@ -407,7 +407,7 @@ export function fetchFollowersSuccess(id, accounts, next) {
accounts,
next,
};
-};
+}
export function fetchFollowersFail(id, error) {
return {
@@ -416,7 +416,7 @@ export function fetchFollowersFail(id, error) {
error,
skipNotFound: true,
};
-};
+}
export function expandFollowers(id) {
return (dispatch, getState) => {
@@ -438,14 +438,14 @@ export function expandFollowers(id) {
dispatch(expandFollowersFail(id, error));
});
};
-};
+}
export function expandFollowersRequest(id) {
return {
type: FOLLOWERS_EXPAND_REQUEST,
id,
};
-};
+}
export function expandFollowersSuccess(id, accounts, next) {
return {
@@ -454,7 +454,7 @@ export function expandFollowersSuccess(id, accounts, next) {
accounts,
next,
};
-};
+}
export function expandFollowersFail(id, error) {
return {
@@ -462,7 +462,7 @@ export function expandFollowersFail(id, error) {
id,
error,
};
-};
+}
export function fetchFollowing(id) {
return (dispatch, getState) => {
@@ -478,14 +478,14 @@ export function fetchFollowing(id) {
dispatch(fetchFollowingFail(id, error));
});
};
-};
+}
export function fetchFollowingRequest(id) {
return {
type: FOLLOWING_FETCH_REQUEST,
id,
};
-};
+}
export function fetchFollowingSuccess(id, accounts, next) {
return {
@@ -494,7 +494,7 @@ export function fetchFollowingSuccess(id, accounts, next) {
accounts,
next,
};
-};
+}
export function fetchFollowingFail(id, error) {
return {
@@ -503,7 +503,7 @@ export function fetchFollowingFail(id, error) {
error,
skipNotFound: true,
};
-};
+}
export function expandFollowing(id) {
return (dispatch, getState) => {
@@ -525,14 +525,14 @@ export function expandFollowing(id) {
dispatch(expandFollowingFail(id, error));
});
};
-};
+}
export function expandFollowingRequest(id) {
return {
type: FOLLOWING_EXPAND_REQUEST,
id,
};
-};
+}
export function expandFollowingSuccess(id, accounts, next) {
return {
@@ -541,7 +541,7 @@ export function expandFollowingSuccess(id, accounts, next) {
accounts,
next,
};
-};
+}
export function expandFollowingFail(id, error) {
return {
@@ -549,7 +549,7 @@ export function expandFollowingFail(id, error) {
id,
error,
};
-};
+}
export function fetchRelationships(accountIds) {
return (dispatch, getState) => {
@@ -570,7 +570,7 @@ export function fetchRelationships(accountIds) {
dispatch(fetchRelationshipsFail(error));
});
};
-};
+}
export function fetchRelationshipsRequest(ids) {
return {
@@ -578,7 +578,7 @@ export function fetchRelationshipsRequest(ids) {
ids,
skipLoading: true,
};
-};
+}
export function fetchRelationshipsSuccess(relationships) {
return {
@@ -586,7 +586,7 @@ export function fetchRelationshipsSuccess(relationships) {
relationships,
skipLoading: true,
};
-};
+}
export function fetchRelationshipsFail(error) {
return {
@@ -595,7 +595,7 @@ export function fetchRelationshipsFail(error) {
skipLoading: true,
skipNotFound: true,
};
-};
+}
export function fetchFollowRequests() {
return (dispatch, getState) => {
@@ -607,13 +607,13 @@ export function fetchFollowRequests() {
dispatch(fetchFollowRequestsSuccess(response.data, next ? next.uri : null));
}).catch(error => dispatch(fetchFollowRequestsFail(error)));
};
-};
+}
export function fetchFollowRequestsRequest() {
return {
type: FOLLOW_REQUESTS_FETCH_REQUEST,
};
-};
+}
export function fetchFollowRequestsSuccess(accounts, next) {
return {
@@ -621,14 +621,14 @@ export function fetchFollowRequestsSuccess(accounts, next) {
accounts,
next,
};
-};
+}
export function fetchFollowRequestsFail(error) {
return {
type: FOLLOW_REQUESTS_FETCH_FAIL,
error,
};
-};
+}
export function expandFollowRequests() {
return (dispatch, getState) => {
@@ -646,13 +646,13 @@ export function expandFollowRequests() {
dispatch(expandFollowRequestsSuccess(response.data, next ? next.uri : null));
}).catch(error => dispatch(expandFollowRequestsFail(error)));
};
-};
+}
export function expandFollowRequestsRequest() {
return {
type: FOLLOW_REQUESTS_EXPAND_REQUEST,
};
-};
+}
export function expandFollowRequestsSuccess(accounts, next) {
return {
@@ -660,14 +660,14 @@ export function expandFollowRequestsSuccess(accounts, next) {
accounts,
next,
};
-};
+}
export function expandFollowRequestsFail(error) {
return {
type: FOLLOW_REQUESTS_EXPAND_FAIL,
error,
};
-};
+}
export function authorizeFollowRequest(id) {
return (dispatch, getState) => {
@@ -678,21 +678,21 @@ export function authorizeFollowRequest(id) {
.then(() => dispatch(authorizeFollowRequestSuccess(id)))
.catch(error => dispatch(authorizeFollowRequestFail(id, error)));
};
-};
+}
export function authorizeFollowRequestRequest(id) {
return {
type: FOLLOW_REQUEST_AUTHORIZE_REQUEST,
id,
};
-};
+}
export function authorizeFollowRequestSuccess(id) {
return {
type: FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
id,
};
-};
+}
export function authorizeFollowRequestFail(id, error) {
return {
@@ -700,7 +700,7 @@ export function authorizeFollowRequestFail(id, error) {
id,
error,
};
-};
+}
export function rejectFollowRequest(id) {
@@ -712,21 +712,21 @@ export function rejectFollowRequest(id) {
.then(() => dispatch(rejectFollowRequestSuccess(id)))
.catch(error => dispatch(rejectFollowRequestFail(id, error)));
};
-};
+}
export function rejectFollowRequestRequest(id) {
return {
type: FOLLOW_REQUEST_REJECT_REQUEST,
id,
};
-};
+}
export function rejectFollowRequestSuccess(id) {
return {
type: FOLLOW_REQUEST_REJECT_SUCCESS,
id,
};
-};
+}
export function rejectFollowRequestFail(id, error) {
return {
@@ -734,7 +734,7 @@ export function rejectFollowRequestFail(id, error) {
id,
error,
};
-};
+}
export function pinAccount(id) {
return (dispatch, getState) => {
@@ -746,7 +746,7 @@ export function pinAccount(id) {
dispatch(pinAccountFail(error));
});
};
-};
+}
export function unpinAccount(id) {
return (dispatch, getState) => {
@@ -758,49 +758,49 @@ export function unpinAccount(id) {
dispatch(unpinAccountFail(error));
});
};
-};
+}
export function pinAccountRequest(id) {
return {
type: ACCOUNT_PIN_REQUEST,
id,
};
-};
+}
export function pinAccountSuccess(relationship) {
return {
type: ACCOUNT_PIN_SUCCESS,
relationship,
};
-};
+}
export function pinAccountFail(error) {
return {
type: ACCOUNT_PIN_FAIL,
error,
};
-};
+}
export function unpinAccountRequest(id) {
return {
type: ACCOUNT_UNPIN_REQUEST,
id,
};
-};
+}
export function unpinAccountSuccess(relationship) {
return {
type: ACCOUNT_UNPIN_SUCCESS,
relationship,
};
-};
+}
export function unpinAccountFail(error) {
return {
type: ACCOUNT_UNPIN_FAIL,
error,
};
-};
+}
export const revealAccount = id => ({
type: ACCOUNT_REVEAL,
@@ -811,18 +811,18 @@ export function fetchPinnedAccounts() {
return (dispatch, getState) => {
dispatch(fetchPinnedAccountsRequest());
- api(getState).get(`/api/v1/endorsements`, { params: { limit: 0 } }).then(response => {
+ api(getState).get('/api/v1/endorsements', { params: { limit: 0 } }).then(response => {
dispatch(importFetchedAccounts(response.data));
dispatch(fetchPinnedAccountsSuccess(response.data));
}).catch(err => dispatch(fetchPinnedAccountsFail(err)));
};
-};
+}
export function fetchPinnedAccountsRequest() {
return {
type: PINNED_ACCOUNTS_FETCH_REQUEST,
};
-};
+}
export function fetchPinnedAccountsSuccess(accounts, next) {
return {
@@ -830,14 +830,14 @@ export function fetchPinnedAccountsSuccess(accounts, next) {
accounts,
next,
};
-};
+}
export function fetchPinnedAccountsFail(error) {
return {
type: PINNED_ACCOUNTS_FETCH_FAIL,
error,
};
-};
+}
export function fetchPinnedAccountsSuggestions(q) {
return (dispatch, getState) => {
@@ -853,7 +853,7 @@ export function fetchPinnedAccountsSuggestions(q) {
dispatch(fetchPinnedAccountsSuggestionsReady(q, response.data));
});
};
-};
+}
export function fetchPinnedAccountsSuggestionsReady(query, accounts) {
return {
@@ -861,24 +861,24 @@ export function fetchPinnedAccountsSuggestionsReady(query, accounts) {
query,
accounts,
};
-};
+}
export function clearPinnedAccountsSuggestions() {
return {
type: PINNED_ACCOUNTS_EDITOR_SUGGESTIONS_CLEAR,
};
-};
+}
export function changePinnedAccountsSuggestions(value) {
return {
type: PINNED_ACCOUNTS_EDITOR_SUGGESTIONS_CHANGE,
value,
- }
-};
+ };
+}
export function resetPinnedAccountsEditor() {
return {
type: PINNED_ACCOUNTS_EDITOR_RESET,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/alerts.js b/app/javascript/flavours/glitch/actions/alerts.js
index 1670f9c10d..0220b0af58 100644
--- a/app/javascript/flavours/glitch/actions/alerts.js
+++ b/app/javascript/flavours/glitch/actions/alerts.js
@@ -17,13 +17,13 @@ export function dismissAlert(alert) {
type: ALERT_DISMISS,
alert,
};
-};
+}
export function clearAlert() {
return {
type: ALERT_CLEAR,
};
-};
+}
export function showAlert(title = messages.unexpectedTitle, message = messages.unexpectedMessage, message_values = undefined) {
return {
@@ -32,7 +32,7 @@ export function showAlert(title = messages.unexpectedTitle, message = messages.u
message,
message_values,
};
-};
+}
export function showAlertForError(error, skipNotFound = false) {
if (error.response) {
diff --git a/app/javascript/flavours/glitch/actions/blocks.js b/app/javascript/flavours/glitch/actions/blocks.js
index fd9881302a..192aa3ce40 100644
--- a/app/javascript/flavours/glitch/actions/blocks.js
+++ b/app/javascript/flavours/glitch/actions/blocks.js
@@ -24,13 +24,13 @@ export function fetchBlocks() {
dispatch(fetchRelationships(response.data.map(item => item.id)));
}).catch(error => dispatch(fetchBlocksFail(error)));
};
-};
+}
export function fetchBlocksRequest() {
return {
type: BLOCKS_FETCH_REQUEST,
};
-};
+}
export function fetchBlocksSuccess(accounts, next) {
return {
@@ -38,14 +38,14 @@ export function fetchBlocksSuccess(accounts, next) {
accounts,
next,
};
-};
+}
export function fetchBlocksFail(error) {
return {
type: BLOCKS_FETCH_FAIL,
error,
};
-};
+}
export function expandBlocks() {
return (dispatch, getState) => {
@@ -64,13 +64,13 @@ export function expandBlocks() {
dispatch(fetchRelationships(response.data.map(item => item.id)));
}).catch(error => dispatch(expandBlocksFail(error)));
};
-};
+}
export function expandBlocksRequest() {
return {
type: BLOCKS_EXPAND_REQUEST,
};
-};
+}
export function expandBlocksSuccess(accounts, next) {
return {
@@ -78,14 +78,14 @@ export function expandBlocksSuccess(accounts, next) {
accounts,
next,
};
-};
+}
export function expandBlocksFail(error) {
return {
type: BLOCKS_EXPAND_FAIL,
error,
};
-};
+}
export function initBlockModal(account) {
return dispatch => {
diff --git a/app/javascript/flavours/glitch/actions/bookmarks.js b/app/javascript/flavours/glitch/actions/bookmarks.js
index 544ed2ff22..3c8eec5468 100644
--- a/app/javascript/flavours/glitch/actions/bookmarks.js
+++ b/app/javascript/flavours/glitch/actions/bookmarks.js
@@ -25,13 +25,13 @@ export function fetchBookmarkedStatuses() {
dispatch(fetchBookmarkedStatusesFail(error));
});
};
-};
+}
export function fetchBookmarkedStatusesRequest() {
return {
type: BOOKMARKED_STATUSES_FETCH_REQUEST,
};
-};
+}
export function fetchBookmarkedStatusesSuccess(statuses, next) {
return {
@@ -39,14 +39,14 @@ export function fetchBookmarkedStatusesSuccess(statuses, next) {
statuses,
next,
};
-};
+}
export function fetchBookmarkedStatusesFail(error) {
return {
type: BOOKMARKED_STATUSES_FETCH_FAIL,
error,
};
-};
+}
export function expandBookmarkedStatuses() {
return (dispatch, getState) => {
@@ -66,13 +66,13 @@ export function expandBookmarkedStatuses() {
dispatch(expandBookmarkedStatusesFail(error));
});
};
-};
+}
export function expandBookmarkedStatusesRequest() {
return {
type: BOOKMARKED_STATUSES_EXPAND_REQUEST,
};
-};
+}
export function expandBookmarkedStatusesSuccess(statuses, next) {
return {
@@ -80,11 +80,11 @@ export function expandBookmarkedStatusesSuccess(statuses, next) {
statuses,
next,
};
-};
+}
export function expandBookmarkedStatusesFail(error) {
return {
type: BOOKMARKED_STATUSES_EXPAND_FAIL,
error,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/boosts.js b/app/javascript/flavours/glitch/actions/boosts.js
index 6e14065d6f..c0f0f3acc5 100644
--- a/app/javascript/flavours/glitch/actions/boosts.js
+++ b/app/javascript/flavours/glitch/actions/boosts.js
@@ -11,7 +11,7 @@ export function initBoostModal(props) {
dispatch({
type: BOOSTS_INIT_MODAL,
- privacy
+ privacy,
});
dispatch(openModal('BOOST', props));
diff --git a/app/javascript/flavours/glitch/actions/columns.js b/app/javascript/flavours/glitch/actions/columns.js
index 9b87415fb8..302c3f0f9b 100644
--- a/app/javascript/flavours/glitch/actions/columns.js
+++ b/app/javascript/flavours/glitch/actions/columns.js
@@ -15,7 +15,7 @@ export function addColumn(id, params) {
dispatch(saveSettings());
};
-};
+}
export function removeColumn(uuid) {
return dispatch => {
@@ -26,7 +26,7 @@ export function removeColumn(uuid) {
dispatch(saveSettings());
};
-};
+}
export function moveColumn(uuid, direction) {
return dispatch => {
@@ -38,7 +38,7 @@ export function moveColumn(uuid, direction) {
dispatch(saveSettings());
};
-};
+}
export function changeColumnParams(uuid, path, value) {
return dispatch => {
diff --git a/app/javascript/flavours/glitch/actions/compose.js b/app/javascript/flavours/glitch/actions/compose.js
index 267cff563c..01f0f36668 100644
--- a/app/javascript/flavours/glitch/actions/compose.js
+++ b/app/javascript/flavours/glitch/actions/compose.js
@@ -101,20 +101,20 @@ export function setComposeToStatus(status, text, spoiler_text, content_type) {
spoiler_text,
content_type,
};
-};
+}
export function changeCompose(text) {
return {
type: COMPOSE_CHANGE,
text: text,
};
-};
+}
export function cycleElefriendCompose() {
return {
type: COMPOSE_CYCLE_ELEFRIEND,
};
-};
+}
export function replyCompose(status, routerHistory) {
return (dispatch, getState) => {
@@ -127,19 +127,19 @@ export function replyCompose(status, routerHistory) {
ensureComposeIsVisible(getState, routerHistory);
};
-};
+}
export function cancelReplyCompose() {
return {
type: COMPOSE_REPLY_CANCEL,
};
-};
+}
export function resetCompose() {
return {
type: COMPOSE_RESET,
};
-};
+}
export function mentionCompose(account, routerHistory) {
return (dispatch, getState) => {
@@ -150,7 +150,7 @@ export function mentionCompose(account, routerHistory) {
ensureComposeIsVisible(getState, routerHistory);
};
-};
+}
export function directCompose(account, routerHistory) {
return (dispatch, getState) => {
@@ -161,7 +161,7 @@ export function directCompose(account, routerHistory) {
ensureComposeIsVisible(getState, routerHistory);
};
-};
+}
export function submitCompose(routerHistory) {
return function (dispatch, getState) {
@@ -257,34 +257,34 @@ export function submitCompose(routerHistory) {
dispatch(submitComposeFail(error));
});
};
-};
+}
export function submitComposeRequest() {
return {
type: COMPOSE_SUBMIT_REQUEST,
};
-};
+}
export function submitComposeSuccess(status) {
return {
type: COMPOSE_SUBMIT_SUCCESS,
status: status,
};
-};
+}
export function submitComposeFail(error) {
return {
type: COMPOSE_SUBMIT_FAIL,
error: error,
};
-};
+}
export function doodleSet(options) {
return {
type: COMPOSE_DOODLE_SET,
options: options,
};
-};
+}
export function uploadCompose(files) {
return function (dispatch, getState) {
@@ -347,9 +347,9 @@ export function uploadCompose(files) {
}
});
}).catch(error => dispatch(uploadComposeFail(error)));
- };
+ }
};
-};
+}
export const uploadComposeProcessing = () => ({
type: COMPOSE_UPLOAD_PROCESSING,
@@ -407,14 +407,14 @@ export function initMediaEditModal(id) {
dispatch(openModal('FOCAL_POINT', { id }));
};
-};
+}
export function onChangeMediaDescription(description) {
return {
type: COMPOSE_CHANGE_MEDIA_DESCRIPTION,
description,
};
-};
+}
export function onChangeMediaFocus(focusX, focusY) {
return {
@@ -422,7 +422,7 @@ export function onChangeMediaFocus(focusX, focusY) {
focusX,
focusY,
};
-};
+}
export function changeUploadCompose(id, params) {
return (dispatch, getState) => {
@@ -454,14 +454,14 @@ export function changeUploadCompose(id, params) {
});
}
};
-};
+}
export function changeUploadComposeRequest() {
return {
type: COMPOSE_UPLOAD_CHANGE_REQUEST,
skipLoading: true,
};
-};
+}
export function changeUploadComposeSuccess(media, attached) {
return {
@@ -470,7 +470,7 @@ export function changeUploadComposeSuccess(media, attached) {
attached: attached,
skipLoading: true,
};
-};
+}
export function changeUploadComposeFail(error) {
return {
@@ -478,14 +478,14 @@ export function changeUploadComposeFail(error) {
error: error,
skipLoading: true,
};
-};
+}
export function uploadComposeRequest() {
return {
type: COMPOSE_UPLOAD_REQUEST,
skipLoading: true,
};
-};
+}
export function uploadComposeProgress(loaded, total) {
return {
@@ -493,7 +493,7 @@ export function uploadComposeProgress(loaded, total) {
loaded: loaded,
total: total,
};
-};
+}
export function uploadComposeSuccess(media, file) {
return {
@@ -502,7 +502,7 @@ export function uploadComposeSuccess(media, file) {
file: file,
skipLoading: true,
};
-};
+}
export function uploadComposeFail(error) {
return {
@@ -510,14 +510,14 @@ export function uploadComposeFail(error) {
error: error,
skipLoading: true,
};
-};
+}
export function undoUploadCompose(media_id) {
return {
type: COMPOSE_UPLOAD_UNDO,
media_id: media_id,
};
-};
+}
export function clearComposeSuggestions() {
if (fetchComposeSuggestionsAccountsController) {
@@ -526,7 +526,7 @@ export function clearComposeSuggestions() {
return {
type: COMPOSE_SUGGESTIONS_CLEAR,
};
-};
+}
const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) => {
if (fetchComposeSuggestionsAccountsController) {
@@ -603,7 +603,7 @@ export function fetchComposeSuggestions(token) {
break;
}
};
-};
+}
export function readyComposeSuggestionsEmojis(token, emojis) {
return {
@@ -611,7 +611,7 @@ export function readyComposeSuggestionsEmojis(token, emojis) {
token,
emojis,
};
-};
+}
export function readyComposeSuggestionsAccounts(token, accounts) {
return {
@@ -619,7 +619,7 @@ export function readyComposeSuggestionsAccounts(token, accounts) {
token,
accounts,
};
-};
+}
export const readyComposeSuggestionsTags = (token, tags) => ({
type: COMPOSE_SUGGESTIONS_READY,
@@ -659,7 +659,7 @@ export function selectComposeSuggestion(position, token, suggestion, path) {
});
}
};
-};
+}
export function updateSuggestionTags(token) {
return {
@@ -707,13 +707,13 @@ export function mountCompose() {
return {
type: COMPOSE_MOUNT,
};
-};
+}
export function unmountCompose() {
return {
type: COMPOSE_UNMOUNT,
};
-};
+}
export function changeComposeAdvancedOption(option, value) {
return {
@@ -727,7 +727,7 @@ export function changeComposeSensitivity() {
return {
type: COMPOSE_SENSITIVITY_CHANGE,
};
-};
+}
export const changeComposeLanguage = language => ({
type: COMPOSE_LANGUAGE_CHANGE,
@@ -738,28 +738,28 @@ export function changeComposeSpoilerness() {
return {
type: COMPOSE_SPOILERNESS_CHANGE,
};
-};
+}
export function changeComposeSpoilerText(text) {
return {
type: COMPOSE_SPOILER_TEXT_CHANGE,
text,
};
-};
+}
export function changeComposeVisibility(value) {
return {
type: COMPOSE_VISIBILITY_CHANGE,
value,
};
-};
+}
export function changeComposeContentType(value) {
return {
type: COMPOSE_CONTENT_TYPE_CHANGE,
value,
};
-};
+}
export function insertEmojiCompose(position, emoji) {
return {
@@ -767,26 +767,26 @@ export function insertEmojiCompose(position, emoji) {
position,
emoji,
};
-};
+}
export function addPoll() {
return {
type: COMPOSE_POLL_ADD,
};
-};
+}
export function removePoll() {
return {
type: COMPOSE_POLL_REMOVE,
};
-};
+}
export function addPollOption(title) {
return {
type: COMPOSE_POLL_OPTION_ADD,
title,
};
-};
+}
export function changePollOption(index, title) {
return {
@@ -794,14 +794,14 @@ export function changePollOption(index, title) {
index,
title,
};
-};
+}
export function removePollOption(index) {
return {
type: COMPOSE_POLL_OPTION_REMOVE,
index,
};
-};
+}
export function changePollSettings(expiresIn, isMultiple) {
return {
@@ -809,4 +809,4 @@ export function changePollSettings(expiresIn, isMultiple) {
expiresIn,
isMultiple,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/custom_emojis.js b/app/javascript/flavours/glitch/actions/custom_emojis.js
index 7b7d0091b5..9ec8156b17 100644
--- a/app/javascript/flavours/glitch/actions/custom_emojis.js
+++ b/app/javascript/flavours/glitch/actions/custom_emojis.js
@@ -14,14 +14,14 @@ export function fetchCustomEmojis() {
dispatch(fetchCustomEmojisFail(error));
});
};
-};
+}
export function fetchCustomEmojisRequest() {
return {
type: CUSTOM_EMOJIS_FETCH_REQUEST,
skipLoading: true,
};
-};
+}
export function fetchCustomEmojisSuccess(custom_emojis) {
return {
@@ -29,7 +29,7 @@ export function fetchCustomEmojisSuccess(custom_emojis) {
custom_emojis,
skipLoading: true,
};
-};
+}
export function fetchCustomEmojisFail(error) {
return {
@@ -37,4 +37,4 @@ export function fetchCustomEmojisFail(error) {
error,
skipLoading: true,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/domain_blocks.js b/app/javascript/flavours/glitch/actions/domain_blocks.js
index 34a33a6546..d06de20a2d 100644
--- a/app/javascript/flavours/glitch/actions/domain_blocks.js
+++ b/app/javascript/flavours/glitch/actions/domain_blocks.js
@@ -29,14 +29,14 @@ export function blockDomain(domain) {
dispatch(blockDomainFail(domain, err));
});
};
-};
+}
export function blockDomainRequest(domain) {
return {
type: DOMAIN_BLOCK_REQUEST,
domain,
};
-};
+}
export function blockDomainSuccess(domain, accounts) {
return {
@@ -44,7 +44,7 @@ export function blockDomainSuccess(domain, accounts) {
domain,
accounts,
};
-};
+}
export function blockDomainFail(domain, error) {
return {
@@ -52,7 +52,7 @@ export function blockDomainFail(domain, error) {
domain,
error,
};
-};
+}
export function unblockDomain(domain) {
return (dispatch, getState) => {
@@ -66,14 +66,14 @@ export function unblockDomain(domain) {
dispatch(unblockDomainFail(domain, err));
});
};
-};
+}
export function unblockDomainRequest(domain) {
return {
type: DOMAIN_UNBLOCK_REQUEST,
domain,
};
-};
+}
export function unblockDomainSuccess(domain, accounts) {
return {
@@ -81,7 +81,7 @@ export function unblockDomainSuccess(domain, accounts) {
domain,
accounts,
};
-};
+}
export function unblockDomainFail(domain, error) {
return {
@@ -89,7 +89,7 @@ export function unblockDomainFail(domain, error) {
domain,
error,
};
-};
+}
export function fetchDomainBlocks() {
return (dispatch, getState) => {
@@ -102,13 +102,13 @@ export function fetchDomainBlocks() {
dispatch(fetchDomainBlocksFail(err));
});
};
-};
+}
export function fetchDomainBlocksRequest() {
return {
type: DOMAIN_BLOCKS_FETCH_REQUEST,
};
-};
+}
export function fetchDomainBlocksSuccess(domains, next) {
return {
@@ -116,14 +116,14 @@ export function fetchDomainBlocksSuccess(domains, next) {
domains,
next,
};
-};
+}
export function fetchDomainBlocksFail(error) {
return {
type: DOMAIN_BLOCKS_FETCH_FAIL,
error,
};
-};
+}
export function expandDomainBlocks() {
return (dispatch, getState) => {
@@ -142,13 +142,13 @@ export function expandDomainBlocks() {
dispatch(expandDomainBlocksFail(err));
});
};
-};
+}
export function expandDomainBlocksRequest() {
return {
type: DOMAIN_BLOCKS_EXPAND_REQUEST,
};
-};
+}
export function expandDomainBlocksSuccess(domains, next) {
return {
@@ -156,11 +156,11 @@ export function expandDomainBlocksSuccess(domains, next) {
domains,
next,
};
-};
+}
export function expandDomainBlocksFail(error) {
return {
type: DOMAIN_BLOCKS_EXPAND_FAIL,
error,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/emojis.js b/app/javascript/flavours/glitch/actions/emojis.js
index 7cd9d4b7b3..3b5d53996c 100644
--- a/app/javascript/flavours/glitch/actions/emojis.js
+++ b/app/javascript/flavours/glitch/actions/emojis.js
@@ -11,4 +11,4 @@ export function useEmoji(emoji) {
dispatch(saveSettings());
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/favourites.js b/app/javascript/flavours/glitch/actions/favourites.js
index 9448b1efe7..7388e0c580 100644
--- a/app/javascript/flavours/glitch/actions/favourites.js
+++ b/app/javascript/flavours/glitch/actions/favourites.js
@@ -25,14 +25,14 @@ export function fetchFavouritedStatuses() {
dispatch(fetchFavouritedStatusesFail(error));
});
};
-};
+}
export function fetchFavouritedStatusesRequest() {
return {
type: FAVOURITED_STATUSES_FETCH_REQUEST,
skipLoading: true,
};
-};
+}
export function fetchFavouritedStatusesSuccess(statuses, next) {
return {
@@ -41,7 +41,7 @@ export function fetchFavouritedStatusesSuccess(statuses, next) {
next,
skipLoading: true,
};
-};
+}
export function fetchFavouritedStatusesFail(error) {
return {
@@ -49,7 +49,7 @@ export function fetchFavouritedStatusesFail(error) {
error,
skipLoading: true,
};
-};
+}
export function expandFavouritedStatuses() {
return (dispatch, getState) => {
@@ -69,13 +69,13 @@ export function expandFavouritedStatuses() {
dispatch(expandFavouritedStatusesFail(error));
});
};
-};
+}
export function expandFavouritedStatusesRequest() {
return {
type: FAVOURITED_STATUSES_EXPAND_REQUEST,
};
-};
+}
export function expandFavouritedStatusesSuccess(statuses, next) {
return {
@@ -83,11 +83,11 @@ export function expandFavouritedStatusesSuccess(statuses, next) {
statuses,
next,
};
-};
+}
export function expandFavouritedStatusesFail(error) {
return {
type: FAVOURITED_STATUSES_EXPAND_FAIL,
error,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/height_cache.js b/app/javascript/flavours/glitch/actions/height_cache.js
index 4c752993fe..a8645410c8 100644
--- a/app/javascript/flavours/glitch/actions/height_cache.js
+++ b/app/javascript/flavours/glitch/actions/height_cache.js
@@ -8,10 +8,10 @@ export function setHeight (key, id, height) {
id,
height,
};
-};
+}
export function clearHeight () {
return {
type: HEIGHT_CACHE_CLEAR,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/interactions.js b/app/javascript/flavours/glitch/actions/interactions.js
index 225ee7eb2a..c7b552a656 100644
--- a/app/javascript/flavours/glitch/actions/interactions.js
+++ b/app/javascript/flavours/glitch/actions/interactions.js
@@ -54,7 +54,7 @@ export function reblog(status, visibility) {
dispatch(reblogFail(status, error));
});
};
-};
+}
export function unreblog(status) {
return (dispatch, getState) => {
@@ -67,21 +67,21 @@ export function unreblog(status) {
dispatch(unreblogFail(status, error));
});
};
-};
+}
export function reblogRequest(status) {
return {
type: REBLOG_REQUEST,
status: status,
};
-};
+}
export function reblogSuccess(status) {
return {
type: REBLOG_SUCCESS,
status: status,
};
-};
+}
export function reblogFail(status, error) {
return {
@@ -89,21 +89,21 @@ export function reblogFail(status, error) {
status: status,
error: error,
};
-};
+}
export function unreblogRequest(status) {
return {
type: UNREBLOG_REQUEST,
status: status,
};
-};
+}
export function unreblogSuccess(status) {
return {
type: UNREBLOG_SUCCESS,
status: status,
};
-};
+}
export function unreblogFail(status, error) {
return {
@@ -111,7 +111,7 @@ export function unreblogFail(status, error) {
status: status,
error: error,
};
-};
+}
export function favourite(status) {
return function (dispatch, getState) {
@@ -124,7 +124,7 @@ export function favourite(status) {
dispatch(favouriteFail(status, error));
});
};
-};
+}
export function unfavourite(status) {
return (dispatch, getState) => {
@@ -137,21 +137,21 @@ export function unfavourite(status) {
dispatch(unfavouriteFail(status, error));
});
};
-};
+}
export function favouriteRequest(status) {
return {
type: FAVOURITE_REQUEST,
status: status,
};
-};
+}
export function favouriteSuccess(status) {
return {
type: FAVOURITE_SUCCESS,
status: status,
};
-};
+}
export function favouriteFail(status, error) {
return {
@@ -159,21 +159,21 @@ export function favouriteFail(status, error) {
status: status,
error: error,
};
-};
+}
export function unfavouriteRequest(status) {
return {
type: UNFAVOURITE_REQUEST,
status: status,
};
-};
+}
export function unfavouriteSuccess(status) {
return {
type: UNFAVOURITE_SUCCESS,
status: status,
};
-};
+}
export function unfavouriteFail(status, error) {
return {
@@ -181,7 +181,7 @@ export function unfavouriteFail(status, error) {
status: status,
error: error,
};
-};
+}
export function bookmark(status) {
return function (dispatch, getState) {
@@ -194,7 +194,7 @@ export function bookmark(status) {
dispatch(bookmarkFail(status, error));
});
};
-};
+}
export function unbookmark(status) {
return (dispatch, getState) => {
@@ -207,21 +207,21 @@ export function unbookmark(status) {
dispatch(unbookmarkFail(status, error));
});
};
-};
+}
export function bookmarkRequest(status) {
return {
type: BOOKMARK_REQUEST,
status: status,
};
-};
+}
export function bookmarkSuccess(status) {
return {
type: BOOKMARK_SUCCESS,
status: status,
};
-};
+}
export function bookmarkFail(status, error) {
return {
@@ -229,21 +229,21 @@ export function bookmarkFail(status, error) {
status: status,
error: error,
};
-};
+}
export function unbookmarkRequest(status) {
return {
type: UNBOOKMARK_REQUEST,
status: status,
};
-};
+}
export function unbookmarkSuccess(status) {
return {
type: UNBOOKMARK_SUCCESS,
status: status,
};
-};
+}
export function unbookmarkFail(status, error) {
return {
@@ -251,7 +251,7 @@ export function unbookmarkFail(status, error) {
status: status,
error: error,
};
-};
+}
export function fetchReblogs(id) {
return (dispatch, getState) => {
@@ -264,14 +264,14 @@ export function fetchReblogs(id) {
dispatch(fetchReblogsFail(id, error));
});
};
-};
+}
export function fetchReblogsRequest(id) {
return {
type: REBLOGS_FETCH_REQUEST,
id,
};
-};
+}
export function fetchReblogsSuccess(id, accounts) {
return {
@@ -279,14 +279,14 @@ export function fetchReblogsSuccess(id, accounts) {
id,
accounts,
};
-};
+}
export function fetchReblogsFail(id, error) {
return {
type: REBLOGS_FETCH_FAIL,
error,
};
-};
+}
export function fetchFavourites(id) {
return (dispatch, getState) => {
@@ -299,14 +299,14 @@ export function fetchFavourites(id) {
dispatch(fetchFavouritesFail(id, error));
});
};
-};
+}
export function fetchFavouritesRequest(id) {
return {
type: FAVOURITES_FETCH_REQUEST,
id,
};
-};
+}
export function fetchFavouritesSuccess(id, accounts) {
return {
@@ -314,14 +314,14 @@ export function fetchFavouritesSuccess(id, accounts) {
id,
accounts,
};
-};
+}
export function fetchFavouritesFail(id, error) {
return {
type: FAVOURITES_FETCH_FAIL,
error,
};
-};
+}
export function pin(status) {
return (dispatch, getState) => {
@@ -334,21 +334,21 @@ export function pin(status) {
dispatch(pinFail(status, error));
});
};
-};
+}
export function pinRequest(status) {
return {
type: PIN_REQUEST,
status,
};
-};
+}
export function pinSuccess(status) {
return {
type: PIN_SUCCESS,
status,
};
-};
+}
export function pinFail(status, error) {
return {
@@ -356,7 +356,7 @@ export function pinFail(status, error) {
status,
error,
};
-};
+}
export function unpin (status) {
return (dispatch, getState) => {
@@ -369,21 +369,21 @@ export function unpin (status) {
dispatch(unpinFail(status, error));
});
};
-};
+}
export function unpinRequest(status) {
return {
type: UNPIN_REQUEST,
status,
};
-};
+}
export function unpinSuccess(status) {
return {
type: UNPIN_SUCCESS,
status,
};
-};
+}
export function unpinFail(status, error) {
return {
@@ -391,4 +391,4 @@ export function unpinFail(status, error) {
status,
error,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/local_settings.js b/app/javascript/flavours/glitch/actions/local_settings.js
index a4a928611d..adf7fd2abc 100644
--- a/app/javascript/flavours/glitch/actions/local_settings.js
+++ b/app/javascript/flavours/glitch/actions/local_settings.js
@@ -33,14 +33,14 @@ export function checkDeprecatedLocalSettings() {
}));
}
};
-};
+}
export function clearDeprecatedLocalSettings() {
return (dispatch) => {
dispatch(deleteLocalSetting(['content_warnings', 'auto_unfold']));
dispatch(deleteLocalSetting(['swipe_to_change_columns']));
};
-};
+}
export function changeLocalSetting(key, value) {
return dispatch => {
@@ -52,7 +52,7 @@ export function changeLocalSetting(key, value) {
dispatch(saveLocalSettings());
};
-};
+}
export function deleteLocalSetting(key) {
return dispatch => {
@@ -63,7 +63,7 @@ export function deleteLocalSetting(key) {
dispatch(saveLocalSettings());
};
-};
+}
// __TODO :__
// Right now `saveLocalSettings()` doesn't keep track of which user
@@ -74,4 +74,4 @@ export function saveLocalSettings() {
const localSettings = getState().get('local_settings').toJS();
localStorage.setItem('mastodon-settings', JSON.stringify(localSettings));
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/markers.js b/app/javascript/flavours/glitch/actions/markers.js
index 3b6a76bc43..dfd701cbb8 100644
--- a/app/javascript/flavours/glitch/actions/markers.js
+++ b/app/javascript/flavours/glitch/actions/markers.js
@@ -101,7 +101,7 @@ export function submitMarkersSuccess({ home, notifications }) {
home: (home || {}).last_read_id,
notifications: (notifications || {}).last_read_id,
};
-};
+}
export function submitMarkers(params = {}) {
const result = (dispatch, getState) => debouncedSubmitMarkers(dispatch, getState);
@@ -111,7 +111,7 @@ export function submitMarkers(params = {}) {
}
return result;
-};
+}
export const fetchMarkers = () => (dispatch, getState) => {
const params = { timeline: ['notifications'] };
@@ -130,7 +130,7 @@ export function fetchMarkersRequest() {
type: MARKERS_FETCH_REQUEST,
skipLoading: true,
};
-};
+}
export function fetchMarkersSuccess(markers) {
return {
@@ -138,7 +138,7 @@ export function fetchMarkersSuccess(markers) {
markers,
skipLoading: true,
};
-};
+}
export function fetchMarkersFail(error) {
return {
@@ -147,4 +147,4 @@ export function fetchMarkersFail(error) {
skipLoading: true,
skipAlert: true,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/modal.js b/app/javascript/flavours/glitch/actions/modal.js
index 3e576fab8e..ef2ae0e4c7 100644
--- a/app/javascript/flavours/glitch/actions/modal.js
+++ b/app/javascript/flavours/glitch/actions/modal.js
@@ -7,7 +7,7 @@ export function openModal(type, props) {
modalType: type,
modalProps: props,
};
-};
+}
export function closeModal(type, options = { ignoreFocus: false }) {
return {
@@ -15,4 +15,4 @@ export function closeModal(type, options = { ignoreFocus: false }) {
modalType: type,
ignoreFocus: options.ignoreFocus,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/mutes.js b/app/javascript/flavours/glitch/actions/mutes.js
index 1ccf9592f7..aa47d14642 100644
--- a/app/javascript/flavours/glitch/actions/mutes.js
+++ b/app/javascript/flavours/glitch/actions/mutes.js
@@ -26,13 +26,13 @@ export function fetchMutes() {
dispatch(fetchRelationships(response.data.map(item => item.id)));
}).catch(error => dispatch(fetchMutesFail(error)));
};
-};
+}
export function fetchMutesRequest() {
return {
type: MUTES_FETCH_REQUEST,
};
-};
+}
export function fetchMutesSuccess(accounts, next) {
return {
@@ -40,14 +40,14 @@ export function fetchMutesSuccess(accounts, next) {
accounts,
next,
};
-};
+}
export function fetchMutesFail(error) {
return {
type: MUTES_FETCH_FAIL,
error,
};
-};
+}
export function expandMutes() {
return (dispatch, getState) => {
@@ -66,13 +66,13 @@ export function expandMutes() {
dispatch(fetchRelationships(response.data.map(item => item.id)));
}).catch(error => dispatch(expandMutesFail(error)));
};
-};
+}
export function expandMutesRequest() {
return {
type: MUTES_EXPAND_REQUEST,
};
-};
+}
export function expandMutesSuccess(accounts, next) {
return {
@@ -80,14 +80,14 @@ export function expandMutesSuccess(accounts, next) {
accounts,
next,
};
-};
+}
export function expandMutesFail(error) {
return {
type: MUTES_EXPAND_FAIL,
error,
};
-};
+}
export function initMuteModal(account) {
return dispatch => {
diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js
index 158a5b7e43..989bc41444 100644
--- a/app/javascript/flavours/glitch/actions/notifications.js
+++ b/app/javascript/flavours/glitch/actions/notifications.js
@@ -129,7 +129,7 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
});
}
};
-};
+}
const excludeTypesFromSettings = state => state.getIn(['settings', 'notifications', 'shows']).filter(enabled => !enabled).keySeq().toJS();
@@ -209,14 +209,14 @@ export function expandNotifications({ maxId, forceLoad } = {}, done = noOp) {
done();
});
};
-};
+}
export function expandNotificationsRequest(isLoadingMore) {
return {
type: NOTIFICATIONS_EXPAND_REQUEST,
skipLoading: !isLoadingMore,
};
-};
+}
export function expandNotificationsSuccess(notifications, next, isLoadingMore, isLoadingRecent, usePendingItems) {
return {
@@ -227,7 +227,7 @@ export function expandNotificationsSuccess(notifications, next, isLoadingMore, i
usePendingItems,
skipLoading: !isLoadingMore,
};
-};
+}
export function expandNotificationsFail(error, isLoadingMore) {
return {
@@ -236,7 +236,7 @@ export function expandNotificationsFail(error, isLoadingMore) {
skipLoading: !isLoadingMore,
skipAlert: !isLoadingMore || error.name === 'AbortError',
};
-};
+}
export function clearNotifications() {
return (dispatch, getState) => {
@@ -246,14 +246,14 @@ export function clearNotifications() {
api(getState).post('/api/v1/notifications/clear');
};
-};
+}
export function scrollTopNotifications(top) {
return {
type: NOTIFICATIONS_SCROLL_TOP,
top,
};
-};
+}
export function deleteMarkedNotifications() {
return (dispatch, getState) => {
@@ -277,33 +277,33 @@ export function deleteMarkedNotifications() {
dispatch(deleteMarkedNotificationsFail(error));
});
};
-};
+}
export function enterNotificationClearingMode(yes) {
return {
type: NOTIFICATIONS_ENTER_CLEARING_MODE,
yes: yes,
};
-};
+}
export function markAllNotifications(yes) {
return {
type: NOTIFICATIONS_MARK_ALL_FOR_DELETE,
yes: yes, // true, false or null. null = invert
};
-};
+}
export function deleteMarkedNotificationsRequest() {
return {
type: NOTIFICATIONS_DELETE_MARKED_REQUEST,
};
-};
+}
export function deleteMarkedNotificationsFail() {
return {
type: NOTIFICATIONS_DELETE_MARKED_FAIL,
};
-};
+}
export function markNotificationForDelete(id, yes) {
return {
@@ -311,32 +311,32 @@ export function markNotificationForDelete(id, yes) {
id: id,
yes: yes,
};
-};
+}
export function deleteMarkedNotificationsSuccess() {
return {
type: NOTIFICATIONS_DELETE_MARKED_SUCCESS,
};
-};
+}
export function mountNotifications() {
return {
type: NOTIFICATIONS_MOUNT,
};
-};
+}
export function unmountNotifications() {
return {
type: NOTIFICATIONS_UNMOUNT,
};
-};
+}
export function notificationsSetVisibility(visibility) {
return {
type: NOTIFICATIONS_SET_VISIBILITY,
visibility: visibility,
};
-};
+}
export function setFilter (filterType) {
return dispatch => {
@@ -348,13 +348,13 @@ export function setFilter (filterType) {
dispatch(expandNotifications({ forceLoad: true }));
dispatch(saveSettings());
};
-};
+}
export function markNotificationsAsRead() {
return {
type: NOTIFICATIONS_MARK_AS_READ,
};
-};
+}
// Browser support
export function setupBrowserNotifications() {
@@ -379,7 +379,7 @@ export function requestBrowserPermission(callback = noOp) {
callback(permission);
});
};
-};
+}
export function setBrowserSupport (value) {
return {
diff --git a/app/javascript/flavours/glitch/actions/onboarding.js b/app/javascript/flavours/glitch/actions/onboarding.js
index a161c50efe..5038b7eb67 100644
--- a/app/javascript/flavours/glitch/actions/onboarding.js
+++ b/app/javascript/flavours/glitch/actions/onboarding.js
@@ -11,4 +11,4 @@ export function showOnboardingOnce() {
dispatch(saveSettings());
}
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/pin_statuses.js b/app/javascript/flavours/glitch/actions/pin_statuses.js
index 0926978ac8..d8c0a13737 100644
--- a/app/javascript/flavours/glitch/actions/pin_statuses.js
+++ b/app/javascript/flavours/glitch/actions/pin_statuses.js
@@ -18,13 +18,13 @@ export function fetchPinnedStatuses() {
dispatch(fetchPinnedStatusesFail(error));
});
};
-};
+}
export function fetchPinnedStatusesRequest() {
return {
type: PINNED_STATUSES_FETCH_REQUEST,
};
-};
+}
export function fetchPinnedStatusesSuccess(statuses, next) {
return {
@@ -32,11 +32,11 @@ export function fetchPinnedStatusesSuccess(statuses, next) {
statuses,
next,
};
-};
+}
export function fetchPinnedStatusesFail(error) {
return {
type: PINNED_STATUSES_FETCH_FAIL,
error,
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/search.js b/app/javascript/flavours/glitch/actions/search.js
index f21c0058ba..0012808e5b 100644
--- a/app/javascript/flavours/glitch/actions/search.js
+++ b/app/javascript/flavours/glitch/actions/search.js
@@ -19,13 +19,13 @@ export function changeSearch(value) {
type: SEARCH_CHANGE,
value,
};
-};
+}
export function clearSearch() {
return {
type: SEARCH_CLEAR,
};
-};
+}
export function submitSearch() {
return (dispatch, getState) => {
@@ -60,13 +60,13 @@ export function submitSearch() {
dispatch(fetchSearchFail(error));
});
};
-};
+}
export function fetchSearchRequest() {
return {
type: SEARCH_FETCH_REQUEST,
};
-};
+}
export function fetchSearchSuccess(results, searchTerm) {
return {
@@ -74,14 +74,14 @@ export function fetchSearchSuccess(results, searchTerm) {
results,
searchTerm,
};
-};
+}
export function fetchSearchFail(error) {
return {
type: SEARCH_FETCH_FAIL,
error,
};
-};
+}
export const expandSearch = type => (dispatch, getState) => {
const value = getState().getIn(['search', 'value']);
diff --git a/app/javascript/flavours/glitch/actions/settings.js b/app/javascript/flavours/glitch/actions/settings.js
index 5634a11efb..60f0abf950 100644
--- a/app/javascript/flavours/glitch/actions/settings.js
+++ b/app/javascript/flavours/glitch/actions/settings.js
@@ -15,7 +15,7 @@ export function changeSetting(path, value) {
dispatch(saveSettings());
};
-};
+}
const debouncedSave = debounce((dispatch, getState) => {
if (getState().getIn(['settings', 'saved'])) {
@@ -31,4 +31,4 @@ const debouncedSave = debounce((dispatch, getState) => {
export function saveSettings() {
return (dispatch, getState) => debouncedSave(dispatch, getState);
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/statuses.js b/app/javascript/flavours/glitch/actions/statuses.js
index efb4cc33b5..487cd69884 100644
--- a/app/javascript/flavours/glitch/actions/statuses.js
+++ b/app/javascript/flavours/glitch/actions/statuses.js
@@ -45,7 +45,7 @@ export function fetchStatusRequest(id, skipLoading) {
id,
skipLoading,
};
-};
+}
export function fetchStatus(id, forceFetch = false) {
return (dispatch, getState) => {
@@ -66,14 +66,14 @@ export function fetchStatus(id, forceFetch = false) {
dispatch(fetchStatusFail(id, error, skipLoading));
});
};
-};
+}
export function fetchStatusSuccess(skipLoading) {
return {
type: STATUS_FETCH_SUCCESS,
skipLoading,
};
-};
+}
export function fetchStatusFail(id, error, skipLoading) {
return {
@@ -83,7 +83,7 @@ export function fetchStatusFail(id, error, skipLoading) {
skipLoading,
skipAlert: true,
};
-};
+}
export function redraft(status, raw_text, content_type) {
return {
@@ -92,7 +92,7 @@ export function redraft(status, raw_text, content_type) {
raw_text,
content_type,
};
-};
+}
export const editStatus = (id, routerHistory) => (dispatch, getState) => {
let status = getState().getIn(['statuses', id]);
@@ -148,21 +148,21 @@ export function deleteStatus(id, routerHistory, withRedraft = false) {
dispatch(deleteStatusFail(id, error));
});
};
-};
+}
export function deleteStatusRequest(id) {
return {
type: STATUS_DELETE_REQUEST,
id: id,
};
-};
+}
export function deleteStatusSuccess(id) {
return {
type: STATUS_DELETE_SUCCESS,
id: id,
};
-};
+}
export function deleteStatusFail(id, error) {
return {
@@ -170,7 +170,7 @@ export function deleteStatusFail(id, error) {
id: id,
error: error,
};
-};
+}
export const updateStatus = status => dispatch =>
dispatch(importFetchedStatus(status));
@@ -191,14 +191,14 @@ export function fetchContext(id) {
dispatch(fetchContextFail(id, error));
});
};
-};
+}
export function fetchContextRequest(id) {
return {
type: CONTEXT_FETCH_REQUEST,
id,
};
-};
+}
export function fetchContextSuccess(id, ancestors, descendants) {
return {
@@ -208,7 +208,7 @@ export function fetchContextSuccess(id, ancestors, descendants) {
descendants,
statuses: ancestors.concat(descendants),
};
-};
+}
export function fetchContextFail(id, error) {
return {
@@ -217,7 +217,7 @@ export function fetchContextFail(id, error) {
error,
skipAlert: true,
};
-};
+}
export function muteStatus(id) {
return (dispatch, getState) => {
@@ -229,21 +229,21 @@ export function muteStatus(id) {
dispatch(muteStatusFail(id, error));
});
};
-};
+}
export function muteStatusRequest(id) {
return {
type: STATUS_MUTE_REQUEST,
id,
};
-};
+}
export function muteStatusSuccess(id) {
return {
type: STATUS_MUTE_SUCCESS,
id,
};
-};
+}
export function muteStatusFail(id, error) {
return {
@@ -251,7 +251,7 @@ export function muteStatusFail(id, error) {
id,
error,
};
-};
+}
export function unmuteStatus(id) {
return (dispatch, getState) => {
@@ -263,21 +263,21 @@ export function unmuteStatus(id) {
dispatch(unmuteStatusFail(id, error));
});
};
-};
+}
export function unmuteStatusRequest(id) {
return {
type: STATUS_UNMUTE_REQUEST,
id,
};
-};
+}
export function unmuteStatusSuccess(id) {
return {
type: STATUS_UNMUTE_SUCCESS,
id,
};
-};
+}
export function unmuteStatusFail(id, error) {
return {
@@ -285,7 +285,7 @@ export function unmuteStatusFail(id, error) {
id,
error,
};
-};
+}
export function hideStatus(ids) {
if (!Array.isArray(ids)) {
@@ -296,7 +296,7 @@ export function hideStatus(ids) {
type: STATUS_HIDE,
ids,
};
-};
+}
export function revealStatus(ids) {
if (!Array.isArray(ids)) {
@@ -307,7 +307,7 @@ export function revealStatus(ids) {
type: STATUS_REVEAL,
ids,
};
-};
+}
export function toggleStatusCollapse(id, isCollapsed) {
return {
@@ -315,7 +315,7 @@ export function toggleStatusCollapse(id, isCollapsed) {
id,
isCollapsed,
};
-};
+}
export const translateStatus = id => (dispatch, getState) => {
dispatch(translateStatusRequest(id));
diff --git a/app/javascript/flavours/glitch/actions/store.js b/app/javascript/flavours/glitch/actions/store.js
index 9dbc0b2148..137b68e222 100644
--- a/app/javascript/flavours/glitch/actions/store.js
+++ b/app/javascript/flavours/glitch/actions/store.js
@@ -18,7 +18,7 @@ const applyMigrations = (state) => {
if (state.getIn(['settings', 'notifications', 'showUnread']) !== false) {
state.setIn(['settings', 'notifications', 'showUnread'], state.getIn(['local_settings', 'notifications', 'show_unread']));
}
- state.removeIn(['local_settings', 'notifications', 'show_unread'])
+ state.removeIn(['local_settings', 'notifications', 'show_unread']);
}
});
};
@@ -36,4 +36,4 @@ export function hydrateStore(rawState) {
dispatch(importFetchedAccounts(Object.values(rawState.accounts)));
dispatch(saveSettings());
};
-};
+}
diff --git a/app/javascript/flavours/glitch/actions/suggestions.js b/app/javascript/flavours/glitch/actions/suggestions.js
index 1f1116e75e..9e8cd1ea40 100644
--- a/app/javascript/flavours/glitch/actions/suggestions.js
+++ b/app/javascript/flavours/glitch/actions/suggestions.js
@@ -21,14 +21,14 @@ export function fetchSuggestions(withRelationships = false) {
}
}).catch(error => dispatch(fetchSuggestionsFail(error)));
};
-};
+}
export function fetchSuggestionsRequest() {
return {
type: SUGGESTIONS_FETCH_REQUEST,
skipLoading: true,
};
-};
+}
export function fetchSuggestionsSuccess(suggestions) {
return {
@@ -36,7 +36,7 @@ export function fetchSuggestionsSuccess(suggestions) {
suggestions,
skipLoading: true,
};
-};
+}
export function fetchSuggestionsFail(error) {
return {
@@ -45,7 +45,7 @@ export function fetchSuggestionsFail(error) {
skipLoading: true,
skipAlert: true,
};
-};
+}
export const dismissSuggestion = accountId => (dispatch, getState) => {
dispatch({
diff --git a/app/javascript/flavours/glitch/actions/timelines.js b/app/javascript/flavours/glitch/actions/timelines.js
index a1c4dd43ad..eb817daf9e 100644
--- a/app/javascript/flavours/glitch/actions/timelines.js
+++ b/app/javascript/flavours/glitch/actions/timelines.js
@@ -55,14 +55,14 @@ export function updateTimeline(timeline, status, accept) {
timeline,
status,
usePendingItems: preferPendingItems,
- filtered
+ filtered,
});
if (timeline === 'home') {
dispatch(submitMarkers());
}
};
-};
+}
export function deleteFromTimelines(id) {
return (dispatch, getState) => {
@@ -78,13 +78,13 @@ export function deleteFromTimelines(id) {
reblogOf,
});
};
-};
+}
export function clearTimeline(timeline) {
return (dispatch) => {
dispatch({ type: TIMELINE_CLEAR, timeline });
};
-};
+}
const noOp = () => {};
@@ -134,7 +134,7 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
done();
});
};
-};
+}
export function fillTimelineGaps(timelineId, path, params = {}, done = noOp) {
return (dispatch, getState) => {
@@ -181,7 +181,7 @@ export function expandTimelineRequest(timeline, isLoadingMore) {
timeline,
skipLoading: !isLoadingMore,
};
-};
+}
export function expandTimelineSuccess(timeline, statuses, next, partial, isLoadingRecent, isLoadingMore, usePendingItems) {
return {
@@ -194,7 +194,7 @@ export function expandTimelineSuccess(timeline, statuses, next, partial, isLoadi
usePendingItems,
skipLoading: !isLoadingMore,
};
-};
+}
export function expandTimelineFail(timeline, error, isLoadingMore) {
return {
@@ -204,7 +204,7 @@ export function expandTimelineFail(timeline, error, isLoadingMore) {
skipLoading: !isLoadingMore,
skipNotFound: timeline.startsWith('account:'),
};
-};
+}
export function scrollTopTimeline(timeline, top) {
return {
@@ -212,7 +212,7 @@ export function scrollTopTimeline(timeline, top) {
timeline,
top,
};
-};
+}
export function connectTimeline(timeline) {
return {
@@ -220,7 +220,7 @@ export function connectTimeline(timeline) {
timeline,
usePendingItems: preferPendingItems,
};
-};
+}
export const disconnectTimeline = timeline => ({
type: TIMELINE_DISCONNECT,
diff --git a/app/javascript/flavours/glitch/compare_id.js b/app/javascript/flavours/glitch/compare_id.js
index 66cf51c4b6..d2bd74f447 100644
--- a/app/javascript/flavours/glitch/compare_id.js
+++ b/app/javascript/flavours/glitch/compare_id.js
@@ -8,4 +8,4 @@ export default function compareId (id1, id2) {
} else {
return id1.length > id2.length ? 1 : -1;
}
-};
+}
diff --git a/app/javascript/flavours/glitch/components/account.js b/app/javascript/flavours/glitch/components/account.js
index 8e810ce5fb..7ce4b65aac 100644
--- a/app/javascript/flavours/glitch/components/account.js
+++ b/app/javascript/flavours/glitch/components/account.js
@@ -48,27 +48,27 @@ class Account extends ImmutablePureComponent {
handleFollow = () => {
this.props.onFollow(this.props.account);
- }
+ };
handleBlock = () => {
this.props.onBlock(this.props.account);
- }
+ };
handleMute = () => {
this.props.onMute(this.props.account);
- }
+ };
handleMuteNotifications = () => {
this.props.onMuteNotifications(this.props.account, true);
- }
+ };
handleUnmuteNotifications = () => {
this.props.onMuteNotifications(this.props.account, false);
- }
+ };
handleAction = () => {
this.props.onActionClick(this.props.account);
- }
+ };
render () {
const {
diff --git a/app/javascript/flavours/glitch/components/admin/Retention.js b/app/javascript/flavours/glitch/components/admin/Retention.js
index 9cc39040b9..e1ba3f6c9d 100644
--- a/app/javascript/flavours/glitch/components/admin/Retention.js
+++ b/app/javascript/flavours/glitch/components/admin/Retention.js
@@ -137,7 +137,7 @@ export default class Retention extends React.PureComponent {
break;
default:
title = ;
- };
+ }
return (
diff --git a/app/javascript/flavours/glitch/components/animated_number.js b/app/javascript/flavours/glitch/components/animated_number.js
index 9431c96f7b..dd21d97f0c 100644
--- a/app/javascript/flavours/glitch/components/animated_number.js
+++ b/app/javascript/flavours/glitch/components/animated_number.js
@@ -38,13 +38,13 @@ export default class AnimatedNumber extends React.PureComponent {
const { direction } = this.state;
return { y: -1 * direction };
- }
+ };
willLeave = () => {
const { direction } = this.state;
return { y: spring(1 * direction, { damping: 35, stiffness: 400 }) };
- }
+ };
render () {
const { value, obfuscate } = this.props;
diff --git a/app/javascript/flavours/glitch/components/autosuggest_input.js b/app/javascript/flavours/glitch/components/autosuggest_input.js
index c7b0246523..4d751e2812 100644
--- a/app/javascript/flavours/glitch/components/autosuggest_input.js
+++ b/app/javascript/flavours/glitch/components/autosuggest_input.js
@@ -78,7 +78,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
}
this.props.onChange(e);
- }
+ };
onKeyDown = (e) => {
const { suggestions, disabled } = this.props;
@@ -136,22 +136,22 @@ export default class AutosuggestInput extends ImmutablePureComponent {
}
this.props.onKeyDown(e);
- }
+ };
onBlur = () => {
this.setState({ suggestionsHidden: true, focused: false });
- }
+ };
onFocus = () => {
this.setState({ focused: true });
- }
+ };
onSuggestionClick = (e) => {
const suggestion = this.props.suggestions.get(e.currentTarget.getAttribute('data-index'));
e.preventDefault();
this.props.onSuggestionSelected(this.state.tokenStart, this.state.lastToken, suggestion);
this.input.focus();
- }
+ };
componentWillReceiveProps (nextProps) {
if (nextProps.suggestions !== this.props.suggestions && nextProps.suggestions.size > 0 && this.state.suggestionsHidden && this.state.focused) {
@@ -161,7 +161,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
setInput = (c) => {
this.input = c;
- }
+ };
renderSuggestion = (suggestion, i) => {
const { selectedSuggestion } = this.state;
@@ -183,7 +183,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
{inner}
);
- }
+ };
render () {
const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength, lang } = this.props;
diff --git a/app/javascript/flavours/glitch/components/autosuggest_textarea.js b/app/javascript/flavours/glitch/components/autosuggest_textarea.js
index 68c0834336..6e6e567b93 100644
--- a/app/javascript/flavours/glitch/components/autosuggest_textarea.js
+++ b/app/javascript/flavours/glitch/components/autosuggest_textarea.js
@@ -75,7 +75,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
}
this.props.onChange(e);
- }
+ };
onKeyDown = (e) => {
const { suggestions, disabled } = this.props;
@@ -133,25 +133,25 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
}
this.props.onKeyDown(e);
- }
+ };
onBlur = () => {
this.setState({ suggestionsHidden: true, focused: false });
- }
+ };
onFocus = (e) => {
this.setState({ focused: true });
if (this.props.onFocus) {
this.props.onFocus(e);
}
- }
+ };
onSuggestionClick = (e) => {
const suggestion = this.props.suggestions.get(e.currentTarget.getAttribute('data-index'));
e.preventDefault();
this.props.onSuggestionSelected(this.state.tokenStart, this.state.lastToken, suggestion);
this.textarea.focus();
- }
+ };
componentWillReceiveProps (nextProps) {
if (nextProps.suggestions !== this.props.suggestions && nextProps.suggestions.size > 0 && this.state.suggestionsHidden && this.state.focused) {
@@ -161,14 +161,14 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
setTextarea = (c) => {
this.textarea = c;
- }
+ };
onPaste = (e) => {
if (e.clipboardData && e.clipboardData.files.length === 1) {
this.props.onPaste(e.clipboardData.files);
e.preventDefault();
}
- }
+ };
renderSuggestion = (suggestion, i) => {
const { selectedSuggestion } = this.state;
@@ -190,7 +190,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
{inner}
);
- }
+ };
render () {
const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, lang, children } = this.props;
diff --git a/app/javascript/flavours/glitch/components/avatar.js b/app/javascript/flavours/glitch/components/avatar.js
index 38fd99af59..f30b33e700 100644
--- a/app/javascript/flavours/glitch/components/avatar.js
+++ b/app/javascript/flavours/glitch/components/avatar.js
@@ -28,12 +28,12 @@ export default class Avatar extends React.PureComponent {
handleMouseEnter = () => {
if (this.props.animate) return;
this.setState({ hovering: true });
- }
+ };
handleMouseLeave = () => {
if (this.props.animate) return;
this.setState({ hovering: false });
- }
+ };
render () {
const {
diff --git a/app/javascript/flavours/glitch/components/button.js b/app/javascript/flavours/glitch/components/button.js
index b1815c3e19..40b8f5a159 100644
--- a/app/javascript/flavours/glitch/components/button.js
+++ b/app/javascript/flavours/glitch/components/button.js
@@ -19,11 +19,11 @@ export default class Button extends React.PureComponent {
if (!this.props.disabled) {
this.props.onClick(e);
}
- }
+ };
setRef = (c) => {
this.node = c;
- }
+ };
focus() {
this.node.focus();
diff --git a/app/javascript/flavours/glitch/components/column.js b/app/javascript/flavours/glitch/components/column.js
index cf0e6d5e40..47293ef18e 100644
--- a/app/javascript/flavours/glitch/components/column.js
+++ b/app/javascript/flavours/glitch/components/column.js
@@ -29,11 +29,11 @@ export default class Column extends React.PureComponent {
}
this._interruptScrollAnimation();
- }
+ };
setRef = c => {
this.node = c;
- }
+ };
componentDidMount () {
if (this.props.bindToDocument) {
diff --git a/app/javascript/flavours/glitch/components/column_back_button.js b/app/javascript/flavours/glitch/components/column_back_button.js
index 05688f867d..e9e2615cbb 100644
--- a/app/javascript/flavours/glitch/components/column_back_button.js
+++ b/app/javascript/flavours/glitch/components/column_back_button.js
@@ -26,7 +26,7 @@ export default class ColumnBackButton extends React.PureComponent {
} else {
this.context.router.history.push('/');
}
- }
+ };
render () {
const { multiColumn } = this.props;
diff --git a/app/javascript/flavours/glitch/components/column_back_button_slim.js b/app/javascript/flavours/glitch/components/column_back_button_slim.js
index faa0c23a82..b43d85b3b0 100644
--- a/app/javascript/flavours/glitch/components/column_back_button_slim.js
+++ b/app/javascript/flavours/glitch/components/column_back_button_slim.js
@@ -21,7 +21,7 @@ export default class ColumnBackButtonSlim extends React.PureComponent {
} else {
this.context.router.history.push('/');
}
- }
+ };
render () {
return (
diff --git a/app/javascript/flavours/glitch/components/column_header.js b/app/javascript/flavours/glitch/components/column_header.js
index 0f89b3a97b..3790960ddf 100644
--- a/app/javascript/flavours/glitch/components/column_header.js
+++ b/app/javascript/flavours/glitch/components/column_header.js
@@ -55,39 +55,39 @@ class ColumnHeader extends React.PureComponent {
} else {
this.context.router.history.push('/');
}
- }
+ };
handleToggleClick = (e) => {
e.stopPropagation();
this.setState({ collapsed: !this.state.collapsed, animating: true });
- }
+ };
handleTitleClick = () => {
this.props.onClick?.();
- }
+ };
handleMoveLeft = () => {
this.props.onMove(-1);
- }
+ };
handleMoveRight = () => {
this.props.onMove(1);
- }
+ };
handleBackClick = (event) => {
this.historyBack(event.shiftKey);
- }
+ };
handleTransitionEnd = () => {
this.setState({ animating: false });
- }
+ };
handlePin = () => {
if (!this.props.pinned) {
this.historyBack();
}
this.props.onPin();
- }
+ };
render () {
const { title, icon, active, children, pinned, multiColumn, extraButton, showBackButton, intl: { formatMessage }, placeholder, appendContent, collapseIssues } = this.props;
diff --git a/app/javascript/flavours/glitch/components/dismissable_banner.js b/app/javascript/flavours/glitch/components/dismissable_banner.js
index ff52a619d2..c4968ac3c2 100644
--- a/app/javascript/flavours/glitch/components/dismissable_banner.js
+++ b/app/javascript/flavours/glitch/components/dismissable_banner.js
@@ -24,7 +24,7 @@ class DismissableBanner extends React.PureComponent {
handleDismiss = () => {
const { id } = this.props;
this.setState({ visible: false }, () => bannerSettings.set(id, true));
- }
+ };
render () {
const { visible } = this.state;
diff --git a/app/javascript/flavours/glitch/components/display_name.js b/app/javascript/flavours/glitch/components/display_name.js
index 1c22975785..19f63ec60c 100644
--- a/app/javascript/flavours/glitch/components/display_name.js
+++ b/app/javascript/flavours/glitch/components/display_name.js
@@ -27,7 +27,7 @@ export default class DisplayName extends React.PureComponent {
let emoji = emojis[i];
emoji.src = emoji.getAttribute('data-original');
}
- }
+ };
handleMouseLeave = ({ currentTarget }) => {
if (autoPlayGif) {
@@ -40,7 +40,7 @@ export default class DisplayName extends React.PureComponent {
let emoji = emojis[i];
emoji.src = emoji.getAttribute('data-static');
}
- }
+ };
render() {
const { account, className, inline, localDomain, others, onAccountClick } = this.props;
@@ -74,7 +74,7 @@ export default class DisplayName extends React.PureComponent {
)).reduce((prev, cur) => [prev, ', ', cur]);
if (others.size - 2 > 0) {
- displayName.push(` +${others.size - 2}`);
+ displayName.push(` +${others.size - 2}`);
}
suffix = (
diff --git a/app/javascript/flavours/glitch/components/domain.js b/app/javascript/flavours/glitch/components/domain.js
index 697065d874..e09fa45910 100644
--- a/app/javascript/flavours/glitch/components/domain.js
+++ b/app/javascript/flavours/glitch/components/domain.js
@@ -19,7 +19,7 @@ class Account extends ImmutablePureComponent {
handleDomainUnblock = () => {
this.props.onUnblockDomain(this.props.domain);
- }
+ };
render () {
const { domain, intl } = this.props;
diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.js b/app/javascript/flavours/glitch/components/dropdown_menu.js
index 7c70f750fd..f4b6e059fc 100644
--- a/app/javascript/flavours/glitch/components/dropdown_menu.js
+++ b/app/javascript/flavours/glitch/components/dropdown_menu.js
@@ -36,7 +36,7 @@ class DropdownMenu extends React.PureComponent {
if (this.node && !this.node.contains(e.target)) {
this.props.onClose();
}
- }
+ };
componentDidMount () {
document.addEventListener('click', this.handleDocumentClick, false);
@@ -56,11 +56,11 @@ class DropdownMenu extends React.PureComponent {
setRef = c => {
this.node = c;
- }
+ };
setFocusRef = c => {
this.focusedItem = c;
- }
+ };
handleKeyDown = e => {
const items = Array.from(this.node.querySelectorAll('a, button'));
@@ -97,18 +97,18 @@ class DropdownMenu extends React.PureComponent {
e.preventDefault();
e.stopPropagation();
}
- }
+ };
handleItemKeyPress = e => {
if (e.key === 'Enter' || e.key === ' ') {
this.handleClick(e);
}
- }
+ };
handleClick = e => {
const { onItemClick } = this.props;
onItemClick(e);
- }
+ };
renderItem = (option, i) => {
if (option === null) {
@@ -124,7 +124,7 @@ class DropdownMenu extends React.PureComponent {
);
- }
+ };
render () {
const { items, scrollable, renderHeader, loading } = this.props;
@@ -194,7 +194,7 @@ export default class Dropdown extends React.PureComponent {
} else {
this.props.onOpen(this.state.id, this.handleItemClick, type !== 'click');
}
- }
+ };
handleClose = () => {
if (this.activeElement) {
@@ -202,13 +202,13 @@ export default class Dropdown extends React.PureComponent {
this.activeElement = null;
}
this.props.onClose(this.state.id);
- }
+ };
handleMouseDown = () => {
if (!this.state.open) {
this.activeElement = document.activeElement;
}
- }
+ };
handleButtonKeyDown = (e) => {
switch(e.key) {
@@ -217,7 +217,7 @@ export default class Dropdown extends React.PureComponent {
this.handleMouseDown();
break;
}
- }
+ };
handleKeyPress = (e) => {
switch(e.key) {
@@ -228,7 +228,7 @@ export default class Dropdown extends React.PureComponent {
e.preventDefault();
break;
}
- }
+ };
handleItemClick = e => {
const { onItemClick } = this.props;
@@ -247,25 +247,25 @@ export default class Dropdown extends React.PureComponent {
e.preventDefault();
this.context.router.history.push(item.to);
}
- }
+ };
setTargetRef = c => {
this.target = c;
- }
+ };
findTarget = () => {
return this.target;
- }
+ };
componentWillUnmount = () => {
if (this.state.id === this.props.openDropdownId) {
this.handleClose();
}
- }
+ };
close = () => {
this.handleClose();
- }
+ };
render () {
const {
diff --git a/app/javascript/flavours/glitch/components/edited_timestamp/index.js b/app/javascript/flavours/glitch/components/edited_timestamp/index.js
index 9648133aff..c973bda58f 100644
--- a/app/javascript/flavours/glitch/components/edited_timestamp/index.js
+++ b/app/javascript/flavours/glitch/components/edited_timestamp/index.js
@@ -36,7 +36,7 @@ class EditedTimestamp extends React.PureComponent {
return (
);
- }
+ };
renderItem = (item, index, { onClick, onKeyPress }) => {
const formattedDate = ;
@@ -53,7 +53,7 @@ class EditedTimestamp extends React.PureComponent {
);
- }
+ };
render () {
const { timestamp, intl, statusId } = this.props;
diff --git a/app/javascript/flavours/glitch/components/error_boundary.js b/app/javascript/flavours/glitch/components/error_boundary.js
index e0ca3e2b05..8518dfc866 100644
--- a/app/javascript/flavours/glitch/components/error_boundary.js
+++ b/app/javascript/flavours/glitch/components/error_boundary.js
@@ -18,7 +18,7 @@ export default class ErrorBoundary extends React.PureComponent {
stackTrace: undefined,
mappedStackTrace: undefined,
componentStack: undefined,
- }
+ };
componentDidCatch(error, info) {
this.setState({
diff --git a/app/javascript/flavours/glitch/components/gifv.js b/app/javascript/flavours/glitch/components/gifv.js
index b775e52005..1f0f99b464 100644
--- a/app/javascript/flavours/glitch/components/gifv.js
+++ b/app/javascript/flavours/glitch/components/gifv.js
@@ -17,7 +17,7 @@ export default class GIFV extends React.PureComponent {
handleLoadedData = () => {
this.setState({ loading: false });
- }
+ };
componentWillReceiveProps (nextProps) {
if (nextProps.src !== this.props.src) {
@@ -32,7 +32,7 @@ export default class GIFV extends React.PureComponent {
e.stopPropagation();
onClick();
}
- }
+ };
render () {
const { src, width, height, alt } = this.props;
diff --git a/app/javascript/flavours/glitch/components/icon_button.js b/app/javascript/flavours/glitch/components/icon_button.js
index 2485f0f480..10d7926be5 100644
--- a/app/javascript/flavours/glitch/components/icon_button.js
+++ b/app/javascript/flavours/glitch/components/icon_button.js
@@ -46,7 +46,7 @@ export default class IconButton extends React.PureComponent {
state = {
activate: false,
deactivate: false,
- }
+ };
componentWillReceiveProps (nextProps) {
if (!nextProps.animate) return;
@@ -64,25 +64,25 @@ export default class IconButton extends React.PureComponent {
if (!this.props.disabled) {
this.props.onClick(e);
}
- }
+ };
handleKeyPress = (e) => {
if (this.props.onKeyPress && !this.props.disabled) {
this.props.onKeyPress(e);
}
- }
+ };
handleMouseDown = (e) => {
if (!this.props.disabled && this.props.onMouseDown) {
this.props.onMouseDown(e);
}
- }
+ };
handleKeyDown = (e) => {
if (!this.props.disabled && this.props.onKeyDown) {
this.props.onKeyDown(e);
}
- }
+ };
render () {
// Hack required for some icons which have an overriden size
diff --git a/app/javascript/flavours/glitch/components/intersection_observer_article.js b/app/javascript/flavours/glitch/components/intersection_observer_article.js
index b28e44e4c6..77cd663587 100644
--- a/app/javascript/flavours/glitch/components/intersection_observer_article.js
+++ b/app/javascript/flavours/glitch/components/intersection_observer_article.js
@@ -21,7 +21,7 @@ export default class IntersectionObserverArticle extends React.Component {
state = {
isHidden: false, // set to true in requestIdleCallback to trigger un-render
- }
+ };
shouldComponentUpdate (nextProps, nextState) {
const isUnrendered = !this.state.isIntersecting && (this.state.isHidden || this.props.cachedHeight);
@@ -63,7 +63,7 @@ export default class IntersectionObserverArticle extends React.Component {
scheduleIdleTask(this.calculateHeight);
this.setState(this.updateStateAfterIntersection);
- }
+ };
updateStateAfterIntersection = (prevState) => {
if (prevState.isIntersecting !== false && !this.entry.isIntersecting) {
@@ -73,7 +73,7 @@ export default class IntersectionObserverArticle extends React.Component {
isIntersecting: this.entry.isIntersecting,
isHidden: false,
};
- }
+ };
calculateHeight = () => {
const { onHeightChange, saveHeightKey, id } = this.props;
@@ -84,7 +84,7 @@ export default class IntersectionObserverArticle extends React.Component {
if (onHeightChange && saveHeightKey) {
onHeightChange(saveHeightKey, id, this.height);
}
- }
+ };
hideIfNotIntersecting = () => {
if (!this.componentMounted) {
@@ -96,11 +96,11 @@ export default class IntersectionObserverArticle extends React.Component {
// this is to save DOM nodes and avoid using up too much memory.
// See: https://github.com/mastodon/mastodon/issues/2900
this.setState((prevState) => ({ isHidden: !prevState.isIntersecting }));
- }
+ };
handleRef = (node) => {
this.node = node;
- }
+ };
render () {
const { children, id, index, listLength, cachedHeight } = this.props;
@@ -121,8 +121,9 @@ export default class IntersectionObserverArticle extends React.Component {
aria-setsize={listLength}
data-id={id}
tabIndex='0'
- style={style}>
- {children && React.cloneElement(children, { hidden: !isIntersecting && (isHidden || !!cachedHeight) })}
+ style={style}
+ >
+ {children && React.cloneElement(children, { hidden: !isIntersecting && (isHidden || !!cachedHeight) })}
);
}
diff --git a/app/javascript/flavours/glitch/components/load_gap.js b/app/javascript/flavours/glitch/components/load_gap.js
index fe3f60a585..6ed9a38c63 100644
--- a/app/javascript/flavours/glitch/components/load_gap.js
+++ b/app/javascript/flavours/glitch/components/load_gap.js
@@ -19,7 +19,7 @@ class LoadGap extends React.PureComponent {
handleClick = () => {
this.props.onClick(this.props.maxId);
- }
+ };
render () {
const { disabled, intl } = this.props;
diff --git a/app/javascript/flavours/glitch/components/load_more.js b/app/javascript/flavours/glitch/components/load_more.js
index 389c3e1e11..ab9428e35a 100644
--- a/app/javascript/flavours/glitch/components/load_more.js
+++ b/app/javascript/flavours/glitch/components/load_more.js
@@ -8,11 +8,11 @@ export default class LoadMore extends React.PureComponent {
onClick: PropTypes.func,
disabled: PropTypes.bool,
visible: PropTypes.bool,
- }
+ };
static defaultProps = {
visible: true,
- }
+ };
render() {
const { disabled, visible } = this.props;
diff --git a/app/javascript/flavours/glitch/components/load_pending.js b/app/javascript/flavours/glitch/components/load_pending.js
index 7e27024036..a75259146a 100644
--- a/app/javascript/flavours/glitch/components/load_pending.js
+++ b/app/javascript/flavours/glitch/components/load_pending.js
@@ -7,7 +7,7 @@ export default class LoadPending extends React.PureComponent {
static propTypes = {
onClick: PropTypes.func,
count: PropTypes.number,
- }
+ };
render() {
const { count } = this.props;
diff --git a/app/javascript/flavours/glitch/components/media_attachments.js b/app/javascript/flavours/glitch/components/media_attachments.js
index a517fcf300..33f01bb5a0 100644
--- a/app/javascript/flavours/glitch/components/media_attachments.js
+++ b/app/javascript/flavours/glitch/components/media_attachments.js
@@ -30,7 +30,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
return (
);
- }
+ };
renderLoadingVideoPlayer = () => {
const { height, width } = this.props;
@@ -38,7 +38,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
return (
);
- }
+ };
renderLoadingAudioPlayer = () => {
const { height, width } = this.props;
@@ -46,7 +46,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
return (
);
- }
+ };
render () {
const { status, width, height, revealed } = this.props;
diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js
index 23e279589a..c11ac46c24 100644
--- a/app/javascript/flavours/glitch/components/media_gallery.js
+++ b/app/javascript/flavours/glitch/components/media_gallery.js
@@ -60,14 +60,14 @@ class Item extends React.PureComponent {
if (this.hoverToPlay()) {
e.target.play();
}
- }
+ };
handleMouseLeave = (e) => {
if (this.hoverToPlay()) {
e.target.pause();
e.target.currentTime = 0;
}
- }
+ };
getAutoPlay() {
return this.props.autoplay || autoPlayGif;
@@ -91,11 +91,11 @@ class Item extends React.PureComponent {
}
e.stopPropagation();
- }
+ };
handleImageLoad = () => {
this.setState({ loaded: true });
- }
+ };
render () {
const { attachment, index, size, standalone, letterbox, displayWidth, visible } = this.props;
@@ -307,11 +307,11 @@ class MediaGallery extends React.PureComponent {
} else {
this.setState({ visible: !this.state.visible });
}
- }
+ };
handleClick = (index) => {
this.props.onOpenMedia(this.props.media, index);
- }
+ };
handleRef = (node) => {
this.node = node;
@@ -319,11 +319,11 @@ class MediaGallery extends React.PureComponent {
if (this.node) {
this._setDimensions();
}
- }
+ };
_setDimensions () {
const width = this.node.offsetWidth;
-
+
if (width && width != this.state.width) {
// offsetWidth triggers a layout, so only calculate when we need to
if (this.props.cacheWidth) {
@@ -360,7 +360,7 @@ class MediaGallery extends React.PureComponent {
} else if (width) {
style.height = width / (16/9);
} else {
- return ();
+ return ();
}
if (this.isStandaloneEligible()) {
diff --git a/app/javascript/flavours/glitch/components/modal_root.js b/app/javascript/flavours/glitch/components/modal_root.js
index 056277447a..5a5563e873 100644
--- a/app/javascript/flavours/glitch/components/modal_root.js
+++ b/app/javascript/flavours/glitch/components/modal_root.js
@@ -5,6 +5,7 @@ import { createBrowserHistory } from 'history';
import { multiply } from 'color-blend';
export default class ModalRoot extends React.PureComponent {
+
static contextTypes = {
router: PropTypes.object,
};
@@ -28,7 +29,7 @@ export default class ModalRoot extends React.PureComponent {
&& !!this.props.children && !this.props.noEsc) {
this.props.onClose();
}
- }
+ };
handleKeyDown = (e) => {
if (e.key === 'Tab') {
@@ -49,7 +50,7 @@ export default class ModalRoot extends React.PureComponent {
e.preventDefault();
}
}
- }
+ };
componentDidMount () {
window.addEventListener('keyup', this.handleKeyUp, false);
@@ -125,11 +126,11 @@ export default class ModalRoot extends React.PureComponent {
getSiblings = () => {
return Array(...this.node.parentElement.childNodes).filter(node => node !== this.node);
- }
+ };
setRef = ref => {
this.node = ref;
- }
+ };
render () {
const { children, onClose } = this.props;
diff --git a/app/javascript/flavours/glitch/components/permalink.js b/app/javascript/flavours/glitch/components/permalink.js
index 718b021150..b09b17eeb4 100644
--- a/app/javascript/flavours/glitch/components/permalink.js
+++ b/app/javascript/flavours/glitch/components/permalink.js
@@ -24,12 +24,12 @@ export default class Permalink extends React.PureComponent {
if (this.context.router) {
e.preventDefault();
- let state = {...this.context.router.history.location.state};
+ let state = { ...this.context.router.history.location.state };
state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;
this.context.router.history.push(this.props.to, state);
}
}
- }
+ };
render () {
const {
diff --git a/app/javascript/flavours/glitch/components/picture_in_picture_placeholder.js b/app/javascript/flavours/glitch/components/picture_in_picture_placeholder.js
index 01dce0a383..8bfdf343cf 100644
--- a/app/javascript/flavours/glitch/components/picture_in_picture_placeholder.js
+++ b/app/javascript/flavours/glitch/components/picture_in_picture_placeholder.js
@@ -22,7 +22,7 @@ class PictureInPicturePlaceholder extends React.PureComponent {
handleClick = () => {
const { dispatch } = this.props;
dispatch(removePictureInPicture());
- }
+ };
setRef = c => {
this.node = c;
@@ -30,7 +30,7 @@ class PictureInPicturePlaceholder extends React.PureComponent {
if (this.node) {
this._setDimensions();
}
- }
+ };
_setDimensions () {
const width = this.node.offsetWidth;
diff --git a/app/javascript/flavours/glitch/components/poll.js b/app/javascript/flavours/glitch/components/poll.js
index da65cd2415..53ece560e7 100644
--- a/app/javascript/flavours/glitch/components/poll.js
+++ b/app/javascript/flavours/glitch/components/poll.js
@@ -95,7 +95,7 @@ class Poll extends ImmutablePureComponent {
tmp[value] = true;
this.setState({ selected: tmp });
}
- }
+ };
handleOptionChange = ({ target: { value } }) => {
this._toggleOption(value);
@@ -107,7 +107,7 @@ class Poll extends ImmutablePureComponent {
e.stopPropagation();
e.preventDefault();
}
- }
+ };
handleVote = () => {
if (this.props.disabled) {
diff --git a/app/javascript/flavours/glitch/components/scrollable_list.js b/app/javascript/flavours/glitch/components/scrollable_list.js
index 8eb2b66d43..ae1ba3037a 100644
--- a/app/javascript/flavours/glitch/components/scrollable_list.js
+++ b/app/javascript/flavours/glitch/components/scrollable_list.js
@@ -137,7 +137,7 @@ class ScrollableList extends PureComponent {
}
this.mouseMovedRecently = false;
this.scrollToTopOnMouseIdle = false;
- }
+ };
componentDidMount () {
this.attachScrollListener();
@@ -154,29 +154,29 @@ class ScrollableList extends PureComponent {
} else {
return null;
}
- }
+ };
getScrollTop = () => {
return this.props.bindToDocument ? document.scrollingElement.scrollTop : this.node.scrollTop;
- }
+ };
getScrollHeight = () => {
return this.props.bindToDocument ? document.scrollingElement.scrollHeight : this.node.scrollHeight;
- }
+ };
getClientHeight = () => {
return this.props.bindToDocument ? document.scrollingElement.clientHeight : this.node.clientHeight;
- }
+ };
updateScrollBottom = (snapshot) => {
const newScrollTop = this.getScrollHeight() - snapshot;
this.setScrollTop(newScrollTop);
- }
+ };
cacheMediaWidth = (width) => {
if (width && this.state.cachedMediaWidth != width) this.setState({ cachedMediaWidth: width });
- }
+ };
getSnapshotBeforeUpdate (prevProps, prevState) {
const someItemInserted = React.Children.count(prevProps.children) > 0 &&
@@ -208,7 +208,7 @@ class ScrollableList extends PureComponent {
onFullScreenChange = () => {
this.setState({ fullscreen: isFullscreen() });
- }
+ };
attachIntersectionObserver () {
this.intersectionObserverWrapper.connect({
@@ -256,12 +256,12 @@ class ScrollableList extends PureComponent {
setRef = (c) => {
this.node = c;
- }
+ };
handleLoadMore = e => {
e.preventDefault();
this.props.onLoadMore();
- }
+ };
handleLoadPending = e => {
e.preventDefault();
@@ -273,7 +273,7 @@ class ScrollableList extends PureComponent {
this.clearMouseIdleTimer();
this.mouseIdleTimer = setTimeout(this.handleMouseIdle, MOUSE_IDLE_DELAY);
this.mouseMovedRecently = true;
- }
+ };
render () {
const { children, scrollKey, trackScroll, showLoading, isLoading, hasMore, numPending, prepend, alwaysPrepend, append, emptyMessage, onLoadMore } = this.props;
diff --git a/app/javascript/flavours/glitch/components/setting_text.js b/app/javascript/flavours/glitch/components/setting_text.js
index 2c1b70bc34..3a21a06018 100644
--- a/app/javascript/flavours/glitch/components/setting_text.js
+++ b/app/javascript/flavours/glitch/components/setting_text.js
@@ -13,7 +13,7 @@ export default class SettingText extends React.PureComponent {
handleChange = (e) => {
this.props.onChange(this.props.settingPath, e.target.value);
- }
+ };
render () {
const { settings, settingPath, label } = this.props;
diff --git a/app/javascript/flavours/glitch/components/spoilers.js b/app/javascript/flavours/glitch/components/spoilers.js
index 8527403c16..75e4ec3a1a 100644
--- a/app/javascript/flavours/glitch/components/spoilers.js
+++ b/app/javascript/flavours/glitch/components/spoilers.js
@@ -4,6 +4,7 @@ import { FormattedMessage } from 'react-intl';
export default
class Spoilers extends React.PureComponent {
+
static propTypes = {
spoilerText: PropTypes.string,
children: PropTypes.node,
@@ -11,27 +12,27 @@ class Spoilers extends React.PureComponent {
state = {
hidden: true,
- }
+ };
handleSpoilerClick = () => {
this.setState({ hidden: !this.state.hidden });
- }
+ };
render () {
const { spoilerText, children } = this.props;
const { hidden } = this.state;
- const toggleText = hidden ?
- :
- ;
+ const toggleText = hidden ?
+ () :
+ ();
return ([
@@ -43,8 +44,9 @@ class Spoilers extends React.PureComponent {
,
{children}
-
+ ,
]);
}
+
}
diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js
index cbd8eb31cd..34880efe41 100644
--- a/app/javascript/flavours/glitch/components/status.js
+++ b/app/javascript/flavours/glitch/components/status.js
@@ -54,7 +54,7 @@ export const defaultMediaVisibility = (status, settings) => {
}
return (displayMedia !== 'hide_all' && !status.get('sensitive') || displayMedia === 'show_all');
-}
+};
export default @injectIntl
class Status extends ImmutablePureComponent {
@@ -117,7 +117,7 @@ class Status extends ImmutablePureComponent {
revealBehindCW: undefined,
showCard: false,
forceFilter: undefined,
- }
+ };
// Avoid checking props that are functions (and whose equality will always
// evaluate to false. See react-immutable-pure-component for usage.
@@ -132,14 +132,14 @@ class Status extends ImmutablePureComponent {
'expanded',
'unread',
'pictureInPicture',
- ]
+ ];
updateOnStates = [
'isExpanded',
'isCollapsed',
'showMedia',
'forceFilter',
- ]
+ ];
// If our settings have changed to disable collapsed statuses, then we
// need to make sure that we uncollapse every one. We do that by watching
@@ -302,7 +302,9 @@ class Status extends ImmutablePureComponent {
if (this.node && this.props.getScrollPosition) {
const position = this.props.getScrollPosition();
if (position !== null && this.node.offsetTop < position.top) {
- requestAnimationFrame(() => { this.props.updateScrollBottom(position.height - position.top); });
+ requestAnimationFrame(() => {
+ this.props.updateScrollBottom(position.height - position.top);
+ });
}
}
}
@@ -321,7 +323,7 @@ class Status extends ImmutablePureComponent {
} else {
this.setState({ isCollapsed: false });
}
- }
+ };
setExpansion = (value) => {
if (this.props.settings.getIn(['content_warnings', 'shared_state']) && this.props.status.get('hidden') === value) {
@@ -332,7 +334,7 @@ class Status extends ImmutablePureComponent {
if (value) {
this.setCollapsed(false);
}
- }
+ };
// `parseClick()` takes a click event and responds appropriately.
// If our status is collapsed, then clicking on it should uncollapse it.
@@ -361,17 +363,17 @@ class Status extends ImmutablePureComponent {
status.getIn(['reblog', 'id'], status.get('id'))
}`;
}
- let state = {...router.history.location.state};
+ let state = { ...router.history.location.state };
state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;
router.history.push(destination, state);
}
e.preventDefault();
}
- }
+ };
handleToggleMediaVisibility = () => {
this.setState({ showMedia: !this.state.showMedia });
- }
+ };
handleExpandedToggle = () => {
if (this.props.settings.getIn(['content_warnings', 'shared_state'])) {
@@ -384,11 +386,11 @@ class Status extends ImmutablePureComponent {
handleOpenVideo = (options) => {
const { status } = this.props;
this.props.onOpenVideo(status.get('id'), status.getIn(['media_attachments', 0]), options);
- }
+ };
handleOpenMedia = (media, index) => {
this.props.onOpenMedia(this.props.status.get('id'), media, index);
- }
+ };
handleHotkeyOpenMedia = e => {
const { status, onOpenMedia, onOpenVideo } = this.props;
@@ -403,84 +405,84 @@ class Status extends ImmutablePureComponent {
onOpenMedia(statusId, status.get('media_attachments'), 0);
}
}
- }
+ };
handleDeployPictureInPicture = (type, mediaProps) => {
const { deployPictureInPicture, status } = this.props;
deployPictureInPicture(status, type, mediaProps);
- }
+ };
handleHotkeyReply = e => {
e.preventDefault();
this.props.onReply(this.props.status, this.context.router.history);
- }
+ };
handleHotkeyFavourite = (e) => {
this.props.onFavourite(this.props.status, e);
- }
+ };
handleHotkeyBoost = e => {
this.props.onReblog(this.props.status, e);
- }
+ };
handleHotkeyBookmark = e => {
this.props.onBookmark(this.props.status, e);
- }
+ };
handleHotkeyMention = e => {
e.preventDefault();
this.props.onMention(this.props.status.get('account'), this.context.router.history);
- }
+ };
handleHotkeyOpen = () => {
- let state = {...this.context.router.history.location.state};
+ let state = { ...this.context.router.history.location.state };
state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;
const status = this.props.status;
this.context.router.history.push(`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`, state);
- }
+ };
handleHotkeyOpenProfile = () => {
- let state = {...this.context.router.history.location.state};
+ let state = { ...this.context.router.history.location.state };
state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;
this.context.router.history.push(`/@${this.props.status.getIn(['account', 'acct'])}`, state);
- }
+ };
handleHotkeyMoveUp = e => {
this.props.onMoveUp(this.props.containerId || this.props.id, e.target.getAttribute('data-featured'));
- }
+ };
handleHotkeyMoveDown = e => {
this.props.onMoveDown(this.props.containerId || this.props.id, e.target.getAttribute('data-featured'));
- }
+ };
handleHotkeyCollapse = e => {
if (!this.props.settings.getIn(['collapsed', 'enabled']))
return;
this.setCollapsed(!this.state.isCollapsed);
- }
+ };
handleHotkeyToggleSensitive = () => {
this.handleToggleMediaVisibility();
- }
+ };
handleUnfilterClick = e => {
this.setState({ forceFilter: false });
e.preventDefault();
- }
+ };
handleFilterClick = () => {
this.setState({ forceFilter: true });
- }
+ };
handleRef = c => {
this.node = c;
- }
+ };
handleTranslate = () => {
this.props.onTranslate(this.props.status);
- }
+ };
renderLoadingMediaGallery () {
return ;
diff --git a/app/javascript/flavours/glitch/components/status_action_bar.js b/app/javascript/flavours/glitch/components/status_action_bar.js
index baf61000a3..02c5442b58 100644
--- a/app/javascript/flavours/glitch/components/status_action_bar.js
+++ b/app/javascript/flavours/glitch/components/status_action_bar.js
@@ -86,7 +86,7 @@ class StatusActionBar extends ImmutablePureComponent {
'showReplyCount',
'withCounters',
'withDismiss',
- ]
+ ];
handleReplyClick = () => {
const { signedIn } = this.context.identity;
@@ -96,14 +96,14 @@ class StatusActionBar extends ImmutablePureComponent {
} else {
this.props.onInteractionModal('reply', this.props.status);
}
- }
+ };
handleShareClick = () => {
navigator.share({
text: this.props.status.get('search_index'),
url: this.props.status.get('url'),
});
- }
+ };
handleFavouriteClick = (e) => {
const { signedIn } = this.context.identity;
@@ -113,7 +113,7 @@ class StatusActionBar extends ImmutablePureComponent {
} else {
this.props.onInteractionModal('favourite', this.props.status);
}
- }
+ };
handleReblogClick = e => {
const { signedIn } = this.context.identity;
@@ -123,78 +123,78 @@ class StatusActionBar extends ImmutablePureComponent {
} else {
this.props.onInteractionModal('reblog', this.props.status);
}
- }
+ };
handleBookmarkClick = (e) => {
this.props.onBookmark(this.props.status, e);
- }
+ };
handleDeleteClick = () => {
this.props.onDelete(this.props.status, this.context.router.history);
- }
+ };
handleRedraftClick = () => {
this.props.onDelete(this.props.status, this.context.router.history, true);
- }
+ };
handleEditClick = () => {
this.props.onEdit(this.props.status, this.context.router.history);
- }
+ };
handlePinClick = () => {
this.props.onPin(this.props.status);
- }
+ };
handleMentionClick = () => {
this.props.onMention(this.props.status.get('account'), this.context.router.history);
- }
+ };
handleDirectClick = () => {
this.props.onDirect(this.props.status.get('account'), this.context.router.history);
- }
+ };
handleMuteClick = () => {
this.props.onMute(this.props.status.get('account'));
- }
+ };
handleBlockClick = () => {
this.props.onBlock(this.props.status);
- }
+ };
handleOpen = () => {
- let state = {...this.context.router.history.location.state};
+ let state = { ...this.context.router.history.location.state };
if (state.mastodonModalKey) {
this.context.router.history.replace(`/@${this.props.status.getIn(['account', 'acct'])}/${this.props.status.get('id')}`, { mastodonBackSteps: (state.mastodonBackSteps || 0) + 1 });
} else {
state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;
this.context.router.history.push(`/@${this.props.status.getIn(['account', 'acct'])}/${this.props.status.get('id')}`, state);
}
- }
+ };
handleEmbed = () => {
this.props.onEmbed(this.props.status);
- }
+ };
handleReport = () => {
this.props.onReport(this.props.status);
- }
+ };
handleConversationMuteClick = () => {
this.props.onMuteConversation(this.props.status);
- }
+ };
handleCopy = () => {
const url = this.props.status.get('url');
navigator.clipboard.writeText(url);
- }
+ };
handleHideClick = () => {
this.props.onFilter();
- }
+ };
handleFilterClick = () => {
this.props.onAddFilter(this.props.status);
- }
+ };
render () {
const { status, intl, withDismiss, withCounters, showReplyCount, scrollKey } = this.props;
diff --git a/app/javascript/flavours/glitch/components/status_content.js b/app/javascript/flavours/glitch/components/status_content.js
index c59f42220c..790a5c6591 100644
--- a/app/javascript/flavours/glitch/components/status_content.js
+++ b/app/javascript/flavours/glitch/components/status_content.js
@@ -12,7 +12,7 @@ const textMatchesTarget = (text, origin, host) => {
return (text === origin || text === host
|| text.startsWith(origin + '/') || text.startsWith(host + '/')
|| 'www.' + text === host || ('www.' + text).startsWith(host + '/'));
-}
+};
const isLinkMisleading = (link) => {
let linkTextParts = [];
@@ -168,8 +168,8 @@ class StatusContent extends React.PureComponent {
link.setAttribute('title', link.href);
link.classList.add('unhandled-link');
- link.setAttribute('target', '_blank');
- link.setAttribute('rel', 'noopener nofollow noreferrer');
+ link.setAttribute('target', '_blank');
+ link.setAttribute('rel', 'noopener nofollow noreferrer');
try {
if (tagLinks && isLinkMisleading(link)) {
@@ -210,7 +210,7 @@ class StatusContent extends React.PureComponent {
let emoji = emojis[i];
emoji.src = emoji.getAttribute('data-original');
}
- }
+ };
handleMouseLeave = ({ currentTarget }) => {
if (autoPlayGif) {
@@ -223,7 +223,7 @@ class StatusContent extends React.PureComponent {
let emoji = emojis[i];
emoji.src = emoji.getAttribute('data-static');
}
- }
+ };
componentDidMount () {
this._updateStatusLinks();
@@ -238,13 +238,13 @@ class StatusContent extends React.PureComponent {
if (this.props.collapsed) {
if (this.props.parseClick) this.props.parseClick(e);
}
- }
+ };
onMentionClick = (mention, e) => {
if (this.props.parseClick) {
this.props.parseClick(e, `/@${mention.get('acct')}`);
}
- }
+ };
onHashtagClick = (hashtag, e) => {
hashtag = hashtag.replace(/^#/, '');
@@ -252,11 +252,11 @@ class StatusContent extends React.PureComponent {
if (this.props.parseClick) {
this.props.parseClick(e, `/tags/${hashtag}`);
}
- }
+ };
handleMouseDown = (e) => {
this.startXY = [e.clientX, e.clientY];
- }
+ };
handleMouseUp = (e) => {
const { parseClick, disabled } = this.props;
@@ -281,7 +281,7 @@ class StatusContent extends React.PureComponent {
}
this.startXY = null;
- }
+ };
handleSpoilerClick = (e) => {
e.preventDefault();
@@ -291,15 +291,15 @@ class StatusContent extends React.PureComponent {
} else {
this.setState({ hidden: !this.state.hidden });
}
- }
+ };
handleTranslate = () => {
this.props.onTranslate();
- }
+ };
setContentsRef = (c) => {
this.contentsNode = c;
- }
+ };
render () {
const {
diff --git a/app/javascript/flavours/glitch/components/status_header.js b/app/javascript/flavours/glitch/components/status_header.js
index 990dea5362..21d8b42128 100644
--- a/app/javascript/flavours/glitch/components/status_header.js
+++ b/app/javascript/flavours/glitch/components/status_header.js
@@ -21,12 +21,12 @@ export default class StatusHeader extends React.PureComponent {
handleClick = (acct, e) => {
const { parseClick } = this.props;
parseClick(e, `/@${acct}`);
- }
+ };
handleAccountClick = (e) => {
const { status } = this.props;
this.handleClick(status.getIn(['account', 'acct']), e);
- }
+ };
// Rendering.
render () {
diff --git a/app/javascript/flavours/glitch/components/status_icons.js b/app/javascript/flavours/glitch/components/status_icons.js
index 71ffb2e569..c4cb42741b 100644
--- a/app/javascript/flavours/glitch/components/status_icons.js
+++ b/app/javascript/flavours/glitch/components/status_icons.js
@@ -60,22 +60,22 @@ class StatusIcons extends React.PureComponent {
setCollapsed(!collapsed);
e.preventDefault();
}
- }
+ };
mediaIconTitleText (mediaIcon) {
const { intl } = this.props;
switch (mediaIcon) {
- case 'link':
- return intl.formatMessage(messages.previewCard);
- case 'picture-o':
- return intl.formatMessage(messages.pictures);
- case 'tasks':
- return intl.formatMessage(messages.poll);
- case 'video-camera':
- return intl.formatMessage(messages.video);
- case 'music':
- return intl.formatMessage(messages.audio);
+ case 'link':
+ return intl.formatMessage(messages.previewCard);
+ case 'picture-o':
+ return intl.formatMessage(messages.pictures);
+ case 'tasks':
+ return intl.formatMessage(messages.poll);
+ case 'video-camera':
+ return intl.formatMessage(messages.video);
+ case 'music':
+ return intl.formatMessage(messages.audio);
}
}
diff --git a/app/javascript/flavours/glitch/components/status_list.js b/app/javascript/flavours/glitch/components/status_list.js
index 0d843a27dd..a9c06f6932 100644
--- a/app/javascript/flavours/glitch/components/status_list.js
+++ b/app/javascript/flavours/glitch/components/status_list.js
@@ -35,7 +35,7 @@ export default class StatusList extends ImmutablePureComponent {
getFeaturedStatusCount = () => {
return this.props.featuredStatusIds ? this.props.featuredStatusIds.size : 0;
- }
+ };
getCurrentStatusIndex = (id, featured) => {
if (featured) {
@@ -43,21 +43,21 @@ export default class StatusList extends ImmutablePureComponent {
} else {
return this.props.statusIds.indexOf(id) + this.getFeaturedStatusCount();
}
- }
+ };
handleMoveUp = (id, featured) => {
const elementIndex = this.getCurrentStatusIndex(id, featured) - 1;
this._selectChild(elementIndex, true);
- }
+ };
handleMoveDown = (id, featured) => {
const elementIndex = this.getCurrentStatusIndex(id, featured) + 1;
this._selectChild(elementIndex, false);
- }
+ };
handleLoadOlder = debounce(() => {
this.props.onLoadMore(this.props.statusIds.size > 0 ? this.props.statusIds.last() : undefined);
- }, 300, { leading: true })
+ }, 300, { leading: true });
_selectChild (index, align_top) {
const container = this.node.node;
@@ -75,7 +75,7 @@ export default class StatusList extends ImmutablePureComponent {
setRef = c => {
this.node = c;
- }
+ };
render () {
const { statusIds, featuredStatusIds, onLoadMore, timelineId, ...other } = this.props;
diff --git a/app/javascript/flavours/glitch/components/status_prepend.js b/app/javascript/flavours/glitch/components/status_prepend.js
index f825330621..8c4343b040 100644
--- a/app/javascript/flavours/glitch/components/status_prepend.js
+++ b/app/javascript/flavours/glitch/components/status_prepend.js
@@ -18,7 +18,7 @@ export default class StatusPrepend extends React.PureComponent {
handleClick = (e) => {
const { account, parseClick } = this.props;
parseClick(e, `/@${account.get('acct')}`);
- }
+ };
Message = () => {
const { type, account } = this.props;
@@ -98,7 +98,7 @@ export default class StatusPrepend extends React.PureComponent {
);
}
return null;
- }
+ };
render () {
const { Message } = this;
@@ -126,7 +126,7 @@ export default class StatusPrepend extends React.PureComponent {
case 'update':
iconId = 'pencil';
break;
- };
+ }
return !type ? null : (