Added unique photos and videos tab to profile

• Added:
- unique photos and videos tab to profile
- mediaType/media_type query string in api/statuses_controller

• Updated:
- /media to redirect to /photos
- AccountGallery, selector to accept mediaType and update on change in componentWillReceiveProps

• Removed:
- Generic "media" tab

• Todo:
- Create index for MediaAttachment.type
This commit is contained in:
mgabdev
2020-06-08 19:38:36 -04:00
parent 1f78bc6879
commit a5e99dd7c3
6 changed files with 70 additions and 25 deletions

View File

@@ -205,8 +205,11 @@ class SwitchingArea extends PureComponent {
<Redirect from='/@:username/following' to='/:username/following' />
<WrappedRoute path='/:username/following' page={ProfilePage} component={Following} content={children} />
<Redirect from='/@:username/media' to='/:username/media' />
<WrappedRoute path='/:username/media' page={ProfilePage} component={AccountGallery} content={children} />
<Redirect from='/@:username/media' to='/:username/photos' />
<Redirect from='/@:username/photos' to='/:username/photos' />
<Redirect from='/:username/media' to='/:username/photos' />
<WrappedRoute path='/:username/photos' page={ProfilePage} component={AccountGallery} content={children} componentParams={{ noSidebar: true, mediaType: 'photo' }} />
<WrappedRoute path='/:username/videos' page={ProfilePage} component={AccountGallery} content={children} componentParams={{ noSidebar: true, mediaType: 'video' }} />
<Redirect from='/@:username/likes' to='/:username/likes' />
<WrappedRoute path='/:username/likes' page={ProfilePage} component={LikedStatuses} content={children} />