Allow scrolling back to search after generation.

Keeps the search UI visible in generated mode (so you can scroll up), but locks it to prevent changing choices until tapping New search.
This commit is contained in:
b1rdmania
2025-12-26 21:29:17 +00:00
parent 9c6a47ab4e
commit 134867cf93
2 changed files with 10 additions and 4 deletions
+3
View File
@@ -239,6 +239,9 @@
justify-content: center;
max-width: 720px;
}
.controls.locked {
opacity: 0.35;
}
button {
background: var(--color-surface);
+7 -4
View File
@@ -775,10 +775,13 @@ class MotifApp {
// collapse results when selected/generated
this.resultsSection.classList.toggle('collapsed', state === 'selected');
// Search affordances: hidden after generation (no choice)
const hideSearch = state === 'generated';
this.controlsEl.style.display = hideSearch ? 'none' : '';
this.status.style.display = hideSearch ? 'none' : '';
// Keep search visible so you can scroll back up, but lock it during generated mode.
const lockSearch = state === 'generated';
this.controlsEl.classList.toggle('locked', lockSearch);
this.songInput.disabled = lockSearch;
this.searchBtn.disabled = lockSearch;
// Keep status visible for layout continuity; just de-emphasize content in generated mode.
if (lockSearch) this.status.textContent = '';
// Selected pre-generation content
const showPreGen = state === 'selected';