Fix incorrect use of old WebUI paths (#16773)

* Fix incorrect use of old WebUI paths

PR #16171 renamed some routes but missed some occurrences.
Without #16772, this leads to unreachable routes in those cases.

* Fix floating action button being displayed on statuses and compose screen
master
Claire 3 years ago committed by GitHub
parent 11502ae46e
commit 6b19e1e632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/javascript/mastodon/features/direct_timeline/components/conversation.js
  2. 2
      app/javascript/mastodon/features/follow_recommendations/components/account.js
  3. 2
      app/javascript/mastodon/features/follow_recommendations/index.js
  4. 2
      app/javascript/mastodon/features/ui/components/columns_area.js

@ -81,7 +81,7 @@ class Conversation extends ImmutablePureComponent {
markRead(); markRead();
} }
this.context.router.history.push(`/statuses/${lastStatus.get('id')}`); this.context.router.history.push(`/@${lastStatus.getIn(['account', 'acct'])}/${lastStatus.get('id')}`);
} }
handleMarkAsRead = () => { handleMarkAsRead = () => {

@ -66,7 +66,7 @@ class Account extends ImmutablePureComponent {
return ( return (
<div className='account follow-recommendations-account'> <div className='account follow-recommendations-account'>
<div className='account__wrapper'> <div className='account__wrapper'>
<Permalink className='account__display-name account__display-name--with-note' title={account.get('acct')} href={account.get('url')} to={`/accounts/${account.get('id')}`}> <Permalink className='account__display-name account__display-name--with-note' title={account.get('acct')} href={account.get('url')} to={`/@${account.get('acct')}`}>
<div className='account__avatar-wrapper'><Avatar account={account} size={36} /></div> <div className='account__avatar-wrapper'><Avatar account={account} size={36} /></div>
<DisplayName account={account} /> <DisplayName account={account} />

@ -68,7 +68,7 @@ class FollowRecommendations extends ImmutablePureComponent {
} }
})); }));
router.history.push('/timelines/home'); router.history.push('/home');
} }
render () { render () {

@ -53,7 +53,7 @@ const messages = defineMessages({
publish: { id: 'compose_form.publish', defaultMessage: 'Toot' }, publish: { id: 'compose_form.publish', defaultMessage: 'Toot' },
}); });
const shouldHideFAB = path => path.match(/^\/statuses\/|^\/search|^\/getting-started|^\/start/); const shouldHideFAB = path => path.match(/^\/statuses\/|^\/@[^/]+\/\d+|^\/publish|^\/search|^\/getting-started|^\/start/);
export default @(component => injectIntl(component, { withRef: true })) export default @(component => injectIntl(component, { withRef: true }))
class ColumnsArea extends ImmutablePureComponent { class ColumnsArea extends ImmutablePureComponent {

Loading…
Cancel
Save