0
0
Fork 0

Add a hashtag public link to the trending hashtag page (#17140)

* Add a hashtag public link to the hashtag management page

* Add support for element 'target' to Counter.js.
Remove 'rel' element.

* Update app/javascript/mastodon/components/admin/Counter.js

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
mayaeh 2022-03-26 10:52:51 +09:00 committed by GitHub
parent 6907605026
commit 52813830be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -33,6 +33,7 @@ export default class Counter extends React.PureComponent {
label: PropTypes.string.isRequired,
href: PropTypes.string,
params: PropTypes.object,
target: PropTypes.string,
};
state = {
@ -54,7 +55,7 @@ export default class Counter extends React.PureComponent {
}
render () {
const { label, href } = this.props;
const { label, href, target } = this.props;
const { loading, data } = this.state;
let content;
@ -100,7 +101,7 @@ export default class Counter extends React.PureComponent {
if (href) {
return (
<a href={href} className='sparkline'>
<a href={href} className='sparkline' target={target}>
{inner}
</a>
);