mirror of
https://github.com/andrepimenta/claude-code-chat.git
synced 2026-05-31 00:55:28 +08:00
Hide OpenCredits option when feature flag is disabled and bump to 2.0.5
Only show "Just try it · Pay as you go with OpenCredits" in the install modal when the OpenCredits feature flag is enabled for the user's region. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2839,6 +2839,10 @@ const getScript = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'htt
|
||||
if (checkout) checkout.style.display = 'none';
|
||||
if (funds) funds.style.display = 'none';
|
||||
|
||||
// Hide OpenCredits option if feature flag is disabled
|
||||
var ocOption = document.getElementById('installOpenCreditsOption');
|
||||
if (ocOption) ocOption.style.display = opencreditsEnabled ? '' : 'none';
|
||||
|
||||
sendStats('Login options shown');
|
||||
}
|
||||
|
||||
@@ -2872,6 +2876,10 @@ const getScript = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'htt
|
||||
const successEl = document.getElementById('installSuccess');
|
||||
successEl.style.display = 'flex';
|
||||
|
||||
// Hide OpenCredits option if feature flag is disabled
|
||||
const ocOption = document.getElementById('installOpenCreditsOption');
|
||||
if (ocOption) ocOption.style.display = opencreditsEnabled ? '' : 'none';
|
||||
|
||||
if (success) {
|
||||
sendStats('Install success');
|
||||
successEl.querySelector('.install-success-text').textContent = 'Installed';
|
||||
|
||||
Reference in New Issue
Block a user