diff --git a/cms/version.py b/cms/version.py index 5154ac80..e845926a 100644 --- a/cms/version.py +++ b/cms/version.py @@ -1 +1 @@ -VERSION = "8.08" +VERSION = "8.09" diff --git a/frontend/src/static/js/components/MediaListHeader.tsx b/frontend/src/static/js/components/MediaListHeader.tsx index 8b5cb81a..de944da8 100755 --- a/frontend/src/static/js/components/MediaListHeader.tsx +++ b/frontend/src/static/js/components/MediaListHeader.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { translateString, inEmbeddedApp } from '../utils/helpers/'; +import { translateString, inSelectMediaEmbedMode } from '../utils/helpers/'; interface MediaListHeaderProps { title?: string; @@ -11,12 +11,12 @@ interface MediaListHeaderProps { export const MediaListHeader: React.FC = (props) => { const viewAllText = props.viewAllText || translateString('VIEW ALL'); - const isEmbedMode = inEmbeddedApp(); + const isSelectMediaMode = inSelectMediaEmbedMode(); return (

{props.title}

- {!isEmbedMode && props.viewAllLink ? ( + {!isSelectMediaMode && props.viewAllLink ? (

{' '} diff --git a/frontend/src/static/js/components/list-item/MediaItem.jsx b/frontend/src/static/js/components/list-item/MediaItem.jsx index 06d951b1..52b5134e 100644 --- a/frontend/src/static/js/components/list-item/MediaItem.jsx +++ b/frontend/src/static/js/components/list-item/MediaItem.jsx @@ -1,13 +1,13 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useMediaItem } from '../../utils/hooks/'; -import { PositiveInteger, PositiveIntegerOrZero, inEmbeddedApp } from '../../utils/helpers/'; +import { PositiveInteger, PositiveIntegerOrZero, inSelectMediaEmbedMode } from '../../utils/helpers/'; import { MediaItemThumbnailLink, itemClassname } from './includes/items/'; import { Item } from './Item'; export function MediaItem(props) { const type = props.type; - const isEmbedMode = inEmbeddedApp(); + const isSelectMediaMode = inSelectMediaEmbedMode(); const [titleComponentOrig, descriptionComponent, thumbnailUrl, UnderThumbWrapperOrig, editMediaComponent, metaComponents, viewMediaComponent] = useMediaItem({ ...props, type }); @@ -21,14 +21,14 @@ export function MediaItem(props) { const ItemMain = ({ children }) =>
{children}
; - const titleComponent = isEmbedMode + const titleComponent = isSelectMediaMode ? () => : titleComponentOrig; - const UnderThumbWrapper = isEmbedMode ? ItemMain : UnderThumbWrapperOrig; + const UnderThumbWrapper = isSelectMediaMode ? ItemMain : UnderThumbWrapperOrig; function thumbnailComponent() { - if (isEmbedMode) { + if (isSelectMediaMode) { // In embed mode, render thumbnail without link const thumbStyle = thumbnailUrl ? { backgroundImage: "url('" + thumbnailUrl + "')" } : null; return ( @@ -57,13 +57,13 @@ export function MediaItem(props) { const finalClassname = containerClassname + (props.showSelection ? ' with-selection' : '') + (props.isSelected ? ' selected' : '') + - (props.hasAnySelection || isEmbedMode ? ' has-any-selection' : ''); + (props.hasAnySelection || isSelectMediaMode ? ' has-any-selection' : ''); const handleItemClick = (e) => { - const isEmbedMode = inEmbeddedApp(); + const isSelectMediaMode = inSelectMediaEmbedMode(); - // In embed mode or if there's any selection active, clicking the item should toggle selection - if ((isEmbedMode || props.hasAnySelection) && props.onCheckboxChange) { + // In select media mode or if there's any selection active, clicking the item should toggle selection + if ((isSelectMediaMode || props.hasAnySelection) && props.onCheckboxChange) { // Check if clicking on the checkbox itself, edit icon, or view icon if (e.target.closest('.item-selection-checkbox') || e.target.closest('.item-edit-icon') || @@ -93,12 +93,12 @@ export function MediaItem(props) {

)} - {!isEmbedMode && editMediaComponent()} - {!isEmbedMode && viewMediaComponent()} + {!isSelectMediaMode && editMediaComponent()} + {!isSelectMediaMode && viewMediaComponent()} {thumbnailComponent()} - {isEmbedMode ? ( + {isSelectMediaMode ? ( {titleComponent()} {metaComponents()} diff --git a/frontend/src/static/js/components/list-item/MediaItemAudio.jsx b/frontend/src/static/js/components/list-item/MediaItemAudio.jsx index 36d4ba3b..7e8dbd14 100644 --- a/frontend/src/static/js/components/list-item/MediaItemAudio.jsx +++ b/frontend/src/static/js/components/list-item/MediaItemAudio.jsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useMediaItem } from '../../utils/hooks/'; -import { PositiveIntegerOrZero, inEmbeddedApp } from '../../utils/helpers/'; +import { PositiveIntegerOrZero, inSelectMediaEmbedMode } from '../../utils/helpers/'; import { MediaDurationInfo } from '../../utils/classes/'; import { MediaPlaylistOptions } from '../media-playlist-options/MediaPlaylistOptions'; import { MediaItemDuration, MediaItemPlaylistIndex, itemClassname } from './includes/items/'; @@ -9,7 +9,7 @@ import { MediaItem } from './MediaItem'; export function MediaItemAudio(props) { const type = props.type; - const isEmbedMode = inEmbeddedApp(); + const isSelectMediaMode = inSelectMediaEmbedMode(); const [titleComponentOrig, descriptionComponent, thumbnailUrl, UnderThumbWrapperOrig, editMediaComponent, metaComponents, viewMediaComponent] = useMediaItem({ ...props, type }); @@ -23,11 +23,11 @@ export function MediaItemAudio(props) { const ItemMain = ({ children }) =>
{children}
; - const titleComponent = isEmbedMode + const titleComponent = isSelectMediaMode ? () => : titleComponentOrig; - const UnderThumbWrapper = isEmbedMode ? ItemMain : UnderThumbWrapperOrig; + const UnderThumbWrapper = isSelectMediaMode ? ItemMain : UnderThumbWrapperOrig; const _MediaDurationInfo = new MediaDurationInfo(); @@ -38,7 +38,7 @@ export function MediaItemAudio(props) { const durationISO8601 = _MediaDurationInfo.ISO8601(); function thumbnailComponent() { - if (isEmbedMode) { + if (isSelectMediaMode) { // In embed mode, render thumbnail without link return (
{ // In embed mode or if there's any selection active, clicking the item should toggle selection - if ((isEmbedMode || props.hasAnySelection) && props.onCheckboxChange) { + if ((isSelectMediaMode || props.hasAnySelection) && props.onCheckboxChange) { // Check if clicking on the checkbox itself, edit icon, or view icon if (e.target.closest('.item-selection-checkbox') || e.target.closest('.item-edit-icon') || @@ -135,12 +135,12 @@ export function MediaItemAudio(props) {
)} - {!isEmbedMode && editMediaComponent()} - {!isEmbedMode && viewMediaComponent()} + {!isSelectMediaMode && editMediaComponent()} + {!isSelectMediaMode && viewMediaComponent()} {thumbnailComponent()} - {isEmbedMode ? ( + {isSelectMediaMode ? ( {titleComponent()} {metaComponents()} diff --git a/frontend/src/static/js/components/list-item/MediaItemVideo.jsx b/frontend/src/static/js/components/list-item/MediaItemVideo.jsx index 24de48cd..f8982f49 100644 --- a/frontend/src/static/js/components/list-item/MediaItemVideo.jsx +++ b/frontend/src/static/js/components/list-item/MediaItemVideo.jsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useMediaItem } from '../../utils/hooks/'; -import { PositiveIntegerOrZero, inEmbeddedApp } from '../../utils/helpers/'; +import { PositiveIntegerOrZero, inSelectMediaEmbedMode } from '../../utils/helpers/'; import { MediaDurationInfo } from '../../utils/classes/'; import { MediaPlaylistOptions } from '../media-playlist-options/MediaPlaylistOptions.jsx'; import { MediaItemVideoPlayer, MediaItemDuration, MediaItemVideoPreviewer, MediaItemPlaylistIndex, itemClassname } from './includes/items/'; @@ -9,7 +9,7 @@ import { MediaItem } from './MediaItem'; export function MediaItemVideo(props) { const type = props.type; - const isEmbedMode = inEmbeddedApp(); + const isSelectMediaMode = inSelectMediaEmbedMode(); const [titleComponentOrig, descriptionComponent, thumbnailUrl, UnderThumbWrapperOrig, editMediaComponent, metaComponents, viewMediaComponent] = useMediaItem({ ...props, type }); @@ -23,11 +23,11 @@ export function MediaItemVideo(props) { const ItemMain = ({ children }) =>
{children}
; - const titleComponent = isEmbedMode + const titleComponent = isSelectMediaMode ? () => : titleComponentOrig; - const UnderThumbWrapper = isEmbedMode ? ItemMain : UnderThumbWrapperOrig; + const UnderThumbWrapper = isSelectMediaMode ? ItemMain : UnderThumbWrapperOrig; const _MediaDurationInfo = new MediaDurationInfo(); @@ -42,8 +42,8 @@ export function MediaItemVideo(props) { } function thumbnailComponent() { - if (isEmbedMode) { - // In embed mode, render thumbnail without link + if (isSelectMediaMode) { + // In select media mode, render thumbnail without link return (
{ - // In embed mode or if there's any selection active, clicking the item should toggle selection - if ((isEmbedMode || props.hasAnySelection) && props.onCheckboxChange) { + // In select media mode or if there's any selection active, clicking the item should toggle selection + if ((isSelectMediaMode || props.hasAnySelection) && props.onCheckboxChange) { // Check if clicking on the checkbox itself, edit icon, or view icon if (e.target.closest('.item-selection-checkbox') || e.target.closest('.item-edit-icon') || @@ -145,12 +145,12 @@ export function MediaItemVideo(props) {
)} - {!isEmbedMode && editMediaComponent()} - {!isEmbedMode && viewMediaComponent()} + {!isSelectMediaMode && editMediaComponent()} + {!isSelectMediaMode && viewMediaComponent()} {props.hasMediaViewer ? videoViewerComponent() : thumbnailComponent()} - {isEmbedMode ? ( + {isSelectMediaMode ? ( {titleComponent()} {metaComponents()} diff --git a/frontend/src/static/js/components/profile-page/ProfilePagesHeader.js b/frontend/src/static/js/components/profile-page/ProfilePagesHeader.js index cf20fce8..ec86c446 100644 --- a/frontend/src/static/js/components/profile-page/ProfilePagesHeader.js +++ b/frontend/src/static/js/components/profile-page/ProfilePagesHeader.js @@ -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 } from '../../utils/helpers/'; +import { translateString, inEmbeddedApp, inSelectMediaEmbedMode } from '../../utils/helpers/'; class ProfileSearchBar extends React.PureComponent { constructor(props) { @@ -372,7 +372,7 @@ class NavMenuInlineTabs extends React.PureComponent { } render() { - const isEmbedMode = inEmbeddedApp(); + const isSelectMediaMode = inSelectMediaEmbedMode(); return (