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:
@@ -239,6 +239,9 @@
|
||||
justify-content: center;
|
||||
max-width: 720px;
|
||||
}
|
||||
.controls.locked {
|
||||
opacity: 0.35;
|
||||
}
|
||||
|
||||
button {
|
||||
background: var(--color-surface);
|
||||
|
||||
+7
-4
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user