[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:
+29
-29
@@ -1,35 +1,35 @@
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
import { defineMessages, injectIntl } from "react-intl";
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { showAlert } from '../../../actions/alerts';
|
||||
import { openModal } from '../../../actions/modal';
|
||||
import { setFilter, clearNotifications, requestBrowserPermission } from '../../../actions/notifications';
|
||||
import { changeAlerts as changePushNotifications } from '../../../actions/push_notifications';
|
||||
import { changeSetting } from '../../../actions/settings';
|
||||
import ColumnSettings from '../components/column_settings';
|
||||
import { showAlert } from "../../../actions/alerts";
|
||||
import { openModal } from "../../../actions/modal";
|
||||
import { setFilter, clearNotifications, requestBrowserPermission } from "../../../actions/notifications";
|
||||
import { changeAlerts as changePushNotifications } from "../../../actions/push_notifications";
|
||||
import { changeSetting } from "../../../actions/settings";
|
||||
import ColumnSettings from "../components/column_settings";
|
||||
|
||||
const messages = defineMessages({
|
||||
clearMessage: { id: 'notifications.clear_confirmation', defaultMessage: 'Are you sure you want to permanently clear all your notifications?' },
|
||||
clearConfirm: { id: 'notifications.clear', defaultMessage: 'Clear notifications' },
|
||||
permissionDenied: { id: 'notifications.permission_denied_alert', defaultMessage: 'Desktop notifications can\'t be enabled, as browser permission has been denied before' },
|
||||
clearMessage: { id: "notifications.clear_confirmation", defaultMessage: "Are you sure you want to permanently clear all your notifications?" },
|
||||
clearConfirm: { id: "notifications.clear", defaultMessage: "Clear notifications" },
|
||||
permissionDenied: { id: "notifications.permission_denied_alert", defaultMessage: "Desktop notifications can't be enabled, as browser permission has been denied before" },
|
||||
});
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
settings: state.getIn(['settings', 'notifications']),
|
||||
pushSettings: state.get('push_notifications'),
|
||||
alertsEnabled: state.getIn(['settings', 'notifications', 'alerts']).includes(true),
|
||||
browserSupport: state.getIn(['notifications', 'browserSupport']),
|
||||
browserPermission: state.getIn(['notifications', 'browserPermission']),
|
||||
settings: state.getIn(["settings", "notifications"]),
|
||||
pushSettings: state.get("push_notifications"),
|
||||
alertsEnabled: state.getIn(["settings", "notifications", "alerts"]).includes(true),
|
||||
browserSupport: state.getIn(["notifications", "browserSupport"]),
|
||||
browserPermission: state.getIn(["notifications", "browserPermission"]),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch, { intl }) => ({
|
||||
|
||||
onChange (path, checked) {
|
||||
if (path[0] === 'push') {
|
||||
if (checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
|
||||
if (path[0] === "push") {
|
||||
if (checked && typeof window.Notification !== "undefined" && Notification.permission !== "granted") {
|
||||
dispatch(requestBrowserPermission((permission) => {
|
||||
if (permission === 'granted') {
|
||||
if (permission === "granted") {
|
||||
dispatch(changePushNotifications(path.slice(1), checked));
|
||||
} else {
|
||||
dispatch(showAlert({ message: messages.permissionDenied }));
|
||||
@@ -38,29 +38,29 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
||||
} else {
|
||||
dispatch(changePushNotifications(path.slice(1), checked));
|
||||
}
|
||||
} else if (path[0] === 'quickFilter') {
|
||||
dispatch(changeSetting(['notifications', ...path], checked));
|
||||
dispatch(setFilter('all'));
|
||||
} else if (path[0] === 'alerts' && checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
|
||||
if (checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
|
||||
} else if (path[0] === "quickFilter") {
|
||||
dispatch(changeSetting(["notifications", ...path], checked));
|
||||
dispatch(setFilter("all"));
|
||||
} else if (path[0] === "alerts" && checked && typeof window.Notification !== "undefined" && Notification.permission !== "granted") {
|
||||
if (checked && typeof window.Notification !== "undefined" && Notification.permission !== "granted") {
|
||||
dispatch(requestBrowserPermission((permission) => {
|
||||
if (permission === 'granted') {
|
||||
dispatch(changeSetting(['notifications', ...path], checked));
|
||||
if (permission === "granted") {
|
||||
dispatch(changeSetting(["notifications", ...path], checked));
|
||||
} else {
|
||||
dispatch(showAlert({ message: messages.permissionDenied }));
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
dispatch(changeSetting(['notifications', ...path], checked));
|
||||
dispatch(changeSetting(["notifications", ...path], checked));
|
||||
}
|
||||
} else {
|
||||
dispatch(changeSetting(['notifications', ...path], checked));
|
||||
dispatch(changeSetting(["notifications", ...path], checked));
|
||||
}
|
||||
},
|
||||
|
||||
onClear () {
|
||||
dispatch(openModal({
|
||||
modalType: 'CONFIRM',
|
||||
modalType: "CONFIRM",
|
||||
modalProps: {
|
||||
message: intl.formatMessage(messages.clearMessage),
|
||||
confirm: intl.formatMessage(messages.clearConfirm),
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { setFilter } from '../../../actions/notifications';
|
||||
import FilterBar from '../components/filter_bar';
|
||||
import { setFilter } from "../../../actions/notifications";
|
||||
import FilterBar from "../components/filter_bar";
|
||||
|
||||
const makeMapStateToProps = state => ({
|
||||
selectedFilter: state.getIn(['settings', 'notifications', 'quickFilter', 'active']),
|
||||
advancedMode: state.getIn(['settings', 'notifications', 'quickFilter', 'advanced']),
|
||||
selectedFilter: state.getIn(["settings", "notifications", "quickFilter", "active"]),
|
||||
advancedMode: state.getIn(["settings", "notifications", "quickFilter", "advanced"]),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { authorizeFollowRequest, rejectFollowRequest } from 'mastodon/actions/accounts';
|
||||
import { makeGetAccount } from 'mastodon/selectors';
|
||||
import { authorizeFollowRequest, rejectFollowRequest } from "mastodon/actions/accounts";
|
||||
import { makeGetAccount } from "mastodon/selectors";
|
||||
|
||||
import FollowRequest from '../components/follow_request';
|
||||
import FollowRequest from "../components/follow_request";
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const getAccount = makeGetAccount();
|
||||
|
||||
+15
-15
@@ -1,20 +1,20 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { initBoostModal } from '../../../actions/boosts';
|
||||
import { mentionCompose } from '../../../actions/compose';
|
||||
import { initBoostModal } from "../../../actions/boosts";
|
||||
import { mentionCompose } from "../../../actions/compose";
|
||||
import {
|
||||
reblog,
|
||||
favourite,
|
||||
unreblog,
|
||||
unfavourite,
|
||||
} from '../../../actions/interactions';
|
||||
} from "../../../actions/interactions";
|
||||
import {
|
||||
hideStatus,
|
||||
revealStatus,
|
||||
} from '../../../actions/statuses';
|
||||
import { boostModal } from '../../../initial_state';
|
||||
import { makeGetNotification, makeGetStatus, makeGetReport } from '../../../selectors';
|
||||
import Notification from '../components/notification';
|
||||
} from "../../../actions/statuses";
|
||||
import { boostModal } from "../../../initial_state";
|
||||
import { makeGetNotification, makeGetStatus, makeGetReport } from "../../../selectors";
|
||||
import Notification from "../components/notification";
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const getNotification = makeGetNotification();
|
||||
@@ -25,8 +25,8 @@ const makeMapStateToProps = () => {
|
||||
const notification = getNotification(state, props.notification, props.accountId);
|
||||
return {
|
||||
notification: notification,
|
||||
status: notification.get('status') ? getStatus(state, { id: notification.get('status'), contextType: 'notifications' }) : null,
|
||||
report: notification.get('report') ? getReport(state, notification.get('report'), notification.getIn(['report', 'target_account', 'id'])) : null,
|
||||
status: notification.get("status") ? getStatus(state, { id: notification.get("status"), contextType: "notifications" }) : null,
|
||||
report: notification.get("report") ? getReport(state, notification.get("report"), notification.getIn(["report", "target_account", "id"])) : null,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ const mapDispatchToProps = dispatch => ({
|
||||
},
|
||||
|
||||
onReblog (status, e) {
|
||||
if (status.get('reblogged')) {
|
||||
if (status.get("reblogged")) {
|
||||
dispatch(unreblog(status));
|
||||
} else {
|
||||
if (e.shiftKey || !boostModal) {
|
||||
@@ -55,7 +55,7 @@ const mapDispatchToProps = dispatch => ({
|
||||
},
|
||||
|
||||
onFavourite (status) {
|
||||
if (status.get('favourited')) {
|
||||
if (status.get("favourited")) {
|
||||
dispatch(unfavourite(status));
|
||||
} else {
|
||||
dispatch(favourite(status));
|
||||
@@ -63,10 +63,10 @@ const mapDispatchToProps = dispatch => ({
|
||||
},
|
||||
|
||||
onToggleHidden (status) {
|
||||
if (status.get('hidden')) {
|
||||
dispatch(revealStatus(status.get('id')));
|
||||
if (status.get("hidden")) {
|
||||
dispatch(revealStatus(status.get("id")));
|
||||
} else {
|
||||
dispatch(hideStatus(status.get('id')));
|
||||
dispatch(hideStatus(status.get("id")));
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user