Change in-app links to keep you in-app (#20540)
* Change in-app links to keep you in-app * refactor Permalink into Link * rewrite link hrefs in status content * please linter * please linter again
This commit is contained in:
		
					parent
					
						
							
								ad66bbed62
							
						
					
				
			
			
				commit
				
					
						07229089a6
					
				
			
		
					 21 changed files with 52 additions and 94 deletions
				
			
		|  | @ -3,7 +3,7 @@ import PropTypes from 'prop-types'; | |||
| import ImmutablePropTypes from 'react-immutable-proptypes'; | ||||
| import ActionBar from './action_bar'; | ||||
| import Avatar from '../../../components/avatar'; | ||||
| import Permalink from '../../../components/permalink'; | ||||
| import { Link } from 'react-router-dom'; | ||||
| import IconButton from '../../../components/icon_button'; | ||||
| import { FormattedMessage } from 'react-intl'; | ||||
| import ImmutablePureComponent from 'react-immutable-pure-component'; | ||||
|  | @ -19,15 +19,15 @@ export default class NavigationBar extends ImmutablePureComponent { | |||
|   render () { | ||||
|     return ( | ||||
|       <div className='navigation-bar'> | ||||
|         <Permalink href={this.props.account.get('url')} to={`/@${this.props.account.get('acct')}`}> | ||||
|         <Link to={`/@${this.props.account.get('acct')}`}> | ||||
|           <span style={{ display: 'none' }}>{this.props.account.get('acct')}</span> | ||||
|           <Avatar account={this.props.account} size={46} /> | ||||
|         </Permalink> | ||||
|         </Link> | ||||
| 
 | ||||
|         <div className='navigation-bar__profile'> | ||||
|           <Permalink href={this.props.account.get('url')} to={`/@${this.props.account.get('acct')}`}> | ||||
|           <Link to={`/@${this.props.account.get('acct')}`}> | ||||
|             <strong className='navigation-bar__profile-account'>@{this.props.account.get('acct')}</strong> | ||||
|           </Permalink> | ||||
|           </Link> | ||||
| 
 | ||||
|           <a href='/settings/profile' className='navigation-bar__profile-edit'><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a> | ||||
|         </div> | ||||
|  |  | |||
|  | @ -50,7 +50,7 @@ class ReplyIndicator extends ImmutablePureComponent { | |||
|         <div className='reply-indicator__header'> | ||||
|           <div className='reply-indicator__cancel'><IconButton title={intl.formatMessage(messages.cancel)} icon='times' onClick={this.handleClick} inverted /></div> | ||||
| 
 | ||||
|           <a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} className='reply-indicator__display-name'> | ||||
|           <a href={`/@${status.getIn(['account', 'acct'])}`} onClick={this.handleAccountClick} className='reply-indicator__display-name'> | ||||
|             <div className='reply-indicator__display-avatar'><Avatar account={status.get('account')} size={24} /></div> | ||||
|             <DisplayName account={status.get('account')} /> | ||||
|           </a> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue