Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

VideoPress: Fix local video listed as VideoPress video
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useState } from 'react';
*/
import { VIDEO_PRIVACY_LEVELS, VIDEO_PRIVACY_LEVEL_PRIVATE } from '../../../state/constants';
import Checkbox from '../checkbox';
import ConnectVideoRow, { VideoRow, Stats } from '../video-row';
import ConnectVideoRow, { LocalVideoRow, Stats } from '../video-row';
import styles from './style.module.scss';
/**
* Types
Expand Down Expand Up @@ -151,7 +151,7 @@ export const LocalVideoList = ( {
return null;
}
return (
<VideoRow
<LocalVideoRow
key={ `local-video-${ video.id }` }
id={ video.id }
title={ video.title }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const VideoRow = ( {
disableActionButton = false,
disabled = false,
uploadProgress,
isLocalVideo = false,
}: VideoRowProps ) => {
const textRef = useRef( null );
const checkboxRef = useRef( null );
Expand Down Expand Up @@ -320,11 +321,17 @@ export const VideoRow = ( {
) }
</div>

<PublishFirstVideoPopover id={ id } anchor={ anchor } position="top center" />
{ ! isLocalVideo && (
<PublishFirstVideoPopover id={ id } anchor={ anchor } position="top center" />
) }
</div>
);
};

export const LocalVideoRow = ( props: VideoRowProps ) => {
return <VideoRow isLocalVideo={ true } { ...props } />;
};

export const ConnectVideoRow = ( { id, ...restProps }: VideoRowProps ) => {
const { isDeleting, uploading, processing, isUpdatingPoster, data, uploadProgress } = useVideo(
id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ type VideoRowBaseProps = {
* Adornment to be showed after title.
*/
disableActionButton?: boolean;
/**
* True when row is used to show a local video.
*/
isLocalVideo?: boolean;
};

type VideoPressVideoProps = VideoRowBaseProps &
Expand Down