[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:
@@ -1,27 +1,27 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import {
|
||||
changeComposeAdvancedOption,
|
||||
changeComposeContentType,
|
||||
addPoll,
|
||||
removePoll,
|
||||
} from 'flavours/glitch/actions/compose';
|
||||
import { openModal } from 'flavours/glitch/actions/modal';
|
||||
} from "flavours/glitch/actions/compose";
|
||||
import { openModal } from "flavours/glitch/actions/modal";
|
||||
|
||||
import Options from '../components/options';
|
||||
import Options from "../components/options";
|
||||
|
||||
function mapStateToProps (state) {
|
||||
const poll = state.getIn(['compose', 'poll']);
|
||||
const media = state.getIn(['compose', 'media_attachments']);
|
||||
const pending_media = state.getIn(['compose', 'pending_media_attachments']);
|
||||
const poll = state.getIn(["compose", "poll"]);
|
||||
const media = state.getIn(["compose", "media_attachments"]);
|
||||
const pending_media = state.getIn(["compose", "pending_media_attachments"]);
|
||||
return {
|
||||
acceptContentTypes: state.getIn(['media_attachments', 'accept_content_types']).toArray().join(','),
|
||||
resetFileKey: state.getIn(['compose', 'resetFileKey']),
|
||||
acceptContentTypes: state.getIn(["media_attachments", "accept_content_types"]).toArray().join(","),
|
||||
resetFileKey: state.getIn(["compose", "resetFileKey"]),
|
||||
hasPoll: !!poll,
|
||||
allowMedia: !poll && (media ? media.size + pending_media < 4 && !media.some(item => ['video', 'audio'].includes(item.get('type'))) : pending_media < 4),
|
||||
allowMedia: !poll && (media ? media.size + pending_media < 4 && !media.some(item => ["video", "audio"].includes(item.get("type"))) : pending_media < 4),
|
||||
allowPoll: !(media && !!media.size),
|
||||
showContentTypeChoice: state.getIn(['local_settings', 'show_content_type_choice']),
|
||||
contentType: state.getIn(['compose', 'content_type']),
|
||||
showContentTypeChoice: state.getIn(["local_settings", "show_content_type_choice"]),
|
||||
contentType: state.getIn(["compose", "content_type"]),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onTogglePoll() {
|
||||
dispatch((_, getState) => {
|
||||
if (getState().getIn(['compose', 'poll'])) {
|
||||
if (getState().getIn(["compose", "poll"])) {
|
||||
dispatch(removePoll());
|
||||
} else {
|
||||
dispatch(addPoll());
|
||||
@@ -47,7 +47,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onDoodleOpen() {
|
||||
dispatch(openModal({
|
||||
modalType: 'DOODLE',
|
||||
modalType: "DOODLE",
|
||||
modalProps: { noEsc: true, noClose: true },
|
||||
}));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user