diff --git a/AudioCuesheetEditor/AudioCuesheetEditor.csproj b/AudioCuesheetEditor/AudioCuesheetEditor.csproj index d07c440b..9190636c 100644 --- a/AudioCuesheetEditor/AudioCuesheetEditor.csproj +++ b/AudioCuesheetEditor/AudioCuesheetEditor.csproj @@ -51,6 +51,8 @@ + + @@ -98,6 +100,8 @@ + + diff --git a/AudioCuesheetEditor/Resources/Localization/TrackList/de.json b/AudioCuesheetEditor/Resources/Localization/TrackList/de.json index 1407eb91..2e75cffa 100644 --- a/AudioCuesheetEditor/Resources/Localization/TrackList/de.json +++ b/AudioCuesheetEditor/Resources/Localization/TrackList/de.json @@ -1,13 +1,8 @@ { "culture": "de", "translations": { - "Add new track": "Neuen Titel hinzufügen", - "Display selection of tracks": "Auswahl einblenden", "Selection": "Auswahl", "Select all": "Wählen Sie alle Spuren für Mehrfachspuroperationen aus", - "Delete selected tracks": "Ausgewählte löschen", - "Hide selection of tracks": "Auswahl ausblenden", - "Delete all tracks": "Alle Titel löschen", "Controls": "Steuerung", "Artist": "Künstler", "Title": "Titel", @@ -19,7 +14,6 @@ "Save changes": "Änderungen speichern", "Confirmation required": "Bestätigung erforderlich", "Do you really want to delete all tracks?": "Möchten Sie wirklich alle Titel löschen?", - "Edit selected tracks": "Ausgewählte Titel bearbeiten", "Validation errors": "Validierungsfehler" } } \ No newline at end of file diff --git a/AudioCuesheetEditor/Resources/Localization/TrackList/en.json b/AudioCuesheetEditor/Resources/Localization/TrackList/en.json index 16d63fb6..c5a255f1 100644 --- a/AudioCuesheetEditor/Resources/Localization/TrackList/en.json +++ b/AudioCuesheetEditor/Resources/Localization/TrackList/en.json @@ -1,12 +1,8 @@ { "culture": "en", "translations": { - "Add new track": "Add new track", - "Display selection of tracks": "Display selection", "Selection": "Selection", "Select all": "Select all track for multiple track operations", - "Delete selected tracks": "Delete selected", - "Hide selection of tracks": "Hide selection", "Delete all tracks": "Delete all tracks", "Controls": "Controls", "Artist": "Artist", @@ -19,7 +15,6 @@ "Save changes": "Save changes", "Confirmation required": "Confirmation required", "Do you really want to delete all tracks?": "Do you really want to delete all tracks?", - "Edit selected tracks": "Edit selected tracks", "Validation errors": "Validation errors" } } \ No newline at end of file diff --git a/AudioCuesheetEditor/Resources/Localization/TrackListControlButtons/de.json b/AudioCuesheetEditor/Resources/Localization/TrackListControlButtons/de.json new file mode 100644 index 00000000..4830f203 --- /dev/null +++ b/AudioCuesheetEditor/Resources/Localization/TrackListControlButtons/de.json @@ -0,0 +1,13 @@ +{ + "culture": "de", + "translations": { + "Add new track": "Neuen Titel hinzufügen", + "Display selection of tracks": "Auswahl einblenden", + "Delete selected tracks": "Ausgewählte löschen", + "Hide selection of tracks": "Auswahl ausblenden", + "Delete all tracks": "Alle Titel löschen", + "Edit selected tracks": "Ausgewählte Titel bearbeiten", + "Pin table header": "Tabellenkopf anheften", + "Pin the table header to top, displaying all controls above the table while scrolling through the records": "Tabellenkopf anheften, um während des scrollens alle Buttons oberhalb anzuordnen" + } +} \ No newline at end of file diff --git a/AudioCuesheetEditor/Resources/Localization/TrackListControlButtons/en.json b/AudioCuesheetEditor/Resources/Localization/TrackListControlButtons/en.json new file mode 100644 index 00000000..a6a5a5a6 --- /dev/null +++ b/AudioCuesheetEditor/Resources/Localization/TrackListControlButtons/en.json @@ -0,0 +1,13 @@ +{ + "culture": "en", + "translations": { + "Add new track": "Add new track", + "Display selection of tracks": "Display selection", + "Delete selected tracks": "Delete selected", + "Hide selection of tracks": "Hide selection", + "Delete all tracks": "Delete all tracks", + "Edit selected tracks": "Edit selected tracks", + "Pin table header": "Pin table header", + "Pin the table header to top, displaying all controls above the table while scrolling through the records": "Pin the table header to top, displaying all controls above the table while scrolling through the records" + } +} \ No newline at end of file diff --git a/AudioCuesheetEditor/Shared/TrackList/TrackList.razor b/AudioCuesheetEditor/Shared/TrackList/TrackList.razor index 88e92d6a..763a8d3b 100644 --- a/AudioCuesheetEditor/Shared/TrackList/TrackList.razor +++ b/AudioCuesheetEditor/Shared/TrackList/TrackList.razor @@ -42,88 +42,19 @@ along with Foobar. If not, see } } - - - - - - - - @if (TrackSelectionVisible == false) - { - - - - } - else - { - - - - } - - - - - - - - - - - - - -
+ } - +
@if ((_sessionStateContainer.CurrentViewMode == ViewMode.ViewModeFull) && (TrackSelectionVisible)) @@ -168,13 +99,15 @@ along with Foobar. If not, see @code { + //TODO: Save trackselectionvisible and fixedheader to applicationOptions ModalDialog? modalDialog; EditTrackModal? modalTrackEdit; List selectedTracks = new(); - Boolean _trackSelectionVisible = false; + Boolean trackSelectionVisible = false; Validations? validations; Boolean revalidate = false; List TracksAttachedToValidateablePropertyChanged = new(); + Boolean fixedTableHeader = false; [Parameter] public AudioPlayer? AudioPlayer { get; set; } @@ -199,10 +132,10 @@ along with Foobar. If not, see public Boolean TrackSelectionVisible { - get => _trackSelectionVisible; + get => trackSelectionVisible; set { - _trackSelectionVisible = value; + trackSelectionVisible = value; selectedTracks = new(); } } diff --git a/AudioCuesheetEditor/Shared/TrackList/TrackListControlButtons.razor b/AudioCuesheetEditor/Shared/TrackList/TrackListControlButtons.razor new file mode 100644 index 00000000..f776f4a4 --- /dev/null +++ b/AudioCuesheetEditor/Shared/TrackList/TrackListControlButtons.razor @@ -0,0 +1,161 @@ + +@inject ITextLocalizer _localizer + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +@code { + [Parameter] + public EventCallback AddButtonClicked { get; set; } + + [Parameter] + public EventCallback EditSelectedTracksClicked { get; set; } + + [Parameter] + public EventCallback DeleteSelectedTracksClicked { get; set; } + + [Parameter] + public EventCallback DeleteAllTracksClicked { get; set; } + + [Parameter] + public Boolean FixedTableHeader { get; set; } + + [Parameter] + public EventCallback FixedTableHeaderChanged { get; set; } + + [Parameter] + public Boolean TrackSelectionVisible { get; set; } + + [Parameter] + public EventCallback TrackSelectionVisibleChanged { get; set; } + + [Parameter] + public IReadOnlyCollection? SelectedTracks { get; set; } + + String TooltipTextTrackSelectionVisible + { + get + { + if (TrackSelectionVisible) + { + return _localizer["Hide selection of tracks"]; + } + else + { + return _localizer["Display selection of tracks"]; + } + } + } +}