This commit is contained in:
Markos Gogoulos
2026-02-11 21:09:15 +02:00
parent 98111234f8
commit f226c2fe1e
20 changed files with 45 additions and 25 deletions

View File

@@ -680,6 +680,17 @@
}
}
}
// Disable sticky navigation when in select_media mode (for LTI iframe)
&.fixed-nav[data-action="select_media"] {
.profile-nav {
position: relative;
top: auto;
left: auto;
right: auto;
z-index: 1;
}
}
}
.page-main {

View File

@@ -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 } from '../../utils/helpers/';
import { translateString, inEmbeddedApp, inSelectMediaEmbedMode, isSelectMediaMode } from '../../utils/helpers/';
class ProfileSearchBar extends React.PureComponent {
constructor(props) {
@@ -721,7 +721,11 @@ export default function ProfilePagesHeader(props) {
}, []);
return (
<div ref={profilePageHeaderRef} className={'profile-page-header' + (fixedNav ? ' fixed-nav' : '')}>
<div
ref={profilePageHeaderRef}
className={'profile-page-header' + (fixedNav ? ' fixed-nav' : '')}
{...(isSelectMediaMode() ? { 'data-action': 'select_media' } : {})}
>
{!props.hideChannelBanner && (
<span className="profile-banner-wrap">
{props.author.banner_thumbnail_url ? (

View File

@@ -14,4 +14,4 @@ export * from './quickSort';
export * from './requests';
export { translateString } from './translate';
export { replaceString } from './replacementStrings';
export * from './embeddedApp';
export { inEmbeddedApp, inSelectMediaEmbedMode, isSelectMediaMode } from './embeddedApp';

View File

@@ -195,13 +195,18 @@ class MediaPageStore extends EventEmitter {
this.emit('loaded_media_data');
}
this.loadPlaylists();
if (MediaCMS.features.media.actions.comment_mention === true) {
this.loadUsers();
}
// Skip loading playlists and comments when in embed mode (to reduce API calls)
const isEmbedMode = window.location.pathname.startsWith('/embed');
if (this.mediacms_config.member.can.readComment) {
this.loadComments();
if (!isEmbedMode) {
this.loadPlaylists();
if (MediaCMS.features.media.actions.comment_mention === true) {
this.loadUsers();
}
if (this.mediacms_config.member.can.readComment) {
this.loadComments();
}
}
}