about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-06 18:49:46 +0100
committerGitHub <noreply@github.com>2022-11-06 18:49:46 +0100
commit54101563bbadbfafd9291a867d7fbea6df3a8b7b (patch)
treefcf9a125f6ebc3ad4182fa0edcbd7101b33aebb0 /app/javascript/flavours/glitch/components
parent2f8fb49d1314db931385089bc9004a48700161ad (diff)
parent21d6bc16893a9dd24c5ef54cf2f554846c8eca5b (diff)
Merge pull request #1892 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r--app/javascript/flavours/glitch/components/account.js8
-rw-r--r--app/javascript/flavours/glitch/components/navigation_portal.js7
-rw-r--r--app/javascript/flavours/glitch/components/server_banner.js2
3 files changed, 14 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/components/account.js b/app/javascript/flavours/glitch/components/account.js
index 8bfc8e9dc..8e810ce5f 100644
--- a/app/javascript/flavours/glitch/components/account.js
+++ b/app/javascript/flavours/glitch/components/account.js
@@ -27,6 +27,7 @@ export default @injectIntl
 class Account extends ImmutablePureComponent {
 
   static propTypes = {
+    size: PropTypes.number,
     account: ImmutablePropTypes.map,
     onFollow: PropTypes.func.isRequired,
     onBlock: PropTypes.func.isRequired,
@@ -41,6 +42,10 @@ class Account extends ImmutablePureComponent {
     onActionClick: PropTypes.func,
   };
 
+  static defaultProps = {
+    size: 36,
+  };
+
   handleFollow = () => {
     this.props.onFollow(this.props.account);
   }
@@ -75,6 +80,7 @@ class Account extends ImmutablePureComponent {
       actionIcon,
       actionTitle,
       defaultAction,
+      size,
     } = this.props;
 
     if (!account) {
@@ -163,7 +169,7 @@ class Account extends ImmutablePureComponent {
       <div className='account'>
         <div className='account__wrapper'>
           <Permalink key={account.get('id')} className='account__display-name' 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={size} /></div>
             {mute_expires_at}
             <DisplayName account={account} />
           </Permalink>
diff --git a/app/javascript/flavours/glitch/components/navigation_portal.js b/app/javascript/flavours/glitch/components/navigation_portal.js
index 16a8ca3f5..90afa1da0 100644
--- a/app/javascript/flavours/glitch/components/navigation_portal.js
+++ b/app/javascript/flavours/glitch/components/navigation_portal.js
@@ -21,7 +21,12 @@ class NavigationPortal extends React.PureComponent {
   render () {
     return (
       <Switch>
-        <Route path='/@:acct/(tagged/:tagged?)?' component={AccountNavigation} />
+        <Route path='/@:acct' exact component={AccountNavigation} />
+        <Route path='/@:acct/tagged/:tagged?' exact component={AccountNavigation} />
+        <Route path='/@:acct/with_replies' exact component={AccountNavigation} />
+        <Route path='/@:acct/followers' exact component={AccountNavigation} />
+        <Route path='/@:acct/following' exact component={AccountNavigation} />
+        <Route path='/@:acct/media' exact component={AccountNavigation} />
         <Route component={DefaultNavigation} />
       </Switch>
     );
diff --git a/app/javascript/flavours/glitch/components/server_banner.js b/app/javascript/flavours/glitch/components/server_banner.js
index 9cb0ef13c..36e0ff238 100644
--- a/app/javascript/flavours/glitch/components/server_banner.js
+++ b/app/javascript/flavours/glitch/components/server_banner.js
@@ -61,7 +61,7 @@ class ServerBanner extends React.PureComponent {
           <div className='server-banner__meta__column'>
             <h4><FormattedMessage id='server_banner.administered_by' defaultMessage='Administered by:' /></h4>
 
-            <Account id={server.getIn(['contact', 'account', 'id'])} />
+            <Account id={server.getIn(['contact', 'account', 'id'])} size={36} />
           </div>
 
           <div className='server-banner__meta__column'>