Compare commits
2 Commits
28e716c52b
...
cbfd0c1798
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbfd0c1798 | ||
|
|
8540c7be54 |
@@ -11,7 +11,7 @@ interface Song {
|
||||
activations: number;
|
||||
}
|
||||
|
||||
type SortField = 'title' | 'artist';
|
||||
type SortField = 'title' | 'artist' | 'createdAt';
|
||||
type SortDirection = 'asc' | 'desc';
|
||||
|
||||
export default function AdminPage() {
|
||||
@@ -229,6 +229,12 @@ export default function AdminPage() {
|
||||
>
|
||||
Artist {sortField === 'artist' && (sortDirection === 'asc' ? '↑' : '↓')}
|
||||
</th>
|
||||
<th
|
||||
style={{ padding: '0.75rem', cursor: 'pointer', userSelect: 'none' }}
|
||||
onClick={() => handleSort('createdAt')}
|
||||
>
|
||||
Added {sortField === 'createdAt' && (sortDirection === 'asc' ? '↑' : '↓')}
|
||||
</th>
|
||||
<th style={{ padding: '0.75rem' }}>Activations</th>
|
||||
<th style={{ padding: '0.75rem' }}>Actions</th>
|
||||
</tr>
|
||||
@@ -258,6 +264,9 @@ export default function AdminPage() {
|
||||
style={{ padding: '0.25rem' }}
|
||||
/>
|
||||
</td>
|
||||
<td style={{ padding: '0.75rem', color: '#666', fontSize: '0.75rem' }}>
|
||||
{new Date(song.createdAt).toLocaleDateString('de-DE')}
|
||||
</td>
|
||||
<td style={{ padding: '0.75rem', color: '#666' }}>{song.activations}</td>
|
||||
<td style={{ padding: '0.75rem' }}>
|
||||
<div style={{ display: 'flex', gap: '0.5rem' }}>
|
||||
@@ -282,6 +291,9 @@ export default function AdminPage() {
|
||||
<>
|
||||
<td style={{ padding: '0.75rem', fontWeight: 'bold' }}>{song.title}</td>
|
||||
<td style={{ padding: '0.75rem' }}>{song.artist}</td>
|
||||
<td style={{ padding: '0.75rem', color: '#666', fontSize: '0.75rem' }}>
|
||||
{new Date(song.createdAt).toLocaleDateString('de-DE')}
|
||||
</td>
|
||||
<td style={{ padding: '0.75rem', color: '#666' }}>{song.activations}</td>
|
||||
<td style={{ padding: '0.75rem' }}>
|
||||
<div style={{ display: 'flex', gap: '0.5rem' }}>
|
||||
@@ -307,7 +319,7 @@ export default function AdminPage() {
|
||||
))}
|
||||
{paginatedSongs.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={5} style={{ padding: '1rem', textAlign: 'center', color: '#666' }}>
|
||||
<td colSpan={6} style={{ padding: '1rem', textAlign: 'center', color: '#666' }}>
|
||||
{searchQuery ? 'No songs found matching your search.' : 'No songs uploaded yet.'}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -4,6 +4,7 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
user: root
|
||||
restart: always
|
||||
ports:
|
||||
- "3010:3000"
|
||||
|
||||
Reference in New Issue
Block a user