This commit is contained in:
Markos Gogoulos
2026-04-21 19:27:05 +03:00
parent c380b29c4b
commit 1a72d0a46c
8 changed files with 40 additions and 8 deletions
@@ -5,7 +5,7 @@ import { LinksContext, MemberContext, SiteContext } from '../../utils/contexts/'
import { PageStore, ProfilePageStore } from '../../utils/stores/';
import { PageActions, ProfilePageActions } from '../../utils/actions/';
import { CircleIconButton, PopupMain } from '../_shared';
import { translateString, inEmbeddedApp, inSelectMediaEmbedMode, isSelectMediaMode, isShareMediaDisabled } from '../../utils/helpers/';
import { translateString, inEmbeddedApp, inSelectMediaEmbedMode, isSelectMediaMode } from '../../utils/helpers/';
class ProfileSearchBar extends React.PureComponent {
constructor(props) {
@@ -373,7 +373,6 @@ class NavMenuInlineTabs extends React.PureComponent {
render() {
const isSelectMediaMode = inSelectMediaEmbedMode();
const shareMediaDisabled = isShareMediaDisabled();
// Append action=select_media to links when in select mode
const mediaLink = isSelectMediaMode
@@ -416,7 +415,7 @@ class NavMenuInlineTabs extends React.PureComponent {
link={sharedByMeLink}
/>
) : null}
{this.userIsAuthor && !shareMediaDisabled ? (
{this.userIsAuthor ? (
<InlineTab
id="shared_with_me"
isActive={'shared_with_me' === this.props.type}
@@ -11,7 +11,7 @@ import { ProfileMediaFilters } from '../components/search-filters/ProfileMediaFi
import { ProfileMediaTags } from '../components/search-filters/ProfileMediaTags';
import { ProfileMediaSharing } from '../components/search-filters/ProfileMediaSharing';
import { ProfileMediaSorting } from '../components/search-filters/ProfileMediaSorting';
import { inEmbeddedApp, inSelectMediaEmbedMode } from '../utils/helpers';
import { inEmbeddedApp, inSelectMediaEmbedMode, isShareMediaDisabled } from '../utils/helpers';
import { Page } from './_Page';
@@ -86,6 +86,7 @@ export class ProfileSharedWithMePage extends Page {
let requestUrl = this.state.requestUrl;
if (author) {
const excludeLtiEmbed = isShareMediaDisabled() ? '&exclude_lti_embed=1' : '';
if (this.state.query) {
requestUrl =
ApiUrlContext._currentValue.media +
@@ -93,6 +94,7 @@ export class ProfileSharedWithMePage extends Page {
author.id +
'&show=shared_with_me&q=' +
encodeURIComponent(this.state.query) +
excludeLtiEmbed +
this.state.filterArgs;
} else {
requestUrl =
@@ -100,6 +102,7 @@ export class ProfileSharedWithMePage extends Page {
'?author=' +
author.id +
'&show=shared_with_me' +
excludeLtiEmbed +
this.state.filterArgs;
}
}