Earn tab: progress hint shows at every stage (the claim-ready hint was unreachable); member guide /earning

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-12 17:41:13 -05:00
parent a6dcd02999
commit 1a83f4f2ff
4 changed files with 81 additions and 4 deletions
+6 -2
View File
@@ -1702,8 +1702,12 @@
+ '<button type="button" class="btn sec small" data-earnnext="campaigns">Launch a campaign with your ' + (st.earnedAvailable != null ? st.earnedAvailable : st.earned) + ' credits</button></div></div>';
if (box) box.querySelectorAll('[data-earnnext]').forEach(b => b.addEventListener('click', () => { if (b.dataset.earnnext === 'campaigns') setPane('campaigns'); else setEarnSub('visits'); }));
if ($('earnStartBtn')) $('earnStartBtn').hidden = true;
} else if ($('earnStartBtn')) $('earnStartBtn').hidden = false;
else if (done) $('earnHint').textContent = 'Set complete. Claim your ' + st.claimCredits + ' credits' + (st.streakDay > 1 ? ' (streak day ' + st.streakDay + ')' : '') + '.';
} else {
if ($('earnStartBtn')) $('earnStartBtn').hidden = done; // set done: the claim button takes over
$('earnHint').textContent = done
? 'Set complete. Claim your ' + st.claimCredits + ' credits' + (st.streakDay > 1 ? ' (streak day ' + st.streakDay + ')' : '') + '.'
: (st.views ? (st.target - st.views) + ' more to go, then claim ' + st.claimCredits + ' credits' + (st.streakDay > 1 ? ' (streak day ' + st.streakDay + ')' : '') + '.' : 'View ' + st.target + ' ads to unlock the daily claim of ' + st.claimCredits + ' credits' + (st.streakDay > 1 ? ' (streak day ' + st.streakDay + ')' : '') + '.');
}
return st;
} catch (e) { return null; }
}