From 3c11fa2471b2dd8198eaccb3a433d5a233459055 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 29 Jan 2026 20:06:30 +0000 Subject: [PATCH] Add progress indicator and make layout more compact - Remove loading div with rotating GIF - Add step progress indicator (1-2-3) at top - Progress updates as user moves through steps - Make step cards more compact (reduced padding/margins) - Smaller text for descriptions - Mobile-optimized progress indicator --- app/templates/index.html | 113 +++++++++++++++++++++++++++++++-------- 1 file changed, 90 insertions(+), 23 deletions(-) diff --git a/app/templates/index.html b/app/templates/index.html index 23d3601..35e5a91 100755 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -86,8 +86,8 @@ .step-card { background-color: #1a1a2e; border-radius: 12px; - padding: 20px; - margin-bottom: 20px; + padding: 16px; + margin-bottom: 12px; } .step-number { display: inline-flex; @@ -132,6 +132,43 @@ color: #888; margin-left: 10px; } + .progress-indicator { + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 20px; + gap: 8px; + } + .progress-step { + width: 36px; + height: 36px; + border-radius: 50%; + background-color: #2c3e50; + color: #888; + display: flex; + align-items: center; + justify-content: center; + font-weight: bold; + font-size: 14px; + transition: all 0.3s; + } + .progress-step.active { + background-color: #1db954; + color: white; + } + .progress-step.completed { + background-color: #1db954; + color: white; + } + .progress-line { + width: 40px; + height: 3px; + background-color: #2c3e50; + transition: background-color 0.3s; + } + .progress-line.completed { + background-color: #1db954; + } #mood-profile { display: none; } @@ -176,12 +213,24 @@ gap: 10px; } .step-card { - padding: 16px; + padding: 14px; border-radius: 10px; + margin-bottom: 10px; } .step-header h4 { font-size: 1.1rem; } + .progress-indicator { + margin-bottom: 14px; + } + .progress-step { + width: 30px; + height: 30px; + font-size: 12px; + } + .progress-line { + width: 30px; + } #playlists-container { max-height: 50vh !important; } @@ -237,26 +286,24 @@ - - -
-

Magic Music Generator

-

Create playlists based on the mood of your existing playlists

-
- -
+
+ +
+
1
+
+
2
+
+
3
+
-
+
1

Select a Playlist

-

Choose a playlist as your mood template

+

Choose a playlist as your mood template

Loading your playlists...

@@ -274,13 +321,13 @@

Select a Playlist

-
+
2

Mood Profile

-

Based on

+

Based on

@@ -301,11 +348,11 @@
Top Tags
-
+
3

Generate Playlist

-

Combine mood profile with your preferences

+

Combine mood profile with your preferences

@@ -432,18 +479,34 @@ $('#analyze-playlist-btn').prop('disabled', false); }); + // Update progress indicator + function updateProgress(step) { + // Reset all + $('.progress-step').removeClass('active completed'); + $('.progress-line').removeClass('completed'); + + // Mark completed steps + for (var i = 1; i < step; i++) { + $('#prog-' + i).addClass('completed'); + $('#prog-line-' + i).addClass('completed'); + } + // Mark current step active + $('#prog-' + step).addClass('active'); + } + // Analyze playlist $('#analyze-playlist-btn').click(function(e) { e.stopPropagation(); // Prevent triggering collapsed handler if (!selectedPlaylistId) return; $(this).prop('disabled', true).text('Analyzing...'); - $('#loading').show(); $.get('/api/playlist/' + selectedPlaylistId + '/analyze', function(response) { - $('#loading').hide(); $('#analyze-playlist-btn').prop('disabled', false).text('Analyze Selected Playlist'); + // Update progress + updateProgress(2); + // Collapse step 1 and set summary $('#step-1').addClass('collapsed'); $('#step-1-summary').text(selectedPlaylistName); @@ -475,7 +538,6 @@ scrollTop: $('#mood-profile').offset().top - 20 }, 300); }).fail(function(xhr) { - $('#loading').hide(); $('#analyze-playlist-btn').prop('disabled', false).text('Analyze Selected Playlist'); if (xhr.status === 401) { alert('Session expired. Please log in again.'); @@ -490,6 +552,9 @@ $('#continue-to-generator').click(function(e) { e.stopPropagation(); // Prevent triggering collapsed handler + // Update progress + updateProgress(3); + // Collapse step 2 and set summary $('#mood-profile').addClass('collapsed'); var topTags = []; @@ -516,8 +581,10 @@ if (stepId === 'step-1') { $('#mood-profile').addClass('collapsed').hide(); $('#generator-settings').hide(); + updateProgress(1); } else if (stepId === 'mood-profile') { $('#generator-settings').hide(); + updateProgress(2); } });