[build] upgrade eslint to 9.37.0 (#88)
Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88 Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org> Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
This commit is contained in:
+11
-11
@@ -1,15 +1,15 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from "prop-types";
|
||||
import { PureComponent } from "react";
|
||||
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from "react-intl";
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePropTypes from "react-immutable-proptypes";
|
||||
|
||||
import SettingText from 'flavours/glitch/components/setting_text';
|
||||
import SettingToggle from 'flavours/glitch/features/notifications/components/setting_toggle';
|
||||
import SettingText from "flavours/glitch/components/setting_text";
|
||||
import SettingToggle from "flavours/glitch/features/notifications/components/setting_toggle";
|
||||
|
||||
const messages = defineMessages({
|
||||
filter_regex: { id: 'home.column_settings.filter_regex', defaultMessage: 'Filter out by regular expressions' },
|
||||
filter_regex: { id: "home.column_settings.filter_regex", defaultMessage: "Filter out by regular expressions" },
|
||||
});
|
||||
|
||||
class ColumnSettings extends PureComponent {
|
||||
@@ -27,15 +27,15 @@ class ColumnSettings extends PureComponent {
|
||||
return (
|
||||
<div>
|
||||
<div className='column-settings__row'>
|
||||
<SettingToggle settings={settings} settingPath={['other', 'onlyMedia']} onChange={onChange} label={<FormattedMessage id='community.column_settings.media_only' defaultMessage='Media only' />} />
|
||||
<SettingToggle settings={settings} settingPath={['other', 'onlyRemote']} onChange={onChange} label={<FormattedMessage id='community.column_settings.remote_only' defaultMessage='Remote only' />} />
|
||||
{!settings.getIn(['other', 'onlyRemote']) && <SettingToggle settings={settings} settingPath={['other', 'allowLocalOnly']} onChange={onChange} label={<FormattedMessage id='community.column_settings.allow_local_only' defaultMessage='Show local-only toots' />} />}
|
||||
<SettingToggle settings={settings} settingPath={["other", "onlyMedia"]} onChange={onChange} label={<FormattedMessage id='community.column_settings.media_only' defaultMessage='Media only' />} />
|
||||
<SettingToggle settings={settings} settingPath={["other", "onlyRemote"]} onChange={onChange} label={<FormattedMessage id='community.column_settings.remote_only' defaultMessage='Remote only' />} />
|
||||
{!settings.getIn(["other", "onlyRemote"]) && <SettingToggle settings={settings} settingPath={["other", "allowLocalOnly"]} onChange={onChange} label={<FormattedMessage id='community.column_settings.allow_local_only' defaultMessage='Show local-only toots' />} />}
|
||||
</div>
|
||||
|
||||
<span className='column-settings__section'><FormattedMessage id='home.column_settings.advanced' defaultMessage='Advanced' /></span>
|
||||
|
||||
<div className='column-settings__row'>
|
||||
<SettingText settings={settings} settingPath={['regex', 'body']} onChange={onChange} label={intl.formatMessage(messages.filter_regex)} />
|
||||
<SettingText settings={settings} settingPath={["regex", "body"]} onChange={onChange} label={intl.formatMessage(messages.filter_regex)} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
+8
-8
@@ -1,17 +1,17 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { changeColumnParams } from 'flavours/glitch/actions/columns';
|
||||
import { changeSetting } from 'flavours/glitch/actions/settings';
|
||||
import { changeColumnParams } from "flavours/glitch/actions/columns";
|
||||
import { changeSetting } from "flavours/glitch/actions/settings";
|
||||
|
||||
import ColumnSettings from '../components/column_settings';
|
||||
import ColumnSettings from "../components/column_settings";
|
||||
|
||||
const mapStateToProps = (state, { columnId }) => {
|
||||
const uuid = columnId;
|
||||
const columns = state.getIn(['settings', 'columns']);
|
||||
const index = columns.findIndex(c => c.get('uuid') === uuid);
|
||||
const columns = state.getIn(["settings", "columns"]);
|
||||
const index = columns.findIndex(c => c.get("uuid") === uuid);
|
||||
|
||||
return {
|
||||
settings: (uuid && index >= 0) ? columns.get(index).get('params') : state.getIn(['settings', 'public']),
|
||||
settings: (uuid && index >= 0) ? columns.get(index).get("params") : state.getIn(["settings", "public"]),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ const mapDispatchToProps = (dispatch, { columnId }) => {
|
||||
if (columnId) {
|
||||
dispatch(changeColumnParams(columnId, key, checked));
|
||||
} else {
|
||||
dispatch(changeSetting(['public', ...key], checked));
|
||||
dispatch(changeSetting(["public", ...key], checked));
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from "prop-types";
|
||||
import { PureComponent } from "react";
|
||||
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from "react-intl";
|
||||
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Helmet } from "react-helmet";
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns';
|
||||
import { connectPublicStream } from 'flavours/glitch/actions/streaming';
|
||||
import { expandPublicTimeline } from 'flavours/glitch/actions/timelines';
|
||||
import Column from 'flavours/glitch/components/column';
|
||||
import ColumnHeader from 'flavours/glitch/components/column_header';
|
||||
import { DismissableBanner } from 'flavours/glitch/components/dismissable_banner';
|
||||
import StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container';
|
||||
import { domain } from 'flavours/glitch/initial_state';
|
||||
import { addColumn, removeColumn, moveColumn } from "flavours/glitch/actions/columns";
|
||||
import { connectPublicStream } from "flavours/glitch/actions/streaming";
|
||||
import { expandPublicTimeline } from "flavours/glitch/actions/timelines";
|
||||
import Column from "flavours/glitch/components/column";
|
||||
import ColumnHeader from "flavours/glitch/components/column_header";
|
||||
import { DismissableBanner } from "flavours/glitch/components/dismissable_banner";
|
||||
import StatusListContainer from "flavours/glitch/features/ui/containers/status_list_container";
|
||||
import { domain } from "flavours/glitch/initial_state";
|
||||
|
||||
import ColumnSettingsContainer from './containers/column_settings_container';
|
||||
import ColumnSettingsContainer from "./containers/column_settings_container";
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.public', defaultMessage: 'Federated timeline' },
|
||||
title: { id: "column.public", defaultMessage: "Federated timeline" },
|
||||
});
|
||||
|
||||
const mapStateToProps = (state, { columnId }) => {
|
||||
const uuid = columnId;
|
||||
const columns = state.getIn(['settings', 'columns']);
|
||||
const index = columns.findIndex(c => c.get('uuid') === uuid);
|
||||
const onlyMedia = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyMedia']) : state.getIn(['settings', 'public', 'other', 'onlyMedia']);
|
||||
const onlyRemote = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyRemote']) : state.getIn(['settings', 'public', 'other', 'onlyRemote']);
|
||||
const allowLocalOnly = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'allowLocalOnly']) : state.getIn(['settings', 'public', 'other', 'allowLocalOnly']);
|
||||
const regex = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'regex', 'body']) : state.getIn(['settings', 'public', 'regex', 'body']);
|
||||
const timelineState = state.getIn(['timelines', `public${onlyRemote ? ':remote' : allowLocalOnly ? ':allow_local_only' : ''}${onlyMedia ? ':media' : ''}`]);
|
||||
const columns = state.getIn(["settings", "columns"]);
|
||||
const index = columns.findIndex(c => c.get("uuid") === uuid);
|
||||
const onlyMedia = (columnId && index >= 0) ? columns.get(index).getIn(["params", "other", "onlyMedia"]) : state.getIn(["settings", "public", "other", "onlyMedia"]);
|
||||
const onlyRemote = (columnId && index >= 0) ? columns.get(index).getIn(["params", "other", "onlyRemote"]) : state.getIn(["settings", "public", "other", "onlyRemote"]);
|
||||
const allowLocalOnly = (columnId && index >= 0) ? columns.get(index).getIn(["params", "other", "allowLocalOnly"]) : state.getIn(["settings", "public", "other", "allowLocalOnly"]);
|
||||
const regex = (columnId && index >= 0) ? columns.get(index).getIn(["params", "regex", "body"]) : state.getIn(["settings", "public", "regex", "body"]);
|
||||
const timelineState = state.getIn(["timelines", `public${onlyRemote ? ":remote" : allowLocalOnly ? ":allow_local_only" : ""}${onlyMedia ? ":media" : ""}`]);
|
||||
|
||||
return {
|
||||
hasUnread: !!timelineState && timelineState.get('unread') > 0,
|
||||
hasUnread: !!timelineState && timelineState.get("unread") > 0,
|
||||
onlyMedia,
|
||||
onlyRemote,
|
||||
allowLocalOnly,
|
||||
@@ -70,7 +70,7 @@ class PublicTimeline extends PureComponent {
|
||||
if (columnId) {
|
||||
dispatch(removeColumn(columnId));
|
||||
} else {
|
||||
dispatch(addColumn(onlyRemote ? 'REMOTE' : 'PUBLIC', { other: { onlyMedia, onlyRemote, allowLocalOnly } }));
|
||||
dispatch(addColumn(onlyRemote ? "REMOTE" : "PUBLIC", { other: { onlyMedia, onlyRemote, allowLocalOnly } }));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -149,7 +149,7 @@ class PublicTimeline extends PureComponent {
|
||||
|
||||
<StatusListContainer
|
||||
prepend={<DismissableBanner id='public_timeline'><FormattedMessage id='dismissable_banner.public_timeline' defaultMessage='These are the most recent public posts from people on the social web that people on {domain} follow.' values={{ domain }} /></DismissableBanner>}
|
||||
timelineId={`public${onlyRemote ? ':remote' : (allowLocalOnly ? ':allow_local_only' : '')}${onlyMedia ? ':media' : ''}`}
|
||||
timelineId={`public${onlyRemote ? ":remote" : (allowLocalOnly ? ":allow_local_only" : "")}${onlyMedia ? ":media" : ""}`}
|
||||
onLoadMore={this.handleLoadMore}
|
||||
trackScroll={!pinned}
|
||||
scrollKey={`public_timeline-${columnId}`}
|
||||
|
||||
Reference in New Issue
Block a user