diff --git a/components/snapshot/TrackEntries.vue b/components/snapshot/TrackEntries.vue index 9511a96..9ec703d 100644 --- a/components/snapshot/TrackEntries.vue +++ b/components/snapshot/TrackEntries.vue @@ -37,19 +37,34 @@ const formatRetentionText = (retention: number) => { return formattedText; }; + +const datatablePropsToEnable = computed(() => + props.page === 'snapshot' + ? { scrollable: true, scrollHeight: '500px' } + : { + paginator: true, + paginatorTemplate: + 'CurrentPageReport FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown', + currentPageReportTemplate: + 'Showing {first} to {last} of {totalRecords}', + rows: 10, + rowsPerPageOptions: [10, 20, 50, 100] + } +); + +const firstCellMarginTop = computed(() => + props.page === 'stats' ? '3.5rem' : '0' +); @@ -60,14 +75,16 @@ const formatRetentionText = (retention: number) => { - - - {{ artist.name }} - - , - + + + + {{ artist.name }} + + , + + @@ -78,12 +95,12 @@ const formatRetentionText = (retention: number) => { - + {{ formatDate(track.added_at) }} - + {{ formatDuration(track.duration_ms) }} @@ -108,3 +125,15 @@ const formatRetentionText = (retention: number) => { + +