diff --git a/AudioCuesheetEditor/Shared/TrackList/TrackListItem.razor b/AudioCuesheetEditor/Shared/TrackList/TrackListItem.razor index f9bf3450..cfb6e292 100644 --- a/AudioCuesheetEditor/Shared/TrackList/TrackListItem.razor +++ b/AudioCuesheetEditor/Shared/TrackList/TrackListItem.razor @@ -33,94 +33,7 @@ along with Foobar. If not, see - @switch (_sessionStateContainer.CurrentViewMode) - { - case ViewMode.ViewModeRecord: - - - - @track.Position - break; - case ViewMode.ViewModeFull: - case ViewMode.ViewModeImport: - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - - - - - - - - - break; - } + @@ -217,10 +130,9 @@ along with Foobar. If not, see @code { - //TODO: More little components, like TrackLink, TrackSelection, etc. ;) //TODO: Localization - Validations? validations; EditTrackModal? modalTrackEdit; + Validations? validations; IEnumerable? autocompleteTrackArtists; IEnumerable? autocompleteTrackTitles; @@ -238,7 +150,7 @@ along with Foobar. If not, see [Parameter] public EventCallback> SelectedTracksChanged { get; set; } - [Parameter] + [Parameter, EditorRequired] public AudioPlayer? AudioPlayer { get; set; } public Cuesheet? Cuesheet @@ -301,14 +213,6 @@ along with Foobar. If not, see await EditTrackModal(copy); } - async Task OnPlayTrackClicked(Track track) - { - if (AudioPlayer != null) - { - await AudioPlayer.OnPlayTrackClicked(track); - } - } - void SelectedTrackChanged(Track track, bool selected) { var selectedTracks = new List(SelectedTracks); @@ -323,14 +227,6 @@ along with Foobar. If not, see SelectedTracksChanged.InvokeAsync(selectedTracks); } - void OnDeleteTrackClicked(Track track) - { - Cuesheet?.RemoveTrack(track); - var selectedTracks = new List(SelectedTracks); - selectedTracks.Remove(track); - SelectedTracksChanged.InvokeAsync(selectedTracks); - } - async Task OnReadDataAutocompleteTrackArtist(AutocompleteReadDataEventArgs autocompleteReadDataEventArgs) { if (!autocompleteReadDataEventArgs.CancellationToken.IsCancellationRequested) @@ -373,4 +269,11 @@ along with Foobar. If not, see break; } } + + void TrackDeleted(Track track) + { + var selectedTracks = new List(SelectedTracks); + selectedTracks.Remove(track); + SelectedTracksChanged.InvokeAsync(selectedTracks); + } } diff --git a/AudioCuesheetEditor/Shared/TrackList/TrackListItemControlColumn.razor b/AudioCuesheetEditor/Shared/TrackList/TrackListItemControlColumn.razor new file mode 100644 index 00000000..84a75095 --- /dev/null +++ b/AudioCuesheetEditor/Shared/TrackList/TrackListItemControlColumn.razor @@ -0,0 +1,212 @@ +