feat: add greeting header and recently played row to home screen
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
a2f2f4f6c3
commit
fef8578a27
3 files changed
+14
-1
No files matched your search
@@ -92,6 +92,13 @@ export async function getArtistImage(artistId) {
|
||||
|
||||
// ─── HOME ───
|
||||
export async function loadHomeData() {
|
||||
const hour = new Date().getHours();
|
||||
const greeting = hour < 12 ? 'Guten Morgen' : hour < 18 ? 'Guten Tag' : 'Guten Abend';
|
||||
const name = S.cfg.user ? `, ${S.cfg.user}` : '';
|
||||
const el = document.getElementById('home-greeting');
|
||||
if (el) el.textContent = `${greeting}${name} 👋`;
|
||||
|
||||
loadAlbumRow('home-recent', 'getAlbumList2', '&type=recent&size=20');
|
||||
loadAlbumRow('home-random', 'getAlbumList2', '&type=random&size=20');
|
||||
loadAlbumRow('home-newest', 'getAlbumList2', '&type=newest&size=20');
|
||||
loadAlbumRow('home-frequent', 'getAlbumList2', '&type=frequent&size=20');
|
||||
|
||||
Reference in new issue
Block a user