Replace glitch-soc's collapsed toots with upstream's “Read more” (#2916)

* Remove glitch-soc's post collapse feature

* Get rid of the infamous `parseClick`

* Remove unused CSS

* Use upstream's “Read More” implementation

* Update translation strings
This commit is contained in:
Claire
2024-12-22 20:27:32 +01:00
committed by GitHub
parent 28751ff042
commit d65f6c2f8a
17 changed files with 203 additions and 644 deletions

View File

@@ -15,27 +15,23 @@ import StarIcon from '@/material-icons/400-24px/star-fill.svg?react';
import { Icon } from 'flavours/glitch/components/icon';
import { me } from 'flavours/glitch/initial_state';
import { Permalink } from './permalink';
export default class StatusPrepend extends PureComponent {
static propTypes = {
type: PropTypes.string.isRequired,
account: ImmutablePropTypes.map.isRequired,
parseClick: PropTypes.func.isRequired,
notificationId: PropTypes.number,
children: PropTypes.node,
};
handleClick = (e) => {
const { account, parseClick } = this.props;
parseClick(e, `/@${account.get('acct')}`);
};
Message = () => {
const { type, account } = this.props;
let link = (
<a
<Permalink
onClick={this.handleClick}
to={`/@${account.get('acct')}`}
href={account.get('url')}
className='status__display-name'
data-hover-card-account={account.get('id')}
@@ -47,7 +43,7 @@ export default class StatusPrepend extends PureComponent {
}}
/>
</bdi>
</a>
</Permalink>
);
switch (type) {
case 'featured':