fix: show "Start Application" when no saved session exists
Button defaults to green "Start Application" and only switches to white "Restart Application" when localStorage has saved progress. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4e4273c27b
commit
ccc79c0489
|
|
@ -556,7 +556,7 @@
|
||||||
<a href="#" onclick="startFormAndResume(); return false;" style="color: var(--forest); font-weight: 600;">Resume where you left off</a>
|
<a href="#" onclick="startFormAndResume(); return false;" style="color: var(--forest); font-weight: 600;">Resume where you left off</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-secondary" onclick="startForm()" style="font-size: 1.1rem; padding: 1rem 3rem;">Restart Application</button>
|
<button id="start-btn" class="btn btn-primary" onclick="startForm()" style="font-size: 1.1rem; padding: 1rem 3rem;">Start Application</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="progress-container" id="progress-container">
|
<div class="progress-container" id="progress-container">
|
||||||
|
|
@ -1050,6 +1050,10 @@
|
||||||
const saved = localStorage.getItem(STORAGE_KEY);
|
const saved = localStorage.getItem(STORAGE_KEY);
|
||||||
if (saved) {
|
if (saved) {
|
||||||
document.getElementById('resume-notice').style.display = 'block';
|
document.getElementById('resume-notice').style.display = 'block';
|
||||||
|
const btn = document.getElementById('start-btn');
|
||||||
|
btn.textContent = 'Restart Application';
|
||||||
|
btn.classList.remove('btn-primary');
|
||||||
|
btn.classList.add('btn-secondary');
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue