diff --git a/src/views/home.js b/src/views/home.js index 926e0d6..a36f55c 100644 --- a/src/views/home.js +++ b/src/views/home.js @@ -20,12 +20,25 @@ export async function getArtistImage(artistId) { } // ─── HOME ─── +const _greetW = [ + 'Ready for some beats,', "What's on the playlist,", 'Good vibes only,', + 'Let the music play,', 'Your soundtrack awaits,', 'Turn it up,', + 'Time to tune in,', 'Hit play and chill,', 'Music is the answer,', 'Welcome back,', +]; +const _greetN = [ + 'Ready for some beats?', "What's on the playlist today?", 'Good vibes only', + 'Let the music play', 'Your soundtrack awaits', 'Turn it up', 'Time to tune in', + 'Hit play and chill', 'Music is the answer', 'What are we listening to?', + 'Time to escape into music', 'Pick something great', +]; + 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 name = S.cfg.user || ''; + const g = name + ? `${_greetW[Math.floor(Math.random() * _greetW.length)]} ${name}` + : _greetN[Math.floor(Math.random() * _greetN.length)]; const el = document.getElementById('home-greeting'); - if (el) el.textContent = `${greeting}${name} 👋`; + if (el) el.textContent = g; loadHeroCard(); loadGenreSection();