[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,13 +1,13 @@
|
||||
// Package imports //
|
||||
import PropTypes from 'prop-types';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from "prop-types";
|
||||
import { PureComponent } from "react";
|
||||
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePropTypes from "react-immutable-proptypes";
|
||||
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import { me } from 'flavours/glitch/initial_state';
|
||||
import { Icon } from "flavours/glitch/components/icon";
|
||||
import { me } from "flavours/glitch/initial_state";
|
||||
|
||||
export default class StatusPrepend extends PureComponent {
|
||||
|
||||
@@ -20,7 +20,7 @@ export default class StatusPrepend extends PureComponent {
|
||||
|
||||
handleClick = (e) => {
|
||||
const { account, parseClick } = this.props;
|
||||
parseClick(e, `/@${account.get('acct')}`);
|
||||
parseClick(e, `/@${account.get("acct")}`);
|
||||
};
|
||||
|
||||
Message = () => {
|
||||
@@ -28,77 +28,77 @@ export default class StatusPrepend extends PureComponent {
|
||||
let link = (
|
||||
<a
|
||||
onClick={this.handleClick}
|
||||
href={account.get('url')}
|
||||
href={account.get("url")}
|
||||
className='status__display-name'
|
||||
>
|
||||
<b
|
||||
dangerouslySetInnerHTML={{
|
||||
__html : account.get('display_name_html') || account.get('username'),
|
||||
__html : account.get("display_name_html") || account.get("username"),
|
||||
}}
|
||||
/>
|
||||
</a>
|
||||
);
|
||||
switch (type) {
|
||||
case 'featured':
|
||||
return (
|
||||
<FormattedMessage id='status.pinned' defaultMessage='Pinned post' />
|
||||
);
|
||||
case 'reblogged_by':
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='status.reblogged_by'
|
||||
defaultMessage='{name} boosted'
|
||||
values={{ name : link }}
|
||||
/>
|
||||
);
|
||||
case 'favourite':
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.favourite'
|
||||
defaultMessage='{name} favorited your status'
|
||||
values={{ name : link }}
|
||||
/>
|
||||
);
|
||||
case 'reblog':
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.reblog'
|
||||
defaultMessage='{name} boosted your status'
|
||||
values={{ name : link }}
|
||||
/>
|
||||
);
|
||||
case 'status':
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.status'
|
||||
defaultMessage='{name} just posted'
|
||||
values={{ name: link }}
|
||||
/>
|
||||
);
|
||||
case 'poll':
|
||||
if (me === account.get('id')) {
|
||||
case "featured":
|
||||
return (
|
||||
<FormattedMessage id='status.pinned' defaultMessage='Pinned post' />
|
||||
);
|
||||
case "reblogged_by":
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.own_poll'
|
||||
defaultMessage='Your poll has ended'
|
||||
id='status.reblogged_by'
|
||||
defaultMessage='{name} boosted'
|
||||
values={{ name : link }}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
case "favourite":
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.poll'
|
||||
defaultMessage='A poll you have voted in has ended'
|
||||
id='notification.favourite'
|
||||
defaultMessage='{name} favorited your status'
|
||||
values={{ name : link }}
|
||||
/>
|
||||
);
|
||||
case "reblog":
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.reblog'
|
||||
defaultMessage='{name} boosted your status'
|
||||
values={{ name : link }}
|
||||
/>
|
||||
);
|
||||
case "status":
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.status'
|
||||
defaultMessage='{name} just posted'
|
||||
values={{ name: link }}
|
||||
/>
|
||||
);
|
||||
case "poll":
|
||||
if (me === account.get("id")) {
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.own_poll'
|
||||
defaultMessage='Your poll has ended'
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.poll'
|
||||
defaultMessage='A poll you have voted in has ended'
|
||||
/>
|
||||
);
|
||||
}
|
||||
case "update":
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.update'
|
||||
defaultMessage='{name} edited a post'
|
||||
values={{ name: link }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
case 'update':
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.update'
|
||||
defaultMessage='{name} edited a post'
|
||||
values={{ name: link }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
@@ -110,32 +110,32 @@ export default class StatusPrepend extends PureComponent {
|
||||
let iconId;
|
||||
|
||||
switch(type) {
|
||||
case 'favourite':
|
||||
iconId = 'star';
|
||||
break;
|
||||
case 'featured':
|
||||
iconId = 'thumb-tack';
|
||||
break;
|
||||
case 'poll':
|
||||
iconId = 'tasks';
|
||||
break;
|
||||
case 'reblog':
|
||||
case 'reblogged_by':
|
||||
iconId = 'retweet';
|
||||
break;
|
||||
case 'status':
|
||||
iconId = 'bell';
|
||||
break;
|
||||
case 'update':
|
||||
iconId = 'pencil';
|
||||
break;
|
||||
case "favourite":
|
||||
iconId = "star";
|
||||
break;
|
||||
case "featured":
|
||||
iconId = "thumb-tack";
|
||||
break;
|
||||
case "poll":
|
||||
iconId = "tasks";
|
||||
break;
|
||||
case "reblog":
|
||||
case "reblogged_by":
|
||||
iconId = "retweet";
|
||||
break;
|
||||
case "status":
|
||||
iconId = "bell";
|
||||
break;
|
||||
case "update":
|
||||
iconId = "pencil";
|
||||
break;
|
||||
}
|
||||
|
||||
return !type ? null : (
|
||||
<aside className={type === 'reblogged_by' || type === 'featured' ? 'status__prepend' : 'notification__message'}>
|
||||
<div className={type === 'reblogged_by' || type === 'featured' ? 'status__prepend-icon-wrapper' : 'notification__favourite-icon-wrapper'}>
|
||||
<aside className={type === "reblogged_by" || type === "featured" ? "status__prepend" : "notification__message"}>
|
||||
<div className={type === "reblogged_by" || type === "featured" ? "status__prepend-icon-wrapper" : "notification__favourite-icon-wrapper"}>
|
||||
<Icon
|
||||
className={`status__prepend-icon ${type === 'favourite' ? 'star-icon' : ''}`}
|
||||
className={`status__prepend-icon ${type === "favourite" ? "star-icon" : ""}`}
|
||||
id={iconId}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user