@@ -156,100 +387,50 @@ const PlaylistTrackEdit = ( {
variant="toolbar"
/>
-
-
- {
- setAttributes( { artist: artistValue } );
- } }
- />
- {
- setAttributes( { album: albumValue } );
- } }
- />
- {
- setAttributes( { title: titleValue } );
- } }
- />
-
-
-
- { __( 'Track image' ) }
-
-
- { !! image && (
-

- ) }
-
(
-
- ) }
- />
- { !! image && (
-
- ) }
-
-
-
- { !! image && (
-
- setAttributes( { imageAlt: value } )
- }
- help={
-
- { __(
- 'Describe the purpose of the image.'
- ) }
-
- }
- />
+ { isEditingSelectedTracks && (
+
-
+ imageButtonRef={ imageButton }
+ />
+ ) }
+ { ! hasSelectedTracks && (
+
{
+ setAttributes( { artist: artistValue } );
+ } }
+ album={ album }
+ onChangeAlbum={ ( albumValue ) => {
+ setAttributes( { album: albumValue } );
+ } }
+ title={ title }
+ onChangeTitle={ ( titleValue ) => {
+ setAttributes( { title: titleValue } );
+ } }
+ image={ image }
+ hasImage={ !! image }
+ imageAlt={ imageAlt || '' }
+ onSelectImage={ onSelectTrackImage }
+ onRemoveImage={ onRemoveTrackImage }
+ onChangeImageAlt={ ( value ) =>
+ setAttributes( { imageAlt: value } )
+ }
+ imageButtonRef={ imageButton }
+ />
+ ) }
{ !! temporaryURL && }