[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:
+4
-4
@@ -1,14 +1,14 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { makeGetReport } from 'flavours/glitch/selectors';
|
||||
import { makeGetReport } from "flavours/glitch/selectors";
|
||||
|
||||
import AdminReport from '../components/admin_report';
|
||||
import AdminReport from "../components/admin_report";
|
||||
|
||||
const mapStateToProps = (state, { notification }) => {
|
||||
const getReport = makeGetReport();
|
||||
|
||||
return {
|
||||
report: notification.get('report') ? getReport(state, notification.get('report'), notification.getIn(['report', 'target_account', 'id'])) : null,
|
||||
report: notification.get("report") ? getReport(state, notification.get("report"), notification.getIn(["report", "target_account", "id"])) : null,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+29
-29
@@ -1,36 +1,36 @@
|
||||
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 'flavours/glitch/actions/alerts';
|
||||
import { openModal } from 'flavours/glitch/actions/modal';
|
||||
import { setFilter, clearNotifications, requestBrowserPermission } from 'flavours/glitch/actions/notifications';
|
||||
import { changeAlerts as changePushNotifications } from 'flavours/glitch/actions/push_notifications';
|
||||
import { changeSetting } from 'flavours/glitch/actions/settings';
|
||||
import { showAlert } from "flavours/glitch/actions/alerts";
|
||||
import { openModal } from "flavours/glitch/actions/modal";
|
||||
import { setFilter, clearNotifications, requestBrowserPermission } from "flavours/glitch/actions/notifications";
|
||||
import { changeAlerts as changePushNotifications } from "flavours/glitch/actions/push_notifications";
|
||||
import { changeSetting } from "flavours/glitch/actions/settings";
|
||||
|
||||
import ColumnSettings from '../components/column_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(undefined, messages.permissionDenied));
|
||||
@@ -39,29 +39,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(undefined, 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),
|
||||
|
||||
+5
-5
@@ -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) => ({
|
||||
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { authorizeFollowRequest, rejectFollowRequest } from 'flavours/glitch/actions/accounts';
|
||||
import { authorizeFollowRequest, rejectFollowRequest } from "flavours/glitch/actions/accounts";
|
||||
|
||||
import FollowRequest from '../components/follow_request';
|
||||
import FollowRequest from "../components/follow_request";
|
||||
|
||||
const mapDispatchToProps = (dispatch, { account }) => ({
|
||||
onAuthorize () {
|
||||
dispatch(authorizeFollowRequest(account.get('id')));
|
||||
dispatch(authorizeFollowRequest(account.get("id")));
|
||||
},
|
||||
|
||||
onReject () {
|
||||
dispatch(rejectFollowRequest(account.get('id')));
|
||||
dispatch(rejectFollowRequest(account.get("id")));
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
// Package imports.
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
// Our imports.
|
||||
import { mentionCompose } from 'flavours/glitch/actions/compose';
|
||||
import { makeGetNotification } from 'flavours/glitch/selectors';
|
||||
import { mentionCompose } from "flavours/glitch/actions/compose";
|
||||
import { makeGetNotification } from "flavours/glitch/selectors";
|
||||
|
||||
import Notification from '../components/notification';
|
||||
import Notification from "../components/notification";
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const getNotification = makeGetNotification();
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
notification: getNotification(state, props.notification, props.accountId),
|
||||
notifCleaning: state.getIn(['notifications', 'cleaningMode']),
|
||||
notifCleaning: state.getIn(["notifications", "cleaningMode"]),
|
||||
});
|
||||
|
||||
return mapStateToProps;
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
// Package imports.
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
// Our imports.
|
||||
import { markNotificationForDelete } from 'flavours/glitch/actions/notifications';
|
||||
import { markNotificationForDelete } from "flavours/glitch/actions/notifications";
|
||||
|
||||
import NotificationOverlay from '../components/overlay';
|
||||
import NotificationOverlay from "../components/overlay";
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
onMarkForDelete(id, yes) {
|
||||
@@ -13,7 +13,7 @@ const mapDispatchToProps = dispatch => ({
|
||||
});
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
show: state.getIn(['notifications', 'cleaningMode']),
|
||||
show: state.getIn(["notifications", "cleaningMode"]),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(NotificationOverlay);
|
||||
|
||||
Reference in New Issue
Block a user